史萊姆論壇

返回   史萊姆論壇 > 專業主討論區 > 論壇程式討論區
忘記密碼?
論壇說明 標記討論區已讀

歡迎您來到『史萊姆論壇』 ^___^

您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的!

請點擊這裡:『註冊成為我們的一份子!』

Google 提供的廣告


發文 回覆
 
主題工具 顯示模式
舊 2005-06-21, 03:30 PM   #1
貝斯特 帥哥
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
Cool NewVBB 精華區繁體版

運行SQL語句:
ALTER TABLE `thread` ADD `goodnees` INT( 1 ) NOT NULL ;
ALTER TABLE `user` ADD `goodnees` INT( 6 ) NOT NULL ;
新建語言變數
全局 組
$vbphrase[goodnees_thread] = "精華主題"
$vbphrase[goodnees] = "精華"
常規設置 組
$vbphrase[settinggroup_newvbbgood] = "精華帖(區)插件管理(NewvBB.com)"
$vbphrase[setting_goodonoff_title] = "開啟精華功能?"
$vbphrase[setting_goodonoff_desc] = "是否開啟精華功能。如果選擇“否”,那麼對應的精華帖和精華區等相關的功能將全部關閉。"
$vbphrase[setting_goodpm_title] = "開啟精華悄悄話通知功能?"
$vbphrase[setting_goodpm_desc] = "是否開啟精華悄悄話通知功能。如果選擇“是”,那麼會員發表主題被評為精華時會通過悄悄話通知對方。"
$vbphrase[setting_goodneesmoney_title] = "評為精華帖時增加的金錢"
$vbphrase[setting_goodneesmoney_desc] = "當一個主題評為精華時增加的金錢,留空則關閉此功能。(如果你沒有安裝金錢銀行插件,請留空!)"
顯示主題 組
$vbphrase[goodnees_thread] = "推薦為精華主題"
$vbphrase[ungoodnees_thread] = "取消精華主題"
主題管理 組
$vbphrase[goodnees] = "推薦精華"
$vbphrase[goodnees_thread_x] = "精華的主題“{1}”"
$vbphrase[thread_goodnees_by_x_on_y_at_z] = "主題在{2} {3}被{1}推薦為精華。"
$vbphrase[thread_ungoodnees_by_x_on_y_at_z] = "主題在{2} {3}被{1}取消精華。"
$vbphrase[ungoodnees] = "取消精華"
$vbphrase[ungoodnees_thread_x] = "取消精華主題“{1}”"
$vbphrase[thread_is_goodnees] = "主題精華: 主題是精華主題。"
$vbphrase[pm_thread_is_goodnees] = "您的主題被推薦為精華主題。"
$vbphrase[pm_thread_isnot_goodnees] = "您的主題被取消精華主題。"
$vbphrase[pm_thread_is_goodnees_c] = "恭喜您,您的主題被推薦為精華主題。
希望能繼續看到您更多優秀的文章!
具體鏈結:"
$vbphrase[pm_thread_isnot_goodnees_c] = "不好意思,您的主題被取消了精華。
具體鏈結:"
線上用戶 組
$vbphrase[viewing_goodnees] = "正在流覽“{1}”的精華區"
論壇顯示 組
$vbphrase[view_goodnees] = "流覽精華區"
$vbphrase[goodnees] = "{1} 的精華區"
發帖 組
$vbphrase[ungood_this_thread] = "取消精華"
$vbphrase[good_this_thread] = "推薦精華"
前端重定向資訊 組
$vbphrase[goodnees] = "主題已成功 $action 。你將返回到此主題。"
導入設置組
__________________

給自己看也給所有需要這些話鼓勵的人看!

認真不一定會得到美好的結果,但是不認真就一定沒有

想要有什麼結果,就秉持你的雙手
放手去做
總比什麼都沒付出最後失敗了才嘆氣來的好吧
沒努力的人.沒有資格說放棄
努力過的人.更要有勇氣繼續努力下去
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
向 貝斯特 送花的會員:
kobmmgyzsi (2014-06-15)
感謝您發表一篇好文章
舊 2005-06-21, 03:30 PM   #2 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

用文本編輯器打開 vbulletin-settings.xml,在末行 </settinggroups> 之前添加:
<settinggroup name="newvbbgood" displayorder="1010">
<setting varname="goodonoff" displayorder="1">
<optioncode>yesno</optioncode>
<defaultvalue>1</defaultvalue>
</setting>
<setting varname="goodpm" displayorder="5">
<optioncode>yesno</optioncode>
<defaultvalue>1</defaultvalue>
</setting>
<setting varname="goodneesmoney" displayorder="10">
<defaultvalue>100</defaultvalue>
</setting>
</settinggroup>

然後登錄管理面板,運行
http://您論壇的URL/admincp/options.php?do=import
選擇剛才修改好的 vbulletin-settings.xml 並點擊“引入”按鈕。
修改範本
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
舊 2005-06-21, 03:38 PM   #3 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

SHOWTHREAD
搜索:
<div><label for="ao_sut"><input type="radio" name="do" id="ao_sut" value="stick" /><if condition="$show['unstick']">$vbphrase[unstick_thread]<else />$vbphrase[stick_thread]</if></label></div>
在後面添加:
<if condition="$vboptions['goodonoff']">
<div><label for="ao_gut"><input type="radio" name="do" id="ao_gut" value="goodnees" /><if condition="$show['ungoodnees']">$vbphrase[ungoodnees_thread]<else />$vbphrase[goodnees_thread]</if></label></div>
</if>
搜索:
<option value="stick"><if condition="$show['unstick']">$vbphrase[unstick_thread]<else />$vbphrase[stick_thread]</if></option>
在後面添加:
<if condition="$vboptions['goodonoff']">
<option value="goodnees"><if condition="$show['ungoodnees']">$vbphrase[ungoodnees_thread]<else />$vbphrase[goodnees_thread]</if></option>
</if>
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
向 貝斯特 送花的會員:
kobmmgyzsi (2014-06-15)
感謝您發表一篇好文章
舊 2005-06-21, 03:38 PM   #4 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

threadbit
搜索:
<if condition="$show['sticky']"><img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /></if>
在後面添加:
<if condition="$show['goodnees']"><img class="inlineimg" src="$stylevar[imgdir_misc]/goodnees.gif" alt="$vbphrase[goodnees_thread]" /></if>
postbit
搜索:
<div>
$vbphrase[posts]: $post[posts]
<if condition="$show['reputation']">$post[reputationdisplay]</if>
</div>
在後面添加:
<if condition="$vboptions['goodonoff']">
<div>$vbphrase[goodnees]: $post[goodnees]</div>
</if>
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
舊 2005-06-21, 03:40 PM   #5 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

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&amp;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&amp;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&amp;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 修改結束
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
向 貝斯特 送花的會員:
kobmmgyzsi (2014-06-15)
感謝您發表一篇好文章
舊 2005-06-21, 03:40 PM   #6 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

