Log in

View Full Version : What is if conditional code for first showtread page?


basketmen
09-16-2009, 09:30 AM
I want to showing a text only in every first showtread page




what is the right code for it guys?





here is for anyone that answering this :up:

Lynne
09-16-2009, 02:44 PM
So only the very first post? Try this:

<if condition="$post['postid']==$thread['firstpostid']">
stuff only for first post
</if>

basketmen
09-16-2009, 11:07 PM
So only the very first post? Try this:

<if condition="$post['postid']==$thread['firstpostid']">
stuff only for first post
</if>
no, not every first post

but every first thread

what is the code guys

Stormraven
09-16-2009, 11:19 PM
Take a look here, you may find it on this list:

http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html

Lynne
09-16-2009, 11:41 PM
no, not every first post

but every first thread

what is the code guys
First thread? What is a first thread?

The code I posted is for the first post in a thread.

basketmen
09-17-2009, 12:48 AM
First thread? What is a first thread?

The code I posted is for the first post in a thread.
ah sorry wrong type, i mean first showthread page

for example this is the first showthread page i want to showing the text here under Quick reply https://vborg.vbsupport.ru/showthread.php?t=223371

and this is the second showthread page and the rest showthread pages, i dont want to showing it there https://vborg.vbsupport.ru/showthread.php?t=223371&page=2




Take a look here, you may find it on this list:

http://forum.vbulletinsetup.com/f18/...list-2185.html

i had try looking there, but still cant find it

basketmen
09-18-2009, 07:25 AM
upp still dont get the answer, this looks like easy and basic, but i still dont have the answer

Lynne
09-18-2009, 02:43 PM
Have you tried anything with the $page variable? like
<if condition="$page <= 1">
stuff
</if>

It might be $_GET for the variable and they might have changed it in the php to be called something else, but that is probably what I'd look into.

basketmen
09-19-2009, 02:02 AM
i had try these but no one works

<if condition="$page <= 1">


or


<if condition="$page == 1">




and this code just for postbit https://vborg.vbsupport.ru/showthread.php?t=104447&highlight=first+page , i need to put the code in showthread template below quick reply



any other code guys? is there any code for this, i am confuse i had try search other threads too

Lynne
09-19-2009, 03:42 AM
Try the opposite... if $page is greater than or equal to 2, don't do something, else do it. And, like I said, page may be a $_GET variable, I really don't know.

gbechtel
05-29-2010, 08:30 PM
The condition is...

<if condition="!$GLOBALS['FIRSTPOSTID']">AD CODE</if>

place it just above $post[message]


This is what I am using...
<div style="margin-left:10px; margin-bottom:10px; float:right;">
<if condition="!$GLOBALS['FIRSTPOSTID']">AD CODE</if>
</div>
$post[message]


Useful for adding a advertisement or other information after the first post on every page.

Ref: http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html as stated earlier in ths thread