PDA

View Full Version : [RELEASE vb2.0] Show admin groups


Kier
Thu 15th Mar '01, 12:08am
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.

Jake Bunce
Thu 15th Mar '01, 12:46am
*bows to Kier*

Sarge
Thu 15th Mar '01, 1:23am
Ok if I want to include the moderaters avatar next to their name how would I do that?

Great hack BTW

Kier
Thu 15th Mar '01, 1:43am
Simply add this somewhere in the showmods_bit template: <img src="avatar.php?s=$session[sessionhash]&userid=$user[userid]" border=0> :)

[edit] - full avatar functionality is now included.

Sarge
Thu 15th Mar '01, 1:56am
that didn't work :(

Kier
Thu 15th Mar '01, 2:14am
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... ;)

EXCHANGE
Thu 15th Mar '01, 3:55am
No problems to install it

jojo85
Thu 15th Mar '01, 5:32am
Will install it tonight ! :)

The_Sisko
Thu 15th Mar '01, 5:55am
YOU DA MAN!!

Thanks for your help with this!

pipi
Thu 15th Mar '01, 7:57am
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

chrispadfield
Thu 15th Mar '01, 8:27am
wow! another brilliant hack!

EXCHANGE
Thu 15th Mar '01, 9:01am
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

John Harrison
Thu 15th Mar '01, 10:35am
cool :D

Kier
Thu 15th Mar '01, 11:05am
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.

The_Sisko
Thu 15th Mar '01, 12:33pm
Got same prob with admin = mod and listing all forums x times.....

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

snyx
Thu 15th Mar '01, 12:46pm
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:
<td valign=bottom><smallfont COLOR="#afa3c5"><B>Moderator</B></smallfont>
Under it add:
<!--- 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)

upgrader
Thu 15th Mar '01, 12:50pm
I'm getting this error

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

any ideas?

The_Sisko
Thu 15th Mar '01, 12:56pm
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: 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")."\";");
}

Freddie Bingham
Thu 15th Mar '01, 1:24pm
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

Kier
Thu 15th Mar '01, 1:38pm
DO NOT 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

The_Sisko
Thu 15th Mar '01, 1:45pm
Didn't know that the: The vB PHP parsing funktion
has an error...sorry for that!

upgrader
Thu 15th Mar '01, 1:57pm
Well sisco's code change actually cured my problem

jojo85
Thu 15th Mar '01, 2:56pm
nice :)

what is the adress of your forums kier???

Kier
Thu 15th Mar '01, 5:08pm
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.

pipi
Thu 15th Mar '01, 6:08pm
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

gjgjgj
Thu 15th Mar '01, 8:47pm
Hey kier that was an excellent hack...

YOU simply ROCK

Kier
Thu 15th Mar '01, 11:53pm
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:: ;)

jojo85
Fri 16th Mar '01, 12:02am
ok hurry up open your forums :)

Kier
Fri 16th Mar '01, 1:20am
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).

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...

pipi
Fri 16th Mar '01, 1:26am
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?

Kier
Fri 16th Mar '01, 1:38am
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.

EXCHANGE
Fri 16th Mar '01, 2:17am
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

upgrader
Fri 16th Mar '01, 2:21am
Got another error with the new version:

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

Kier
Fri 16th Mar '01, 2:22am
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... ;)

Sarge
Fri 16th Mar '01, 3:15am
Worked like a charm. The avatar's are great

jojo85
Fri 16th Mar '01, 4:28am
Ok!
Thx very much!!
This version create auto. the bbcodes need?

Kier
Fri 16th Mar '01, 4:36am
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.

jojo85
Fri 16th Mar '01, 4:53am
hehe :)
Are you now in the dev team?

Kier
Fri 16th Mar '01, 4:57am
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?

Bane
Fri 16th Mar '01, 4:59am
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 :)

pipi
Fri 16th Mar '01, 5:31am
Warning: Variable passed to each() is not an array or object in /home/hi/public_html/forums/showmods.php on line 110

Kier
Fri 16th Mar '01, 6:29am
Originally posted by pipi
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...

