vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   show some html if post > X (https://vborg.vbsupport.ru/showthread.php?t=156956)

blackvborg 09-03-2007 09:35 PM

show some html if post > X
 
I would put a block of html on a page only when the number of posts showed on the current page is bigger then X; what is the condition?

Is there a reference somewhere to the variables I can test in Conditions?

<if condition="$??? > 1">
...my html...
</if>

Thank you!

blackvborg 09-05-2007 05:42 AM

any idea? it should not be hard for the vb experts :)

Opserty 09-05-2007 12:33 PM

I think its

HTML Code:

<if condition="$post['postcount']">
<!-- You HTML -->
</if>


blackvborg 09-05-2007 01:03 PM

isn't $post['postcount'] the number of the post showed? I'm interested on checking the number of posts showed on the current page.

Eg. if a thread has 22 posts and I've 15 posts per page I would have 15 for the first page and 7 for the second one

Thank you!

Opserty 09-05-2007 01:16 PM

I thought you meant the the number of posts on a page.

I'm not a 100% sure but you can try

Code:

<if condition="$thread['replycount'] > X">
<!-- You HTML -->
</if>

I don't know if it is fetched but you can try it.

blackvborg 09-05-2007 09:34 PM

it works for the first page, but not for the second

$thread['replycount'] give the total number of replies to a thread; I need the number of replies on the current page.

I found this escamotage:

<if condition="$thread['replycount'] - $pagenumber*$perpage + $perpage > 1">

it works!

but this not:
<if condition="$thread['replycount'] - ($pagenumber-1)*$perpage > 1">

Thank you very much!


All times are GMT. The time now is 08:02 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.01506 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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