Page 2 of 3

Re: ACP redirection

Posted: 22 Apr 2010, 19:06
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?

Re: ACP redirection

Posted: 22 Apr 2010, 19:17
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!

Re: ACP redirection

Posted: 22 Apr 2010, 19:24
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?

Re: ACP redirection

Posted: 22 Apr 2010, 19:47
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! ;)

Re: ACP redirection

Posted: 22 Apr 2010, 20:11
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>'));
		}

Re: ACP redirection

Posted: 22 Apr 2010, 21:06
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?

Re: ACP redirection

Posted: 22 Apr 2010, 21:16
by cisco007
that guy that made this snippet is a phpbb.com jr. mod validator, if that counts for something!

Re: ACP redirection

Posted: 22 Apr 2010, 21:18
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.

Re: ACP redirection

Posted: 22 Apr 2010, 21:38
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

Re: ACP redirection

Posted: 22 Apr 2010, 21:41
by Steve
viewtopic.php?f=10&t=8 < enable debug.