vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PHPInclude End help (https://vborg.vbsupport.ru/showthread.php?t=70884)

Michael Morris 10-22-2004 05:42 PM

PHPInclude End help
 
I can't get the following query to work in the PHPINCLUDE_END template, and can't figure out why..

PHP Code:

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
PHP Code:

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 :(

miz 10-23-2004 05:49 PM

can be also

PHP Code:

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:

PHP Code:

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 :)


All times are GMT. The time now is 08:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01144 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete