Back to vBulletin 4.x Template Modifications

Latest Blog in Postbit Using Carp for vBulletin 4.x
Mod Version: 4.01, by djbaxter

vB Version: 4.0.6 Rating: (2 votes - 5.00 average) Installs: 15
Released: 27 Jan 2010 Last Update: 23 Aug 2010 Downloads: 35
Not Supported Uses Plugins Template Edits Re-usable Code Translations  

This is an update for nevetS' mod for 3.5 at Latest Blog Feed in Postbit using Carp RSS and gotlinks' update for 3.6 at 3.6 Working Recent Blog Mod ( Uses Carp Free ) to make it work in 4.x.

If you already have Carp Free or Carp LE or Carp Evolution, great. If not, you'll have to download a copy from http://carp.docs.geckotribe.com/download.php (Carp Free is now renamed Carp LE). If you need to install Carp first, golinks has some instructions at 3.6 Working Recent Blog Mod ( Uses Carp Free ) and there are of course more detailed instructions at http://carp.docs.geckotribe.com/

Now, modify your vBulletin installation.

1. Add three custom profile fields - in my setup, they are as follows, but make a note of the field# for later in case yours are different:
  1. Name = Blog RSS Feed (RSS Only!)
    Single-Line Text Box Editable, Searchable, Members field6
    The member enters his blog feed here.
  2. Latest Blog Title
    Single-Line Text Box Searchable, Members field7
    This is filled automatically by Carp with the latest blog post at that feed.
  3. Blog URL
    Single-Line Text Box Searchable, Members field8
    This is the URL to the blog, filled by Carp and used in postbit to make the blog title a live URL.

2. Create a new plugin called Carp Configuration and attach it to hook location: global_bootstrap_init_start

PHP Code:
global $vbulletin;
require_once 
'./carp/carp.php';
CarpConf('carperrors',0);
CarpConf('cacheinterval',3);
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link');
CarpConf('linktarget',1); 
3. Create another plugin called Get Users Blog Entry and attach this to hook location: postbit_display_start

PHP Code:
global $vbulletin;
ob_start();
CarpCacheShow($post[field6]);
$blogentry ob_get_contents();
ob_end_clean();
vB_Template::preRegister('postbit',array('blogentry' => $blogentry)); 

4. Edit postbit (and/or legacy):

Find:

PHP Code:
<vb:if condition="$post['rank']">
                        <
span class="rank">{vb:raw post.rank}</span>
                    </
vb:if> 
Add after:

PHP Code:
<!-- latest blog hack -->
<
vb:if condition="$post['field6']">
<
span class="smallfont">Recent Blog: <a href="{vb:raw post.field8}" target="_blank">{vb:raw blogentry}</a></span>
</
vb:if>
<!-- 
end latest blog hack --> 
Remember to change field6 and field8 to correspond to the numbers of the custom fields for your forum.

For postbit_legacy, use this code instead (thanks to 993ti who posted this here

Spoiler (click to open)


Nice mod, thx, comes in handy on my forum
Might want to add that if you use postbit_legacy the plugincode of Get Users Blog Entry should be
Code:
ob_start();  
CarpCacheShow($post[field6]);  
$blogentry = ob_get_contents();  
ob_end_clean();  
vB_Template::preRegister('postbit_legacy',array('blogentry' => $blogentry));

Close
:

PHP Code:
ob_start();  
CarpCacheShow($post[field6]);  
$blogentry ob_get_contents();  
ob_end_clean();  
vB_Template::preRegister('postbit_legacy',array('blogentry' => $blogentry)); 

Download

File Type: %1$s Latest-Blog-in-Postbit-Suite.txt (2.7 KB, 35 downloads)

Supporters / CoAuthors

  • 993ti
  • gotlinks
  • nevetS

Screenshots

Click image for larger version
Name:	latest-blog-in-postbit.jpg
Views:	429
Size:	4.1 KB
ID:	111170  

Similar Mods

Add-On Releases 3.6 Working Recent Blog Mod ( Uses Carp Free ) vBulletin 3.6 Add-ons
Latest Blog Feed in Postbit using Carp RSS vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024