The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add Option to Moderation Tools
How can I add an option to the Moderation Tools dropdown portion of Thread Tools?
|
#2
|
|||
|
|||
You would have to add your option to the SHOWTHREAD template, by editing the template or by doing a replacement in a plugin. Then you'd need a plugin using hook location threadmanage_action_switch to handle when it's selected (it's probably best to look at postings.php and search for that hook name to see how to handle it).
|
#3
|
||||
|
||||
What is it you are looking to add to it? This mod add quite a bit, https://vborg.vbsupport.ru/showthread.php?t=302780
|
#4
|
|||
|
|||
Quote:
Quote:
|
#5
|
|||
|
|||
Quote:
Fortunately I happened to know of a plugin that adds to that menu. The code (using hook showthread_start) looks something like this: Code:
if(can_moderate($threadinfo['forumid'])) { $vbulletin->templatecache['SHOWTHREAD'] = str_replace( '$vbphrase[remove_redirects]</label></div>', '$vbphrase[remove_redirects]</label></div>\n<div><label for=\"my_option\"><input type=\"radio\" name=\"do\" id=\"my_option\" value=\"my_option\" />My Option</label></div>', $vbulletin->templatecache['SHOWTHREAD'] ); } You'd want to replace all occurances of "my_option" with something else of course, and also the text "My Option" (and if you want to use a phrase for that, use something like $vbphrase[my_option]) |
#6
|
|||
|
|||
Quote:
|
#7
|
||||
|
||||
It could be just you, or the code, what is the exact code you are trying to use?
|
#8
|
|||
|
|||
Yep, my fault, sorry about that. I edited the code without testing it, and there was an extra double quote in there. I fixed the code above.
|
Благодарность от: | ||
CAG CheechDogg |
#9
|
||||
|
||||
Nice catch Kevin.
|
#10
|
|||
|
|||
Sorry, I'm so tired. Thank you so much, I really appreciate the help.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|