View Full Version : Custom PHP page based on UserGroup?
sjsteve33171
08-03-2008, 09:14 PM
Ok if i have a graphical page i've designed and want to upload to my website and i only want certain usergroup(s) to view it, can i say incorporate it into a page within vBulletin or can i upload it and have only certain usergroups veiw that.
Hopefully someone here has a relatively simple answer for me :)
Thanks in advance
Bellardia
08-04-2008, 12:53 AM
<if condition="(is_member_of($vbulletin->userinfo, 5, 6 ,7))">
$php_page_insert
</if>
By using this conditional, anyone who is a member of usergroup 5, 6, or 7 will be able to view your page. Change the numbers to which ever usergroup you'd like.
RLShare
08-04-2008, 01:01 AM
Thats the template conditional...If you would rather do it in the php page and show a standard VB no permission page to people that cannot view it.
if(is_member_of($vbulletin->userinfo, 5, 6 ,7)){
YOUR PAGE CODE
}
else{
print_no_permission();
}
sjsteve33171
08-07-2008, 10:40 AM
Hi, thanks both for your input.
RLShare, thankyou, its exactly what i needed and it's worked an abolute treat!
So thank You both very much :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.