vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Integration with vBulletin - Replacment of External.php with FeedBurner (https://vborg.vbsupport.ru/showthread.php?t=161637)

mccollin 10-31-2007 10:00 PM

Replacment of External.php with FeedBurner
 
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.

Brandon Sheley 11-01-2007 02:09 AM

interesting idea :)

yoyoyoyo 11-01-2007 03:30 AM

nice one - I was also frustrated by the rss feeds in vb being too explicit and considered doing this myself, but you did all of the legwork for me - thanks :)

mccollin 11-01-2007 04:08 AM

Its not hard... just time consuming. I did about 1/4 of my forums so far... the ones I figured people would care about. I'll try to do the rest as time permits. Feedburner has a ton of tools to help exploit the RSS feeds that I hope to get into. The thing is though that I've not found a way to easily change all the feeds at the same time, which is a pain. They need a way to make a global change to add something to a feed.

yoyoyoyo 11-02-2007 02:53 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=125100" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=125100</a>

mccollin 11-02-2007 04:39 AM

Yes... I'm aware of that but it doesn't work with 3.6.5 or newer. That's why I went looking for something else. The thing is that Feedburner brings a lot more to the table. I also just found out that I can even have Feedburner use my url... like feeds.mysite.com... I just need to setup the zone file correctly.

FleaBag 11-06-2007 09:07 PM

This looks really cool. I'm planning to take a look. Thanks for sharing. :)

yoyoyoyo 11-08-2007 02:29 AM

Quote:

Originally Posted by mccollin (Post 1373999)
Yes... I'm aware of that but it doesn't work with 3.6.5 or newer. That's why I went looking for something else.

Yes it does, you have to enable it in the ACP, and select the number of characters to display, and it works just fine. I am using 3.6.8 PL2 and it works as advertised.

Milad 11-13-2007 06:27 PM

you may replace external.php with a file that send 301 redirecting http header. to redirect users who are already subscribed to your feeds.

cihangir 11-15-2007 12:05 PM

nice job, this is what i have been waiting for years :). thanks a lot.


All times are GMT. The time now is 03:16 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.01199 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete