長老會員
|
postbit_legacy
搜索:
<div>
$vbphrase[posts]: $post[posts]
<if condition="$show['reputation']">$post[reputationdisplay]</if>
</div>
在後面添加:
<if condition="$vboptions['goodonoff']">
<div>$vbphrase[goodnees]: $post[goodnees]</div>
</if>
FORUMDISPLAY
搜索:
<if condition="$show['newthreadlink']"><tr><td class="vbmenu_option"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]">$vbphrase[post_a_new_thread]</a></td></tr></if>
在後面添加:
<if condition="$vboptions['goodonoff']"><tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=viewgoodnees&f=$foruminfo[forumid]">$vbphrase[view_goodnees]</a></td></tr></if>
搜索:
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch"><a href="#goto_forumsearch">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
</if>
在後面添加:
<if condition="$vboptions['goodonoff']">
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=viewgoodnees&f=$foruminfo[forumid]">$vbphrase[view_goodnees]</a></td>
</if>
newpost_threadmanage
搜索:
</div>
</fieldset>
在前面添加:
<if condition="$show['goodungood']">
<div><label for="cb_goodungood"><input type="checkbox" name="goodungood" value="1" id="cb_goodungood" tabindex="1" $checked[goodungood] /><if condition="$show['ungoodthread']">$vbphrase[ungood_this_thread]<else />$vbphrase[good_this_thread]</if> $vbphrase[after_you_submit_your_message].</label>
</div></if>
threadadmin_editthread
搜索:
<div><label for="cb_sticky"><input type="checkbox" name="sticky" value="yes" id="cb_sticky" $stickychecked />$vbphrase[thread_is_sticky]</label></div>
在後面添加:
<if condition="$vboptions['goodonoff']">
<div><label for="cb_goodnees"><input type="checkbox" name="goodnees" value="yes" id="cb_goodnees" $goodneeschecked />$vbphrase[thread_is_goodnees]</label></div>
</if>
檔修改
forumdisplay.php
搜索:
$threads = $DB_site->query("
SELECT $votequery $previewfield
thread.threadid, thread.title AS threadtitle, lastpost, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach
" . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed") . "
" . iif(!$deljoin, ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid,
deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
FROM " . TABLE_PREFIX . "thread AS thread
" . iif(!$deljoin, " LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')") . "
" . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])") . "
$previewjoin
WHERE thread.threadid IN (0$ids)
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
");
替換為:
// newvbb 修改開始
// 精華插件修改
$threads = $DB_site->query("
SELECT $votequery $previewfield
thread.threadid, thread.title AS threadtitle, lastpost, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, goodnees, votetotal, thread.attach
" . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed") . "
" . iif(!$deljoin, ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid,
deletionlog.username AS del_username, deletionlog.reason AS del_reason") . "
FROM " . TABLE_PREFIX . "thread AS thread
" . iif(!$deljoin, " LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')") . "
" . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])") . "
$previewjoin
WHERE thread.threadid IN (0$ids)
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
");
// newvbb 修改結束
注意此處如果你添加過其他涉及主題塊的插件(例如,主題標題高亮,總置頂等等),請對比後修改。
搜索:
// pop the last element off the end of the $nav array so that we can show it without a link
array_pop($navbits);
$navbits[''] = $foruminfo['title'];
替換為:
// newvbb 修改開始
// 精華區導航欄
if ($_REQUEST['do'] == 'viewgoodnees')
{
$navbits[''] = construct_phrase($vbphrase['goodnees'], $foruminfo['title']);
$navbits[] = 1;
} else {
$navbits[''] = $foruminfo['title'];
}
// pop the last element off the end of the $nav array so that we can show it without a link
array_pop($navbits);
// newvbb 修改結束
搜索:
$threadscount = $DB_site->query_first("
SELECT COUNT(*) AS threads,
SUM(IF(lastpost>=$lastread AND open<>10,1,0)) AS newthread
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
AND visible = 1
$globalignore
$datecut
$limitothers
$delthreadlimit
");
替換為:
// newvbb 修改開始
// 精華區
if ($_REQUEST['do'] == 'viewgoodnees')
{
$viewgoodnees = "AND goodnees = 1";
} else {
$viewgoodnees = '';
}
$threadscount = $DB_site->query_first("
SELECT COUNT(*) AS threads,
SUM(IF(lastpost>=$lastread AND open<>10,1,0)) AS newthread
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
AND visible = 1
$globalignore
$datecut
$limitothers
$delthreadlimit
$viewgoodnees
");
// newvbb 修改結束
搜索:
$stickies = $DB_site->query("
SELECT threadid
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND visible = 1
AND sticky = 1
$limitothers
$globalignore
$delthreadlimit
");
替換為:
// newvbb 修改開始
// 精華區
$stickies = $DB_site->query("
SELECT threadid
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND visible = 1
AND sticky = 1
$limitothers
$globalignore
$delthreadlimit
$viewgoodnees
");
// newvbb 修改結束
|