includes/template.php
changeset 286 b2f985e4cef3
parent 276 acfdccf7a2bf
child 287 f6d144cba8a9
equal deleted inserted replaced
285:7846d45bd250 286:b2f985e4cef3
   746       'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme,
   746       'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme,
   747       'THEME_ID'=>$this->theme,
   747       'THEME_ID'=>$this->theme,
   748       'STYLE_ID'=>$this->style,
   748       'STYLE_ID'=>$this->style,
   749       'JS_DYNAMIC_VARS'=>$js_dynamic,
   749       'JS_DYNAMIC_VARS'=>$js_dynamic,
   750       'UNREAD_PMS'=>$session->unread_pms,
   750       'UNREAD_PMS'=>$session->unread_pms,
   751       'URL_ABOUT_ENANO' => makeUrlNS('Special', 'About_Enano', '', true)
   751       'URL_ABOUT_ENANO' => makeUrlNS('Special', 'About_Enano', '', true),
       
   752       'REPORT_URI' => makeUrl($paths->page, 'do=sql_report', true)
   752       );
   753       );
   753     
   754     
   754     foreach ( $paths->nslist as $ns_id => $ns_prefix )
   755     foreach ( $paths->nslist as $ns_id => $ns_prefix )
   755     {
   756     {
   756       $tpl_strings[ 'NS_' . strtoupper($ns_id) ] = $ns_prefix;
   757       $tpl_strings[ 'NS_' . strtoupper($ns_id) ] = $ns_prefix;
  1045         
  1046         
  1046         if ( !isset($cond) || ( isset($cond) && !is_string($cond) ) )
  1047         if ( !isset($cond) || ( isset($cond) && !is_string($cond) ) )
  1047           continue;
  1048           continue;
  1048         
  1049         
  1049         $tag_complete = <<<TPLCODE
  1050         $tag_complete = <<<TPLCODE
  1050         ';
  1051 ';
  1051         /* START OF CONDITION: $type ($test) */
  1052         /* START OF CONDITION: $type ($test) */
  1052         if ( $cond )
  1053         if ( $cond )
  1053         {
  1054         {
  1054           echo '$particle_true';
  1055           echo '$particle_true';
  1055         /* ELSE OF CONDITION: $type ($test) */
  1056         /* ELSE OF CONDITION: $type ($test) */
  1603     $right = '';
  1604     $right = '';
  1604     
  1605     
  1605     if ( !$this->fetch_block('Links') )
  1606     if ( !$this->fetch_block('Links') )
  1606       $this->initLinksWidget();
  1607       $this->initLinksWidget();
  1607     
  1608     
  1608     $q = $db->sql_query('SELECT item_id,sidebar_id,block_name,block_type,block_content FROM '.table_prefix.'sidebar WHERE item_enabled=1 ORDER BY sidebar_id ASC, item_order ASC;');
  1609     $q = $db->sql_query('SELECT item_id,sidebar_id,block_name,block_type,block_content FROM '.table_prefix.'sidebar' . "\n"
       
  1610                            . '  WHERE item_enabled=1 ORDER BY sidebar_id ASC, item_order ASC;');
  1609     if(!$q) $db->_die('The sidebar text data could not be selected.');
  1611     if(!$q) $db->_die('The sidebar text data could not be selected.');
  1610     
  1612     
  1611     $vars = $this->extract_vars('elements.tpl');
  1613     $vars = $this->extract_vars('elements.tpl');
  1612     
  1614     
  1613     if(isset($vars['sidebar_top'])) 
  1615     if(isset($vars['sidebar_top'])) 
  1792 /**
  1794 /**
  1793  * A version of the template compiler that does not rely at all on the other parts of Enano. Used during installation and for showing
  1795  * A version of the template compiler that does not rely at all on the other parts of Enano. Used during installation and for showing
  1794  * "critical error" messages. ** REQUIRES ** the Oxygen theme.
  1796  * "critical error" messages. ** REQUIRES ** the Oxygen theme.
  1795  */
  1797  */
  1796 
  1798 
  1797 class template_nodb {
  1799 class template_nodb
       
  1800 {
  1798   var $fading_button, $tpl_strings, $tpl_bool, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list;
  1801   var $fading_button, $tpl_strings, $tpl_bool, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list;
  1799   function __construct() {
  1802   function __construct() {
  1800     
  1803     
  1801     $this->tpl_bool    = Array();
  1804     $this->tpl_bool    = Array();
  1802     $this->tpl_strings = Array();
  1805     $this->tpl_strings = Array();