View Full Version : If 'Guest' or 'Newbie' then redirect
Tyraunt
01-27-2011, 03:25 PM
Hello,
I want to redirect a specific forum if a 'Guest' or 'Newbie' views it unless they are promoted to the usergroup which will be able to view this forum. Thanks
borbole
01-27-2011, 04:27 PM
Hello,
I want to redirect a specific forum if a 'Guest' or 'Newbie' views it unless they are promoted to the usergroup which will be able to view this forum. Thanks
Try this:
Go to your Plugin Manager at your Acp and create a new plugin. For the hook location choose:
forumdisplay_start
Then for the php code add this:
global $foruminfo;
$redirectforums = array(1,2,3);
if(!$vbulletin->userinfo['userid'] AND in_array($foruminfo['forumid'], $redirectforums))
{
$vbulletin->url = 'http://www.redirecturl.com';
}
Then replace1,2,3 with the id of the forums where you want to resdirect the guests when viewing the redirect forums.
Also, replace
http://www.redirecturl.com
with the actual url of where you want to redirect your guests when viewing those particular forums.
To do the same if the guests will view the latest post at those particular forums, add the exact php code for the the showthread_start hook location as well. (create a new plugin).
Hope it helps.
borbole
01-28-2011, 05:55 PM
Did the above suggestion work for you Tyraunt?
Tyraunt
02-24-2011, 06:11 PM
Sorry for the late reply, no it didn't work but the syntax code is 3.0 and not 4.0.
Tyraunt
02-26-2011, 01:37 PM
Bump!
Lynne
02-26-2011, 03:45 PM
What do you mean the syntax code is 3.0 and not 4.0? It looks just fine to me for 3.x or 4.x (php is php in either version). Did you actually try the code or did you just assume it wouldn't work?
instanticity
02-26-2011, 04:46 PM
How would I do this for the entire forum page?
Lynne
02-26-2011, 04:58 PM
How would I do this for the entire forum page?
Do what exactly? You need to be much more specific and actually since it sounds like you are not asking for the same thing, you should start your own thread being specific with what you want.
instanticity
02-26-2011, 05:38 PM
I want to redirect guests to a non-VB landing page as opposed to showing them the error log ni page. Forum is open to members only. I did start a new thread, but ran across this thread which sounds very similar to what I want to achieve. Most place get angry when you start a new thread about a topic already being discussed, redirecting guests.
Lynne
02-26-2011, 06:19 PM
If you have the exact same issue as in this thread, then the answer is exactly the same.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.