vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Line break after first post... (https://vborg.vbsupport.ru/showthread.php?t=215883)

Warlord 06-11-2009 01:05 AM

Line break after first post...
 
I was wondering what I could use in the postbit template to make a line break between the first post and the rest of the posts?

I tried

<if $post[postcount]==1>
<p>
</if>

But it inserted a paragraph break in between every post instead of just between post #1 and post #2 like I wanted. Any suggestions?

RTMdotORG 06-11-2009 01:24 AM

line break=<br />

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

You should be able to use a first post on all pages mod, and add a <br /> at the end of it so it would only be the first post with the break. :D

Lynne 06-11-2009 02:12 AM

Perhaps:
HTML Code:

<if condition="$post[postcount] == '1'">
<br />
</if>


RTMdotORG 06-11-2009 02:16 AM

Quote:

Originally Posted by Lynne (Post 1827394)
Perhaps:
HTML Code:

<if condition="$post[postcount] == '1'">
<br />
</if>


Good One! :D

Dismounted 06-11-2009 05:33 AM

You could also add some code to the ad location template for after the first post.

Warlord 06-11-2009 08:46 PM

Quote:

Originally Posted by Lynne (Post 1827394)
Perhaps:
HTML Code:

<if condition="$post[postcount] == '1'">
<br />
</if>


Awesome, thanks! Do you know how I could count all of the reply posts in a thread?

I want the first post to be a news article and all of the following posts to be "Comments" on the news article. I'd like to count the replies and have it say something like

"13 Comments"

In between the first post and the rest of the posts.

I've taken what you've given me here a step further and changed up the template for the replies to give the first post a different look than the rest of them. You can see what I mean here if you like.

http://forums.projectfanboy.com/DC-C...-teaser-t3551/

Wired1 06-11-2009 09:11 PM

There are article mods out there. You may want to look at their code to see how they do it.

Warlord 06-11-2009 11:56 PM

Took me a while but I figured it out, thanks. :D

Lynne 06-12-2009 02:29 AM

That's nice! :up:


All times are GMT. The time now is 01:09 PM.

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.01612 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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