Webmastersite.net
Register Log In

templates/bootstrap/viewcomments.tpl contains

Comments on templates/bootstrap/viewcomments.tpl contains

Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Dec 11, 2006 - 6:15 AM:

Ok i would like to make for content that is in wrapper to apper in home.tpl and editmembers.tpl i have tryed this and its not working

<IF {TID} contains home.tpl or editmembers.tpl>
content here
</IF>

but when i try this it workes but only for one template how can i add more templates to this condition?

<IF {TID} contains home.tpl>
content here
</IF>
prep4usmle
Member

Usergroup: Customer
Joined: Mar 16, 2003

Total Topics: 13
Total Comments: 24
Posted Dec 11, 2006 - 6:51 AM:

I use for multiple tpl this:

<IF {TID} contains home.tpl><OTHERWISE><IF {TID} contains editmembers.tpl>

content here

</IF></IF>
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Dec 11, 2006 - 7:00 AM:

Now only works in editmembers.tpl

Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 12, 2006 - 4:40 PM:

<IF {TID} contains home.tpl or {TID} contains editmembers.tpl>
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Dec 13, 2006 - 12:06 AM:

I already tryed this and i get this error

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 476 of the output.
Warning: file_get_contents(templates/default/) [function.file-get-contents]: failed to open stream: Permission denied in C:¶rogram Files\xampp\htdocs\tutorials\filefunctions.php on line 406
Line #471:
Line #472: </div>
Line #473: </div></td>
Line #474: <td id="midleft" class="user2">
Line #475: <?php if (strstr(templates/default/main.tpl, "home.tpl" || "templates/default/main.tpl", "editmembers.tpl")) { ?>
Line #476: <div class="moduletable">

[Load this template in your template editor]

Note that the line of the output is not necessarily the same line number in your template... just look for a similar looking area. The source of your error is probably not on line 476 itself, but most likely a line or two before it. Check your code carefully for syntax mistakes. If you cannot recognize one, copy and paste this output into a thread on the support forum.
Now outputing the page without any conditional or php sections evaluated:
< type="text/javascript" src="templates/default/javascriptheader.js">
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 13, 2006 - 6:50 PM:

Then two term contains conditionals must be broken, use PHP: <?php if (strstr("{TID}", "home.tpl") or strstr("{TID}", "editmembers.tpl")) { ?>
Damir
Forum Regular

Usergroup: Customer
Joined: Jan 25, 2005
Location: Croatia

Total Topics: 46
Total Comments: 136
Damir
Posted Dec 14, 2006 - 7:14 AM:

Will this be fixed in next update?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 14, 2006 - 6:01 PM:

Unlikely. Conditionals are intended for simple stuff, PHP exists for harder stuff. Two-term conditionals have always been erratic.
rw
Experienced

Usergroup: Customer
Joined: Jul 29, 2005

Total Topics: 30
Total Comments: 65
rw
Posted Dec 23, 2006 - 10:13 AM:

Hi,

I tried all the variations also. Ended up doing this:
<IF {TID} contains displaylinks.tpl>
content
</IF>
<IF {TID} contains memberlinks.tpl>
same content again
</IF>

Not very elegant, but it worked...
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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