Log in

View Full Version : Redirect guest on payments.php to landing page


vb_mp
09-17-2008, 11:41 PM
I am wondering if anyone knows how I can redirect guests who hit the payments.php elsewhere? (I want to send them to a landing page that explains what the payments are about - and prompt them to register first).

I've got the redirect code (from a redirect plugin here (https://vborg.vbsupport.ru/showthread.php?t=172989&page=3)):

if ($show['guest']){
$vbulletin->url = '' . $vbulletin->options['bburl'] . '/misc.php?do=page&template=mylandingpage';
standard_redirect();
}

Put I can't find a hook for the payments.php start.

Any help please?

Dismounted
09-18-2008, 05:32 AM
Hook in at global_setup_complete, and use:
if ($show['guest'] AND THIS_SCRIPT == 'payments')
{
$vbulletin->url = $vbulletin->options['bburl'] . '/misc.php?do=page&template=mylandingpage';
standard_redirect();
}

vb_mp
09-18-2008, 08:05 AM
That worked, thanks Dismounted!