Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Replacment of External.php with FeedBurner Details »»
Replacment of External.php with FeedBurner
Version: 1.00, by mccollin mccollin is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.5 Rating:
Released: 10-31-2007 Last Update: Never Installs: 17
Template Edits
Re-useable Code  
No support by the author.

I am frustrated with the fact that vBulletin 3.6.x does not limit the RSS feeds and so your entire posts are going out for someone to load into their site, thus eliminating the need for them to come to your site at all. Upon investigating this, I discovered FeedBurner's vast capabilities so I have tried to replace the built-in RSS capabilities of vBulletin's external.php with FeedBurner.

The modification is a simple template change, and renaming one file.

1. First you need to go to feedburner.com and get yourself an account setup.

2. Copy your /forums/external.php file to some other name such as /forums/feedburner.php. (you will eventually want to hide external.php, so this is a preliminary step)

3. Next go into AdminCP and print out a list of all your forums. Then, by using the "hover" over the names of the forums, record the forum IDs from the URL in the browser's status window on your list.

4. Create a new feed at feedburner.com using the url of
PHP Code:
http://yourforumurl.com/yourforumdirectory/fbget.php?type=RSS2 
(where /yourforumurl.com/yourforumdirectory/ is the path to your forum, and fbget.php is what you copied external.php to).

5. Using the tools at Feedburner.com to create links to your feed, determine the url to your Feedburner feed and make a note of it. It will most likely be something like this...
PHP Code:
http://feeds.feedburner.com/yourforumurlcom 
.

6. Test the feed to make sure it works.

7. Now you will need to manually create a new feed for any forum which you want to have a feed fore. Go into Feedburner.com and the new feed dialog. Re-enter the url used above to create another feed, and append to the end of it the code for forumid. Use the chart you created and start at the top. You will need to create a feed for each forum you wish to have a feed to. The url for forum ID 47 would be
PHP Code:
http://yourforumurl.com/yourforumdirectory/fbget.php?type=RSS2&forumid=47 
. Feedburner should create the title of the feed for you based on your forum title, and I recommend you don't change it here. The reason is that if you have a lot of forums, you will have a lot of feeds and your only easy way to identify them is by their names. You want them to match. Another tip is that for parent forums, I used the feature of external.php to aggregate forumids with commas. In these cases, I would list all the child forums into one feed.

8. Repeat this process for all forums you wish to have feeds for, making sure that the url used in each case is exactly the same except for the forumid. This is very important.

9. Now to integrate this into your forum, you need to make a change to the headinclude template. Find the following code:

PHP Code:
<if condition="$vboptions['externalrss']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] RSS Feed" href="external.php?type=RSS2" />
<if 
condition="$show['foruminfo'] OR $show['threadinfo']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] - $foruminfo[title_clean] - RSS Feed" 

href="external.php?type=RSS2&amp;forumids=$foruminfo[forumid]/>
</if> 
And replace it with the following code, replacing the urls with the ones that feedburner created for your feeds. Note that you replace the forumid part of the url with $foruminfo[forumid].

PHP Code:
<if condition="$vboptions['externalrss']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom" />
<if 
condition="$show['foruminfo'] OR $show['threadinfo']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] - $foruminfo[title_clean] - RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom-$foruminfo[forumid]/>
</if> 
10. Once you are sure that its working, you can rename external.php to something else. If you ever want to reverse this, you simply need to replace your old template, and rename external.php back.

Show Your Support

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

Comments
  #12  
Old 11-16-2007, 03:38 AM
mexicanpizza mexicanpizza is offline
 
Join Date: Oct 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the case of parent-subforums, where you've made a feedburner feed that aggregates all of a set of subforums (/external.php?type=RSS2&forumids=3,4,5,6)....I can't see how the above will work with your code modification to display one feedburner feed for all 4 of the forums. In your second to last line:

Code:
href="http://feeds.feedburner.com/yourforumurlcom-$foruminfo[forumid]" />
That won't work, right? If you've done what I described above (aggregating with forumids=3,4,5,6, and creating a feedburner feed of that)...your modification will break when it generates the link above....as the feedburner link will be http://feeds.feedburner.com/yourforumurlcom-3456 if you left the default.

For example, you're viewing forumid=5, your code above generates a link to http://feeds.feedburner.com/yourforumurlcom-5 for which there is no separate feedburner feed....

ack I'm so confused.
Reply With Quote
  #13  
