Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest Blog in Postbit Using Carp for vBulletin 4.x Details »»
Latest Blog in Postbit Using Carp for vBulletin 4.x
Version: 4.01, by djbaxter djbaxter is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.0.6 Rating:
Released: 01-26-2010 Last Update: 08-22-2010 Installs: 15
Uses Plugins Template Edits
Re-useable Code Translations  
No support by the author.

This is an update for nevetS' mod for 3.5 at https://vborg.vbsupport.ru/showthread.php?t=91781 and gotlinks' update for 3.6 at https://vborg.vbsupport.ru/showthread.php?t=163718 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 https://vborg.vbsupport.ru/showthread.php?t=163718 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:

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

Download Now

File Type: txt Latest-Blog-in-Postbit-Suite.txt (2.7 KB, 33 views)

Screenshots

File Type: jpg latest-blog-in-postbit.jpg (4.1 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-16-2010, 04:19 PM
daveaite's Avatar
daveaite daveaite is offline
 
Join Date: Jul 2009
Location: Florida
Posts: 1,890
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply and effort. The mod works perfectly on forums.

CMS it works until theirs a post on a particular thread and that particular article sends out an error.
Reply With Quote
  #13  
Old 08-20-2010, 01:03 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

daveite:

Do you by any chance have this add-on installed: https://vborg.vbsupport.ru/showthread.php?t=150761

If so, disable it and see if you still get the error. That worked with me with the new updated code for the plug-ins now posted above.

If you don't have that specific add-on installed, please look for any other products or plugins that modify the postbit and report them here.
Reply With Quote
  #14  
Old 11-17-2010, 03:51 AM
BlueCheri's Avatar
BlueCheri BlueCheri is offline
 
Join Date: Jul 2009
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Can not see the link of Blog, please guide me.
Reply With Quote
  #15  
Old 11-17-2010, 04:04 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cannot see what link? The link in the postbit or postbit_legacy?
Reply With Quote
  #16  
Old 11-17-2010, 04:26 AM
BlueCheri's Avatar
BlueCheri BlueCheri is offline
 
Join Date: Jul 2009
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
Cannot see what link? The link in the postbit or postbit_legacy?
Its showing "recent blog" only...i cannot see the latest blog entry link..the field is empty.
Can you just tell me where might i be wrong?
Also the codes you have given above ..do we have to put it in postbit or posbit legacy or both?
please specify which code in which templates

Edit: Thanx it is done, Post Filed number not changed.
Reply With Quote
  #17  
Old 12-15-2010, 09:29 AM
Olgi Olgi is offline
 
Join Date: Jul 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
When using Legacy (Vertical) Postbit Template the blog feed will not show, any way around this?
Reply With Quote
  #18  
Old 12-19-2010, 02:18 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Olgi View Post
Hello,
When using Legacy (Vertical) Postbit Template the blog feed will not show, any way around this?
1. Check that you're trying to display an RSS feed and be aware that this mod does not typically work well with Blogger/Blogspot feeds, even with the RSS extensions.

2. Check that you have the right field# in the additional code.

That said, I'm not sure how well suited this is for postbit legacy forums... at best, the blog post title is going to have to wrap condierably. I've never really liked and never used the postbit legacy format so I can't tell you exactly how to modify the display. You may need to play with it a bit.

Can you post a screenshot of (1) what the legacy display looks like now and (2) the code in your legacy postbit?
Reply With Quote
  #19  
Old 12-20-2010, 05:34 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this possible to grab blogs made in the vb-blog stuff on the suite - I only want members most recent blogs from there to show in the postbit.
Reply With Quote
  #20  
Old 12-20-2010, 12:56 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk_aus View Post
Is this possible to grab blogs made in the vb-blog stuff on the suite - I only want members most recent blogs from there to show in the postbit.
I've never tried it but you should be able to use any valid RSS feed.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08633 seconds
  • Memory Usage 2,346KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete