lawrence0731 寫:心靈捕手 寫:To lawrence0731:
我尚未檢查您的 admin\admin_forums.php
不過, 在您的 template\airhead\forum_admin_body.tpl 發現錯誤, 建議修改.
您指的是 <!-- 及 --> 備註的標記吧? 這段我最早是沒標的, 後來為了 debug 才把這段mark 起來, 現在即使拿掉還是一樣的.
事實上, 這段裡的 php 變數我有看過他的值,
程式在跑到這裡時是null(空值), 所以這才是奇怪的地方..
如:<script language="JavaScript">sub_line({catrow.forumrow.sub_forumrow.SUB_LINE});</script> 這行裡, 應該是要把SUB_LINE 這個變數丟到javascript 的 函數裡去執行, 但因為他是Null , 所以導致結果也是Null ==> 網頁上出不來.
看來原因應該是出在 admin_forums.php, 還請大大幫忙了, 謝謝!
如果說發現了問題, 那麼應該是將您 (
按照外掛安裝說明修改後) 的檔案貼出, 比較妥當.
以下是關於 admin_forums.php 的修改, 提供您參考.
#
#-----[ FIND ]-----
#
代碼: 選擇全部
//子版面 start
function get_sub_list($id)
{
global $db;
$sql="select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order ";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]-----
#
代碼: 選擇全部
$cat_data = array();
#
#-----[ FIND ]-----
#
代碼: 選擇全部
if( $total_forums = $db->sql_numrows($q_forums) )
{
$forum_rows = $db->sql_fetchrowset($q_forums);
}
//while( $row = $db->sql_fetchrow($q_forums) )
//{
// if($row[forum_sub]>0)
// {
// $forum_sub2[$row['forum_sub']][]=$row;
// }else
// {
// $forum_rows[] = $row;
// }
//}
$total_forums=count($forum_rows);
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
/*if( $total_forums = $db->sql_numrows($q_forums) )
{
$forum_rows = $db->sql_fetchrowset($q_forums);
}*/
while( $row = $db->sql_fetchrow($q_forums) )
{
if($row[forum_sub]>0)
{
$forum_sub2[$row['forum_sub']][]=$row;
}else
{
$forum_rows[] = $row;
}
}
$total_forums=count($forum_rows);