Old 11-16-2007, 07:49 PM
coolgus coolgus is offline
 
Join Date: May 2004
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

exactly my question too. Every feed I create for seperate forums, has different feedburner url. I couldn't find a way to link the original feed with the other forums from feedburner.com tools.

And in the last step, do we have to enter only the original feed ? (http://feeds.feedburner.com/yourforumurlcom )
Reply With Quote
  #14  
Old 11-16-2007, 08:28 PM
mccollin mccollin is offline
 
Join Date: Jul 2003
Location: North Carolina, USA
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mexicanpizza View Post
In the case of parent-subforums, where you've made a feedburner feed that aggregates all of a set of subforums (/external.php?type=RSS2&forumids=3,4,5,6)....I can't see how the above will work with your code modification to display one feedburner feed for all 4 of the forums. In your second to last line:

Code:
href="http://feeds.feedburner.com/yourforumurlcom-$foruminfo[forumid]" />
That won't work, right? If you've done what I described above (aggregating with forumids=3,4,5,6, and creating a feedburner feed of that)...your modification will break when it generates the link above....as the feedburner link will be http://feeds.feedburner.com/yourforumurlcom-3456 if you left the default.

For example, you're viewing forumid=5, your code above generates a link to http://feeds.feedburner.com/yourforumurlcom-5 for which there is no separate feedburner feed....

ack I'm so confused.
Well you didn't do it exactly the way I did. I use the parent forum-id, which allows the header code to work, but when I create the feed in Feedburner, THERE I insert the list of feeds that I want to show for that parent forum-id. This doesn't actually work with the normal external.php approach, which is why I started looking for an alternative in the first place. For example, I have a News Archive parent forum, and within it there are five different category news forums. What I wanted, was that if someone subscribed to the News Archive, that they'd get all the news. With external.php, it doesn't work that way.... unless you create the forum as a category... which I don't do because of a little problem with formatting. In any event, this will work if you use the parent forum's forumID, and then make sure to associate it properly with the name of the feed in Feedburner.
Reply With Quote
  #15  
Old 12-11-2007, 10:08 PM
Coop1979 Coop1979 is offline
 
Join Date: Aug 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm somewhat dense and new to vbulletin, so could someone help me out? I'm looking to add about 30 feedburner links to take the place of my standard rss links. How do I adjust this code for the multiple feeds?

PHP Code:
<if condition="$vboptions['externalrss']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom" />
<if 
condition="$show['foruminfo'] OR $show['threadinfo']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] - $foruminfo[title_clean] - RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom-$foruminfo[forumid]/>
</if> 
Do I do this:
PHP Code:
<if condition="$vboptions['externalrss']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom" />
<if 
condition="$show['foruminfo'] OR $show['threadinfo']">
<
link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] - $foruminfo[title_clean] - RSS Feed" 

href="http://feeds.feedburner.com/yourforumurlcom-1" 
href="http://feeds.feedburner.com/yourforumurlcom-2"
href="http://feeds.feedburner.com/yourforumurlcom-3"/>
</if> 
I'm guessing not since it's not working for me
Reply With Quote
  #16  
Old 12-12-2007, 07:05 PM
Coop1979 Coop1979 is offline
 
Join Date: Aug 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm stupid, please ignore my post. I figured it out
Reply With Quote
  #17  
Old 08-09-2009, 05:02 AM
gbeebani gbeebani is offline
 
Join Date: Aug 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great! It did require me to change some things int he code and also in the Feedburner uri. But that was not very hard... I have NEVER done any coding and was able to figure things out on my own :-P
Reply With Quote
  #18  
Old 06-24-2013, 08:22 PM
Naijasite's Avatar
Naijasite Naijasite is offline
 
Join Date: Mar 2012
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please how do i get it to work for 4.2.1
Reply With Quote
  #19  
Old 06-24-2013, 08:38 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Naijafinder View Post
please how do i get it to work for 4.2.1
What steps have you tried yourself?
Reply With Quote
  #20  
Old 06-25-2013, 09:11 PM
Naijasite's Avatar
Naijasite Naijasite is offline
 
Join Date: Mar 2012
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have attempted it just wanted to be sure if it will work
Reply With Quote
Reply

Thread Tools

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 04:07 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.04387 seconds
  • Memory Usage 2,329KB
  • 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
  • (2)bbcode_code
  • (7)bbcode_php
  • (2)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
  • (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
  • (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_postinfo_query
  • fetch_postinfo
  • 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