[RELEASE vb2.0] Show admin groups
March 15th, 2010(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.
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30
:)
same problem
Nevermind I just changed:
if ($user[sessionuserid]>0 and $user[lastactivity]>$datecut) eval("$onlinestatus = "".gettemplate("postbit_online")."";");
to
if ($user[sessionuserid]>0 and $user[lastactivity]>$datecut and $user[customtitle]>0) eval("$onlinestatus = "".gettemplate("postbit_online")."";");
Great hack BTW
I'm getting this error
Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 72
any ideas?
find: 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: 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")."";");
}
Thanks for your help with this!
One question though. If one of your super mods have a forum assigned to him he shows up in both the super mod list and the "regular" mod list. Is there a way to exclude him from the "regular" mod list?
sigh :)
not havin a good day thats usin latest php + apache on raq3.
corrected the error after a lil fiddlin thou :)
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.
Cheers :)
This might be a bit too much of a pain, but what if you have that moderator in his own usergroup (with all the mod privledges), so he wouldn't show in the listing?
Warning: Variable passed to each() is not an array or object in /home/hi/public_html/forums/showmods.php on line 110 I can only think of two possible reasons why this might happen:
1) you have no moderators
2) you are using the version of PHP that Noah used when he was building the ark...
any idea why??
http://www.mtb-news.de/forum/showmods.php
Thanks
Tom
Each time upgrade the Vb ! I need to reinstall showmod again !!
any idea ?
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... ;)
what is the adress of your forums kier???
Fatal error: Call to unsupported or undefined function foreach() in /web1/users/909090/docs/forums/showmods.php on line 78
Got another error with the new version:
Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 103 me 2 :(
(install_showmods.php)
_v7_
thanks :)
Had problems loading this thread on ISDN...
Tom
Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 72
any ideas?
Second... Since upgrading too RC3 I get an error in CGI application. Can someone please help me fix this?
help!!!!!!
can Anyone help me ?
....................can Anyone help me ?
I've got the formatting all worked out; that's a piece of cake. But I can't figure out how to actually get the guts in there.
Look: http://www.jjr512.com/forums/showmods.php?s=
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
Warning: Variable passed to each() is not an array or object in /home/hi/public_html/forums/showmods.php on line 110
sorry!!the problem clear!!
Hidden forums are shown! How can it be made so it doesn't show the hidden forums, and if a moderator is only a moderator in hidden forums, they aren't shown at all??
Same over here, how to not show hidden forums?
Apart of that: Great hack that really rocks!
Especially the install func. is amazing.
thx,
-Tom
Craig,
This might be a bit too much of a pain, but what if you have that moderator in his own usergroup (with all the mod privledges), so he wouldn't show in the listing?
Sadly not... good idea, tried it... but it doesn't work - I don't think this script uses the usergroup structure to determine who's a moderator :(
Any other thoughts, guys ?? :)
Parse error: parse error in /home/sites/home/web/forum/showmods.php on line 103
YOU simply ROCK
:)
SOMEBODY TELL ME!!
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
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.
Thx very much!!
This version create auto. the bbcodes need?
Are you now in the dev team?
and would also like the avatar thing and the title + posts :D
http://www.studenten-city.de/stf/showmods.php4
First, is there any way to add email under the pm button? Secondly the Location field is messed up if a user doesn't have a Location... Shouldnt there be a divider between it and the contact info (make a name for that last field)...??? Lastly, shoulnt there also be a divider between online and username? And call the first field online? Just thought it would be better that way! Thanks!
Yeah, is there a fix for that...??? Also can someone take a look at my above post.
--------------------------------------------------------------------------------
Originally posted by Zothip
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30
--------------------------------------------------------------------------------
same problem
help!!
help!!!!!!
can Anyone help me ?
while ($user = $DB_site->fetch_array($users)) {
$moderator[$user[userid]] = $user;
if ($modforums[$user[userid]] == "")
should the userid have a number for the mod like 5 in there or no? i dont know just guessing well please let me know how to fix this prob mine is the 110 error but if i ant gte it to list my mod then i cant fix it heh
Hidden forums are shown! How can it be made so it doesn't show the hidden forums, and if a moderator is only a moderator in hidden forums, they aren't shown at all??
...
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
so bad
:(
working excellent
I you use a custom title for your admins and moderators they will not show as online. Anyway to add this option to the query on the user table in the database so they show as online?
Parker
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
Open FORUMHOME Template. Find:
Under it add:
snyx
(i just wanna help)
worked like a charm ;) at consoleboards.com
keep up the amazing work
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?
1. Can you please show me how to add an email button link below the PM button link?
2. Can you fix, in a future version of this hack, the appearance so that the columns line up a bit neater?
Thanks!
The new version fixes the administrative-moderator bug, and adds full avatar support (can be turned off easily if you don't want it).
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...
search:
while(list($user) = each($moderator)) {
if (($modcount++ % 2) == 0) $backcolor = "{secondaltcolor}";
else $backcolor = "{firstaltcolor}";
$forumbits = $modforums[$user[userid]];
douserinfo();
eval("$moderatorbits .= "".gettemplate("showmods_bit")."";");
}
replays with this:
if ($moderator != "") {
while(list($user) = each($moderator)) {
if (($modcount++ % 2) == 0) $backcolor = "{secondaltcolor}";
else $backcolor = "{firstaltcolor}";
$forumbits = $modforums[$user[userid]];
douserinfo();
eval("$moderatorbits .= "".gettemplate("showmods_bit")."";");
}
}
I've managed to do this, I looked up the usergroup ID of the group I want to display, and used it in place of Super Moderators. However I still get the supermoderators header title for the table . I've read through the code and concluded that it must be bringing the title through in a global variable? (please note my inability to unerstand php - but my ability to learn? :))
I'd also like to be able to show multiple user_id's in where the supermoderators list is - could anyone point me in the right direction please? :)
Thanks
Warning: Variable passed to each() is not an array or object
vb/showmods.php on line 110
can any one help me ....!!!!!!! :confused: :(
http://130.49.87.53/forum/showmods.php?s=
Warning: Variable passed to each() is not an array or object in /home/sites/site60/web/forums/showmods.php on line 110
i like this hack , except for that error that shows at the top of the page
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.
Edit your header template and find:
> > > > > > >
Add the following at the end to have it as the last button
Hope this works for you :)
Don't forget that you have to run the install script again after you an upgrade!
Dankeschön!!
That was the solution!!
:D
everythings in the right place-but how EXACTLY do i link to that php file?
Warning: Cannot use a scalar value as an array in /showmods.php on line 19
Warning: Cannot use a scalar value as an array in /showmods.php on line 45
Warning: Cannot use a scalar value as an array in /showmods.php on line 19
Warning: Cannot use a scalar value as an array in /showmods.php on line 45
Warning: Cannot use a scalar value as an array in /showmods.php on line 19
Warning: Cannot use a scalar value as an array in /showmods.php on line 45
Warning: Cannot use a scalar value as an array in /showmods.php on line 19
Warning: Cannot use a scalar value as an array in /showmods.php on line 45
what's wrong??
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 19
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 45
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 19
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 45
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 19
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 45
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 19
Warning: Cannot use a scalar value as an array in /forums/showmods.php on line 45
Help!
now how can i get the tables to be wider than they are
http://www.r-music.net/forums/showmods.php
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... ;)
Simply add this somewhere in the showmods_bit template: :)
[edit] - full avatar functionality is now included.
Good Hack ! Thanks !
:rolleyes:
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?
[edit] - full avatar functionality is now included.
Works great! Thanks a lot. I'd like to change part of it slightly, instead of Super Moderators I would like to list all the members in another usergroup.
I'd also like to be able to show multiple user_id's in where the supermoderators list is - could anyone point me in the right direction please? :)
Sorry I can't answer any of the other guys questions, but I found a "solution" to my own problems, so I thought I may as well be able to share them. Anything which I say which is *obvious* please don't flame me for, I'm just starting out as I am sure many other people may be. :)
The install script included has all the data regarding layout, table title (usergroup titles) etc. This can be edited to change the names, however I wans't sure of the routine to actually grab this using the userid from the mySQL table.
Secondly, including other groups in the listings can be done by editing the showmods source as follows:
At the top where the usergroups are defined, such as:
$supermod_usergroup = 5;
add as many new groups as you want, or change the current group value
$myother_usergroup = 10;
$alsomyother_usergroup = 9;
Next find the "// get administrators & super moderators *************************" section of code.
where:
WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup)
change to:
WHERE user.usergroupid IN($admin_usergroup,$supermod_usergroup,$myother_u sergroup,$alsomyother_usergroup)
Next, further down find:
while ($user = $DB_site->fetch_array($users)) {
if ($user[usergroupid] == $admin_usergroup) {
if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$adminbits .= "".gettemplate("showmods_adminbit")."";");
}
else {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$supermodbits .= "".gettemplate("showmods_adminbit")."";");
}
}
and change to:
while ($user = $DB_site->fetch_array($users)) {
if ($user[usergroupid] == $admin_usergroup) {
if (($admincount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$adminbits .= "".gettemplate("showmods_adminbit")."";");
}
else if ($user[usergroupid] == $myother_usergroup) {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$supermodbits .= "".gettemplate("showmods_adminbit")."";");
}
else if ($user[usergroupid] == $alsomyother_usergroup) {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$supermodbits .= "".gettemplate("showmods_adminbit")."";");
}
else {
if (($smodcount++ % 2) == 0) $backcolor = "#EFEFEF";
else $backcolor = "#DEDEDE";
douserinfo();
eval("$supermodbits .= "".gettemplate("showmods_adminbit")."";");
}
}
It works for me anyway! Hope this is of some help to someone, and not completely lame :)
Parse error: parse error in /home/usr/(...)/forum/showmods.php on line 31
Am using php3...
Any solution pleeaase? :o
-Tom
Sorry I'm of no help. ;)
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:: ;)
The mod hack shows mods based on their forums. How about changing it so that it shows all mods, regardless whether they have a forum or not?
Also, how do I change the hack so that forums are also displayed for the admins and supermods?
Hidden forums are shown! How can it be made so it doesn't show the hidden forums, and if a moderator is only a moderator in hidden forums, they aren't shown at all??
.....
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.
don't let us parse-erroneous people down :(
Quite a few people in this thread -including me- would love to integrate your hack, but have those nasty parse errors.
It may has something to do with using PHP3 which may be outdated, but the only option for us - at least me.
So, please state if there's any chance to get it running under PHP3 or ...
Thanks,
-Tom
Thanx for the hard work:)
~Chris
Warning:
Variable passed to each() is not an array or object in /.........../..........showmods.php on line 110
thx
i wonder can anybody tell the way of adding custom user groups ... I noticed that Martz did it ...but the problem with his modification was .... the custom user groups adds up to the super moderator table which is not good
I hope somebody will tell me how to have the custom user group to a different table
has an error...sorry for that!
Originally posted by Zothip
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30
--------------------------------------------------------------------------------
same problem
help!!
once you have made somone a mod and then removed there mod and set the permission back to a standed account, they still show on the list.
It maybe just me but as anyone else had this ?
#If you have any other info about this subject , Please add it free.# |