Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
Alert Moderator Button Details »»
Alert Moderator Button
Version: 1.00, by nerbert nerbert is offline
Developer Last Online: Aug 2017 Show Printable Version Email this Page

Category: Moderators Functions - Version: 3.7.3 Rating:
Released: 06-27-2010 Last Update: Never Installs: 1
Uses Plugins Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-28-2010, 02:39 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I didn't know how to get moderate.gif in files so you will have to get it out of screen shots.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03214 seconds
  • Memory Usage 2,201KB
  • Queries Executed 15 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete