問題外掛:全域公告外掛
參考連結:無
使用版本:phpBB 2.0.8a
網站位置:http://ray.science3.net/
狀況描述:
各位大大,小弟安裝了全域公告外掛..
全部安裝完畢了(照者外掛說明),也執行global_announcement_db_update.php了..
但是當小弟在主題上選擇全域公告模式,發了公告后卻不見它出來..
為什麼呢?
希望各位大大幫幫忙!!
[問題]全域公告沒出現..
版主: 版主管理群
如果只是在各分版裡看不到\r
可能是外掛裡紅色處這段code的問題
因為在該外掛要加上的一段code中\r
也有相同的部分(藍色處)
所以,該段須修改code的正確位置\r
應該是在以下這段文字的下方\r
也就是\r
檢查一下吧\r
看是不是改錯地方了!
可能是外掛裡紅色處這段code的問題
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
[color=red]$topic_rowset = array();
$total_announcements = 0;[/color]
#
#-----[ REPLACE WITH ]----------------------------------------
#
// 2 rows deleted - Global announcement MOD
也有相同的部分(藍色處)
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
//
// All announcement data, this keeps announcements
// on each viewforum page ...
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//
// All GLOBAL announcement data, this keeps GLOBAL announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_GLOBAL_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
[color=blue]$topic_rowset = array();
$total_announcements = 0; [/color]
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;
}
$db->sql_freeresult($result);
// End add - Global announcement MOD應該是在以下這段文字的下方\r
代碼: 選擇全部
//
// All announcement data, this keeps announcements
// on each viewforum page ...代碼: 選擇全部
//
[color=darkred]// All announcement data, this keeps announcements
// on each viewforum page ...[/color]
//
$sql = "SELECT t.*, u.username, u.user_color_gc, u.user_id, u2.username as user2, u2.user_color_gc as color2, u2.user_id as id2, p.post_time, p.post_username
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
[color=darkred]$topic_rowset = array();
$total_announcements = 0;[/color]
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_announcements++;看是不是改錯地方了!

