View Full Version : PHPInclude End help
Michael Morris
10-22-2004, 05:42 PM
I can't get the following query to work in the PHPINCLUDE_END template, and can't figure out why..
if ($foruminfo['id']=='158')
{
$output = str_replace("images/icons/", "http://www.enworld.org/forums/images/swtemp/", $output);
}
I know the strreplace works, it's the conditional that's not working...
Xenon
10-23-2004, 03:51 PM
its
if ($foruminfo['forumid'] == 158)
{
$output = str_replace("images/icons/", "http://www.enworld.org/forums/images/swtemp/", $output);
}
:)
Michael Morris
10-23-2004, 05:39 PM
Doesn't work :(
can be also
if ($forum['forumid'] == 158)
{
$output = str_replace("images/icons/", "http://www.enworld.org/forums/images/swtemp/", $output);
}
Michael Morris
10-23-2004, 05:54 PM
Nope, that don't work either... :(
Dean C
10-23-2004, 06:02 PM
Put it in the phpinclude_start template :)
Michael Morris
10-23-2004, 06:10 PM
I would, but I can't execute a string replace until the output is compiled. PHPINCLUDE_START parses too early for that.
I tried putting it into phpinclude_start and setting a flag variable to true, but THAT didn't work. For some reason PHPINCLUDE_END won't evualtes all variable checks to false unless they're constants..
I haven't tried defining a constant in the PHPINCLUDE_START template yet.
Xenon
10-24-2004, 06:10 PM
hmm, , try that code maybe:
global $foruminfo;
if ($foruminfo['forumid'] == 158)
{
$output = str_replace("images/icons/", "http://www.enworld.org/forums/images/swtemp/", $output);
}
but changing the output in phpinclude_end might not be possible at all, so it might not be the condition ;)
Michael Morris
10-24-2004, 07:15 PM
Heh heh, it's possible - I've tested the query by itself without the conditional. I'll try the global call and see if that helps. Thanks :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.