![]() |
|
|||||||
| 論壇說明 |
|
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
|
|
主題工具 | 顯示模式 |
|
|
#6 (permalink) |
|
長老會員
![]() |
搜索:
$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", "&sort=$sortfield&order=$sortorder&pp=$perpage&daysprune=$daysprune"); 替換為: // newvbb 修改開始 // 精華區 if ($_REQUEST['do']=='viewgoodnees') { $dogoodnees = '&do=viewgoodnees'; } $pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid$dogoodnees", "&sort=$sortfield&order=$sortorder&pp=$perpage&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,
|
|
向 貝斯特 送花的會員:
|