vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   [MiniHack] Suspended/pending monitor on AdminCP home (https://vborg.vbsupport.ru/showthread.php?t=34563)

Jawelin 01-27-2002 10:00 PM

This is my first (mini)hack published - even wrote many customizations -, so please don't shoot against the player ! :pirate:

It's an Admin-purpose Swiss army knife to have the runtime status of your board pendings all at once on the AdminCP home.
Simply, along with user under moderation (coppa or not), it checks for
  • Board active or closed for maintenance ?
  • New members allowed ?
  • Existing posts awaiting moderation
  • Existing attachments awaiting moderation
  • ... if you have more ideas ... :china:
Each of the counters links to the appropriate page to manage its own value.
Is very very simple even to remove, so don't fear to try it.
No SS needed, of course.

Any test/tip should be very appreciated.

Let's go. Open the admin/index.php and find :
PHP Code:

if ($moderatenewmembers==or $usecoppa==1) { 

Then, just above, below or around the whole if-clause (beware the ending '}' ), add the following pieces of code:
PHP Code:

//HACK: Show BB NotActive on AdminCP homepage - begin
if (!$bbactive) {
    echo 
"<p><b>Remember: VB board is currently <a href=\"options.php?t=0&s=$session[sessionhash]#settinggroup1\">INACTIVE</a>&nbsp;!</b></p>";
}
//HACK: Show BB NotActive on AdminCP homepage - end

//HACK: Show NoNewUsers on AdminCP homepage - begin
if (!$allowregistration) {
    echo 
"<p><b>Remember: currently <a href=\"options.php?t=0&s=$session[sessionhash]#settinggroup6\">NO NEW USERS</a> are allowed !</b></p>";
}
//HACK: Show NoNewUsers on AdminCP homepage - end

//HACK: Show pending posts if any - begin
if (1==1) {        // flag to activate counter
  
$pending=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE visible=0");
  if (
$pending[posts]>0) {
    echo 
"<p><b><a href=\"../mod/moderate.php?action=posts&s=$session[sessionhash]\">There are currently $pending[posts] post(s) awaiting moderation</a>.</b></p>";
  }
}
//HACK: Show pending attachments if any - begin
if (1==1) {        // flag to activate counter
  
$pending=$DB_site->query_first("SELECT COUNT(*) AS attachments FROM attachment WHERE visible=0");
  if (
$pending[attachments]>0) {
    echo 
"<p><b><a href=\"../mod/moderate.php?action=attachments&s=$session[sessionhash]\">There are currently $pending[attachments] attachment(s) awaiting moderation</a>.</b></p>";
  }
}
//HACK: Show pending(s) if any - end 

That's all folks!
Am I a dummy hacker ? :surprised

Thanks

Natch 01-04-2003 10:10 PM

I've found that a more useful place for this is in the Welcome Box - using the Dynamic Templates hack - to show that moderation actions are required of Mod's / Admins :)

Thansk for the work tho ;) Excellent :D

Dean C 01-06-2003 10:13 AM

Thanks for releasing this - you might want to post this up in a text file so that unlicensed users can't have access to this hack :)

- miSt

EchoHype.com 01-17-2003 11:50 PM

Good idea there mist ;)


All times are GMT. The time now is 10:06 AM.

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.01409 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete