The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Request: Close Thread with BBCode
With all the new plugins making sites more mobile. All my mods and admins monitor the forum a lot via their phone.
They requested and I concur, that it would be very cool if a reply made with BBCode would be able to close the thread. Something like: Code:
[CLOSETHREAD] |
#2
|
|||
|
|||
Stealing some code from inlinemod.php to make a plugin using newpost_complete, I found that this:
Code:
$forumid = $foruminfo['forumid']; if ($threadinfo['visible'] AND can_moderate($forumid, 'canopenclose')) { if ($type == 'thread') $threadid = $post['threadid']; else $threadid = $threadinfo['threadid']; $vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "thread SET open = 0 WHERE threadid = $threadid "); $modlog[] = array( 'userid' =>& $vbulletin->userinfo['userid'], 'forumid' =>& $forumid, 'threadid' => $threadid, ); include("includes/functions_log_error.php"); log_moderator_action($modlog, 'closed_thread'); } will close the thread after the post is made, only (I hope) if the user has the right permissions. So if someone can figure out how to tell if the post had the [closethread] tag in it, I think you'd be there. I suppose one way might be to just check for a certain text string at the end of the post instead of using bbcode. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|