Parker Clack
Sun 8th Apr '01, 7:14am
Kier:

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

Parker Clack
Sun 8th Apr '01, 7:42am
Kier:

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")."\";");

The_Sisko
Sun 8th Apr '01, 12:15pm
After I upgraded to beta 4 it only shows the topics of the page but no admin, mods,..???
http://www.studenten-city.de/stf/showmods.php4

Lost
Mon 9th Apr '01, 8:37am
Great lill hack :)
Thanx for the hard work:)

TechTalk
Sat 14th Apr '01, 6:12pm
Kier please tell me since you are a developer that all of this will be added to vb 2.1?? I think this is a great feature and gives the users a little more info which is always good.

~Chris

Zothip
Sun 15th Apr '01, 3:33pm
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30

:)

JJR512
Tue 17th Apr '01, 1:16am
This hack is pretty neat. I just have two questions.

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!

floleb7
Sat 21st Apr '01, 8:37am
Originally posted by Zothip
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30

:)

same problem

Craig Antill
Wed 25th Apr '01, 2:47pm
Hidden forums are showing up in the list - any way to hide them ??

inetd
Wed 25th Apr '01, 3:53pm
Add please to this VB hack possibility of sending identical PM at once all Moderators/SuperModerators/Administrator

Craig Antill
Thu 26th Apr '01, 1:56pm
Any thoughts on the hidden forums thing ? I've agreed to put a list of admins and moderators together for our site, and really want to use this hack, but i've got to do it soon, so I might end up doing it by hand! :( Of course, if it's not possible to amend this hack to suit, i'll start working now... :)

Susan
Thu 26th Apr '01, 2:34pm
Craig, you could always just take the forums out of the templates. I know that's not ideal.... Seems that some of the "include" code that's used for pulling posts on a main page has something that checks the forums for specific forums...probably could be modified to work with this, but I'm not even to the stage in PHP where I could do that. Maybe someone else could.

Sorry I'm of no help. ;)

Craig Antill
Thu 26th Apr '01, 2:37pm
Yeah, I thought of that, but one of our hidden forums has a moderator who does not moderate any of the public forums... would cause huge confusion! :) Thanks anyway :)

Lorina
Thu 26th Apr '01, 2:54pm
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?

ztsky
Fri 27th Apr '01, 4:13am
\--------------------------------------------------------------------------------
Originally posted by Zothip
Parse error: parse error in /home/zothip2/squadpage-www/forums/showmods.php on line 30


--------------------------------------------------------------------------------



same problem

help!!

Zothip
Fri 27th Apr '01, 10:12am
It must be the version of php we have...

Craig Antill
Fri 27th Apr '01, 2:37pm
Originally posted by Lorina
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 ?? :)

ff92k
Fri 27th Apr '01, 4:18pm
Works like a dream...nice 1

Joshs
Sat 28th Apr '01, 3:45pm
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!

Blue2000
Sun 29th Apr '01, 8:32pm
this is a nice hack mate, but i have a problem with it


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 ?

Joshs
Sun 29th Apr '01, 8:48pm
Originally posted by Joshs
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.

ztsky
Thu 3rd May '01, 11:33pm
Originally posted by ztsky
\--------------------------------------------------------------------------------
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 ?

Martz
Mon 7th May '01, 7:12am
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'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

ztsky
Mon 7th May '01, 1:02pm
Originally posted by ztsky


help!!!!!!
can Anyone help me ?


....................can Anyone help me ?

Mohamed
Tue 8th May '01, 8:16am
hi boys I have in this hack in :

Warning: Variable passed to each() is not an array or object


vb/showmods.php on line 110


can any one help me ....!!!!!!! :confused: :(

Martz
Tue 8th May '01, 12:55pm
Originally posted by Martz
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 :)

Mohamed
Thu 10th May '01, 2:24pm
no body can't help me

so bad
:(

Maverick1236
Thu 10th May '01, 11:03pm
sorry-im a newbie
everythings in the right place-but how EXACTLY do i link to that php file?

Martz
Fri 11th May '01, 6:04am
Well, I created a new button called top_links.gif to go along with usercp, register, calendar etc etc

Edit your header template and find:


<!-- toplinks -->
<a href="usercp.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_profile.gif" alt="Edit your profile" border="0"></a
><a href="register.php?s=$session[sessionhash]&action=signup"><img width="67" height="25" src="images/top_register.gif" alt="Registration is free!" border="0"></a
><a href="calendar.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_calendar.gif" alt="Calendar" border="0"></a
><a href="memberlist.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_members.gif" alt="Find other members" border="0"></a
><a href="misc.php?s=$session[sessionhash]&action=faq"><img width="67" height="25" src="images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a
><a href="search.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_search.gif" alt="Search" border="0"></a
><a href="index.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_home.gif" alt="Home" border="0"></a
> <!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img width="67" height="25" src="images/top_logout.gif" alt="Logout" border="0"></a> -->


Add the following at the end to have it as the last button

<a href="links.php?s=$session[sessionhash]"><img width="67" height="25" src="images/top_links.gif" alt="Links Directory" border="0"></a>


Hope this works for you :)

Joshs
Sun 13th May '01, 9:28am
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!

Second... Since upgrading too RC3 I get an error in CGI application. Can someone please help me fix this?

Joshs
Sun 13th May '01, 9:33am
Okay, I forgot to put the php file back, but now I am getting blank pages...

Dontom
Mon 14th May '01, 3:31pm
after upgrading to rc 3 showmods stopped working (groups are empty..)-
any idea why??
http://www.mtb-news.de/forum/showmods.php
Thanks
Tom

Martz
Wed 16th May '01, 4:47am
Dontom - this is just a guess, but try and check in phpAdmin os similar what the values of your groupid's are - and make sure they are the same as the ones declared at the start of the script.

Joshs
Wed 16th May '01, 8:22am
Anyone have any idea why I am getting a blank page?

Christian
Wed 16th May '01, 5:49pm
Don't forget that you have to run the install script again after you an upgrade!

Dontom
Thu 17th May '01, 5:30pm
Originally posted by Christian
Don't forget that you have to run the install script again after you an upgrade!
Dankeschön!!
That was the solution!!
:D

inetd
Mon 21st May '01, 5:33pm
Make an opportunity of sending PM at once all Adminstators and/or Moderators and/or Super Moderators. How it is made in buddy list. :cool:

Dontom
Mon 21st May '01, 5:40pm
Don't forget that you have to run the install script again after you run an upgrade!

(install_showmods.php)

Joshs
Mon 21st May '01, 5:53pm
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!

Brady
Mon 21st May '01, 7:06pm
THANKS!

worked like a charm ;) at consoleboards.com

keep up the amazing work

Rogue
Sat 26th May '01, 6:41pm
Great hack!
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?

timmiman
Sun 27th May '01, 12:42am
I have this problem, please help!!!

Warning:
Variable passed to each() is not an array or object in /.........../..........showmods.php on line 110


thx

Thomas P
Sun 3rd Jun '01, 8:50am
Same error here:

Parse error: parse error in /home/usr/(...)/forum/showmods.php on line 31

Am using php3...

Any solution pleeaase? :o
-Tom

DEMOLiTiON
Sun 3rd Jun '01, 4:06pm
Originally posted by upgrader
Got another error with the new version:

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

Zarkov
Mon 4th Jun '01, 5:58am
Kier, Well done this is a great hack, installed and working like a charm in less than 2 mins.

Cheers :)

Thomas P
Sat 9th Jun '01, 2:55pm
Please Kier,

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

grant
Sun 10th Jun '01, 7:58pm
Warning: Variable passed to each() is not an array or object in c:\apache\htdocs\carlingfxp\showmods.php on line 110

sigh :)

not havin a good day thats usin latest php + apache on raq3.


corrected the error after a lil fiddlin thou :)

Nocturnal2
Sun 24th Jun '01, 4:48pm
How would I edit this to say include one of my own user groups ? For Example I have a group called Mentors? how would i edit it to display this as well ?

rmusic
Thu 12th Jul '01, 6:41am
im going to add my line 110 error :)

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

