vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Display text only if the thread posts is one ! (https://vborg.vbsupport.ru/showthread.php?t=253213)

KID_1194 11-05-2010 06:32 PM

Display text only if the thread posts is one !
 
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 ...
Code:

<if condition="$totalthreads =1 AND $threadinfo['postuserid'] == $bbuserinfo['userid']">
for the second part
Code:

$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 ..
Code:

$totalthreads =1
the first part is wrong .. can u help?

Best regards

--------------- Added [DATE]1289044278[/DATE] at [TIME]1289044278[/TIME] ---------------

Even I tried to use this
Code:

<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


All times are GMT. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01093 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete