vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   redirect to register.php for guests (https://vborg.vbsupport.ru/showthread.php?t=120454)

hollyboy 07-06-2006 11:01 AM

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

harmor19 07-06-2006 11:43 AM

use

Code:

<if condition="$bbuserinfo[userid] == 0">
//redirect code here
</if>


hollyboy 07-06-2006 12:34 PM

<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

harmor19 07-06-2006 01:06 PM

Code:

<if condition="$bbuserinfo[userid] == 0">
<meta http-equiv="refresh" content="0;url=http://www.mysite/forum/register.php">
</if>


hollyboy 07-06-2006 01:19 PM

now works!
thanks ;)

tnguy3n 07-06-2006 07:56 PM

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");
}

Voila!

Kirk Y 07-06-2006 09:15 PM

Wouldn't this work against you spider-wise? All the spiders would be crawling your register.php page...

tnguy3n 07-07-2006 04:20 AM

well, you can put in a condition to exclude spiders.


All times are GMT. The time now is 05:10 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
  • Page Generation 0.01545 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete