Previous Thread
Next Thread
Print Thread
Rate Thread
#224024 09/04/2002 4:10 PM
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Mod Name / Version - Show User Groups v1.0

Description - Adds a column to the User List (showmembers.php page) which will list the board groups each registered user is in. Groups can be hidden or shown with custom names.

Example - http://www.newoutriders.org/ubbtest Login: test Password: test

Pre-requisites - none

Author - Aglavalin, aka Steve Stout

Files Altered - showmembers.php, showmembers.tmpl, /languages/english/showmembers.php

Database Altered - no

New Files - none

Note: This is a simple hack. Works fine on 6.0.x


Someone had suggested this a while back, and I thought it would be useful on my site, so here is a generic version for everyone. I have not tested this on 6.1x yet, but will after I upgrade and I'll post any changes if any.
Attachments
55774-ShowUserGroups_v1.0.txt (0 Bytes, 55 downloads)

Sponsored Links
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Great hack.. but I need one more feature. To show the group under the person's name when they post in forums. Shouldn't be too hard to add that as an option as well

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
That would be similar, but would have to be in the showflat.php, showflat.tmpl, showthreaded.php and showthreaded.tmpl files at the very least. Much more of a hack, but it could use some of the same code. Let me think this one over fer a bit

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
msula, do you need more than one group to show? Will there need to be a graphic associated with each group? (I kinda like this idea) How about a group hierarchy added so only the 'highest rated/ranking' group will show? Damn, now ya got me thinking too much here! haha

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Here's my situation. I have 4 groups really. The basic user group, then a Bronze Member, Silver Member, and Gold Member (haha, I said gold member)

What this correlates to are the different levels of donations people have sent to the site. This gives them added features, but it would be REALLY nice to have this publically displayed, via the title and/or small graphic. This would not only be just cool, but it would help stimulate more donations because people would want this new title

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If you want an image displayed by group.... this hack of mine would do it for you. It would just need to be tweaked to display on the left instead of with the subject line.

I'm going to be doing something like this on my site. So supporters will have an "image" associated with their profile and posts.

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Guess I could use something to display members of one of my board's groups too. I'll make it a seperate hack since it will be on different pages from the user list.

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Well, I'm half way done. Got a group of choice showing on the showflat.php but have not started on the showthreaded yet. Then I gotta write up some directions. Maybe I'll get this done tonight or by tomorrow. I am inserting a small 15x5 graphic in front of the group name too on my site. Looks nice

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
OK, this extra hack is done and available here.

Joined: Mar 2000
Posts: 63
Member
Member
Offline
Joined: Mar 2000
Posts: 63
I'm getting odd results - I have 19 groups and when I put someone into say group 10 which is IMSA, they don't show as that they show as a combination of group1 + 0. As group 1 is Administrators they show up as Administrators0 instead of IMSA. Anyone had this prob, anyone know how to fix it?

I tried commenting out or having a space etc for 1 below but that just cahnges it from Admistrator0 to Administrator which is still not IMSA.

code:
// Show User Groups Hack
$userrow[$i]['Group'] = $Groups;
$userrow[$i]['Group'] = str_replace("0","",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("1","Administrator",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("2","Moderator",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("3","User",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("4","Guest",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("5","Annan",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("6","Carron",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("7","Barr",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("8","Dee",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("9","Staff",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("10","IMSA",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("11","IMSB",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("12","CIIM",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("13","EBiz",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("14","EComm",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("15","IBM",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("16","SFIM",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("17","ICom",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("18","Emod",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("19","Student",$userrow[$i]['Group']);
$userrow[$i]['Group'] = str_replace("-"," ",$userrow[$i]['Group']);
// end Show User Groups


Sponsored Links
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Hmm, try placing the 0-9 groups last in line, so the double digit groups get replaced first, then they should not get split up. And if you have triple digit groups then they should go before the double digit posts. Sorry, but I don't have as many boards as you to try this myself, but I think this reordering should work. Please let me know how it goes!

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
I did try this reordering out and it seems to do the job. Make sure the forums are listed from largest number of digits to least. i.e. 3 digit forums, 2 digit forums, 1 digit forums. This should ensure that the complete forum number is replaced with the name, not just part of it. I'll post corrected instructions soon.

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
This hack works under 6.1 and you can find final directions in the finished mods forum here.

Mods, please close this thread.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)