View Full Version : [HowTo] Break posts up from eachother
Floris
04-17-2002, 10:00 PM
[HowTo] Break posts up from eachother?
(but still keep the top/bottom post stick to top/bottom row)
What does this one do?
When you view a thread, it shows the first row, the posts, the last row; all sticking together. What we want is a space between the posts. But not a space between the first row and the first post, the last row and the last post. We only want to make a <br> between each individual post. I was not able to do this with a template modification, so I run crying to FireFly and he thought about it for 2,8sec. and gave me the following code to accomplish my wish. *respect*
Why did you make it?
Because vB didn't came with the option by default. And I think it looks pretty damn cool. After applying it to my board I got fan mail with requests on how to do this. I ignored most of them, and now the requests start on vB.com too. So I decided to publish it here. Please note that I am NOT the author of this little code hack, and that all credits should ofcourse goto FireFly.
Instructions:
Open the original vBulletin file "showthread.php" and find:
(near line 425)
$postbits .= getpostbit($post);
Replace that with:
$postbits .= iif(empty($postbits), '', '<br>').getpostbit($post);
Save the file, upload it again and see if it worked.
Done!
Version?
Tested with vBulletin 2.2.5 (final) and it works just great! (I wouldn't know about older versions for sure, but it is pretty easy to undo, so doesn't hurt to check it out)
Support!
Feel free to click 'Installed' once you got it up and running on your board!
Tweak!
There were threads where users complained about the breaking showing up the page bground color instead of the main table background color. I fixed this on my new style by putting eveything in the header & footer in 1 new main table. Please keep in mind that if you have other designs etc, this might screw it up, but it works here.. so :) enjoy
header - at the top add :
<center>
<table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="10" cellspacing="0" border="0"><tr><td>
footer - at the bottom add :
</td></tr></table></center>
Maybe it helps you too.
The Result
This is how it looks on my web site:
Floris
04-18-2002, 07:40 AM
This screenshot shows that the top post from the thread sticks to the top row, but splits from the other posts.
Floris
04-18-2002, 08:04 AM
This screenshot shows that the last post from the thread sticks to the bottom row, but splits from the other posts.
Smoothie
04-18-2002, 08:49 AM
Thanks for that tip! Gave it a go, and I must say it does look rather cool.
Floris
04-18-2002, 09:02 AM
Originally posted by Smoothie
Thanks for that tip! Gave it a go, and I must say it does look rather cool.
Thank you smoothie, I just took a look at your cool web site, and yeah. It does look darn good :) Nice to see you use it.
Twig Deez
04-18-2002, 09:33 AM
Originally posted by xiphoid
...FireFly... *respect*
indeed. :)
thanks a lot xiphoid, respect due to you, too.
Floris
04-18-2002, 09:55 AM
Someone from dietforum posted something that it doesn't work, but when I wanted to reply, the post got deleted :? I hope it got fixed!
And Twig Deez, thank you :P
TWTCommish
04-18-2002, 10:57 AM
Why would this need to be anything more than a template change? Couldn't you stick a <br/> tag in the postbit template and get the same effect, roughly?
I myself have just done this in a tempate edit, no need to hack.
This is also good if you have many stylise, you change it only one time :)
-=dm=-
04-18-2002, 03:46 PM
cool Thanx :)
but how do I change the color which is shown in the space between posts?
inetd
04-18-2002, 05:46 PM
xiphoid, tell me, how u add "activity, popularity and experience" in postbit. Please!
Austin Dea
04-18-2002, 06:42 PM
Very nice :D.
Floris
04-18-2002, 08:02 PM
Originally posted by TWTCommish
Why would this need to be anything more than a template change? Couldn't you stick a <br/> tag in the postbit template and get the same effect, roughly?
I explained this in my first post.
Originally posted by inetd
xiphoid, tell me, how u add "activity, popularity and experience" in postbit. Please!
That is the Just another level hack.
Originally posted by neo
I myself have just done this in a tempate edit, no need to hack.
Explain to me where you added the <br> so both the top & bottom row stick to the first & last post? Because that is exactly why I wanted this, and not just a template change, which is where I was going for first.
Originally posted by Remi
This is also good if you have many stylise, you change it only one time :)
Yep :)
Originally posted by Austin Dea
Very nice :D.
Thank you, enjoy!
Originally posted by -=dm=-
cool Thanx :)
but how do I change the color which is shown in the space between posts?
It should not display any other colour then the background color of the forum, and not of the <body>. You probably have other hacks applied to your showthread/postbit?
Floris
04-18-2002, 08:12 PM
I do not know who moved this hack from hack-tips to full-release, but thank you :> I was not sure how 'worthy' it would be as a true-hack.
TWTCommish
04-18-2002, 08:12 PM
Hmm. Barely qualifies as a hack, IMO (don't take that the wrong way...I don't mean to be rude), but I suppose it is technically.
-=dm=-
04-18-2002, 08:15 PM
Originally posted by -=dm=-
cool Thanx :)
but how do I change the color which is shown in the space between posts?
screenshot added :)
Floris
04-18-2002, 08:17 PM
Originally posted by TWTCommish
Hmm. Barely qualifies as a hack, IMO (don't take that the wrong way...I don't mean to be rude), but I suppose it is technically.
See my previous post where I say "Thank you for moving it to full-release-as-a-hack".. And it is a code-hack, since it modified the original vBulletin code :)
Originally posted by -=dm=-
screenshot added :)
Which vB you running? (version wise)
-=dm=-
04-18-2002, 08:26 PM
I have the vB 2.2.4
EDIT EDIT:
ups this screenshot is from my test board and its the version 2.2.5 :)
Floris
04-18-2002, 08:29 PM
I can't really see in the showthread.php code why it would break up a table .. you are only adding a break tag, not a close table and make new one.. Maybe you applied other hacks that involved more tables? (I do wonder why smoothie didn't had any problems then)
-=dm=-
04-18-2002, 08:32 PM
actually this is the first hack ever on this board :D
I did a clean install.
Floris
04-18-2002, 08:42 PM
Well .. I did not had the problem, and I can't see why/what is causing it. Maybe FireFly can inlight us here.
heretic
04-18-2002, 09:40 PM
for those that want to spend 5 seconds on it instead of 5 minutes you can just add a <br> at the end of your postbit template :)
and when you upgrade, it's one less ahck to think about.
Xanthine
04-18-2002, 09:54 PM
Well this one only really takes 1 minute and when you add a <br> the top post is always stuck to the top bar and the bottom one is always away from the bottom bar. This way looks better IMO.
heretic
04-18-2002, 11:54 PM
not exactly... if you do it right, the top post:
heretic
04-18-2002, 11:56 PM
and the bottom...all through template editing.. however, I've completely redesigned my postbit
*shrug*
Twig Deez
04-19-2002, 12:02 AM
hey xiphoid; :)
re: my last post in the space between categories topic over on vb.com,
do you think a similar piece of code could also be used to seperate the categories on forumhome?
i want the seperation without the misalignment, or having to change td width's to realign them;
i figure i can insert an empty tr at the end of the forumhome_forumbit_level1_post template;
but i would prefer a method similar to the one utilised here.
any ideas?
Floris
04-19-2002, 06:34 AM
Originally posted by heretic
for those that want to spend 5 seconds on it instead of 5 minutes you can just add a <br> at the end of your postbit template :)
and when you upgrade, it's one less ahck to think about.
If it takes you 5 minutes to search & replace :P hehe. Too slow.
As I mentioned, I couldn't get this to work with templates, so this is why. And someone already mentioned this, instead of just saying so, please tell me the code where you entered the <br> in your postbit template.
Originally posted by Xanthine
Well this one only really takes 1 minute and when you add a <br> the top post is always stuck to the top bar and the bottom one is always away from the bottom bar. This way looks better IMO.
Yep.
Originally posted by Twig Deez
hey xiphoid; :)
re: my last post in the space between categories topic over on vb.com,
do you think a similar piece of code could also be used to seperate the categories on forumhome?
i want the seperation without the misalignment, or having to change td width's to realign them;
i figure i can insert an empty tr at the end of the forumhome_forumbit_level1_post template;
but i would prefer a method similar to the one utilised here.
any ideas?
Nope, I am not the guru here :) Maybe you can do it by applying the same trick to $forumbits = ''; from index.php. But don't quote me on that (except when it works)
Twig Deez
04-19-2002, 05:38 PM
Originally posted by xiphoid
Nope, I am not the guru here :) Maybe you can do it by applying the same trick to $forumbits = ''; from index.php. But don't quote me on that (except when it works)
well, i am gonna tinker with it as soon as i get home from work. :)
i'll let you know.
inetd
04-19-2002, 08:11 PM
That is the Just another level hack.xiphoid, please post link for this hack... I search and don't find :( :(
Floris
04-19-2002, 09:23 PM
Originally posted by inetd
xiphoid, please post link for this hack... I search and don't find :( :(
weird :)
inetd
04-19-2002, 09:27 PM
oops :o
Floris
04-19-2002, 10:19 PM
np
wintz
04-20-2002, 08:49 AM
Originally posted by -=dm=-
screenshot added :)
I have the same thing and i`m running version 2.2.5
geniuscrew
04-29-2002, 11:06 PM
Maybe i can help :) (for the first time lol)
It's not another hack thats put's the block of colour between the posts :p
I changed the bgcolor in the "styles" bit to the color that looked right and BAM!
it works :)
Hope that helped
wintz
04-30-2002, 08:45 AM
That works fine thanks, only problem is a wanted to have the body bgcolour different from the page bgcolour :( ahh well
geniuscrew
04-30-2002, 08:54 AM
sorry - can't help you with that, not right now anyway :-/ mind is blank
wintz
04-30-2002, 08:56 AM
lol, i know that feeling ;)
geniuscrew
04-30-2002, 02:14 PM
Originally posted by wintz
lol, i know that feeling ;)
Whoops - I just realised the "Powered by: vBulletin Version 2.2.5...." bit's background is also the bgcolor :-/
Airwaves
05-01-2002, 07:53 PM
I experience the same problem
It does it on a clean install test forum too...
Bad Bunny
05-10-2002, 03:53 PM
The reason you experience this "problem" is because the postbits are not really in the table that displays the background color. Ever notice how a really long post still has the borders around it? You have to do a bit of hacking in the postbit realm to get rid of the columns with spacers in them, and in the showthread realm, you have to place the postbits back inside the main content table.
Do it...go look at a really wide post, you will see that the page border shifts along with it. Otherwise, you are going to have an issue with the page border stretching to fit the wodest post.
Bad Bunny
05-10-2002, 04:26 PM
I just found an easy way to add a break the way it does i here without a hack.
Place a break before the postbit, and then in view thread, place a break before the table holding the time and post/reply buttons on the bottom.
But if people really wanna use this hack, it instead of placing a break between the posts, you could place this
<table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td>
<td width="100%">
<!-- spacer -->
<!-- spacer -->
<img width="10" height="10" src="{imagesfolder}/space.gif" alt=""> </td>
<td width="10"><img width="10" height="8" src="{imagesfolder}/space.gif" alt=""></td>
</tr>
</table>
It will simulate that the table keeps going on. :-> Let me know how that works. Oh yes, you can change the image height to whatever you want.
wintz
05-19-2002, 10:59 AM
Thanks but where would i put this code you mension?
Floris
05-20-2002, 06:45 AM
This is the thread about the code hack, not the template hack. It was already mentioned that this could be done with a template. Re-read arguments in first somewhat posts about that.
madhouse
05-31-2002, 05:32 PM
Here i installed it with collasping post and it worked great...even though i was using mosty black
This is from a clan that I am hosting....
madhouse
05-31-2002, 05:35 PM
And here it is expanded...
madhouse
05-31-2002, 05:41 PM
It works great even on the main forum,but I am reluctant to upgrade my board untill 3.0 comes out so yes I am using 2.2.1
If you want to see the main forums go to The Clan Forums (http://theclanforums.com)
FleaBag
06-21-2002, 08:42 PM
Great improvement to 2.2.6, thanks! :)
Chris M
06-21-2002, 09:37 PM
Nice:)
Satan
Grealm
06-22-2002, 02:36 AM
for some reason it didnt work for me.. im using 2.2.6
K33nny
06-28-2002, 06:44 PM
<a href="http://ewplanet.com/e/showthread.php?postid=2" target="_blank">http://ewplanet.com/e/showthread.php?postid=2</a>
You may notice the break tag being visible between the posts. I'm in the process of constructing the forums so at times things will look extremely sloppy, don't mind that.
How do I fix that? Also, how would I break the categories on forumhome?
K33nny
06-28-2002, 06:51 PM
Nevermind guys.
Heineken77
07-16-2002, 05:26 PM
Nicely done!
Thanks :D
NexDog
08-10-2002, 01:32 PM
Nice hack once again. I got most of yours now. :)
Tyrant
08-23-2002, 10:27 PM
Is the same not achiveable without editing the showthread.php file? I think it is, heres what i did:
* Goto Templates > Modify > [expand list] > Postbit Templates [expand] > postbit [edit]
* Then find this:
<!-- spacer --></td><td width="10"><img width="10" height="1" src="images/space.gif" alt=""></td></tr></table>
* Now Insert this directly below it
<!--added spacer-->
<table align="center">
<td bgcolor="#FFFFFF" width="100" height="10" align="center"></td>
</table>
<!--/added spacer-->
Replace the bgcolour value with the your site's
kmfdm_kid2000
08-27-2002, 06:45 PM
Sorry, had to uninstall, conflicted w/ no double posting hack...Looks nice cosmetically anyway :) Easy install too...
FleaBag
09-03-2002, 02:40 AM
Works on 2.2.7. Thanks. ;)
Floris
09-03-2002, 03:35 AM
Yeah it does. I re-applied it to 227 yesterday when I took the time to upgrade, and had no errors what so ever. (ofcourse)
FleaBag
09-04-2002, 07:21 AM
I love your little hacks, they make a big difference to the presentation of my forums. :D
UnForums2k
10-05-2002, 09:43 PM
br in the template is alot easier, and this hack ddnt work on forum im usin 2.2.7 all well i still got it though
TheSaint-AeD
10-23-2002, 08:08 AM
Originally posted by heretic
for those that want to spend 5 seconds on it instead of 5 minutes you can just add a <br> at the end of your postbit template :)
and when you upgrade, it's one less ahck to think about.
Could you post the Code for this in the Thread? I tested the other ones, only the Hack seperated the Posts correctly, all other means produced the same Problems Xiphoid had.
FleaBag
10-28-2002, 11:10 PM
Works with 2.2.8. Thanks. :D
Floris
10-28-2002, 11:12 PM
I am happy to hear that :)
thx xiphoid ..working on 2.2.9
Dribbles
12-23-2002, 10:56 AM
working perfectly on 2.2.9 .. thnx
Silenced Soul
12-24-2002, 02:45 AM
There wasn't a major point to this hack, if you ask me... just a simple <br/> does the trcik, but, nice thought.
trickfly
01-17-2007, 10:58 PM
does this work on 3.6.2 ? please pm me
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.