PDA

View Full Version : THIS_SCRIPT in template needs help


hazem_aliraqi
10-10-2012, 12:28 PM
hello guys

I wonder How to use THIS_SCRIPT


the template i need to use the condition is headinclude

this condition


<vb:if condition="THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'threads'">
code
</vb:if>


its in all the page


i need the condition in the first post only

i tried this but not work


<vb:if condition="$post['isfirstshown'] && $thread['firstpostid']==$post['postid']">
code
</vb:if>




also this

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
code
</vb:if>

and this


<vb:if condition="THIS_SCRIPT == 'showthread' AND $thread['firstpostid']==$post['postid']">
code
</vb:if>

all this not work in headinclude template

so that i need help to make my code work in first post only

Simon Lloyd
10-10-2012, 03:36 PM
i think showthread will be SHOWTHREAD :)

hazem_aliraqi
10-10-2012, 08:36 PM
no its work in showthread but i need it in first post only

not in all the page

Simon Lloyd
10-10-2012, 09:19 PM
If this doesnt work<vb:if condition="$post['isfirstshown']">something</vb:if>then try this<vb:if condition="$memberinfo['isfirstshown']">something</vb:if>