![]() |
|
Mod Options |
![]() |
|||||||||||||||
Different Postbit on first post based on prefix (news thread)
![]() Developer Last Online: Jun 2018 ![]() ![]() ![]()
This template modification will allow you to display a different posbit based on a prefix. So, for example, if you have a 'news' thread, you could display the first post in a news layout.
Included below is the modified postbit that I use on my forum for an example. The original template comes from the Article Forums mod (http://www.vbulletin.org/forum/showthread.php?t=211638) I've taken out a couple icons at the top and removed the attachment thumbnail box for images. I've added Facebook, Tweetmeme, and Digg buttons to the upper right. Here is a live example of the this mod in action: http://cellphoneforums.net/att/t3063...mmercials.html (example also has helpful posts, tweet poster, and vbseo installed) To install:
This will only work on 3.x
Download Now Only licensed members can download files, Click Here for more information. Supporters / CoAuthors Show Your Support
No members have liked this post.
|
Comments |
#2
|
||||
|
||||
Please let me know if you find this useful
__________________
John No members have liked this post.
|
#3
|
||||
|
||||
I think it's an awesome template mod!
No members have liked this post.
|
#4
|
||||
|
||||
thanks - glad you like it!
__________________
John No members have liked this post.
|
#5
|
||||
|
||||
Though I have no use for it atm, I do like it.. good thinking
No members have liked this post.
|
#6
|
|||
|
|||
This mod is awesome. The only thing I notice is when its shared on Facebook, the counter goes away after the page is refreshed.
__________________
www.montrealracing.com No members have liked this post.
|
#8
|
|||
|
|||
Here is a screen. Happens on both IE and Firefox.
__________________
www.montrealracing.com No members have liked this post.
|
#9
|
|||
|
|||
I was also wondering if its possible ot make a complete column under the facebook, twitter and digg links so that the text of the post doesn't scroll under it? The screen is quite wide and I'd love to limit how wide the text area is and perhaps put photos going down the right hand side with text on the left but formatting posts is very tedious it seems. Can anyone shed some light on this?
__________________
www.montrealracing.com No members have liked this post.
|
#10
|
|||
|
|||
Also how would I modify the first conditional to include multiple prefixes?
Edit: Got it: <if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND in_array($thread['prefixid'], array('COTM', 'Feature', 'news', 'SiteInfo', 'ShowCoverage'))"> where COTM, Feature, news etc are the prefix IDs.
__________________
www.montrealracing.com No members have liked this post.
Last edited by DannyITR; 12 Aug 2010 at 15:22. |
#11
|
|||
|
|||
Interesting..
No members have liked this post.
|
#12
|
||||
|
||||
Thanks, its a handy mod! One problem though, my forum members and guests are seeing the different postbit for the first post on each page of the thread. Only the original posters #1 post in the thread should use the different postbit.
Any idea what could be causing this? No members have liked this post.
|
#13
|
||||
|
||||
I'm not sure why that would be happening. The conditional will make sure it is only displayed on the first post of the thread regardless of the page. Did you copy things per the instructions above?
__________________
John No members have liked this post.
|
#14
|
||||
|
||||
Hi, thanks for the quick reply!
I actually used the adjusted conditional from Danny above for multiple prefixes, however I tried it with just your code as well and the bug was still present. In fact on your site you can see it on page 2 of THIS thread for example. It turns out that admin/mod accounts see it correctly with only the first post in the thread using the different postbit. Guests/not logged in and regular user accounts see the different postbit for the first post on each page of the thread - even though that post isn't the original posters. Thanks to one of our members, he found the fix by changing your conditional to:
Thank you for posting this, we found it very useful! ![]() No members have liked this post.
|
#15
|
||||
|
||||
Originally Posted by texasf1racer
I'm experiencing this issue as well but only in Internet explorer. In Firefox, its only the first post on the first page that gets the new postbit as it should be. Would love to get this fixed somehow.
![]()
__________________
www.montrealracing.com No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 10:07.