![]() |
Is there a way to block custom pages like these from guests being able to view them unless they log in? with having the link to the pages in the navbar as well?
|
Quote:
HTML Code:
<if condition="$show['member']"> |
It's not a good idea to do this on the template level. Just add this at the top of your custom code in the php file:
PHP Code:
|
ahh excellent thank you very much ^_^
|
Quote:
|
First and foremost: Performance. Why run the whole file, go through the whole variable/template registering and rendering process etc. just to show nothing in the end?
Next, you break UI consistency by not using the usual way of handling such errors: You need to code your error message yourself instead of using the standard no permissions message, which is phrased and thus works with multi language environments. Last, but not least: There is a standard procedure in vB to do this, and that's the way I did it. Just look at the original files. And if there is a standard way, it should be used. Anyway, I really don't follow your argumentation - how often do your Admins need to change which usergroups get access to a custom page? This does not seem like a weekly operation to me, does it? This is a set it and forget it decision, is it not? |
Dont work for me :(
http://pic.mk/images/untitl1273999606.jpg |
Your php code does not get parsed. Make sure your file has the .php extension and starts with <?php.
|
Quote:
--------------- Added [DATE]1274003452[/DATE] at [TIME]1274003452[/TIME] --------------- Could it be incorporated in a pluggin where you can state which templates cannot be accessed? Could you also tell me how to do this in a php statement? <if condition="is_member_of($vbulletin->userinfo, array(1, 2, 3))">. |
Quote:
Quote:
Quote:
Quote:
|
All times are GMT. The time now is 08:42 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:
|