View Full Version : Display text only if the thread posts is one !
KID_1194
11-05-2010, 06:32 PM
Dear everyone,
I have been trying to write a conditional code to display a certain text only if the thread posts
is one only .. in another word that this text will hide if someone replied on that thread
but I couldn't don't ..
so if there is someone who is willing to help .. I'll appreciate that !
Best regards
Lynne
11-05-2010, 07:09 PM
Post what you have been trying, and tell us what template, and then we can see what is wrong. Please use the code tags.
KID_1194
11-06-2010, 10:03 AM
The template that I am editing is SHOWTHREAD
and I'm using this condition ...
<if condition="$totalthreads =1 AND $threadinfo['postuserid'] == $bbuserinfo['userid']">
for the second part $threadinfo['postuserid'] == $bbuserinfo['userid']
this is working ..
but the first part .. where I want to show the specific text if there are no replies in the members thread .. $totalthreads =1
the first part is wrong .. can u help?
Best regards
--------------- Added 1289044278 at 1289044278 ---------------
Even I tried to use this
<if condition="$threadinfo['postcount'] = 1 AND $threadinfo['postuserid'] == $bbuserinfo['userid']">
it is not working ..!
Lynne
11-06-2010, 01:55 PM
If you look at the showthread.php file, the variable isn't $totalthreads, it's $totalposts. There is also the variable $LASTPOSTID AND $FIRSTPOSTID, so you could check if they are the same. (All this is in the showthread.php file.)
KID_1194
11-06-2010, 05:43 PM
I did it .. it is $totalposts
Thanks a million .. Lynne ..
you are the best ..!
I really appreciate that ..
Best regards
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.