vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Show admin groups (https://vborg.vbsupport.ru/showthread.php?t=11425)

Kier 03-14-2001 10:00 PM

Updated to Version 2.0 16-3-2001
(v2 includes bug fixes and full avatar support)

This is a complete rewrite of my super-moderators listing hack for Me2Be...

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

This new version shows all members of the Administrators, Super-Moderators and Moderators groups. Note that moderators do not have to be placed in a new usergroup for this hack to work.

Users have their online status and location displayed, along with a PM link. Moderators also have the forums they moderate displayed. There is an option in the script to enable avatar support.

Installation is almost completely automatic, through an install script (supplied). Upload showmods.php to your forums directory, and install_showmods.php to your forums/admin folder.

If you want to disable avatars, open the showmods.php script and set $showavatars to "no". (If you have disabled avatars in the control panel, they will not be shown anyway).

Then run the install script (admin/install_showmods.php) each time you upgrade your board to a new version of vbulletin, in order to add the necessary templates to the master template set.

You should run the install script if you are upgrading from the previous version too, it will perform the necessary steps to upgrade the global templates.

You can then add a link to "showmods.php?s=$session[sessionhash]" to any of your other templates.

03-15-2001 03:46 AM

*bows to Kier*

03-15-2001 04:23 AM

Ok if I want to include the moderaters avatar next to their name how would I do that?

Great hack BTW

03-15-2001 04:43 AM

Simply add this somewhere in the showmods_bit template:
Code:

<img src="avatar.php?s=$session[sessionhash]&userid=$user[userid]" border=0>
:)

[edit] - full avatar functionality is now included.

03-15-2001 04:56 AM

that didn't work :(

03-15-2001 05:14 AM

That code will only work with custom avatars...

I'll post a code snippet later for full avatar support, but now I gotta go to bed... PHP gets much more tricky to write after you've been up for 48 hours... ;)

03-15-2001 06:55 AM

No problems to install it

03-15-2001 08:32 AM

Will install it tonight ! :)

03-15-2001 08:55 AM

YOU DA MAN!!

Thanks for your help with this!

03-15-2001 10:57 AM

i got problem is as below.
Fatal error: Call to unsupported or undefined function foreach() in /web1/users/909090/docs/forums/showmods.php on line 78

03-15-2001 11:27 AM

wow! another brilliant hack!

03-15-2001 12:01 PM

Quote:

Originally posted by Ryan Little
Forums that have administrative moderators are shown more than once under the moderators table. This could become very annoying if an administrator moderated more than one forum.

Is there any way to prevent this from happening? See attachment.

Got the same Problem

03-15-2001 01:35 PM

cool :D

03-15-2001 02:05 PM

Quote:

Originally posted by pipi
i got problem is as below.
Fatal error: Call to unsupported or undefined function foreach() in /web1/users/909090/docs/forums/showmods.php on line 78

How did you get hold of that version? The version downloadable above does not use the foreach() function at all.

03-15-2001 03:33 PM

Got same prob with admin = mod and listing all forums x times.....

and would also like the avatar thing and the title + posts :D

03-15-2001 03:46 PM

Just incase anyone wants it, I took 2 mins and make a View List link next to my Moderator column. It underlines on mouseover like the categories.

Open FORUMHOME Template. Find:
PHP Code:

<td valign=bottom><smallfont COLOR="#afa3c5"><B>Moderator</B></smallfont

Under it add:
PHP Code:

<!--- Veiw Mod List --->
|&
nbsp;<b><a href="showmods.php?s=$session[sessionhash]target="_blank"><smallfont COLOR="#FFFFFF">View List</a></smallfont>
<!--- /
Veiw Mod List ---> 

snyx
(i just wanna help)

03-15-2001 03:50 PM

I'm getting this error

Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 72

any ideas?

03-15-2001 03:56 PM

Quote:

Originally posted by upgrader
I'm getting this error

Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 72

any ideas?

find:
Code:

        if ($modforums[$user[userid]] == "")
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumbit")."\";");
        else {
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumsplit")."\";");
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumbit")."\";");
                }

try change it to:
Code:

        if ($modforums[$user[userid]] == "") {
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumbit")."\";");
        } else {
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumsplit")."\";");
                eval("\$modforums[".$user[userid]."] .= \"".gettemplate("showmods_forumbit")."\";");
                }


03-15-2001 04:24 PM

