Back to vBulletin 3.6 Template Modifications

Replacment of External.php with FeedBurner
Mod Version: 1.00, by mccollin

This modification is in the archives.
vB Version: 3.6.5 Rating: (3 votes - 5.00 average) Installs: 17
Released: 01 Nov 2007 Last Update: Never Downloads: 4
Not Supported Template Edits Re-usable Code  

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.

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024