史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   論壇程式討論區 (http://forum.slime.com.tw/f79.html)
-   -   讓首頁顯示的子論壇依欄位排列 (http://forum.slime.com.tw/thread151928.html)

貝斯特 2005-06-21 03:12 PM

讓首頁顯示的子論壇依欄位排列
 
這是一個不大的修改,可以讓你的論壇的子論壇以欄位方式顯示,
其效果大家可以查看附件圖片,或是直接拜訪這個網址觀看範例:
http://forum.lowcarber.org/

※使用方法:
進入到論壇管理控制台
點選vBulletin Options(常規選項)
選擇"論壇列表顯示選項"
將子論壇顯示深度由0改為1

開始修改:
1.編輯檔案functions_forumlist.php(位於includes資料夾內),搜尋:

PHP代碼:
foreach($iforumcache["$parentid"] AS $forums)


在上面加上此段程式碼:

PHP代碼:
$output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
$cols = 0;


搜尋:

PHP代碼:
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
if (!empty($output))
{
$subforum = $splitter["$canpost"] . $subforum;
}
if ($depth < $vboptions['subforumdepth'])
{
$output .= construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
}
}
}
}

return $output;

}


整段替換為:

PHP代碼:
eval('$subforum = "' . fetch_template("forumhome_subforumbit_$canpost") . '";');
//sub-forum hack
if ($depth < $vboptions['subforumdepth'])
{
$cols++;
if ($cols==3)
{
$cols = 1;
$output .= "</tr><tr>";
}
$output .= "<td width=\"50%\">" . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
}
}
}
}
$output.="</tr></table>";
return $output;
// end sub-forum hack
}


模版編輯(非必需的),如果您覺得字體不太習慣的話,請修改這裡。
搜尋所有模版中的此段程式碼:

HTML代碼:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
整段替換為:

HTML代碼:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>
首頁顯示的子論壇依欄位排列修改完成。


所有時間均為台北時間。現在的時間是 08:46 PM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1