The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Ive done half the work for you...
All that is left for you to do is: edit the forumdisplay template and forumdisplay.php, and copying any reference to "sticky" (including queries) and changing it to "important"... Untested, so backup Open root/postings.php Find: Code:
// ############################### start stick / unstick thread ############################### if ($HTTP_POST_VARS['action'] == 'stick' OR ($action == 'stick' AND $s == $session['dbsessionhash'])) { $threadid=verifyid("thread",$threadid); $threadinfo=getthreadinfo($threadid); if (!$threadinfo[visible]) { $idname="thread"; eval("standarderror(\"".gettemplate("error_invalidid")."\");"); } if (!ismoderator($threadinfo[forumid],"canmanagethreads")) { show_nopermission(); } updateuserforum($threadinfo['forumid']); if ($threadinfo[sticky]) { $threadinfo[sticky]=0; $action="unstuck"; } else { $threadinfo[sticky]=1; $action="stuck"; } $threadinfo[notes]= "Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]"; $DB_site->query("UPDATE thread SET sticky=$threadinfo[sticky],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'"); eval("standardredirect(\"".gettemplate("redirect_sticky")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");"); } Code:
// ############################### start important / unimportant thread ############################### if ($HTTP_POST_VARS['action'] == 'important' OR ($action == 'important' AND $s == $session['dbsessionhash'])) { $threadid=verifyid("thread",$threadid); $threadinfo=getthreadinfo($threadid); if (!$threadinfo[visible]) { $idname="thread"; eval("standarderror(\"".gettemplate("error_invalidid")."\");"); } if (!ismoderator($threadinfo[forumid],"canmanagethreads")) { show_nopermission(); } updateuserforum($threadinfo['forumid']); if ($threadinfo[important]) { $threadinfo[important]=0; $action="unimportant"; } else { $threadinfo[important]=1; $action="important"; } $threadinfo[notes]= "Thread was made $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]"; $DB_site->query("UPDATE thread SET important=$threadinfo[important],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'"); eval("standardredirect(\"".gettemplate("redirect_important")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");"); } Run this Query: [sql]ALTER TABLE thread ADD important smallint(6) DEFAULT '0' NOT NULL[/sql] Add this template: redirect_important Code:
The thread has been successfully made $action. You are now being taken to the thread. Find: Code:
<option value="stick">Stick / Unstick Thread</option> Code:
<option value="stick">Stick / Unstick Thread</option> <option value="important">Important / Unimportant Thread</option> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|