[問題] 偽子分區!又要麻煩~倉木麻衣~老師了(Thx老師!已解決)

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

[問題] 偽子分區!又要麻煩~倉木麻衣~老師了(Thx老師!已解決)

文章 china2000 »

參考連結:[整理]偽子分區功能介紹 ! (~倉木麻衣~)
http://phpbb-tw.net/phpbb/viewtopic.php ... F&start=30

參考連結:[閒聊]一個想法....(偽子分區) (依夢兒)
http://phpbb-tw.net/phpbb/viewtopic.php ... sc&start=0

使用版本:phpBB 2.0.5,採用BMan1Blue為預設風格,Linux為操作系統,MySQL
4.0.15 ,租用外國的主機空間。

狀況描述:由於版面太多太長,有必要把版面修改一下,但對改Mod的信心不是很大\r
所以依樣畫葫蘆般按依夢兒的方法去改 index.php,果然做到了預期的效果(見圖一
的"特別專案室",內裡已包含四個項目)圖檔。此法雖簡單但也有不足處,就是當有新文章時不能顯示有新文章出現。但隨著人的要求越來越高,所以參照倉木麻衣老師的"偽子分區"方法去修改,以下便是安裝時的情況:

01) Backup phpBB目錄和SQL 資料庫\r

02) 上傳admin/admin_forums_control.php 、 templates/BMan1Blue/admin/forum_control_admin_body.tpl 、 templates/BMan1Blue/admin/forum_control_edit_body.tpl1(由於我是採用BMan1Blue為預設風格,所以把兩個tpl檔都上傳到templates/BMan1Blue/admin/內)

03) 在SQL內成功建立 phpbb_forums_control
CREATE TABLE phpbb_forums_control (
control_id mediumint(8) UNSIGNED NOT NULL auto_increment,
show_forums varchar(3) DEFAULT NULL,
hide_forums varchar(255) DEFAULT NULL,
PRIMARY KEY (control_id)
);
04) 依文件修改includes/constants.php 、 language/lang_chinese_traditional_taiwan/lang_admin.php後上傳到相關目錄內\r

05) 依文件指示修改index.php後上傳,進入phpBB2時出現和 黑風凱特 一樣的問題!
Warning: Invalid argument supplied for foreach() in /home/xxxx/web/phpBB2/index.php on line 435

Warning: array_key_exists(): The second argument should be either an array or an object in /home/xxxx/web/phpBB2/index.php on line 459
但依據~倉木麻衣~老師在 http://phpbb-tw.net/phpbb/viewtopic.php ... F&start=30第四版內所提出的方法修正,問題已解決了!

06) 在版面建立新分區(Testing) - id 為 27
07) 在新分區內建立兩個新版面 - id 為 128 和 129
08) 在後台的"偽子分區"的功能表內加入113和114版面id於 128(Testing1) 的分區內,加入115和126版面id於 129(Testing2) 的分區內,建立後再在"偽子分區"的後台內發現好像成功了!請看圖二、三作參考!
圖檔圖檔

09) 但當回到版面後卻發現Testing1和Testing2不能顯示剛才加入的版面!可是在後台卻能正確顯示出版面已成功加入子分區內!

10) 嘗試用html
<font face="Arial" font-size: "11px" color="#FF9933">&nbsp; 《 專題 》</font><br>
<font face="Arial" font-size: "11px">
&nbsp;&nbsp; &nbsp; └ [<a href="http://www.hk9394.hk.com/phpBB2/viewforum.php?f=113" style="text-decoration: none">【何偉途事件】</a>]
[<a href="http://www.hk9394.hk.com/phpBB2/viewforum.php?f=114" style="text-decoration: none">【皇崗直巴問題】</a>]</font>
加入testing1版內,不錯這時兩個項目巳能顯示在Testing1內,但當有新文章時仍是不能顯示有新文章出現!

11) Testing2分區內仍是空空如也!進入Testing2區內仍是內裡沒有項目!

