管理員
積分信息:
威望:6091
金錢:9077259
貢獻:6202
儲蓄:2146643647
|
DIY最新回覆人調用
本帖隱藏的內容
1、打開source\class\block\forum\block_thread.php,
查找
- 'lastpost' => array('name' => lang('blockclass', 'blockclass_thread_field_lastpost'), 'formtype' => 'date', 'datatype' => 'date'),
複製代碼
在其下方添加代碼
- 'lastposter' => array('name' => lang('blockclass', 'blockclass_thread_field_lastposter'), 'formtype' => 'text', 'datatype' => 'string'),
複製代碼
查找
- 'lastpost' => $data['lastpost'],
複製代碼
在其下方添加代碼
- 'lastposter' => $data['lastposter'],
複製代碼
2、打開source\language\lang_blockclass.php,
3、調用標籤{lastposter}
4、更新緩存
DIY最新回覆文章調用修正,過濾未回覆之主題
帖子模塊需設置為「高級自定義」
本帖隱藏的內容
1. 文件 source/class/block/forum/block_thread.php ,
查找
- 'recommend' => array(
- 'title' => 'threadlist_recommend',
- 'type' => 'radio'
- ),
複製代碼
下方添加
- 'replies' => array(
- 'title' => 'threadlist_replies',
- 'type' => 'radio'
- ),
複製代碼
查找
- $recommend = !empty($parameter['recommend']) ? 1 : 0;
複製代碼
下方添加
- $replies = !empty($parameter['replies']) ? 1 : 0;
複製代碼
查找
- if($recommend) {
- $sqlfrom .= " $joinmethod JOIN `".DB::table('forum_forumrecommend')."` fc ON fc.tid=t.tid";
- }
複製代碼
下方添加
- if($replies) {
- $sql .= " AND t.replies > '0'";
- }
複製代碼
2. 文件 source/language/block/lang_threadlist.php
更新緩存 DONE!
未來要啟用這個判斷的話,勾選 "未回覆主題過濾" 即可。 |
|