Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Different Postbit on first post based on prefix (news thread) Details »
Different Postbit on first post based on prefix (news thread)
Mod Version: 1.00, by tpearl5 (Coder/Designer) tpearl5 is offline
Developer Last Online: Jun 2018 I like it Show Printable Version Email this Page

vB Version: 3.8.4 Rating: (1 vote - 5.00 average) Installs: 7
Released: 11 Jan 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

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:
  • Open your postbit template
  • Copy the existing template into an editor
  • Copy the below into an editor
  • Replace 'YOUR ORIGINAL POSTBIT HERE' with your postbit
  • Replace 'news' (in the first line) with the ID of the prefix you would like this template to display with. You can find this by going to 'Thread Prefixes > Prefix manager > click on the prefix you want' It'll be at the top.
  • Copy everything into your postbit template and save

This will only work on 3.x


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 11 Jan 2010, 21:34
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Real name: John
Please let me know if you find this useful
__________________
John
Reply With Quote
  #3  
Old 13 Jan 2010, 06:15
st.charles's Avatar
st.charles st.charles is offline
 
Join Date: Mar 2007
I think it's an awesome template mod!
Reply With Quote
  #4  
Old 17 Jan 2010, 19:00
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Real name: John
thanks - glad you like it!
__________________
John
Reply With Quote
  #5  
Old 17 Jan 2010, 19:16
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Though I have no use for it atm, I do like it.. good thinking
Reply With Quote
  #6  
Old 16 Apr 2010, 15:03
DannyITR DannyITR is offline
 
Join Date: Jan 2002
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
Reply With Quote
  #7  
Old 17 Apr 2010, 03:31
ZEHH's Avatar
ZEHH ZEHH is offline
 
Join Date: Oct 2009
ScreenShot ?
Reply With Quote
  #8  
Old 17 Apr 2010, 18:01
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Here is a screen. Happens on both IE and Firefox.
Attached Images
File Type: jpg screen.jpg (71.3 KB, 243 views)
__________________
www.montrealracing.com
Reply With Quote
  #9  
Old 22 Apr 2010, 21:32
DannyITR DannyITR is offline
 
Join Date: Jan 2002
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
Reply With Quote
  #10  
Old 19 May 2010, 16:03
DannyITR DannyITR is offline
 
Join Date: Jan 2002
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

Last edited by DannyITR; 12 Aug 2010 at 14:22.
Reply With Quote
  #11  
Old 20 May 2010, 08:25
RobbieZ RobbieZ is offline
 
Join Date: Jul 2008
Interesting..
Reply With Quote
  #12  
Old 11 Aug 2010, 18:12
texasf1racer's Avatar
texasf1racer texasf1racer is offline
 
Join Date: Oct 2006
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?
__________________
Best Regards,
Tex

Reply With Quote
  #13  
Old 11 Aug 2010, 18:30
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Real name: John
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
Reply With Quote
  #14  
Old 12 Aug 2010, 03:23
texasf1racer's Avatar
texasf1racer texasf1racer is offline
 
Join Date: Oct 2006
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thank you for posting this, we found it very useful!
__________________
Best Regards,
Tex

Reply With Quote
  #15  
Old 12 Aug 2010, 14:17
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Originally Posted by texasf1racer View Post
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thank you for posting this, we found it very useful!
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:49.

Layout Options | Width: Wide Color: