Back to vBulletin 3.7 Template Modifications

Alert Moderator Button
Mod Version: 1.00, by nerbert

This modification is in the archives.
vB Version: 3.7.3 Rating: (0 vote - 0 average) Installs: 1
Released: 28 Jun 2010 Last Update: Never Downloads: 0
Not Supported Uses Plugins Template Edits Additional Files Re-usable Code Translations  

This will place a red button in the thread display (SHOWTHREAD) page, or any other forum pages, that will alert moderators when a new user needs approval. When the button is clicked it takes you directly to the list of new users awaiting approval.

First, you will need to use the Add New Plugin feature to insert the following code into SHOWTHREAD:

PHP Code:
$waiting $db->query_first("SELECT COUNT(*) AS users FROM " TABLE_PREFIX "user WHERE usergroupid = 4"); 
Product: vBulletin
Location: showthread_start
Title: Find number of users to moderate
Execution order: 1
Plugin is active: Yes

In the SHOWTHREAD template under $navbar add:

HTML Code:
<!--##################### User to Moderate Button ####################-->
<if condition="$show['inlinemod']">
<if condition="$waiting[users] != 0">
<style type = "text/css">
#modbutton1 
{
background-color:#801010;
border-top:4px solid #aa1313;
border-right:4px solid #660000;
border-left:4px solid #aa1313;
border-bottom:4px solid #660000;
color: #e0e0e0;
font-weight: bold;
font-size:small;
padding:0px;
white-space:nowrap;
}
</style>
<table style =" padding:0px;" border = "0px" width = "100%" cellspacing="0">
          <tr>
                     <td id = "modbutton1" align = "center" >
                     <a href="admincp/user.php$session[sessionurl_q]?do=moderate" target = "_blank">
                     <img src = "images/buttons/moderate.gif" alt = "Click to go to the admin CP" border = "0px" />
                     </a></td>
          </tr>
</table>
<br />
</if>
</if>
<!--#################### /User to Moderate Button ####################-->
Now upload moderate.gif to images/buttons.

You are done. This can be disabled in Plugin Manager

To put this on another page find a hook location for that page and add the plugin there, and paste in the html under $navbar in the appropriate template.

If anyone wants to expand on this idea here are some hints:
The PHP code for this was taken directly out of forum/admincp/index.php. If you want to alert moderators to other moderated items you can grab the appropriate php from there.

You could make a more complex second conditional at the top of the html for more items to moderate and make table cells with conditionals for each moderated item.

To create the appropriate links go to your Control Panel Home and right click [view] for the item to moderate and click Properties. Insert "$session[sessionurl_q]" between "php" and "?do =.....".

The moderate.gif image is included only to make a larger target to click on. You could just as well add some padding to the css (6px) and put in "User to Moderate" instead of the image. If you want to make more table cells an image for each one will probably not be needed.

Download

No files for download.

Screenshots

Click image for larger version
Name:	moderate.gif
Views:	160
Size:	1.2 KB
ID:	118942   Click image for larger version
Name:	utmb.jpg
Views:	212
Size:	18.4 KB
ID:	118943  

Similar Mods

Last Reply Alert: Add last reply alert under new reply button vBulletin 3.6 Add-ons
Improved Moderator Alert System vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024