搜索:
$getthreadids = $DB_site->query("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " threadid
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
AND visible = 1
$globalignore
$datecut
$limitothers
$delthreadlimit
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
替換為:
// newvbb 修改開始 精華區
$getthreadids = $DB_site->query("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " threadid
FROM " . TABLE_PREFIX . "thread AS thread
$deljoin
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
AND visible = 1
$globalignore
$datecut
$limitothers
$delthreadlimit
$viewgoodnees
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
// newvbb 修改結束

搜索:
$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid", "&amp;sort=$sortfield&amp;order=$sortorder&amp;pp=$perpage&amp;daysprune=$daysprune");
替換為:
// newvbb 修改開始
// 精華區
if ($_REQUEST['do']=='viewgoodnees') {
$dogoodnees = '&amp;do=viewgoodnees';
}

$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid$dogoodnees", "&amp;sort=$sortfield&amp;order=$sortorder&amp;pp=$perpage&amp;daysprune=$daysprune");
// newvbb 修改結束
postings.php
搜索:
case 'stick':
在後面添加:
// newvbb 修改開始
case 'goodnees':
// newvbb 修改結束
搜索:
unset($newthreadinfo['vote'], $newthreadinfo['threadid'], $newthreadinfo['sticky'], $newthreadinfo['votenum'], $newthreadinfo['votetotal'], $newthreadinfo['isdeleted'], $newthreadinfo['del_userid'], $newthreadinfo['del_username'], $newthreadinfo['del_reason'], $newthreadinfo['issubscribed'], $newthreadinfo['emailupdate'], $newthreadinfo['folderid']);
替換為:
// newvbb 修改開始
// 精華主題推薦-非凡豬0113-此處複製主題增加重設精華
unset($newthreadinfo['vote'], $newthreadinfo['threadid'], $newthreadinfo['sticky'], $newthreadinfo['goodnees'], $newthreadinfo['votenum'], $newthreadinfo['votetotal'], $newthreadinfo['isdeleted'], $newthreadinfo['del_userid'], $newthreadinfo['del_username'], $newthreadinfo['del_reason'], $newthreadinfo['issubscribed'], $newthreadinfo['emailupdate'], $newthreadinfo['folderid']);
// newvbb 修改結束
搜索:
$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_sticky'));
}
在後面添加:
// newvbb 修改開始
// 精華主題推薦-非凡豬
// ############################### start goodnees / ungoodnees thread ###############################
if ($_POST['do'] == 'goodnees')
{
if (!$threadinfo['visible'] OR $threadinfo['isdeleted'])
{
eval(print_standard_error('error_invalidid'));
}

if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))
{
print_no_permission();
}

//取主題鏈結bb代碼。
$threadlink = "[thread=$threadinfo[threadid]]".$threadinfo['title']."[/thread]";

if ($threadinfo['goodnees'])
{
$threadinfo['goodnees'] = 0;
$notes = construct_phrase($vbphrase['thread_ungoodnees_by_x_on_y_at_z'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$logaction = construct_phrase($vbphrase['ungoodnees_thread_x'], $threadinfo['title']);
$action = $vbphrase['ungoodnees'];
global $vboptions;
// 金錢-取消精華減少金錢
if ($vboptions['goodneesmoney'])
{
$domoney = '';
$domoney = "money=money-".$vboptions['goodneesmoney'].",";
}
else
{
$domoney = "";
}
// 寫入到用戶悄悄話
if ($vboptions['goodpm'])
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '" . addslashes($vbphrase['pm_thread_isnot_goodnees']) . "', '" . addslashes($vbphrase['pm_thread_isnot_goodnees_c'].$threadlink) . "', '" . addslashes(serialize(array($threadinfo['postusername']))) . "', '', " . TIMENOW . ", 1, 1)");
$pmtextid = $DB_site->insert_id();
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid) VALUES ($pmtextid, $threadinfo[postuserid])");
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, folderid, messageread) VALUES ($pmtextid, $bbuserinfo[userid], -1, 1)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1 WHERE userid=$bbuserinfo[userid]");
$pmsend = "pmtotal=pmtotal+1, pmunread=pmunread+1,";
}
else
{
$pmsend = "";
}
//更新金錢、未讀悄悄話、用戶精華文章數
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $domoney $pmsend goodnees=goodnees-1 WHERE userid=$threadinfo[postuserid]");
}
else
{
$threadinfo['goodnees'] = 1;
$notes = construct_phrase($vbphrase['thread_goodnees_by_x_on_y_at_z'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
$logaction = construct_phrase($vbphrase['goodnees_thread_x'], $threadinfo['title']);
$action = $vbphrase['goodnees'];
global $vboptions;
//金錢-推薦精華增加金錢
if ($vboptions['goodneesmoney'])
{
$domoney = "money=money+".$vboptions['goodneesmoney'].",";
}
else
{
$domoney = "";
}
// 寫入到用戶悄悄話
if ($vboptions['goodpm'])
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '" . addslashes($vbphrase['pm_thread_is_goodnees']) . "', '" . addslashes($vbphrase['pm_thread_is_goodnees_c'].$threadlink) . "', '" . addslashes(serialize(array($threadinfo['postusername']))) . "', '', " . TIMENOW . ", 1, 1)");
$pmtextid = $DB_site->insert_id();
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid) VALUES ($pmtextid, $threadinfo[postuserid])");
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, folderid, messageread) VALUES ($pmtextid, $bbuserinfo[userid], -1, 1)");
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1 WHERE userid=$bbuserinfo[userid]");
$pmsend = "pmtotal=pmtotal+1, pmunread=pmunread+1,";
}
else
{
$pmsend = "";
}
//更新金錢、未讀悄悄話、用戶精華文章數
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET $domoney $pmsend goodnees=goodnees+1 WHERE userid=$threadinfo[postuserid]");
}
log_moderator_action($threadinfo, $logaction);

