vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Using phpinclude_start (https://vborg.vbsupport.ru/showthread.php?t=79576)

paulyy 04-07-2005 11:32 PM

Using phpinclude_start
 
It doesn't seem to want to accept to following code;

Code:

if (THIS_SCRIPT == 'index') {
    $page_menu = '<if condition="$bbuserinfo['userid']">it works<else />login</if>'; }

But if I just use;

Code:

if (THIS_SCRIPT == 'index') {
    $page_menu = 'it works'; }

It will. So I assume it's the fact I'm trying to use an if condition in the wrong place. So, what would I need to do to get the top piece of code to work effectively?

Adrian Schneider 04-08-2005 01:22 AM

I'm pretty sure you need to escape some of the symbols, I could be wrong though.

Try
PHP Code:

 eval('$variable= "' fetch_template('template_name') . '";'); 

inplace of the second line. And stick the <if> ...</if>inside a template (template_name). This would just check if my theory is correct, but of course you could use this too.

You could also (which would make more sense to me) have all of it inside the template you are using (not php one) as nested <if>s instead of using the php one, or do the opposite: all in php.

IMO anyway.


All times are GMT. The time now is 11:20 AM.

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.01166 seconds
  • Memory Usage 1,710KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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