vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Creating AutoList of SuperMods (https://vborg.vbsupport.ru/showthread.php?t=10820)

Me2Be 03-08-2001 05:29 PM

Can someone help me with this? I'd really like to be able to have a link where someone would click and it would list all of those in the supermoderator admin group with the following info in a table:

Username Location PM (link to send pm)

How can this be done?

03-08-2001 05:42 PM

Give me a little while to finish the documentation for the new version of my vBcode buttons and I'll write this for you in a jiffy :)

03-08-2001 05:51 PM

Quote:

Originally posted by Kier
Give me a little while to finish the documentation for the new version of my vBcode buttons and I'll write this for you in a jiffy :)
Thanks :)

03-08-2001 08:27 PM

1 Attachment(s)
I hope this is what you wanted...

http://kier.3dfrontier.com/vbhacks/supermods.gif

If you link to the attached PHP file, the page will display a list of all your super-moderators, together with a link to their profile and PM, and a display of their location.

I included the forum-jump just because...

To install, just copy the getsmods.php file to your forums directory, and create three custom templates using the .htm files in the attached zip.

03-08-2001 08:50 PM

Thank you! Works perfectly :)

03-09-2001 11:09 AM

Kier strikes again :D

03-09-2001 09:35 PM

Another great hack! Thanks :)

I also added the user's online status to this as well... for those interested:

edit file getsmods.php

Change the main query to read:
Code:

$users = $DB_site->query("
        SELECT DISTINCT
        session.userid AS sessionuserid,
        user.*, userfield.* FROM user
        LEFT JOIN userfield ON (userfield.userid = user.userid)
        LEFT JOIN session  ON (session.userid = user.userid
                                            AND session.userid <> 0
                                            AND user.invisible = 0
                                            AND session.lastactivity>0)
        WHERE  ( user.usergroupid=$super_moderators_group_id )
        ORDER BY user.username");

Find:
Code:

        if ($user[field2] == "") $user[location] = "&nbsp;";
        else $user[location] = $user[field2];

And add AFTER:
Code:

        if ($showonline) {
              unset($onlinestatus);
              if ($user[sessionuserid]>0) {
                  eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
              } else {
                  eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
              }
            }

Template Change supermodsbit
Add
Code:

$onlinestatus

03-09-2001 09:45 PM

Thanks Kier & Chris - this is just perfect!!!

03-09-2001 09:50 PM

Yep.. Works great.

03-10-2001 08:46 PM

don't forget to add postbit_offline and postbit_online to the list of $templatesused, or the page will use an extra two queries...


All times are GMT. The time now is 08:15 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.02007 seconds
  • Memory Usage 1,735KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete