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> |
#12
|
||||
|
||||
Oh...
And you will need to add a vBulletin Options Setting for the "text to display" if the thread is Important Satan |
#13
|
|||
|
|||
Quote:
One small question before i get my hack installation hat on, how do i add the option setting for the "text to display"? Thanks a lot! Matthew |
#14
|
||||
|
||||
Right...
Open up your admin/config.php file, and add: Code:
$debug="1"; Upload it to your admin folder, then open up your Admin Control Panel... On the Sidebar, there should be new options underneath "vBulletin Options"... Click the "Edit Settings" button, and find where the "Sticky", "Moved" and "Poll" prefixes are... Shift+Click on "edit", and then click on "add setting" on the first page (not the one you just opened)...Simply copy the data from the second window to the first, then change the Data to suit the "important" version Then Add the new setting, close the second window, and then remove the "$debug" variable from admin/config.php Satan |
#15
|
|||
|
|||
Thanks a lot for that hellsatan i will install in the morning
Matthew |
#16
|
||||
|
||||
No problem Satan |
#17
|
|||
|
|||
Quick Question: What would the variable name be? "importantthreadprefix" ?
Thanks Matthew |
#18
|
|||
|
|||
I have done everything above but nothing comes up
|
#19
|
||||
|
||||
Have you made the changes to forumdisplay.php?
Satan |
#20
|
|||
|
|||
What changes need to be made?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|