您好
謝謝您回答我
我試著依照您的建議。將在index.php要新增的部份加上includes/page_tail.php
裡
不過因為index.php裡,建議尋找的三段程式碼
代碼: 選擇全部
init_userprefs($userdata);
代碼: 選擇全部
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
代碼: 選擇全部
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
在index.php裡找不到
所以無法像說明文件裡在這3段後面新增程式碼
需新增的部份:
代碼: 選擇全部
require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_link.' . $phpEx);
代碼: 選擇全部
$sql = "SELECT *
FROM ". LINK_CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query Link config information", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$link_config_name = $row['config_name'];
$link_config_value = $row['config_value'];
$link_config[$link_config_name] = $link_config_value;
$link_self_img = $link_config['site_logo'];
$site_logo_height = $link_config['height'];
$site_logo_width = $link_config['width'];
}
代碼: 選擇全部
'L_LINKS' => $lang['Site_links'],
'U_LINKS' => append_sid("links.$phpEx"),
'U_LINKS_JS' => "links.js.$phpEx",
'U_SITE_LOGO' => $link_self_img,
'SITE_LOGO_WIDTH' => $site_logo_width,
'SITE_LOGO_HEIGHT' => $site_logo_height,
於是我就試著自己尋找看看合適的地方
以下是page_tail.php的原始檔
代碼: 選擇全部
<?php
/***************************************************************************
* page_tail.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}
global $do_gzip_compress;
//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);
$template->assign_vars(array(
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link)
);
$template->pparse('overall_footer');
//
// Close our DB connection.
//
$db->sql_close();
//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
exit;
?>
很可惜的是,不論我怎麼加,首頁以外的頁面連結處還是一樣的空白
是否可以請教心靈捕手協助幫忙調整看看需新增的語法放在那裡好?