The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Yep Ozzy.
|
#12
|
||||
|
||||
So only staff is seeing the private groups, is that not what you are asking?
Or am I just totally lost. |
#13
|
||||
|
||||
Yes that's what I mean, only Staff groups can see them.
|
#14
|
||||
|
||||
There's two ways basically. If you have just a few usergroups and don't change them often, you could just do this using several if-conditions in the template. Disadvantage: If you add a new usergroup, you have to edit the template again. But normally you probably won't do that all that often. (Very) big advantage: You save database queries.
You'd go as follows: In postbit or postbit_legacy template find Code:
{vb:raw template_hook.postbit_userinfo_right} Code:
<vb:if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7))"> <span style="font-weight: bold;">Usergroups:<br /></span> <vb:if condition="in_array($post['usergroupid'], array(6))">Administrator</vb:if> <vb:if condition=" in_array($post['usergroupid'], array(5))">Super-Moderator</vb:if> <vb:if condition=" in_array($post['usergroupid'], array(7))">Moderator</vb:if> <vb:if condition=" in_array($post['usergroupid'], array(2))">Registered User</vb:if> </vb:if> Doing it with a plugin would be a bit more complicated, and would add a query per post on the page. |
Благодарность от: | ||
Elixar |
#15
|
||||
|
||||
Hey there, thanks! Unfortunately I'm not seeing it show up on the profiles.
|
#16
|
||||
|
||||
Ouch, I thought you wanted it on postbit. Just replace every occurence of $post with $prepared and add it to the profile template, wherever you want to show it. That should work.
|
#17
|
||||
|
||||
Which profile template?
|
#18
|
||||
|
||||
OK, I had a closer look into the matter, and it is in fact possible to achieve what you want in a more comfortable way, w/o needing to query the database (all necessary information is present in the datastore-cache and can be pulled from there).
I made a little addon out of it: https://vborg.vbsupport.ru/showthread.php?t=309645 |
#19
|
||||
|
||||
I tested it out, and unfortunately they didn't appear on the profile and I got an error. I hate to be a huge bother.
|
#20
|
||||
|
||||
No bother at all; I think I found a minor error, just fixing it atm. Could you tell me exactly what your error is, though?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|