Advanced Search
   
Who's Online
6 user(s) are online (1 user(s) are browsing Technical Section)

Members: 0
Guests: 6

more...
SmartSection is developed by The SmartFactory (http://www.smartfactory.ca), a division of INBOX Solutions (http://inboxinternational.com)
Technical Section > XOOPS Technologies > 解決 xhnewbb 討論串無法預設為展開模式的問題
解決 xhnewbb 討論串無法預設為展開模式的問題
Published by Wt_admin on 2007/9/27 (1782 reads)
解決 xhnewbb 討論串無法預設為展開模式的問題
xhnewbb 是安全性較為嚴謹的 XOOPS 討論區模組,但是自 GIJOE (PEAK XOOPS) 轉而開發全新的 d3forum 之後就失去維護的團隊。日本 XOOPS 社群有轉而開發新版的 xhnewbb,但卻不適合使用在 XOOPS.org 版本上。xhnewbb 最新的版本是 1.31beta 版 (http://xoops.peak.ne.jp/md/mydownloads/singlefile.php?lid=88&cid=1)。

安裝 xhnewbb 之後預設顯示模式是 Thread (討論串),而非 Flat (平面展開)。討論串回文篇數過多時不好閱讀,但是 xhnewbb 後台並沒有修改這個設定的選項。


一開始為 Threaded 模式,因此可以看到 Flat 的選項

經過一番搜尋與測試,最後總算輾轉從日本網站 Hatena 找到解法

修改 xhnewbb 模組中 viewtopic.php 第 17 行附近:
//use users preferences

if (is_object($xoopsUser)) {

// $viewmode = $viewmode ? $viewmode : $xoopsUser->getVar('umode') ; mark 掉這行,新增下一行
$viewmode = $viewmode ? $viewmode : 'flat' ;
$uorder = $xoopsUser->getVar('uorder') == 1 ? 'DESC' : 'ASC' ;
$order = $order ? $order : $uorder ;

}

修改完成後預設進入 xhnewbb 討論區就會是平面展開的模式,更便於閱讀。詳細效果請見本站討論區。

預設為 Flat 模式,所以顯示 Threaded 的選項

Navigate through the articles
安裝 SimpleViewer 網路相簿程式 Next article
The comments are owned by the poster. We aren't responsible for their content.
Poster Thread