Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, November 13, 2026

Diff for Metafox/subst.inc.php between version 1.5 and 1.6

version 1.5, 2005/10/02 18:34:49 version 1.6, 2005/11/28 10:11:32
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/subst.inc.php,v 1.4 2005/08/13 23:06:13 nepto Exp $ */  /* $Platon: Metafox/subst.inc.php,v 1.5 2005/10/02 18:34:49 nepto Exp $ */
   
 require_once 'config/loader.inc.php';  require_once 'config/loader.inc.php';
 Platon::redirect_test(basename(__FILE__), $ezin_cfg['url']);  Platon::redirect_test(basename(__FILE__), $ezin_cfg['url']);
Line 83  $ezin_tmpl_key   = '';
Line 83  $ezin_tmpl_key   = '';
 $ezin_db_author  = '';  $ezin_db_author  = '';
 $ezin_db_section = '';  $ezin_db_section = '';
 $ezin_db_article = '';  $ezin_db_article = '';
 if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author') {  if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author') { /* {{{ */
         $ezin_db_author = ezin_get_author($ezin_cgi['author_id']);          $ezin_db_author = ezin_get_author($ezin_cgi['author_id']);
         if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') {          if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') {
                 ezin_handle_author_link($ezin_db_author['author_link']);                  ezin_handle_author_link($ezin_db_author['author_link']);
Line 97  if ($ezin_cgi['author_id'] > 0 || $ezin_
Line 97  if ($ezin_cgi['author_id'] > 0 || $ezin_
                         $ezin_db_author['search'] = $matches[1];                          $ezin_db_author['search'] = $matches[1];
                 }                  }
         }          }
 } else if ($ezin_cgi['section_id'] > 0 || $ezin_cgi['output'] == 'section') {  } /* }}} */
   else if ($ezin_cgi['section_id'] > 0 || $ezin_cgi['output'] == 'section') { /* {{{ */
         $ezin_db_section = ezin_get_section($ezin_cgi['section_id']);          $ezin_db_section = ezin_get_section($ezin_cgi['section_id']);
         if (! empty($ezin_db_section['section_link']) && $ezin_cgi['output'] == 'section') {          if (! empty($ezin_db_section['section_link']) && $ezin_cgi['output'] == 'section') {
                 ezin_handle_section_link($ezin_db_section['section_link']);                  ezin_handle_section_link($ezin_db_section['section_link']);
Line 111  $ezin_db_section['section_editorial_titl
Line 112  $ezin_db_section['section_editorial_titl
                         $ezin_tmpl_key = $ezin_sys['tmpl']['delim'].$ezin_db_article['article_template_key'];                          $ezin_tmpl_key = $ezin_sys['tmpl']['delim'].$ezin_db_article['article_template_key'];
                 }                  }
         }          }
 }  } /* }}} */
   
   
 /*  /*
  * Main template object   * Main template object
  */   */
   
 switch ($ezin_cgi['output']) {  switch ($ezin_cgi['output']) { /* {{{ */
         default:          default:
                 die('input method fatal error: '.$ezin_cgi['output']);                  die('input method fatal error: '.$ezin_cgi['output']);
                 break;                  break;
Line 164  switch ($ezin_cgi['output']) {
Line 165  switch ($ezin_cgi['output']) {
                 }                  }
                 $ezin_tmpl_main_fname  = $ezin_sys['tmpl']['author'].$ezin_tmpl_key;                  $ezin_tmpl_main_fname  = $ezin_sys['tmpl']['author'].$ezin_tmpl_key;
                 break;                  break;
 }  } /* }}} */
   
 $ezin_tmpl_main = new HTML_Template_Platon($ezin_tmpl_main_fname);  $ezin_tmpl_main = new HTML_Template_Platon($ezin_tmpl_main_fname);
   
