ACP redirect

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
denisesballs
BBCoder II
BBCoder II
Posts: 9
Joined: 22 Apr 2010, 15:40

Re: ACP redirection

Post by denisesballs »

Hey, wouldn't it be easier to just change:

Code: Select all

$redirect = meta_refresh(3, $redirect);
to

Code: Select all

$redirect = meta_refresh($redirect);
Worked on my board. I didn't quite understand your change since the find you have is only part of the line. So does the if go after the "$redirect =" part or before that whole line?
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: ACP redirection

Post by cisco007 »

just like the my first post states, it goes before!
And i did not make this snippet i posted the author of it!
most of the redirect snippets are added to this area of the file!
denisesballs
BBCoder II
BBCoder II
Posts: 9
Joined: 22 Apr 2010, 15:40

Re: ACP redirection

Post by denisesballs »

cisco007 » 22 Apr 2010, 19:17 wrote:just like the my first post states, it goes before!
And i did not make this snippet i posted the author of it!
most of the redirect snippets are added to this area of the file!
Right, I know you said before, but the line you quoted:

Code: Select all

meta_refresh(3, $redirect);
      trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
      }
That is not the complete line, this is:

Code: Select all

$redirect = meta_refresh(3, $redirect);
                        trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
                }
So does that mean your (or whoever you got it from's) snippet goes in the middle of that line, or above the whole line including the part you left out.

Also, isn't the way I posted a lot easier and cleaner?
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: ACP redirection

Post by cisco007 »

cisco007 » 22 Apr 2010, 19:17 wrote:just like the my first post states, it goes before!
which means, it goes on a line above the line to find, this snippet was from a previous versions of phpbb, so the code to find might not be the same thing as in the newer versions of phpbb, so you have, like any mod you install, find a line of code that matches closely to the one it tells you to find and use that code!
as far as you question about your code being cleaner, i do not know, since it seems that you removed the 3, i don't know what effects that might have on any redirection of your board whether it's good or bad. I am not an expert at phpbb so, i don't know, but if it works for you go ahead and do it! ;)
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 803
Joined: 05 Mar 2010, 01:10
Extra Rank: Donator.png
BBCodes: 2000
Favourite BBCode: porn tube
Favourite MOD: Non of Stokers
Location: up your bum
Contact:

Re: ACP redirection

Post by Steve »

denisesballs » 22 Apr 2010, 19:06 wrote:Hey, wouldn't it be easier to just change:

Code: Select all

$redirect = meta_refresh(3, $redirect);
to

Code: Select all

$redirect = meta_refresh($redirect);
Worked on my board. I didn't quite understand your change since the find you have is only part of the line. So does the if go after the "$redirect =" part or before that whole line?
thats not a good idea i get a debug error and also,
if you were to do that use this:

Code: Select all

	$redirect = meta_refresh(0, $redirect);
			trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
		}
NAPWR wrote: Nice, Stoker is Hot
denisesballs
BBCoder II
BBCoder II
Posts: 9
Joined: 22 Apr 2010, 15:40

Re: ACP redirection

Post by denisesballs »

Steve© » 22 Apr 2010, 20:11 wrote: thats not a good idea i get a debug error and also,
if you were to do that use this:

Code: Select all

	$redirect = meta_refresh(0, $redirect);
			trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
		}
Interesting, what did you get a debug error with? You're right though, probably a better idea to just change it to 0. Still easier than adding an if statement though, no?
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: ACP redirection

Post by cisco007 »

that guy that made this snippet is a phpbb.com jr. mod validator, if that counts for something!
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 803
Joined: 05 Mar 2010, 01:10
Extra Rank: Donator.png
BBCodes: 2000
Favourite BBCode: porn tube
Favourite MOD: Non of Stokers
Location: up your bum
Contact:

Re: ACP redirection

Post by Steve »

Code: Select all

$redirect = meta_refresh($redirect);
debug error was using your method.
this is wrong due to the php instructions of meta_refresh has no time.
so best giving it some indication when to refresh rather than none.
Still easier than adding an if statement though, no?
I dont know. this works and the method posted by ciscoo works.
NAPWR wrote: Nice, Stoker is Hot
denisesballs
BBCoder II
BBCoder II
Posts: 9
Joined: 22 Apr 2010, 15:40

Re: ACP redirection

Post by denisesballs »

Steve© » 22 Apr 2010, 21:18 wrote:

Code: Select all

$redirect = meta_refresh($redirect);
debug error was using your method.
this is wrong due to the php instructions of meta_refresh has no time.
so best giving it some indication when to refresh rather than none.
I was just curious what you were using to debug.
Still easier than adding an if statement though, no?
I dont know. this works and the method posted by ciscoo works.
Changing 1 character as opposed to adding a whole if statement seems easier to me :D
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 803
Joined: 05 Mar 2010, 01:10
Extra Rank: Donator.png
BBCodes: 2000
Favourite BBCode: porn tube
Favourite MOD: Non of Stokers
Location: up your bum
Contact:

Re: ACP redirection

Post by Steve »

viewtopic.php?f=10&t=8 < enable debug.
NAPWR wrote: Nice, Stoker is Hot
Locked