12) 已嘗試從頭修改數次和小心核對但問題仍在,由於constants.php、lang_admin.php這兩個部份我肯定沒有錯誤!相信是index.php這部份有問題但找不出來!所以有煩各位幫忙了!以下便是修改後的index.php:
<?php
/***************************************************************************
* index.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: index.php,v 1.99.2.1 2002/12/19 17:17:40 psotfx 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.
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
\nelse
{
$mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
if( $userdata['session_logged_in'] )
{
setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}

$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
);

$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c
ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

while( $category_rows[] = $db->sql_fetchrow($result) );

if( ( $total_categories = count($category_rows) ) )
{
//
// Define appropriate SQL
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, u.user_level
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;

case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id , u.user_level
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
ORDER BY f.cat_id, f.forum_order";
break;

default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, u.user_level
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
break;
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}

$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}

if ( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Obtain a list of topic ids which contain
// posts made since user last visited
//
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
}

$new_topic_data = array();
while( $topic_data = $db->sql_fetchrow($result) )
{
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
}
}

//
// Obtain list of moderators of each forum
// First users, then groups ... broken into two queries
//
$sql = "SELECT aa.forum_id, u.user_id, u.username , u.user_level
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 1
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
AND u.user_id = ug.user_id
GROUP BY u.user_id, u.username, aa.forum_id
ORDER BY aa.forum_id, u.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}

$forum_moderators = array();
while( $row = $db->sql_fetchrow($result) )
{


// Start add - Username Color Mod
switch ( $row['user_level'] )
{
case ADMIN:
$mod_username_color = $row['username'];
$style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
break;
case MOD:
$mod_username_color = $row['username'];
$style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
break;
case BOT:
$mod_username_color = $row['username'];
$style_color = ' style="color:#' . $theme['fontcolor99'] . '"';
break;
default:
$mod_username_color = $row['username'];
$style_color = '';
break;
}
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color . '>' . $mod_username_color . '</a>';
// End add - Username Color Mod

}

$sql = "SELECT aa.forum_id, g.group_id, g.group_name
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE aa.auth_mod = " . TRUE . "
AND g.group_single_user = 0
AND g.group_type <> " . GROUP_HIDDEN . "
AND ug.group_id = aa.group_id
AND g.group_id = aa.group_id
GROUP BY g.group_id, g.group_name, aa.forum_id
ORDER BY aa.forum_id, g.group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}

while( $row = $db->sql_fetchrow($result) )
{
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
}

//
// Find which forums are visible for this user
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => 'index_body.tpl')
);

// ChatBox Mod
require_once($phpbb_root_path . 'chatbox_front.php');

$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),

'FORUM_IMG' => $images['forum'],
'FORUM_NEW_IMG' => $images['forum_new'],
'FORUM_LOCKED_IMG' => $images['forum_locked'],

'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
'L_REPLIES' => $lang['Replies'],
'L_VIEWS' => $lang['Views'],
'L_POSTS' => $lang['Posts'],
'L_LASTPOST' => $lang['Last_Post'],
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
'L_NEW_POSTS' => $lang['New_posts'],
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],

'L_MODERATOR' => $lang['Moderators'],
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],

// ChatBox Mod
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ], $chatters),
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox', // To make easier to test on my PC
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],

'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
);

//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];

//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
}
}

//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_forums )
{
$template->assign_block_vars('catrow', array(
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rows[$i]['cat_title'],
'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
$sql = "SELECT *
FROM " . FORUMS_CONTROL_TABLE ;

if(!$q_forums = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($q_forums) )
{
$forums_control[$row['show_forums']] = $row['hide_forums'];
$forums_control2[$row['show_forums']] = array('unread_topic' => false);
$forums_control2[$row['show_forums']] = array('extra_forum_name' => '');
$end_keys = $row['show_forums'];
}
$db->sql_freeresult($q_forums);
if ( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
$found=false;
if ( $forum_data[$j]['cat_id'] == $cat_id )
{
$forum_id = $forum_data[$j]['forum_id'];

if ( $is_auth_ary[$forum_id]['auth_view'] )
{
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
$folder_image = $images['forum_locked'];
$folder_alt = $lang['Forum_locked'];
}
else
{
$unread_topics = false;
if ( $userdata['session_logged_in'] )
{
if ( !empty($new_topic_data[$forum_id]) )
{
$forum_last_post_time = 0;

while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
{
if ( empty($tracking_topics[$check_topic_id]) )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);

}
else
{
if ( $tracking_topics[$check_topic_id] < $check_post_time )
{
$unread_topics = true;
$forum_last_post_time = max($check_post_time, $forum_last_post_time);
}
}
}

if ( !empty($tracking_forums[$forum_id]) )
{
if ( $tracking_forums[$forum_id] > $forum_last_post_time )
{
$unread_topics = false;
}
}

if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
{
$unread_topics = false;
}
}

}
}

$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
}
for ($keys = 1; $keys <= $end_keys; $keys++)
{
if (!$forums_control[$keys])
{
continue;
}
if (preg_match("/\b$forum_id\b/",$forums_control[$keys]))
{
if ($unread_topics)
{
$forums_control2[$keys]['unread_topic'] = true;
if (empty($forums_control2[$keys]['extra_forum_name']))
{
$forums_control2[$keys]['extra_forum_name'] = "- ". $forum_data[$j]['forum_name'];
}
else
{
$forums_control2[$keys]['extra_forum_name'] .= "、". $forum_data[$j]['forum_name'];
}
}
$found=true;
break;
}
}
if ($found)
{
continue;
}
elseif($forums_control[$forum_id])
{
$folder_image = ( $forums_control2[$forum_id]['unread_topic'] ) ? $images['forum_new'] : $images['forum'];
$folder_alt = ( $forums_control2[$forum_id]['unread_topic'] ) ? $lang['New_posts'] : $lang['No_new_posts'];
(!empty($forums_control2[$forum_id]['extra_forum_name'])) ? $forum_data[$j]['forum_name'] .= $forums_control2[$forum_id]['extra_forum_name'] . '版有新文章' : '';
}
$posts = $forum_data[$j]['forum_posts'];
$topics = $forum_data[$j]['forum_topics'];

// Start add - Username Color Mod
switch ( $forum_data[$j]['user_level'] )
{
case ADMIN:
$username_color = $forum_data[$j]['username'];
$style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
break;
case MOD:
$username_color = $forum_data[$j]['username'];
$style_color = ' style="color:#' . $theme['fontcolor2'] . '"';
break;
case BOT:
$username_color = $forum_data[$j]['username'];
$style_color = ' style="color:#' . $theme['fontcolor99'] . '"';
break;
default:
$username_color = $forum_data[$j]['username'];
$style_color = '';
break;
}
// End add - Username Color Mod


if ( $forum_data[$j]['forum_last_post_id'] )
{
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

$last_post = $last_post_time . '<br />';

$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '"' . $style_color . '>' . $username_color . '</a> ';

$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
else
{
$last_post = $lang['No_Posts'];
}

if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = '&nbsp;';
$moderator_list = '&nbsp;';
}

$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

$template->assign_block_vars('catrow.forumrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image,
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST' => $last_post,
'MODERATORS' => $moderator_list,

'L_MODERATOR' => $l_moderators,
'L_FORUM_FOLDER_ALT' => $folder_alt,

'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
}
}
}
}
} // for ... categories

}// if ... total_categories
else
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
最後由 china2000 於 2005-03-16 00:45 編輯,總共編輯了 3 次。
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

喔~ 會不會是風格不同(我是用BMan1Blue為預設風格),所以上傳這兩個檔案 (
forum_control_admin_body.tpl 、forum_control_edit_body.tpl) 到 templates/BMan1Blue/admin/ 後起不到作用或是有影響呢?
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

我剛有重新安裝一個全新的phpBB 2.0.13版來做測試~
意外發現似乎無法用foreach v_v~ 怪~
改用for取代foreach後再測試~並沒有問題
接著用你提供的index.php回來覆蓋掉我的index.php再做測試
測試結果也沒有問題~
不過我是有拿掉第287行的程式

代碼: 選擇全部

require_once($phpbb_root_path . 'chatbox_front.php');
因為我沒這個東西

檢查一下你資料庫的forums_control資料表是否有值\r

ps.不要叫我老師~我會有壓力 (ro01)
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

謝謝老師回覆~ forums_control 裡有以下兩筆數值!
control_id show_forums hide_forums
3 128 113, 114 Edit Delete
4 129 115, 125 Edit Delete
我有一個疑問仍是看不懂的,就是在版面上要不要用html語法把的些隱藏版面用link連出來?或是在後台設定好了則版面會自動顯示出來?老師仍否需要我提供多些資料嗎?會不會是風格不同的問題呢?
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

風格不致於會影響到結果~
china2000 寫:我有一個疑問仍是看不懂的,就是在版面上要不要用html語法把的些隱藏版面用link連出來?或是在後台設定好了則版面會自動顯示出來?
yes~這部份要另外在「版面管理」裡設定版面說明
目前並沒有此功能能全部自動設好

另外~我想再更確定一下你的系統環境
PHP版本\r
還有PHPBB版本(真的是2.0.5?)
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

真的是2.0.5!但PHP版本則不大清楚了!明早我會去問一問!
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

那我先裝個2.0.5版來測\r
題外話~還是建議你升級到2.0.13
不然論壇很有可能會被..........
謝絕所有私人訊息詢問外掛相關問題
有問題請直接於版上發表, 集思廣議絕對比專挑特定人士詢問來的好

竹貓禁止發表含破解相關的軟體, 違者砍文
不要跟我講別的地方都可以發, 為什麼竹貓就不行
免費不等於破解, 傻傻的搞不清楚
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

是的~ 我知道那個嚴重性!當我完成這個改動後就會著手進行升級行勳 @@~ 謝謝老師不辭勞苦的幫忙~
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

2.0.5版上的測試也沒問題~
謝絕所有私人訊息詢問外掛相關問題
有問題請直接於版上發表, 集思廣議絕對比專挑特定人士詢問來的好

竹貓禁止發表含破解相關的軟體, 違者砍文
不要跟我講別的地方都可以發, 為什麼竹貓就不行
免費不等於破解, 傻傻的搞不清楚
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

剛剛依照老師的方法去修改並重新上傳,但仍是顯示不出來~
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

剛剛把index.php中的
if ( $is_auth_ary[$forum_id]['auth_view'] && $forum_id !='125' && $forum_id !='115' && $forum_id !='114' && $forum_id !='113')
回復到原來的樣子
if ( $is_auth_ary[$forum_id]['auth_view'] )
因為這句是依照依夢兒的簡易子分區才改的!上傳後卻在Testing區內本應隱藏的版面卻通通跑出來!
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

china2000 寫:剛剛把index.php中的
if ( $is_auth_ary[$forum_id]['auth_view'] && $forum_id !='125' && $forum_id !='115' && $forum_id !='114' && $forum_id !='113')
回復到原來的樣子
if ( $is_auth_ary[$forum_id]['auth_view'] )
因為這句是依照依夢兒的簡易子分區才改的!上傳後卻在Testing區內本應隱藏的版面卻通通跑出來!
那現在請維持現狀~

代碼: 選擇全部

if ( $is_auth_ary[$forum_id]['auth_view'] )
再把偽子分區的mod裝回去看看
我現在可以看到剛才在你版上測試的版面前有新文章圖示
china2000
星球公民
星球公民
文章: 194
註冊時間: 2003-10-24 23:00
來自: 傷講

文章 china2000 »

OK !
~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

嗯~在您的站上測了很多次\r
其實都有抓到有新文章~
但不知為何到最後一個判斷處~與偽子分區有關的二維陣列內容卻都不見了
可是把您的index.php拿到我自己電腦上測~卻又都可以正常執行
我在想~會不會是PHP版本所造成的~
您主機的PHP版本為4.3.3~而我則是採用4.3.10
真的蠻讓我頭痛的~目前暫時無解中~抱歉了~
謝絕所有私人訊息詢問外掛相關問題
有問題請直接於版上發表, 集思廣議絕對比專挑特定人士詢問來的好

竹貓禁止發表含破解相關的軟體, 違者砍文
不要跟我講別的地方都可以發, 為什麼竹貓就不行
免費不等於破解, 傻傻的搞不清楚
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

文章 minotaur »

子分區內的文章數與主題數有辦法統計在首頁的分區上嗎
主題已鎖定

回到「外掛問題討論」