Line 172  $ezin_tmpl_main = new HTML_Template_Plat
Line 173  $ezin_tmpl_main = new HTML_Template_Plat
  * Substitute current section parameters   * Substitute current section parameters
  */   */
   
 if ($ezin_db_author != '') {  if ($ezin_db_author != '') { /* {{{ */
         ezin_author_link_process($ezin_db_author);          ezin_author_link_process($ezin_db_author);
         ezin_author_counts_process($ezin_db_author);          ezin_author_counts_process($ezin_db_author);
   
Line 181  if ($ezin_db_author != '') {
Line 182  if ($ezin_db_author != '') {
         ezin_process_text_flags($ezin_db_author['author_description'], 'author');          ezin_process_text_flags($ezin_db_author['author_description'], 'author');
   
         $ezin_tmpl_main->set($ezin_db_author);          $ezin_tmpl_main->set($ezin_db_author);
 }  } /* }}} */
   
 if ($ezin_db_section != '') {  if ($ezin_db_section != '') { /* {{{ */
         ezin_section_link_process($ezin_db_section);          ezin_section_link_process($ezin_db_section);
         ezin_section_counts_process($ezin_db_section);          ezin_section_counts_process($ezin_db_section);
         if (isset($ezin_db_section['section_editorial_timestamp'])) {          if (isset($ezin_db_section['section_editorial_timestamp'])) {
Line 205  if ($ezin_db_section != '') {
Line 206  if ($ezin_db_section != '') {
         }          }
   
         $ezin_tmpl_main->set($ezin_db_section);          $ezin_tmpl_main->set($ezin_db_section);
 }  } /* }}} */
   
 /*  /*
  * Build up sections list   * Build up sections list
  */   */
   
 if ($ezin_tmpl_main->isVar('section_items')) {  if ($ezin_tmpl_main->isVar('section_items')) { /* {{{ */
         $cache_ar = ezin_cache_load('S'.@$ezin_cgi['lang']);          $cache_ar = ezin_cache_load('S'.@$ezin_cgi['lang']);
         if (intval($cache_ar['timestamp']) <= 0) {          if (intval($cache_ar['timestamp']) <= 0) {
                 $item = new HTML_Template_Platon($ezin_sys['tmpl']['section_item'].$ezin_tmpl_key,                  $item = new HTML_Template_Platon($ezin_sys['tmpl']['section_item'].$ezin_tmpl_key,
Line 248  if ($ezin_tmpl_main->isVar('section_item
Line 249  if ($ezin_tmpl_main->isVar('section_item
         if ($cache_ar['var_var']) {          if ($cache_ar['var_var']) {
                 $ezin_tmpl_main->set(ezin_get_section_list_counts($ezin_cgi['lang']));                  $ezin_tmpl_main->set(ezin_get_section_list_counts($ezin_cgi['lang']));
         }          }
 }  } /* }}} */
   
 /*  /*
  * Building articles list   * Building articles list
  */   */
   
 if ($ezin_tmpl_main->isVar('article_items') && ($ezin_db_section != '' || $ezin_db_author != '')) {  if ($ezin_tmpl_main->isVar('article_items') && ($ezin_db_section != '' || $ezin_db_author != '')) { /* {{{ */
         $cache_id   = $ezin_db_section != '' ? 'S'.@$ezin_db_section['section_id']          $cache_id   = $ezin_db_section != '' ? 'S'.@$ezin_db_section['section_id']
                 : 'U'.@$ezin_db_author['author_id'].$ezin_cgi['lang'];                  : 'U'.@$ezin_db_author['author_id'].$ezin_cgi['lang'];
         $cache_ar   = ezin_cache_load($cache_id);          $cache_ar   = ezin_cache_load($cache_id);
Line 300  if ($ezin_tmpl_main->isVar('article_item
Line 301  if ($ezin_tmpl_main->isVar('article_item
         if ($cache_ar['var_var']) {          if ($cache_ar['var_var']) {
                 $ezin_tmpl_main->set(ezin_get_article_list_counts($section_id, $author_id, $limit, $ezin_cgi['lang']));                  $ezin_tmpl_main->set(ezin_get_article_list_counts($section_id, $author_id, $limit, $ezin_cgi['lang']));
         }          }
 }  } /* }}} */
   
   
 /*  /*
  * Gets and substitute current article parameters (if article is set)   * Gets and substitute current article parameters (if article is set)
  */   */
   
 if ($ezin_db_article != '' && ! empty($ezin_cgi['article_id'])) {  if ($ezin_db_article != '' && ! empty($ezin_cgi['article_id'])) { /* {{{ */
         ezin_author_link_process($ezin_db_article, 'article_');          ezin_author_link_process($ezin_db_article, 'article_');
         ezin_section_link_process($ezin_db_article, 'article_');          ezin_section_link_process($ezin_db_article, 'article_');
         ezin_article_link_process($ezin_db_article);          ezin_article_link_process($ezin_db_article);
Line 353  if ($ezin_db_article != '' && ! empty($e
Line 354  if ($ezin_db_article != '' && ! empty($e
                 }                  }
                 $ezin_tmpl_main->setCode('message_full_items', $items);                  $ezin_tmpl_main->setCode('message_full_items', $items);
         }          }
 }  } /* }}} */
   
 /*  /*
  * Gets and substitute current message parameters (if message is set)   * Gets and substitute current message parameters (if message is set)
  */   */
   
 if (! is_array($ezin_cgi['message_id']) && ! empty($ezin_cgi['message_id'])) {  if (! is_array($ezin_cgi['message_id']) && ! empty($ezin_cgi['message_id'])) { /* {{{ */
         $ezin_db_message = ezin_get_message($ezin_cgi['message_id']);          $ezin_db_message = ezin_get_message($ezin_cgi['message_id']);
   
         ezin_handle_special_tags($ezin_db_message['message_article_bodytext'], $ezin_db_message['message_article_bodytext_flags']);          ezin_handle_special_tags($ezin_db_message['message_article_bodytext'], $ezin_db_message['message_article_bodytext_flags']);
Line 379  if (! is_array($ezin_cgi['message_id'])
Line 380  if (! is_array($ezin_cgi['message_id'])
         }          }
 } else {  } else {
         $ezin_tmpl_main->set('message_id', '');          $ezin_tmpl_main->set('message_id', '');
 }  } /* }}} */
   
 if ($ezin_cgi['output'] == 'message') {  if ($ezin_cgi['output'] == 'message') { /* {{{ */
         $ezin_tmpl_main->set(array(          $ezin_tmpl_main->set(array(
                 // Message reply fields                  // Message reply fields
                 'message_reply_subject'  => @$ezin_cgi['message_reply_subject'],                  'message_reply_subject'  => @$ezin_cgi['message_reply_subject'],
Line 403  if ($ezin_cgi['output'] == 'message') {
Line 404  if ($ezin_cgi['output'] == 'message') {
                 'message_save_author_missing'   => intval(@$ezin_cgi['message_save_author_missing']),                  'message_save_author_missing'   => intval(@$ezin_cgi['message_save_author_missing']),
                 'message_save_message_missing'  => intval(@$ezin_cgi['message_save_message_missing']),                  'message_save_message_missing'  => intval(@$ezin_cgi['message_save_message_missing']),
                                 ));                                  ));
 }  } /* }}} */
   
 ezin_substitute_basic_properties($ezin_tmpl_main);  ezin_substitute_basic_properties($ezin_tmpl_main);
   
   /* Modeline for ViM {{{
    * vim: set ts=4:
    * vim600: fdm=marker fdl=0 fdc=0:
    * }}} */
   
 ?>  ?>

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top