Webmastersite.net
Register Log In

conditional error

Comments on conditional error

sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004

Total Topics: 47
Total Comments: 88
sertan6
Posted Nov 08, 2006 - 10:01 AM:

there is a bug when i use:

<IF {TID} contains displaylinks.tpl or {TID} contains suggestlink.tpl>
<br>
</IF>


error message:
--------------
If you are not the administrator of this site, please report this page to the administrator. If you are the administrator, please pay careful attention: You have a parse error in your template (or perhaps in your header or footer) which you need to repair before this page can be displayed correctly. The error is picked up on by php at line 31 of the output.
Warning: fopen(templates/default/): failed to open stream: Permission denied in d:\easyphp1-8\www\wsnforum\filefunctions.php on line 331

Warning: fclose(): supplied argument is not a valid stream resource in d:\easyphp1-8\www\wsnforum\filefunctions.php on line 334
Line #26: <?php } else { ?>
Line #27: <body>
Line #28: <?php } ?>
Line #29:
Line #30: <?php if (strstr(templates/default/viewcomments.tpl, "displaylinks.tpl" || "templates/default/viewcomments.tpl", "suggestlink.tpl")) { ?>
Line #31: <br>


Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 10, 2006 - 7:26 PM:

Multi-term conditionals can be problematic, use
<?php if (strstr("{TID}", "displaylinks.tpl") || strstr("{TID}", "suggestlink.tpl")) { ?>
<br>
<?php } ?>
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004

Total Topics: 47
Total Comments: 88
sertan6
Posted Nov 13, 2006 - 7:53 AM:

thanks Paul, this works perfect
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.