The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if else conditionals
I have a custom page and I want only members to view it and direct guests the login/register page/popup.
Something like: PHP Code:
|
#2
|
|||
|
|||
you could make this in the php file:
exec_header_redirect("login.php"); |
#3
|
|||
|
|||
I put that code directly under <?php and got this error:
Quote:
|
#4
|
|||
|
|||
in templates php isn't allowed
you could make it in the php file PHP Code:
|
#5
|
|||
|
|||
Use print_no_permission();
It will display a nice display message with login form as well. |
#6
|
|||
|
|||
lol
ok thats easier in your php file after including global.php make this: if (!$vbulletin->userinfo['userid']) print_no_permission(); that should be enought |
#7
|
|||
|
|||
got it - thank you very much for your help.
Now when guests view those pages I modified to show the No permissions login page, it still says that they are viewing that page and not the "No permissions" page in "Who's Online". |
#8
|
|||
|
|||
There should be a little stop sign image indicating they are getting A No Permissions error on Who's Online.
|
#9
|
|||
|
|||
They are getting it for the default vb pages, but not the ones I created.
|
#10
|
|||
|
|||
what't the whole code?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|