![]() |
checking usergroups
how do I check for a members usergroup, I want to make my ads only appear for certain usergroups
|
the is_member_of function may help ya :)
|
can I use that in a template?
like I want: if (!is_member_of("gold")) { // display ads } Is that right? |
yes you should be able to use it in a template.
but instead of the 'gold' you have to use the usergroupid of the usergroup |
hmmm well, this did not work, I wanted the ads to show for every usergroup except group10
<if condition="!is_member_of($post, 10)"> so then I tried to set an array for the if to affect all usergroups besides 1o, still didn't work <if condition="is_member_of($post, array(1, 2, 3, 9))"> how can I accomplish this? |
Xenon, how to check usergroups in template conditions ?
|
Code:
// ###################### Start is member of ####################### |
sorry for my bad but I still didn't understand how yet.
I actually want to check if usergroup id = 6 ( admin ), then it will display an image showing that user belong to admin group. Same for that to my Fan Club Group. |
HTML Code:
<if condition="is_member_of($post, specific id here)"><img....</if> |
kooool !
It worked ! Thank you so much Xenon ! |
All times are GMT. The time now is 08:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|