Not putting the brackets around a one line if/else is valid. I would guess (without looking at the code) that your problem is that you need to change eval("$modforums to eval("\$modforums

03-15-2001 04:38 PM

<font color="red">DO NOT</font> copy the code in The Sisko's post above.

The vB PHP parsing feature has a problem with some escaped characters, so if you put \$ into a [ PHP ] block, it will be printed out as $.

The code in showmods.php already has those $ symbols escaped.

[edit] - now that The Sisko has changed hos post to use [ code ] tags instead of [ php ] tags, go ahead and try the modification if you like... although I can't see that it would make a difference, as leaving out the braces for a single statement in a loop is perfectly legal syntax in PHP

03-15-2001 04:45 PM

Didn't know that the: The vB PHP parsing funktion
has an error...sorry for that!

03-15-2001 04:57 PM

Well sisco's code change actually cured my problem

03-15-2001 05:56 PM

nice :)

what is the adress of your forums kier???

03-15-2001 08:08 PM

Quote:

Originally posted by jojo85
nice :)

what is the adress of your forums kier???

My forums are not currently open to the public. I'll post an announcement when the site opens.

03-15-2001 09:08 PM

Quote:

Originally posted by Kier
How did you get hold of that version? The version downloadable above does not use the foreach() function at all.
my version is vb2 b2 upgraded from vb114, is htat possible to solve it? thanks you offer a nice hack

03-15-2001 11:47 PM

Hey kier that was an excellent hack...

YOU simply ROCK

03-16-2001 02:53 AM

I just fixed it...

I can't believe how stupid the problem was...:rolleyes: the reason I couldn't reproduce the error on my board was because I was using a completely different version of the code.

Somehow I managed to zip up an old version of the code for the attachment.

I'm just adding the requested avatar functionality, and I'll upload the new version.

::hides face in shame:: ;)

03-16-2001 03:02 AM

ok hurry up open your forums :)

03-16-2001 04:20 AM

Updated - check the first post in this thread

The new version fixes the administrative-moderator bug, and adds full avatar support (can be turned off easily if you don't want it).

Quote:

Originally posted by jojo85
ok hurry up open your forums :)
Erm... no ;).

My current hosting arrangement is about to go belly-up, and I'm trying to raise the cash to organise a new server... which is not easy for a site as large and complex as that which I've built...

03-16-2001 04:26 AM

Quote:

Originally posted by Kier
Updated - check the first post in this thread

The new version fixes the administrative-moderator bug, and adds full avatar support (can be turned off easily if you don't want it).

Erm... no ;).

My current hosting arrangement is about to go belly-up, and I'm trying to raise the cash to organise a new server... which is not easy for a site as large and complex as that which I've built...

do we need remove old templates before install new version?

03-16-2001 04:38 AM

The install script will update all the global templates.

If you have customized any templates, you should delete showmods_pm, as it's no longer used, and then add $user[avatar] somewhere in showmods_bit and showmods_adminbit.

03-16-2001 05:17 AM

Quote:

Originally posted by Kier
Updated - check the first post in this thread

The new version fixes the administrative-moderator bug, and adds full avatar support (can be turned off easily if you don't want it).

Erm... no ;).

My current hosting arrangement is about to go belly-up, and I'm trying to raise the cash to organise a new server... which is not easy for a site as large and complex as that which I've built...

Works fine now :D:D
thank you

03-16-2001 05:21 AM

Got another error with the new version:

Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 103

03-16-2001 05:22 AM

Quote:

Originally posted by Ryan Little
I know it'll be great, but what exactly will your new site feature? Is it a new version of Alternate Perspective 3D's site or a new site altogether? Newayz, I know all of us can't wait.
This is all I am going to say on the matter for now... ;)

03-16-2001 06:15 AM

Worked like a charm. The avatar's are great

03-16-2001 07:28 AM

Ok!
Thx very much!!
This version create auto. the bbcodes need?

03-16-2001 07:36 AM

Quote:

Originally posted by jojo85
Ok!
Thx very much!!
This version create auto. the bbcodes need?

Just run the install script and follow the simple instructions. It's a very easy hack to install.

03-16-2001 07:53 AM

hehe :)
Are you now in the dev team?

03-16-2001 07:57 AM

Quote:

Originally posted by jojo85
hehe :)
Are you now in the dev team?

If I am, I haven't heard about it. Wouldn't my user title show vBulletin Developer if I was on the dev team?

03-16-2001 07:59 AM

Bah, If I keep installing Kier hacks at this rate I will have almost as much of your coding as vB code. Another great hack Kier :)


All times are GMT. The time now is 04:44 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.02178 seconds
  • Memory Usage 1,822KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (11)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
  • (40)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