Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest blog in postbit - magpierss Details »»
Latest blog in postbit - magpierss
Version: 1.00, by vauge vauge is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 08-01-2005 Last Update: Never Installs: 9
Uses Plugins Template Edits
 
No support by the author.

For this hack, we are using magpierss - simple and GPL.
================================================== =========
MagpieRSS provides an XML-based (expat) RSS parser in PHP.

MagpieRSS is compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom. (with a few exceptions)

http://magpierss.sourceforge.net/
================================================== =========
Idea came from DigitalPoint. I have actually been using this for several months on my forum.
But with the new plugin system, it's even easier to share.

Install instructions:

Step 1)
Magpierss

Download & Install: http://magpierss.sourceforge.net/

Create a "cache" directory or make sure path is ok in: MAGPIEDIR/rss_cache.inc


Step 2)
Create a new profile field for the Blog - Note the field#
The example below is field 7.


Step 3)
Edit magpierss.xml
1. include your full path to magpierss/rss_fetch.inc
2. Change field 7 to applicable field.

PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>



<plugins>
    <plugin active="1" product="vbulletin">
        <title>Magpierss_include</title>
        <hookname>global_start</hookname>
        <phpcode><![CDATA[require_once '/Full Path to/magpierss/rss_fetch.inc';]]></phpcode>
    </plugin>
    <plugin active="1" product="vbulletin">
        <title>Magpierss_Get_Blog</title>
        <hookname>postbit_display_start</hookname>
        <phpcode><![CDATA[if ($post['field7']){
$rss = fetch_rss( $post['field7'] );
foreach ($rss->items as $item) {
        $blogLink = $item[0]['link'];
        $blogTitle = $item[0]['title'];
    }
}]]></phpcode>
    </plugin>
</plugins>
Step 4)
Import magpierss.xml


Step 5)
In your postbit template add the following (note field #!):

PHP Code:
            <if condition="$post['field7']">
            <
div class="smallfont">Recent Blog: <a href="$blogLinktarget="_blank">$blogTitle</a></div>
                        </if> 
===============================================
Attached files: 2
Template Edits: 1
Simplicity: Easy
Time: < 30 mins, 5 mins for advanced users

Attached is a screen from another nevetS's Blog Feed parser using Carp - it is just as relivant.
https://vborg.vbsupport.ru/showthread.php?t=91781

Show Your Support

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

Comments
  #12  
Old 08-21-2005, 06:09 PM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean "pulling the whole thing"?
Reply With Quote
  #13  
Old 08-21-2005, 09:46 PM
vauge vauge is offline
 
Join Date: Oct 2004
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My code is pulling all the items into an array, then doing an array_slice.
(in case I ever want to display more than one)

Your code is only pulling & cacheing 1 item.
Reply With Quote
  #14  
Old 08-22-2005, 10:10 AM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, that's what I thought but I wanted to double check.

My code wasn't really related to that. It's just to do some error checking. For example let's say a user puts this in their blog field:

"htpt:\\theirdomain.com/ url.html"

you will have a bad error. The error checking should save some nasty errors on top of the page of any thread that user posts in.
Reply With Quote
  #15  
Old 08-22-2005, 10:37 AM
vauge vauge is offline
 
Join Date: Oct 2004
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wonder if error checking would be better in the CP instead of runtime?
Reply With Quote
  #16  
Old 08-22-2005, 03:11 PM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You definitely want to error check at runtime (as well as CP) because a url that's good today can be bad tomorrow.
Reply With Quote
  #17  
Old 12-08-2005, 11:20 AM
WhatChaMissin WhatChaMissin is offline
 
Join Date: Apr 2005
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its there anyway to combine this hack with vBJournal?
Reply With Quote
  #18  
Old 12-08-2005, 12:15 PM
lanc3lot's Avatar
lanc3lot lanc3lot is offline
 
Join Date: Sep 2004
Location: Athens, Greece
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, me to have the same question as the above
Reply With Quote
  #19  
Old 12-15-2005, 12:09 AM
Qwest Qwest is offline
 
Join Date: Jun 2004
Location: United States
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack itself doesn't even work without hacking it yourself.

The author hasn't posted or updated since August.

Suggest someone create a better one.
Reply With Quote
  #20  
Old 01-15-2006, 04:04 AM
Shoemoney's Avatar
Shoemoney Shoemoney is offline
 
Join Date: Jan 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Before I found this thread I have already done my new board with up to 3 blogs in the postbit. I will post the code if enough people would like to have it

demo - http://www.pimpmyblog.com/forum/showthread.php?t=43
Reply With Quote
  #21  
Old 01-15-2006, 02:44 PM
WhatChaMissin WhatChaMissin is offline
 
Join Date: Apr 2005
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Shoemoney
Before I found this thread I have already done my new board with up to 3 blogs in the postbit. I will post the code if enough people would like to have it

demo - http://www.pimpmyblog.com/forum/showthread.php?t=43
I would be interested but really only need the latest blog to show up for vBJournal.

Thanks
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 10:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05776 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete