![]() |
New page added, set permissions for registered users only?
Hey guys,
I created a new page on my site and I like to set permissions for only registered users can access not unregistered. How ever it doesn't show any permissions for the new page in Channel Management/Usergroup -> Channel Permissions on the site. How do I add this new page I made to Channel Management to set the users that I wish to look at this page? Hope you guys can help. Many thanks, DigoAlmino |
Can put your new content into a PHP Module and use PHP to give a No Permission to usergroups that have no permission?
|
Hey Lynne,
How will I do this sorry? Because I'm still new to PHP and I'm learning things as I go. Because what I want is the page to be blocked by guest due to it's a application form for different areas of the community. So I'm trying to figure out with the Channel Management is there a way I can add this new page in or like you said Lynne make a script to block that usergroup ID. If you have instructions for the PHP block content Lynne that will be fantastic. Thank you. DigoAlmino |
Something like....
PHP Code:
|
I need it in HTML pls
|
Quote:
|
I didn't ?? ... Digo asked for PHP, I need HTML
|
Quote:
Code:
<vb:if condition="$userinfo['usergroupid'] == 1"> |
Tried it, but this happens .. You are not logged in. Welcome
My code is as follows. <vb:if condition="$bbuserinfo['usergroupid'] == 1"> <!-- Unregistered Users HTML Code --> You are not logged in. <vb:else /> <!-- Your Logged in Users HTML Code --> Welcome </vb:if> |
Oops, I am not at home where I could test the code. At a hotel bar at the moment, during a business stay. I pulled the reference $bbuserinfo from the vb5 manual. If the variable did not exist it should be 'NULL' and 'NULL does not equal 1, so either way you should not have executed that branch.
Try: Code:
<vb:if condition="$userinfo['usergroupid'] == 1"> Where are you placing that code? What template? |
same problem. I am placing it as a new page from the vBulletin 5 page maker -- I am adding that code via HTML module
|
Obviously, I have missed something. When I get home tomorrow I will check this out. :)
Someone should come along and save you, this is a simple problem. |
thank you :)
|
????
|
What do you need you need it in html? Are you creating an .html page or using vbulletin? If for a tmeplate, then what exact template?
|
vBulletin page manager.
I want for example Moderators to see a post saying "Hello" but Registered Users seeing a post saying "Not Allowed" |
You will need to add a PHP module and use the code I already posted.
|
That's template code, right? Sounds like he's just putting in a static html page via page maker. That's doesn't execute template code, does it?
|
All times are GMT. The time now is 03:28 AM. |
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:
|