rmusic
Thu 12th Jul '01, 6:59am
ok i seen in an erlier post that if you have no moderators that you will get the 110 error so i figured that

now how can i get the tables to be wider than they are

http://www.r-music.net/forums/showmods.php

Marty
Thu 12th Jul '01, 7:00pm
test this :

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")."\";");
}
}

DarkReaper
Tue 17th Jul '01, 7:44pm
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??

Kengan
Thu 19th Jul '01, 1:11am
Originally posted by Kier
Simply add this somewhere in the showmods_bit template: <img src="avatar.php?s=$session[sessionhash]&userid=$user[userid]" border=0> :)

[edit] - full avatar functionality is now included.


Good Hack ! Thanks !
:rolleyes:

Thomas P
Sat 28th Jul '01, 7:58pm
Originally posted by DarkReaper
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

GB
Sat 28th Jul '01, 8:42pm
Got the hack to work, but when i click on the link on the very right that says click here to send PM, it brings up an error page. Also it doesnt seem like any of the graphics are working in my showmods panel.....the image can be found here (http://www.anabolic-advantage.com/images/showmods.jpg)

Thomas P
Sun 29th Jul '01, 5:57am
[GB: please take the pic off or make it smaller, 1440055 bytes is way too big]
thanks :)
Had problems loading this thread on ISDN...
Tom

JJR512
Sun 5th Aug '01, 10:00pm
I'm still wondering how to add an email link. Actually now I'd like to add an email link, homepage link, findposts link, and also want to show the join date and post count. Yes: I'm trying to make it look very similar to the standard Memberlist.

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=

dxb
Fri 10th Aug '01, 9:19pm
great hack Kier .....

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

Kengan
Mon 13th Aug '01, 8:18pm
Good Hack !!

Each time upgrade the Vb ! I need to reinstall showmod again !!

any idea ?

Panja
Thu 23rd Aug '01, 8:42am
tnx alot
working excellent

Steve_C
Sun 26th Aug '01, 10:43am
Using 2.0.3. Worked fine before I added moderators and now we get these errors:

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!

LuBi
Sun 26th Aug '01, 11:27am
Does this hack work for 2.0.3 and is the file updated and complete?

DarkReaper
Sun 26th Aug '01, 1:17pm
Hidden forums are shown...shouldn't be....

almighty one
Wed 5th Sep '01, 12:23am
well my problem is i make people moderators but they dont show on the list as mod? is there soemthing in here i need to edit? i would really like to use this hack i have noticred in the code it has about
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

almighty one
Wed 5th Sep '01, 12:36am
ok i have noticed nowhere in this thing does it call for a mod deal it only has admin and super mods maybe ya could add the moderators to it and fix this 110 line error i tried but i know nothing of php thanx for fixin it in advance

DarkReaper
Wed 5th Sep '01, 7:40pm
Originally posted by DarkReaper
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??

...

squawell
Wed 5th Sep '01, 9:31pm
CANN'T INSTALL~~~WHY??

SOMEBODY TELL ME!!

LuBi
Wed 5th Sep '01, 9:36pm
What happened to the demo pic?

Strife
Thu 6th Sep '01, 4:10pm
I installed it on my forums, but the avatars won't change even when I it reload on the page. :\ Could anyone help me out?

http://130.49.87.53/forum/showmods.php?s=

Goddess Washu
Thu 6th Sep '01, 6:02pm
Another thing is this hack doesn't hide forums (and consequently some moderators) of hidden forums. Hopefully that is something Kier can add. I just don't have the time to write that much code. (Yeah I know it's not much, but I am really busy lately). Thanks for all the help.

squawell
Tue 11th Sep '01, 2:27am
Originally posted by pipi
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!!

squawell
Tue 11th Sep '01, 3:07am
another problem need someone help me~~~

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??

_v7_
Thu 27th Sep '01, 12:34pm
Thanks a lot ... works fine !

_v7_

numerodix
Fri 5th Oct '01, 9:10am
Ok, suggestion here.

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?

DarkReaper
Fri 5th Oct '01, 3:42pm
Originally posted by DarkReaper...In July
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??
.....