View Full Version : Clan Roster - Display only certain usergroups on a list of forum members
TheHitman
09-02-2006, 07:50 PM
Essentially, I want to display all members of a clan on a page integrated with a vBulletin forum. It should list them based off either 1) their usergroups in the forums (admin, commander, and clan member, skipping anyone else in the DB), or 2) a custom profile field that flags them as a clan member.
I'm trying to do this integrated with vBaCMPS.
Can anyone here point me in the right direction, explain how to do it, etc? Any help would be most appreciated. (I've already searched these forums but either I've missed the hack or it doesn't exist.)
TheHitman
09-04-2006, 02:41 PM
I hate to bump, but I'd really like to know how to do this... any help would be most appreciated.
Oap JTRipper
09-04-2006, 02:46 PM
have a look at our site lemme know if this is any good
www.oapsquad.com/forums
roster
TheHitman
09-04-2006, 02:53 PM
Wow... I think so, does it automatically pull the info from the user DB? I've got people that will need to update member lists and can't do PHP/HTML, so something where they select 'Clan member' as someone's usergroup and have them show up on the roster is the only real solution.
Oap JTRipper
09-04-2006, 03:02 PM
yep it pulls from the database, it also pulls custom fields from either profile or admin edited profile
TheHitman
09-04-2006, 03:08 PM
Damn, that's slick, and exactly what I've been looking for. Would it be too much trouble to ask how you did it?
Oap JTRipper
09-04-2006, 03:38 PM
its basically the showgroups.php renamed
then I created some usergroups BF2 Squad Leader,BF2 Team etc make sure they are set to display on showgroups (I also turned off all the admin & mod groups so they wouldnt show)
Then gave the users who are in the BF2 Team the new usergroup as an additional user group
Try it & see what you get
TheHitman
09-04-2006, 04:29 PM
Yup, that certainly got the desired effect! Thanks bud. :)
I'm still unable to get any extra info put in there, as I've tried $user[whatever] in place of the $user[onlinestatus] and that doesn't want to work.
Oap JTRipper
09-04-2006, 08:33 PM
now it gets interesting :)
make a new profile field
take note of what field it is
in showgroups find
// Scans too many rows. Usergroup Rows * User Rows
$users = $db->query_read_slave("
SELECT $locationfieldselect user.*, usergroup.usergroupid, usergroup.title, user.options
& after add
, userfield.fieldX
replacing X with the number of the field
in the showgroups_usergroup template
replace with this
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="4">$user[title]</td>
</tr>
<tr>
<td class="thead">$vbphrase[user_name]</td><td class="thead">Whatever </td>
$usergroupbits
</table>
<br />
in the showgroups_usergroupbit template
replace with
<tr>
<td class="$bgclass">
<a href="member.php?$session[sessionurl]u=$user[userid]">$user[musername]</a>
<if condition="$show['location']"><div class="smallfont" title="$vbphrase[location_perm]">$user[location]</div></if>
</td>
<if condition="$showforums">
<td class="$bgclass"><div class="smallfont">$user[forumbits]</div></td>
</if>
<td class="$bgclass" nowrap="nowrap">
$user[fieldX]</td>
</td>
</tr>
replacing X with the number of the field
TheHitman
09-04-2006, 10:10 PM
That did it, I got it all in there now. I really appreciate the assitance, man.
Oap JTRipper
09-05-2006, 02:53 AM
no problem
Jarllax
09-05-2006, 10:10 AM
Thanks Oap JTRipper! Followed those steps for creating a basic guild roster and it is working great.
Oap JTRipper
09-05-2006, 01:46 PM
Thanks Oap JTRipper! Followed those steps for creating a basic guild roster and it is working great.
glad it helped
you can add more fields by creating profile fields & doing the edits to the file & templates
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.