includes/template.php
changeset 355 d15e4411ef65
parent 349 fdaf9070566c
child 370 b251818286b1
equal deleted inserted replaced
354:979d99a0b00e 355:d15e4411ef65
  1902     global $lang;
  1902     global $lang;
  1903     global $db, $session, $paths, $template, $plugins; // Common objects
  1903     global $db, $session, $paths, $template, $plugins; // Common objects
  1904     $tplvars = $this->extract_vars('elements.tpl');
  1904     $tplvars = $this->extract_vars('elements.tpl');
  1905     $tb = '';
  1905     $tb = '';
  1906     // Get the "article" button text (depends on namespace)
  1906     // Get the "article" button text (depends on namespace)
  1907     if(defined('IN_ENANO_INSTALL')) $ns = $lang->get('meta_btn_article');
  1907     if(defined('IN_ENANO_INSTALL') && is_object($lang)) $ns = $lang->get('meta_btn_article');
  1908     else $ns = 'system error page';
  1908     else $ns = 'system error page';
  1909     $t = str_replace('{FLAGS}', 'onclick="return false;" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']);
  1909     $t = str_replace('{FLAGS}', 'onclick="return false;" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']);
  1910     $t = str_replace('{HREF}', '#', $t);
  1910     $t = str_replace('{HREF}', '#', $t);
  1911     $t = str_replace('{TEXT}', $ns, $t);
  1911     $t = str_replace('{TEXT}', $ns, $t);
  1912     $tb .= $t;
  1912     $tb .= $t;
  1940     
  1940     
  1941     // The rewritten template engine will process all required vars during the load_template stage instead of (cough) re-processing everything each time around.
  1941     // The rewritten template engine will process all required vars during the load_template stage instead of (cough) re-processing everything each time around.
  1942     $tpl_strings = Array(
  1942     $tpl_strings = Array(
  1943       'PAGE_NAME'=>$this_page,
  1943       'PAGE_NAME'=>$this_page,
  1944       'PAGE_URLNAME'=>'Null',
  1944       'PAGE_URLNAME'=>'Null',
  1945       'SITE_NAME'=> ( defined('IN_ENANO_INSTALL') ) ? $lang->get('meta_site_name') : 'Critical error',
  1945       'SITE_NAME'=> ( defined('IN_ENANO_INSTALL') && is_object($lang) ) ? $lang->get('meta_site_name') : 'Critical error',
  1946       'USERNAME'=>'admin',
  1946       'USERNAME'=>'admin',
  1947       'SITE_DESC'=>( defined('IN_ENANO_INSTALL') ) ? $lang->get('meta_site_desc') : 'This site is experiencing a problem and cannot load.',
  1947       'SITE_DESC'=>( defined('IN_ENANO_INSTALL') && is_object($lang) ) ? $lang->get('meta_site_desc') : 'This site is experiencing a problem and cannot load.',
  1948       'TOOLBAR'=>$tb,
  1948       'TOOLBAR'=>$tb,
  1949       'SCRIPTPATH'=>scriptPath,
  1949       'SCRIPTPATH'=>scriptPath,
  1950       'CONTENTPATH'=>contentPath,
  1950       'CONTENTPATH'=>contentPath,
  1951       'ADMIN_SID_QUES'=>$asq,
  1951       'ADMIN_SID_QUES'=>$asq,
  1952       'ADMIN_SID_AMP'=>$asa,
  1952       'ADMIN_SID_AMP'=>$asa,
  1953       'ADMIN_SID_AMP_HTML'=>'',
  1953       'ADMIN_SID_AMP_HTML'=>'',
  1954       'ADDITIONAL_HEADERS'=>$this->additional_headers,
  1954       'ADDITIONAL_HEADERS'=>$this->additional_headers,
  1955       'SIDEBAR_EXTRA'=>'',
  1955       'SIDEBAR_EXTRA'=>'',
  1956       'COPYRIGHT'=>( defined('IN_ENANO_INSTALL') ) ? $lang->get('meta_enano_copyright') : ( defined('ENANO_CONFIG_FETCHED') ? getConfig('copyright_notice') : '' ),
  1956       'COPYRIGHT'=>( defined('IN_ENANO_INSTALL') && is_object($lang) ) ? $lang->get('meta_enano_copyright') : ( defined('ENANO_CONFIG_FETCHED') ? getConfig('copyright_notice') : '' ),
  1957       'TOOLBAR_EXTRAS'=>'',
  1957       'TOOLBAR_EXTRAS'=>'',
  1958       'REQUEST_URI'=>( isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '' ).$_SERVER['REQUEST_URI'],
  1958       'REQUEST_URI'=>( isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '' ).$_SERVER['REQUEST_URI'],
  1959       'STYLE_LINK'=>$slink,
  1959       'STYLE_LINK'=>$slink,
  1960       'LOGOUT_LINK'=>'',
  1960       'LOGOUT_LINK'=>'',
  1961       'THEME_LINK'=>'',
  1961       'THEME_LINK'=>'',