The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
redirect to register.php for guests
hi,
is it possibile to redirect the guests to the register page of my forum? if so how? thanks |
#2
|
|||
|
|||
use
Code:
<if condition="$bbuserinfo[userid] == 0"> //redirect code here </if> |
#3
|
||||
|
||||
<if condition="$bbuserinfo[userid] == 0">
<a href="http://www.mysite/forum/register.php"></a> </if> I put the above code in the forumhome template but it doesnt work |
#4
|
|||
|
|||
Code:
<if condition="$bbuserinfo[userid] == 0"> <meta http-equiv="refresh" content="0;url=http://www.mysite/forum/register.php"> </if> |
#5
|
||||
|
||||
now works!
thanks |
#6
|
||||
|
||||
That'll work only for forumhome page, guests are still able to read threads and browse forums. And you can write a plugin to redirect all guests to register page.
Create new plugin at global_start hook with following content: Code:
if (!$vbulletin->userinfo['userid'] AND THIS_SCRIPT != 'register') { header("Location: " . $vbulletin->options['bburl'] . "/register.php"); } |
#7
|
||||
|
||||
Wouldn't this work against you spider-wise? All the spiders would be crawling your register.php page...
|
#8
|
||||
|
||||
well, you can put in a condition to exclude spiders.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|