# HG changeset patch # User Dan # Date 1216764233 18000 # Node ID b2c51a68209b1630ab665dc7231fb4bc2e1fc7c2 # Parent 18dbf386d35648c1907dc069baffdf32d08e9813 Fixed unused $admintitle variable in $template->fading_button code generation; fixed missing CDNPATH, JS_HEADER, and JS_FOOTER in template_nodb; localized onpage_lbl_page_external diff -r 18dbf386d356 -r b2c51a68209b includes/template.php --- a/includes/template.php Tue Jul 22 17:01:42 2008 -0500 +++ b/includes/template.php Tue Jul 22 17:03:53 2008 -0500 @@ -56,10 +56,6 @@ $this->plugin_blocks = Array(); $this->theme_loaded = false; - $this->fading_button = '
'; - $this->theme_list = Array(); $this->named_theme_list = Array(); @@ -195,6 +191,13 @@ function process_theme_acls() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + + // generate the fading button - needs to be done after sessions are started + $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? ' title="' . $lang->get('sidebar_btn_enanopowered_admin_tip') . '"' : ''; + $this->fading_button = ''; // For each theme, check ACLs and delete from RAM if not authorized foreach ( $this->theme_list as $i => $theme ) @@ -559,7 +562,7 @@ $ns = $lang->get('onpage_lbl_page_category'); break; case "Anonymous": - $ns = 'external page'; + $ns = $lang->get('onpage_lbl_page_external'); break; } $this->namespace_string = $ns; @@ -980,12 +983,6 @@ $ash = ''; } - $code = $plugins->setHook('compile_template'); - foreach ( $code as $cmd ) - { - eval($cmd); - } - // Set up javascript includes // these depend heavily on whether we have a CDN to work with or not if ( getConfig('cdn_path') ) @@ -1034,6 +1031,12 @@ JSEOF; } + $code = $plugins->setHook('compile_template'); + foreach ( $code as $cmd ) + { + eval($cmd); + } + // Some additional sidebar processing if ( $this->sidebar_extra != '' ) { @@ -2189,10 +2192,9 @@ function initLinksWidget() { global $db, $session, $paths, $template, $plugins; // Common objects + // SourceForge/W3C buttons $ob = Array(); - // FIXME: l10n - $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? 'title="You may disable this button in the admin panel under General Configuration."' : ''; if(getConfig('sflogo_enabled')=='1') { $sflogo_secure = ( isset($_SERVER['HTTPS']) ) ? 'https' : 'http'; @@ -2639,6 +2641,9 @@ 'TOOLBAR'=>$tb, 'SCRIPTPATH'=>scriptPath, 'CONTENTPATH'=>contentPath, + 'CDNPATH' => scriptPath, + 'JS_HEADER' => '', + 'JS_FOOTER' => '', 'ADMIN_SID_QUES'=>$asq, 'ADMIN_SID_AMP'=>$asa, 'ADMIN_SID_AMP_HTML'=>'', diff -r 18dbf386d356 -r b2c51a68209b language/english/core.json --- a/language/english/core.json Tue Jul 22 17:01:42 2008 -0500 +++ b/language/english/core.json Tue Jul 22 17:03:53 2008 -0500 @@ -244,6 +244,7 @@ lbl_page_template: 'template', lbl_page_project: 'project page', lbl_page_category: 'category', + lbl_page_external: 'external page', btn_discussion: 'discussion (%num_comments%)', btn_discussion_unapp: 'discussion (%num_comments% total, %num_unapp% unapp.)', @@ -497,6 +498,7 @@ btn_administration: 'Administration', btn_editsidebar: 'Edit the sidebar', btn_search_go: 'Go', + btn_enanopowered_admin_tip: 'You may disable this button in the admin panel under General Configuration.', btn_userpage: 'User page', btn_mycontribs: 'My contributions',