PDA

View Full Version : Send Guests to an External URL or Static Page


firebrand media
01-04-2013, 06:47 PM
We're working on a heavily customized site for a client. This is a closed, "invitation-only" site.
So all guests need to go to a static HTML page with information and a login form.
The external page works fine, and the login works fine.

Right now, I'm able to force guests to log in with a custom plugin hooked on global_state_check

if ($vbulletin->userinfo['usergroupid'] == 1)
{
if ((THIS_SCRIPT == 'login') or ($_POST['do'] == 'login'))
{

} else {
$templater = vB_Template::create('custom_login');
print_output( $templater->render());
}
}

This is very close to what I need, but is there a way to just http redirect to the static page instead of rendering a template?

Running vBulletin 4.1 (Still porting our customized navigation to 4.2.)

gamaken
01-04-2013, 07:38 PM
You want to redirect them with header location?

header( 'Location: http://www.foobar.net/login' ) ;

firebrand media
01-04-2013, 08:26 PM
Exactly.
But I don't know how to get vBulletin 4.1 to send that header.

mokujin
01-04-2013, 09:45 PM
Try this:

exec_header_redirect('http://www.foobar.net/login');
May help you :D

firebrand media
01-07-2013, 04:33 PM
Thanks so much!
That was exactly the magic that was needed. :)