The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
In online.php templates, you can use:
- $bbuserinfo (vB3.0 style, depreciated but still supported in 3.5 and up) - or $vbulletin->userinfo (vB3.5 & up style) To use a field from the userinfo use either: - $bbuserinfo[field] - $vbulletin->userinfo[field] (PS If you get "Array"-errors, then surround with curly-brackets, ie: {$vbulletin->userinfo[field]} ) To test for usergroup you can use: HTML Code:
<if condition="is_member_of($bbuserinfo, 15)">
HTML Code:
<if condition="is_member_of({$vbulletin->userinfo}, 15)">
|
#12
|
||||
|
||||
Doing this hides all the information for everyone else too.
I have a usergroup where, no matter what they enter into their profile, nobody else on the forum can see their contact/messenger details. This is because of an abuse issue. I don't care what this group can see, I want to stop everyone else from being able to contact them. So far I've sorted everything except for WOL. Theoretically all the above suggestions should work, they do everywhere else. However something seems to be missing in WOL to prevent it. |
#13
|
|||
|
|||
Ok i now see what you are trying. You want this based on the usergroup if the row of the user being displayed on that line, and not based on the usergroup of the user logged in.
All user information about the current row is stored in $userinfo, so that is what you will need to use. There is however a problem, not all information about a user is pulled from the database for each row that is displayed on the WOL. Only information that is needed for vBulletin to display that row is retrieved. The usergroupid or the membergroupids are not loaded. Unfortunatly there is no option to retrieve this information when the table of online users is populated, with a plugin. You could use a plugin, but that would probably mean 1 extra query for each online user, so from performance POV that is not a good option. The best option would be to us a code edit in online.php. For vB3.5.4, edit online.php and find the following (line 184) PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#14
|
||||
|
||||
Fantastic, that worked thank you very much
All except the syntax of the if condition <if condition="$userinfo[usergroupid] == 15"> worked but <if condition="is_member_of($userinfo,15)"> ) didn't for some reason. |
#15
|
||||
|
||||
Yeah, the $userinfo is really crippled in Who's Online. We really need $userinfo[usergroup].
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|