Log in

View Full Version : What's a template conditional please?


TeaTree
05-26-2006, 01:35 PM
Hi,

Basically I am needing to know what a template conditional is as for a hack I need to get something off of the page that the hack is on and the hack author said to use a template conditional

Many Thanks,

Sam

peterska2
05-26-2006, 01:40 PM
which mod are you refering to and what are you wanting to achieve?

TeaTree
05-26-2006, 01:44 PM
Hi,

First off, Thanks for your very quick response-Secondly, I am refering to this (https://vborg.vbsupport.ru/showthread.php?t=92201)hack

Basically, on page 2 I am hoping to take off my forumhome announcement and the shoutbox but only on that page and not on the actual forumhome-

Thanks

peterska2
05-26-2006, 01:55 PM
i am not familiar with exactly how that mod works so i will install it when i get home and get back to you.

TeaTree
05-26-2006, 02:03 PM
Okay thanks:)

peterska2
05-26-2006, 07:35 PM
Right I've had a look at it, and as far as I can see, the items on the forumhome will appear on all pages created by this modification, and this is non-editable as they all use the same script variable and templates.

TeaTree
05-26-2006, 09:44 PM
Right I've had a look at it, and as far as I can see, the items on the forumhome will appear on all pages created by this modification, and this is non-editable as they all use the same script variable and templates.

The owner seems to think that you can remove them via conditionals:s

peterska2
05-26-2006, 09:50 PM
The owner seems to think that you can remove them via conditionals:s

To remove them and only show them on the main index you would need to use the conditional <if condition="THIS_SCRIPT=='index'">code here</if>but the subsequent pages such as page 2 are also ran by the index script, so it is not possible.

TeaTree
05-27-2006, 07:54 AM
Hmm then Amykahr must be wrong:O

peterska2
05-27-2006, 11:13 AM
It is possible that you could do it with some php conditionals via plugins,but it isn't something I have experimented with. As the shoutbox template is set directly in the php this should be possible, and by attaching the announcement template to that of the shoutbox, is should theoretically just put the announcement where the shoutbox is.

However, I'm not a php coder, so wouldn't know where to start with this.