$notes .= ' ' . $threadinfo['notes'];

$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET goodnees = $threadinfo[goodnees], notes = '" . addslashes($notes) . "' WHERE threadid = $threadid");

$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_goodnees'));
}
// newvbb 修改結束

搜索:
$openchecked = iif($threadinfo['open'], HTML_CHECKED);
$stickychecked = iif($threadinfo['sticky'], HTML_CHECKED);
在後面添加:
// newvbb 修改開始
$goodneeschecked = iif($threadinfo['goodnees'], HTML_CHECKED);
// newvbb 修改結束
搜索:
'sticky' => STR,
在後面添加:
// newvbb 修改開始
'goodnees' => STR,
// newvbb 修改結束
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
向 貝斯特 送花的會員:
kobmmgyzsi (2014-06-15)
感謝您發表一篇好文章
舊 2005-06-21, 03:40 PM   #7 (permalink)
長老會員
 
貝斯特 的頭像
榮譽勳章
UID - 90669
在線等級: 級別:1 | 在線時長:11小時 | 升級還需:1小時
註冊日期: 2003-08-06
住址: The Gates of Hell
文章: 1758
現金: 15064 金幣
資產: 5185909 金幣
預設

搜索:
$open = iif($open == 'yes', 1, 0);
$sticky = iif($sticky == 'yes', 1, 0);
在後面添加:
// newvbb 修改開始
$goodnees = iif($goodnees == 'yes', 1, 0);
// newvbb 修改結束
搜索:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread SET
visible = $visible,
open = $open,
sticky = $sticky ,
title = '" . addslashes(htmlspecialchars_uni($title)) . "',
iconid = $iconid,
notes = '" . addslashes($notes) . "'
WHERE threadid = $threadid
");
替換為:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread SET
visible = $visible,
open = $open,
sticky = $sticky ,
goodnees = $goodnees ,
title = '" . addslashes(htmlspecialchars_uni($title)) . "',
iconid = $iconid,
notes = '" . addslashes($notes) . "'
WHERE threadid = $threadid
");
注意此處如果你添加過其他涉及主題塊的插件(例如,主題標題高亮,總置頂等等),請對比後修改。
showthread.php
搜索:
$show['unstick'] = iif($threadinfo['sticky'], true, false);
在後面添加:
// newvbb 修改開始
// 精華主題推薦-非凡豬0113
$show['ungoodnees'] = iif($threadinfo['goodnees'], true, false);
// newvbb 修改結束
includes/functions_forumdisplay.php
搜索:
// sticky thread?
if ($thread['sticky'])
{
$show['sticky'] = true;
$thread['typeprefix'] = $vbphrase['sticky_thread_prefix'];
}
else
{
$show['sticky'] = false;
$thread['typeprefix'] = '';
}
在後面添加:
// newvbb 修改結束
// 精華主題顯示-非凡豬
if ($vboptions['goodonoff'] AND $thread['goodnees'])
{
$show['goodnees'] = true;
}
else
{
$show['goodnees'] = false;
}
// newvbb 修改結束
貝斯特 目前離線  
送花文章: 1, 收花文章: 38 篇, 收花: 123 次
回覆時引用此帖
發文 回覆


主題工具
顯示模式

發表規則
不可以發文
不可以回覆主題
不可以上傳附加檔案
不可以編輯您的文章

論壇啟用 BB 語法
論壇啟用 表情符號
論壇啟用 [IMG] 語法
論壇禁用 HTML 語法
Trackbacks are 禁用
Pingbacks are 禁用
Refbacks are 禁用


所有時間均為台北時間。現在的時間是 10:50 AM


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


SEO by vBSEO 3.6.1