sfcoil 寫:部分已經修改完成
原來首頁index.php 少了以下一個
(加上後首頁已經可以顯示最後發表文章主題
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id, substring(pt.topic_title,1,18) as topic_title
FROM (((
( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
LEFT JOIN " . TOPICS_TABLE . " pt ON pt.topic_id = p.topic_id )
ORDER BY f.cat_id, f.forum_order";
如有開第二子版面正常
目前剩下有開第三子版面發生的問題
1.再第三子版面95年度10-12月活動剪影中發表文章後
2.無法顯示於第二子分區協會週末營活動剪影的最後發表文章
但在首頁有顯示出來
http://www.fccc.idv.tw/01.rar
請幫忙檢查一下有何錯誤地方
如果您之前的 index.php 是 '少了以下一個
(' 的話,
那麼您的首頁將會出現錯誤訊息的.
首頁未出現標題最主要的原因, 是您修改
位置錯誤.
#
#-----[ FIND ]-----
#
代碼: 選擇全部
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id,substring(pt.topic_title,1,18) as topic_title
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";
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
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";
#
#-----[ FIND ]-----
#
代碼: 選擇全部
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
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 )
LEFT JOIN " . TOPICS_TABLE . " pt ON pt.topic_id = p.topic_id )
ORDER BY f.cat_id, f.forum_order";
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id,substring(pt.topic_title,1,18) as topic_title
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 )
LEFT JOIN " . TOPICS_TABLE . " pt ON pt.topic_id = p.topic_id )
ORDER BY f.cat_id, f.forum_order";
--
另外, 檢視您的 viewforum.php 修改無誤.
建議您:
1. 重新進入控制台, 設定該子版面.
2. 或者, 進入 phpMyAdmin
找到論壇資料庫, 指向資料表 phpbb_forums
檢視 (編輯) 該子版面的欄位 '
main_sub' 的值, 修改成 '
forum_sub' 的值
參考連結:
http://phpbb-tw.net/phpbb/viewtopic.php?p=209793#209793