![]() |
Removed No permission page with custom page?
Hello,
I'd like to remove the no permission page for guests with a custom page. Can someone please assist me on how to do it? Many thanks. |
Anyone, please?
|
You have a custom page and it is giving guests a no permission message? You must have the code in the page then. Look for something like this and remove it (I don't know what your's looks like since you haven't printed out your code):
PHP Code:
|
Hey Lynne,
You misunderstood me, I meant that I want a custom page shown to guests instead of using a no permission page. Thanks |
Maybe you could try this mod: https://vborg.vbsupport.ru/showthread.php?t=172989
or you could try this plugin code: Code:
if (!$vbulletin->userinfo['userid']) using the error_nopermission hook (replacing 'custom page url' with your page url of course). I did a brief test, but you'd want to test it more if you try using this. |
Hello,
Where do I find the error_nopermission hook :$ ? |
Do a search in your files for "error_nopermission" and you'll find it in functions.php
|
Hello Lynne,
I don't exactly know where kh99 is asking me to put the following code: Quote:
Quote:
Thanks, I appreciate your help. |
He's talking about creating a plugin using the error_nopermission hook location. Take a look at this in the manual - Plugin System
|
You could edit the STANDARD_ERROR templates and replace it with your custom code.
|
Quote:
Ta |
Quote:
--------------- Added [DATE]1259359196[/DATE] at [TIME]1259359196[/TIME] --------------- Quote:
Next to "Hook Location", find "error_nopermission" For "Title" enter something so you'll know what it is later, like "Guest No Permission Redirect" or whatever you want. Paste the code in the big text box. Select "Yes" next to "Plugin Active" Save If you want to disable it later, you can just go to "Plugin Manager" and uncheck the "Active" checkbox and save. (Or delete it completely if you want). You really should read that part of the manual if you get a chance, it's not really very long. |
Hello,
It doesn't redirect to the custom page I put in the code, instead it shows a error. Parse error: syntax error, unexpected $end in /home/xxxx/public_html/includes/functions.php(2458) : eval()'d code on line 5 |
When you pasted the code did you get the '}' character on the last line? When you quoted it a few posts ago it's missing the last line.
|
Please post *exactly* what you put in your plugin.
|
if (!$vbulletin->userinfo['1'])
{ $vbulletin->url = 'http://google.com'; eval(print_standard_redirect('no permission')); } Using google as a test. |
That code works for me. Did you change it to userinfo['1'] for testing? That was the part that did it only for guests.
It's getting confusing and I don't know what to tell you, so I'll leave it to Lynne... |
Hey,
No, I want guests to be redirected to the custom page. Thanks |
Well - probably Lynne had the same thought.
So - sorry, I didn't really understand your last post - is it working now? |
Try this:
PHP Code:
|
All times are GMT. The time now is 02:16 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:
|