PDA

View Full Version : Redirect messages


squishi
05-12-2009, 05:55 AM
How does the vbulletin redirect work?

Let's say I have this in a plugin's php code:

if ($_POST['sent'] == '1') {
$vbulletin->url = '/index.php' . $vbulletin->session->vars['sessionurl'];
eval(print_standard_redirect('redirect_postthanks_ nopermission', true, true));
}


How do I change the redirect message?
I want to change the "redirect_postthanks_nopermission".
It's not a phrase, nor is it a template, though.

I want the end result to be:
if ($_POST['sent'] == '1') {
$vbulletin->url = '/index.php' . $vbulletin->session->vars['sessionurl'];
eval(print_standard_redirect('redirect_myownredire ct', true, true));
}
with the redirect printing a my own adjusted redirect message.
I don't want to do this for all the redirects on the forum, only for the redirect of this plugin.

Dismounted
05-12-2009, 07:41 AM
The phrase name is the first argument minus "redirect_".

squishi
05-12-2009, 08:48 AM
Oh, okay. I was searching for "redirect_" in the phrases. :rolleyes:
Thank you for the quick help!

--------------- Added 1242148521 at 1242148521 ---------------

Still having a problem with this.

I added a phrase called "myownredirect" and used the second php code.
But I get the message Could not find phrase 'myownredirect'.
I know the phrase is there, and I double-checked its spelling.

squishi
06-16-2009, 07:56 PM
I still am not able to get this to work!

Here's the redirect:
$vbulletin->url = '/index.php';
eval(print_standard_redirect('redirect_myownredire ct', true, true));

And here's details about the phrase:
GLOBAL Phrases, name: 'myownredirect'

Dismounted
06-17-2009, 07:24 AM
The phrase should be a "Front-End Redirect" phrase.