Advertisement:

Author Topic: Alert when few global mods online  (Read 21128 times)

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Alert when few global mods online
« on: September 11, 2005, 09:48:30 AM »
Want to have a visual alert to your administrators when there are less than 4 global moderators online? Just add this code near the top of your index.template.php:

Code: [Select]
// Staff count
if ($isadmin) {
// Get a count of all global mods currently online
$result = db_query("SELECT COUNT(*) FROM smf_members, smf_log_online WHERE smf_members.ID_GROUP = 2 and smf_members.ID_MEMBER=smf_log_online.ID_MEMBER");
$res = mysql_fetch_array($result);
$staffCount = $res[0];
mysql_free_result($result);

if ($staffCount < 4) {
echo<<<HTML
<h5 style="background: #600; font-weight: bold; color: #fff; text-align: center; margin: 0; padding: 0;">+ There are currently $staffCount Staff online +</h5><table width="100%" cellpadding="0" cellspacing="0" border="0">
HTML;
}
}

You can change the "if" statement to show this for global mods as well... that way they know when they're "it" so to speak. This may help keep an "even coverage" of your Staff.


Cheers
Mike
« Last Edit: September 11, 2005, 09:50:17 AM by Mike Bobbitt »

Offline eriktm

  • Sr. Member
  • ****
  • Posts: 727
  • Gender: Male
  • The world as you know it, will soon be changed...
Re: Alert when few global mods online
« Reply #1 on: April 06, 2006, 11:35:54 AM »
Have you created a mod for this?

If not, I`m gonna do it... :P
« Last Edit: April 06, 2006, 11:37:27 AM by Erik™ »

Offline Mike Bobbitt

  • Full Member
  • ***
  • Posts: 597
    • Army.ca
Re: Alert when few global mods online
« Reply #2 on: April 06, 2006, 03:57:54 PM »
No, I didn't create a mod... I'm a neophyte to that process unfortunately. If you're willing and able, please go ahead.

Thanks!

Offline eriktm

  • Sr. Member
  • ****
  • Posts: 727
  • Gender: Male
  • The world as you know it, will soon be changed...
Re: Alert when few global mods online
« Reply #3 on: April 07, 2006, 01:51:29 AM »
I`m gonna start with it a bit later today...

Offline eriktm

  • Sr. Member
  • ****
  • Posts: 727
  • Gender: Male
  • The world as you know it, will soon be changed...
Re: Alert when few global mods online
« Reply #4 on: April 07, 2006, 08:43:50 AM »
I didn`t made to create it... :'( :'( :'(

Offline DreamersBox

  • Semi-Newbie
  • *
  • Posts: 15
  • Gender: Male
  • Innovation & Creativity
    • dreamersbox on Facebook
    • @dreamersbox on Twitter
    • Arts & Innovation
Re: Alert when few global mods online
« Reply #5 on: December 23, 2016, 09:00:25 PM »
How far has this gotten... if anywhere...

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,767
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Alert when few global mods online
« Reply #6 on: December 23, 2016, 09:05:41 PM »
This is a really old thread :P.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Irisado

  • Doc Coordinator
  • SMF Hero
  • *
  • Posts: 9,009
  • Soñando debajo del arco iris
Re: Alert when few global mods online
« Reply #7 on: December 24, 2016, 05:32:07 AM »
Based on the fact that the last post here was over ten years ago, I think that you can draw your own conclusions.

Please do not revive such old topics in the future.  If you want to start a new topic on this issue, please do so in the SMF Coding Discussion board.  Topic locked.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente