The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
RSS feed displayed in forumdisplay
I'm not a coder but I managed, through trial and error, to get an external RSS feed to display within a scrollable table on forumdisplay. I have several different feeds displayed on separate forums.
Examples: http://www.world-a-team.com/forumdisplay.php?f=3 http://www.world-a-team.com/forumdisplay.php?f=4 http://www.world-a-team.com/forumdisplay.php?f=7 Each separate feed requires a pair of files uploaded to your server. A php and html file. The php file contains the feed URL. eg: $XMLfilename = "http://www.cricinfo.com/rss/wc_2007.rdf"; The HTML file contains variables that get replaced by different parts of the feed. The php file addresses the html file. eg: $TEMPLATEfilename = "rsswc.html"; In the phpinclude_start template I use ob_start(); require("rssaus.php"); $rssaus = ob_get_contents(); ob_end_clean(); to create a variable - eg: $rssaus which I place in a conditional in the forumdisplay template. eg: $header $navbar <if condition="$foruminfo['forumid'] == 3">$rsseng</if> <if condition="$foruminfo['forumid'] == 4">$rssaus</if> <if condition="$foruminfo['forumid'] == 5">$rsssaf</if> <if condition="$foruminfo['forumid'] == 6">$rsspak</if> <if condition="$foruminfo['forumid'] == 7">$rssind</if> So I can display a different feed on different forums. |
#2
|
|||
|
|||
The system I used in the previous post was for my 3.0.3 version forum. I've since upgraded my forum to 3.6.7 and I no longer use the phpinclude_start template.
Instead, I create a plugin that references the PHP files. I create a Plug-in for global_start with these contents: ob_start(); require("rssaus.php"); $rssaus = ob_get_contents(); ob_end_clean(); The plugin also contains the above code repeated for each different feed I fetch via a different PHP file, eg rsseng.php, rsspak.php etc. The code in rssaus.php will execute and any output generated by this script will be stored in $rssaus. Then I place $rssaus in the FORUMDISPLAY template where I want the contents of the PHP file (RSS feed) to appear. For multiple feeds on different forums I use something like: eg: $header $navbar <if condition="$foruminfo['forumid'] == 3">$rsseng</if> <if condition="$foruminfo['forumid'] == 4">$rssaus</if> <if condition="$foruminfo['forumid'] == 5">$rsssaf</if> <if condition="$foruminfo['forumid'] == 6">$rsspak</if> <if condition="$foruminfo['forumid'] == 7">$rssind</if> |
#3
|
|||
|
|||
Can you post the plugin?
Do you think you will upgrade to 3.6.8? |
#4
|
|||
|
|||
I have posted the plugin in the previous post.
Quote:
Quote:
http://www.feedforall.com/download.htm Script 1: RSS2HTML - free PHP script for dipslaying RSS feeds using html (You don't have to register at feedforall.com to download this free file.) Description: http://www.feedforall.com/free-php-script.htm Documentation: http://www.feedforall.com/php-documentation.htm Script 2: rss2html Cache - PHP script for displaying only current items in an RSS feed. (You are required to register at feedforall.com to download this free file) Description: http://www.feedforall.com/rss-cache.htm This should work for 3.6.8. |
#5
|
||||
|
||||
This is a fab idea. The only issue is for a few of us that aren't so techie this abvove description is still a bit difficult to follow. Perhaps you could post a link to a step by step html page?
Many thanks if this is posibble for your time |
#6
|
|||
|
|||
In my first post I gave you an example of code to place in your forum display template:
Quote:
On my server is a folder called FeedForAllCacheFiles which is CHMODed to 777 to store the cached RSS feed files. The documentation should explain this. If it doesn't let me know. I also have a PHP and HTML file corresponding to each feed. For example: rssaus.php and rssaus.html to display the feed on the Australia forum. rsseng.php and rsseng.html to display the feed on the England forum. rssind.php and rssind.html to display the feed on the India forum. Etc. To view the code of rssaus.php open the attached file. To view the html code of rssaus.html open the attached text file: rssaus.txt. I hope this helps. |
#7
|
|||
|
|||
Sounds cool but or us newbies it it as rewritten into a Product and had an ACP entry to configure it I'd be using it.
|
#8
|
|||
|
|||
Does anyone know if it is even possible for it to be written into a product with admincp controls?
|
#9
|
|||
|
|||
I would have thought it would be possible and get rid of the need to edit the tamplates?
|
#10
|
|||
|
|||
If it is possible to turn this into a product/plugin I will pay to have it coded.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|