The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show usergroup's description on a page
I couldn't find this searching so I figured I'd make a thread about it to hopefully get it working.
I'm using a roster plugin and I'm trying to customize it a bit more. I'd like the description of each usergroup to be shown by the list of members who are in that usergroup. The description being the usergroup description you enter when you edit a usergroup. See the screenshot I attached to see what I'm looking to do. I think I need something like $something1[something2] to be there, but I can't figure it out and I don't even know if I'm on the right track. Would you mind pointing me in the right direction or letting me know what I need to do for it to work? Help would be much appreciated. - Revenga |
#2
|
||||
|
||||
Take a look at the showgroups_usergroup template and see what variable is being used in there and then put $variable[description] in where you want it and see if that works.
|
#3
|
|||
|
|||
It didn't seem to work or do anything really. I tried doing what you said with showgroups and it didn't work. Though I'm not using showgroups in that screenshot I attached in original post, I'm using a Showroster Hack, but it didn't seem to work there either. Here's the showroster_header template I'm trying to work with if that helps at all:
Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <if condition="($groupsort == 'username')"><td class="tcat" colspan="12">Usernames ($usercount)</td> <else /><td class="tcat" colspan="12"><div style="float:left">$user[$groupsort] </div><div style="float:right">$usercount Members</div></td></if> </tr> <tr> <td class="thead" width="42%">$vbphrase[user_name]</td> <td class="thead" width="24%">Custom Title</td> <td class="thead" width="12%">Post Count</td> <td class="thead" width="11%">Join Date</td> <td class="thead" width="11%">Last Seen</td> </tr> $rosterbits <tr> <td class="vbmenu_control" align="center" colspan="7"><span class="smallfont">Description here...</span></td> </tr> </table> <br /> I highlighted where I want the usergroup description in red. - Revenga |
#4
|
||||
|
||||
You will need to look at the script that uses that template and see if the usergroup.description is even selected in the query and then get the variable name from there.
|
#5
|
|||
|
|||
It doesn't look like it, assuming I'm looking in the right area. I'm not exactly a php wizard yet, so I guess I'll post the part in the showroster.php file that I'm looking at:
Code:
// Get Usergroups that should be displayed $users = $db->query_read_slave(" SELECT user.*, usergroup.usergroupid, usergroup.title, user.options, usertextfield.*, userfield.*, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "usergroup AS usergroup LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids)) LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid) LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid=user.userid) WHERE (usergroup.showrosterviewpermissions = 1) "); What needs to be edited, or added exactly? - Revenga |
#6
|
|||
|
|||
As Lynne said, you would need to add usergroup.description to the select, like:
Code:
SELECT user.*, usergroup.usergroupid, usergroup.title, usergroup.description, user.options, usertextfield.*, userfield.*, Then you could try using $groupcache[0][description], but I'm not sure if that will always work. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|