vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   problem with condition (https://vborg.vbsupport.ru/showthread.php?t=40295)

Jakeman 06-26-2002 06:20 AM

problem with condition
 
condition in the phpinclude template:
PHP Code:

if ($forumid == || 26) {
  
$picnumber $forumid;
} else {
  
$picnumber '';


goal:
the goal here is to have $picnumber parse into the forumid of the current forum when loading forumdisplay.php . example, you click on the forum with forumid 3 and $picnumber will parse into 3. then you click on the forum with forumid 6 and it parses into nothing.

problem:
the condition is evaluating to true for all forums. i load forumdisplay.php and, regardless of what forumid is in the url, the condition evaluates to true and $picnumber always parses into the forumid of the current forum. i can't figure out why this is always parsing to true. any help is appreciated.

Admin 06-26-2002 06:26 AM

PHP Code:

if ($forumid == or $forumid == 26) { 


Jakeman 06-26-2002 06:30 AM

that worked *cream pie* ;)

Jakeman 06-26-2002 06:57 AM

that is to say, it worked on my test forums but not for the person i'm doing this for. his forums give this error at the top of every page now:

Parse error: parse error, unexpected T_VARIABLE in /home/virtual/site3/fst/var/www/html/global.php(281) : eval()'d code on line 1

the error refers to the first line of the phpinclude template (where the if statement is). and so my questions are...

questions:
1. what does this error mean? i'm not sure what a t_variable is.
2. how do i fix it?

Jakeman 06-26-2002 08:03 AM

thx for the help tonight firefly :)

Dark_Wizard 06-26-2002 10:48 AM

<a href="http://www.php.net/manual/en/tokens.php" target="_blank">http://www.php.net/manual/en/tokens.php</a>


All times are GMT. The time now is 01:10 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.01000 seconds
  • Memory Usage 1,716KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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