View Full Version : [Module] Customizable RSS feed module
Pages :
1
2
3
4
5
6
7
[
8]
9
10
11
12
13
transitbus
09-26-2006, 03:02 PM
That did it :) Thanks for the response
BTW this works great with 3.6.1
ZacUSNYR
09-27-2006, 01:18 PM
I want to have it pull out of Profile field26 a zip code so I can use this as a weather RSS feed
Yahoo has a feed and at the end is the zip code. How can you append the profile field to the URL?
Tom M
09-27-2006, 01:23 PM
I want to have it pull out of Profile field26 a zip code so I can use this as a weather RSS feed
Yahoo has a feed and at the end is the zip code. How can you append the profile field to the URL?
You would need to modify the php file to do this. The downside is that you will then have one cache file for each zip code that is used which may result in quite a few files depending on how large a geographical area your site covers.
ZacUSNYR
09-27-2006, 09:26 PM
Ahhhh - yes I see this. I modified the php file to append the userfield to the url. I assume we're caching the file so we don't piss off the RSS feed with short refreshes? I'll run it and cron kill the cache directory every night and see how it works.
Anyways - great hack - working great :)
Many of the News feeds do not have the full path to image source and will not be displayed...
eg:<Img src="/xxxx/in_depth/2006/10/13/PixName.jpg"
If they contain <Img src="http://www.domain.com/xxxx/in_depth/2006/10/13/PixName.jpg"
then it will work fine. Could the php file be changed to do this?
TIA
Tom M
10-13-2006, 11:22 PM
Many of the News feeds do not have the full path to image source and will not be displayed...
eg:<Img src="/xxxx/in_depth/2006/10/13/PixName.jpg"
If they contain <Img src="http://www.domain.com/xxxx/in_depth/2006/10/13/PixName.jpg"
then it will work fine. Could the php file be changed to do this?
TIAI guess that it could. However I would be more inclined to view this as an error in the feed as they (the feed owner) certainly can't assume that the feed will only be viewed from their own site!
Do you have a specific feed link so that I may look at it?
Do you have a specific feed link so that I may look at it?
This Radio site http://www.rfa.org/english/rss/ supports many different languages and they were all generated with the same problem ..
and the one I am interested in is: http://www.rfa.org/vietnamese/rss.xml
Thanks so much Tom
Tom M
10-14-2006, 02:13 AM
This Radio site http://www.rfa.org/english/rss/ supports many different languages and they were all generated with the same problem ..
and the one I am interested in is: http://www.rfa.org/vietnamese/rss.xml
Thanks so much TomSome of them I looked at had the full url (english, korean) while others only had the relative url. I would suggest that you contact them via the technical support link they provide on the RSS feed page.
Exernon
10-17-2006, 07:33 PM
Does this work on 3.6.2?
Tom M
10-17-2006, 07:38 PM
Does this work on 3.6.2?It works on 3.6.1 so it should be OK on 3.6.2 as well.
Exernon
10-17-2006, 07:59 PM
Installed it but can't seem to make it work. I entered:
http://rss.news.yahoo.com/rss/topstories
.. as the RSS Feed URL and also filled the RSS Cache Directory but nothing is showing up.
Tom M
10-17-2006, 08:20 PM
Installed it but can't seem to make it work. I entered:
http://rss.news.yahoo.com/rss/topstories
.. as the RSS Feed URL and also filled the RSS Cache Directory but nothing is showing up.Link?
Are you using a custom style? If so then you'll need to copy the templates there as well.
Exernon
10-17-2006, 08:38 PM
For some reason, I reinstalled it, and it works now. Faulty installation perhaps.
But then here's a bug, everything works fine but then when I click Quick Links and Search in the navbar, the RSS Feeds get's messed up..
Tom M
10-17-2006, 10:40 PM
It's a quirk with IE as it works fine in FF. You might try it w/o the scrolling capability to see how it goes. If it makes the box too long just limit the number of entries.
redlabour
10-24-2006, 04:35 AM
As you can see here : http://www.kath.net/2005/xml/index.xml this Feed is displayed as ISO-8859-1 !
My Forum uses ISO-8859-1 as Standardformat.
But at vBAdvanced Portal the Fedd is only display correct if i turn my Browser to using UTF-8.
??? Who can i fix this ???
And how can i display a UTF-8 Feed to ISO-8859-1 then ?
Tom M
10-24-2006, 11:51 AM
As you can see here : http://www.kath.net/2005/xml/index.xml this Feed is displayed as ISO-8859-1 !
My Forum uses ISO-8859-1 as Standardformat.
But at vBAdvanced Portal the Fedd is only display correct if i turn my Browser to using UTF-8.
??? Who can i fix this ???
And how can i display a UTF-8 Feed to ISO-8859-1 then ?Depending on your host and what modules they support you might try something similar to this (http://www.vbadvanced.com/forum/showpost.php?p=78754&postcount=127).
redlabour
10-24-2006, 04:25 PM
@Tom_M - you misunderstand me. Customizable RSS feed module is using UTF-8 to show the Characters and ignoring the ISO-8859-1. How can this be fixed ?
Tom M
10-24-2006, 04:37 PM
The module doesn't use any specific encoding and it should, I believe, default to however Windows is set up. I'm far from an expert in this area so other than the iconv() stuff I probably won't be of too much assistance.
redlabour
10-24-2006, 04:40 PM
$rss_item['TITLE'] = iconv("UTF-8", "iso-8859-1", $rss_item['TITLE']);
$rss_item['CATEGORY'] = iconv("UTF-8", "iso-8859-1",$rss_item['CATEGORY']);
$rss_item['DESCRIPTION'] = iconv("UTF-8", "iso-8859-1",$rss_item['DESCRIPTION']);
$rss_channel['TITLE'] = iconv("UTF-8", "iso-8859-1",$rss_channel['TITLE']);
$rss_channel['LINK'] = iconv("UTF-8", "iso-8859-1",$rss_channel['LINK']);
Works now for every ISO-8859-1 coded Feed.
Last Problem :
I have still one original coded with UTF-8.
http://www.islaminstitut.de/32.100.html
This one is still displaying specific Charakters "ä,ö,ü etc.) wrong - example (fü if there should be a ü).
What can i do to fix this ? If i use the Code above it works (why ????) but it shortens the Description of the Feed.
Correct without above Code :
"Institut für Islamfragen: News und Fatawa" (but has still to be fixed to Institut für Islamfragen: News und Fatawa)
Wrong with the above Code :
"Institut f"
Im wondering why this UTF-8 Feed makes problem. I thought UTF-8 Feeds are working correct without any Modification.
sinisterpain
10-27-2006, 09:56 PM
Works great for me on vB 3.6.2 VBA 2.2.1 thanks Tom
angkor408
10-30-2006, 09:51 AM
Hi, I would like to know is there a way for the RSS feed to display the picture too not just the text?
Here my site:
www.khmerclub.com (you will see the news only in text)
Thank.
Angkor
Tom M
10-30-2006, 09:55 AM
Hi, I would like to know is there a way for the RSS feed to display the picture too not just the text?
Here my site:
www.khmerclub.com (you will see the news only in text)
Thank.
AngkorIf the news feed includes images as embedded html then they should be shown as nothing is done to remove them.
Do you have a link to the actual feed being used?
angkor408
10-30-2006, 10:54 AM
Hi tom, thanx for ur respond. Here the link to m rss feed:
http://rss.topix.net/rss/world/cambodia.xml
If the news feed includes images as embedded html then they should be shown as nothing is done to remove them.
Do you have a link to the actual feed being used?
Tom M
10-30-2006, 11:01 AM
Hi tom, thanx for ur respond. Here the link to m rss feed:
http://rss.topix.net/rss/world/cambodia.xmlIt appears that the images are being handled with an "enclosure" tag.<enclosure url="http://64.13.133.31/pics/9714bd41070c22a3bf8a571b40fb6f99-l" length="2821" type="image/jpg" />As such I'm not sure if you'd be able to add that w/o having to modify the rss parsing code in the php file. The way the parser works now is by capturing the information between the <tag></tag> pair and the <enclosure> tag is a single entity.
angkor408
10-30-2006, 03:30 PM
Hi Tom, so you assume to modify this file " rss_cmps2.php ? It would be nice if the RSS feed module allow an option to display image and text.
Angkor
It appears that the images are being handled with an "enclosure" tag.<enclosure url="http://64.13.133.31/pics/9714bd41070c22a3bf8a571b40fb6f99-l" length="2821" type="image/jpg" />As such I'm not sure if you'd be able to add that w/o having to modify the rss parsing code in the php file. The way the parser works now is by capturing the information between the <tag></tag> pair and the <enclosure> tag is a single entity.
Tom M
10-30-2006, 03:35 PM
Hi Tom, so you assume to modify this file " rss_cmps2.php ? It would be nice if the RSS feed module allow an option to display image and text.
AngkorYes, the file would need to be modified.
The problem with displaying images that aren't embedded within the rss html is that users would likely want them in a different place than where they'd be by default. The other problem is that it will take a bit of coding to get the <enclosure> tag to work properly and very few feeds actually seem to use that.
angkor408
10-30-2006, 03:58 PM
Tom, Thank for the info. I also notice when I try to add diff .XML news to my site it doesn't update. I had clear my cache file in RSS but still showing the same provider. The news is update fine but it doesn't take effect when I try add a new rss feed. I try turning active on/off but still same issue. Any reason why?
Thank!
Angkor
Yes, the file would need to be modified.
The problem with displaying images that aren't embedded within the rss html is that users would likely want them in a different place than where they'd be by default. The other problem is that it will take a bit of coding to get the <enclosure> tag to work properly and very few feeds actually seem to use that.
Tom M
10-30-2006, 04:39 PM
Tom, Thank for the info. I also notice when I try to add diff .XML news to my site it doesn't update. I had clear my cache file in RSS but still showing the same provider. The news is update fine but it doesn't take effect when I try add a new rss feed. I try turning active on/off but still same issue. Any reason why?
It may depend on the specifics of the feed. If you provide the url I can check to see if it works.
angkor408
10-30-2006, 05:33 PM
Tom, here the feed:
http://www.abc.net.au/ra/rss/ra_khmer_news.xml
Tom M
10-30-2006, 05:44 PM
Tom, here the feed:
http://www.abc.net.au/ra/rss/ra_khmer_news.xmlThat feed looks like it's got something wrong with it as here's a typical item entry...<item>
<title><![CDATA[ខ្យល់ព្យុះទីហ្វុងដ៏កំណាចបង្កឲ្យមានទឹកជំនន់នៅផ្នែកខាងជើងប្រទេសហ្វីលីពីន]]></title>
<description><![CDATA[នៅផ្នែកខាងជើងនៃប្រទេសហ្វីលីពីន មានខ្យល់ព្យុះទីហ្វុងដ៏កំណាចមួយដែលបាន <br>ធ្វើឲ្យមានទឹកជោរជន់ ដោយបាននាំមកជាមួយនូវភ្លៀងធំនិងខ្យល់បក់យ៉ាងខ្លាំងផង ។]]></description>
<link><![CDATA[http://www.radioaustralia.net.au/khmer/news/stories/s1776927.htm]]></link>
<pubDate>Monday, 30 October 2006 00:00 GMT</pubDate>
</item>
Based on what I'm seeing I don't think there's much that can be done on the module side. You might try contacting the web site.
GrrrlRomeo
10-31-2006, 02:12 AM
Unless I'm doing something wrong, it seems changing the Data modification code for different pages doesn't do anything, even though the option to do so is there.
Tom M
10-31-2006, 02:29 AM
Unless I'm doing something wrong, it seems changing the Data modification code for different pages doesn't do anything, even though the option to do so is there.Can you elaborate a bit on what it is you are trying to do?
I run different modification code on multiple copies of the module and each one runs fine. I haven't tried it by adding the modification code on separate pages though as I assumed it would work. However it really depends on how CMPS passes in the module information.
GrrrlRomeo
10-31-2006, 02:46 AM
I'm using Grouper to convert XML Music charts to RSS feeds. The problem is, the Grouper XML to RSS conversion names all the channel titles "XML conversion by Grouper" which I need to change on different pages to something more descriptive.
Like on my songs page the channel title would be "top 10 songs" and on the albums page it would be "top 10 albums"
I guess I could duplicate the module, but since I'm only using one module per page I thought it'd be easier to just change the data modification code for each page.
Tom M
10-31-2006, 10:53 AM
I guess I could duplicate the module, but since I'm only using one module per page I thought it'd be easier to just change the data modification code for each page.I would think that would work. Let me poke around a bit with it and see what's going on there.
UPDATE: It works fine on my system. Please make sure that if you are trying to modify the overall feed title that you use something like this in the Data modification code area for the specific page
$rss_channel['TITLE'] = "Special title for this page";
If you still have trouble let me know.
angkor408
10-31-2006, 12:28 PM
Tom, You know any site that have valid XML news for ASIA? I check this site at http://www.rssfeeds.com. When I tried run RSS validator it give an error.
Thank
Angkor
That feed looks like it's got something wrong with it as here's a typical item entry...<item>
<title><![CDATA[ខ្យល់ព្យុះទីហ្វុងដ៏កំណាចបង្កឲ្យមានទឹកជំនន់នៅផ្នែកខាងជើងប្រទេសហ្វីលីពីន]]></title>
<description><![CDATA[នៅផ្នែកខាងជើងនៃប្រទេសហ្វីលីពីន មានខ្យល់ព្យុះទីហ្វុងដ៏កំណាចមួយដែលបាន <br>ធ្វើឲ្យមានទឹកជោរជន់ ដោយបាននាំមកជាមួយនូវភ្លៀងធំនិងខ្យល់បក់យ៉ាងខ្លាំងផង ។]]></description>
<link><![CDATA[http://www.radioaustralia.net.au/khmer/news/stories/s1776927.htm]]></link>
<pubDate>Monday, 30 October 2006 00:00 GMT</pubDate>
</item>
Based on what I'm seeing I don't think there's much that can be done on the module side. You might try contacting the web site.
Tom M
10-31-2006, 01:01 PM
Tom, You know any site that have valid XML news for ASIA? I check this site at http://www.rssfeeds.com. When I tried run RSS validator it give an error.
Thank
AngkorYou can always try the VOA site (http://www.voanews.com/english/rss.cfm) to see if it has what you are interested in.
Failing that, you might do a google for "asia rss news feed" and see if that has anything you can use.
GrrrlRomeo
10-31-2006, 01:05 PM
I would think that would work. Let me poke around a bit with it and see what's going on there.
UPDATE: It works fine on my system. Please make sure that if you are trying to modify the overall feed title that you use something like this in the Data modification code area for the specific page
$rss_channel['TITLE'] = "Special title for this page";
If you still have trouble let me know.
Nope still not working. I tried adding the code to the data modification code at the module level and it works so I know the code works. It just doesn't work at the page level. I also tried changing the page type and that didn't seem to work no matter what kind of page I changed it to.
redlabour
11-01-2006, 03:26 PM
OMG - i can not remember how to add new Feeds.
This is what i have done.
Add new PHP Module included with rss_cmps2.php and filled in the Templates used. Saved. And now ???? There is no way to enter the RSS Feed.
I still have 8 other Feeds running well with the same Modul. But they are running over a year without changes.
Help !!! The Installationinstruction in the first Post :
To create additional RSS feeds simply copy the existing module, rename it to something relevant and fill in the information about that feed.
are more confusing then helpfully. I never did it like this and i do not understand what to edit in the Module. There are no lines to be edited. And i have still only of the Module File on my Server and it works.
Tom M
11-01-2006, 03:58 PM
OMG - i can not remember how to add new Feeds.To add a new feed just copy one of the existing modules. After that rename it to whatever you like and change the feed url.
redlabour
11-02-2006, 12:54 AM
To add a new feed just copy one of the existing modules. After that rename it to whatever you like and change the feed url.
I have only one Module at my FTP Server (and never had more) and that works with 8 Feeds. So i still do not know what you mean. :(
Change the Feed URL ?? This is something i allway do at the AdminCP at EditModules.
There is no Field to change the RSS Options at the new Module as you can see in the Screenshots - that is my Problem.
Tom M
11-02-2006, 04:02 AM
There's a difference between having a single php file (module) and having one or more CMPS modules. Clearly, by looking at your page you have more than one CMPS module displaying an RSS feed, correct? So all you need to do is copy one of the CMPS RSS feed modules and then modify it for the feed you want to add.
Make sense?
redlabour
11-02-2006, 06:02 AM
Make sense?
Works now ! Thx..... :)
sinaluna
11-08-2006, 05:54 PM
The module works great - thanks! :)
I was wondering if there was a way to add a conditional. For instance, the blog I am using has more than one author. I would like to put a picture next to each entry based on the author name.
In the adv_portal_rssbits I tried doing this:
<if condition="$rss_item[AUTHOR]==TOM">
<img of Tom here>
<else />
standard code....
</if>
But no joy. Is this doable? Thanks!
Tom M
11-08-2006, 06:09 PM
The module works great - thanks! :)
I was wondering if there was a way to add a conditional. For instance, the blog I am using has more than one author. I would like to put a picture next to each entry based on the author name.
In the adv_portal_rssbits I tried doing this:
<if condition="$rss_item[AUTHOR]==TOM">
<img of Tom here>
<else />
standard code....
</if>
But no joy. Is this doable? Thanks!It should be possible but it will be a bit more tricky that what you are doing. Checking the AUTHOR may still work but to add the image you would either need to insert it before the existing DESCRIPTION or simply add the conditionals to the template instead of doing it with the parsing code. I think I'd vote for modifying the template as that's much more straightforward, although it would impact all the feeds you use unless you make a custom template.
Scribbller
11-18-2006, 04:11 AM
Is there any way to just display the title of the feed as in do away with the description?
Tom M
11-18-2006, 10:12 AM
Is there any way to just display the title of the feed as in do away with the description?You can either edit the template for the exact display you are looking for or try adding this to the Data modification code area for the module$rss_item['DESCRIPTION'] = '';
Slave
11-20-2006, 03:45 AM
Hi Tom M ..
Any chance of making it error gracefully if the feed isn't available? At the moment if the feed goes down you get a lot of error messages at the very top of the page and the module disappears .. it would be much nicer if it just came back with a message like "Sorry, that feed isn't available at the moment" .. or words to that effect :)
Tom M
11-20-2006, 10:24 AM
Hi Tom M ..
Any chance of making it error gracefully if the feed isn't available? At the moment if the feed goes down you get a lot of error messages at the very top of the page and the module disappears .. it would be much nicer if it just came back with a message like "Sorry, that feed isn't available at the moment" .. or words to that effect :)Usually it's supposed to just not show the feed if it can't decipher the contents. Can you post a screen grab of what you are seeing?
You might get some error messages if the cache directory hasn't been set up properly but that should be a one time situation and be quickly resolved during testing.
Slave
11-21-2006, 03:43 AM
Thanks for the reply Tom :)
Difficult to do a screen shot as the feed is now working again ;) .. however I did try and replicate by putting in a incorrect feed, but it did as you described and just didn't show itself. Doh!
The feed was down because the server hosting it was down, perhaps when it hits that situation, instead of the feed being incorrect is when it gets a problem?
Tom M
11-21-2006, 09:50 AM
The feed was down because the server hosting it was down, perhaps when it hits that situation, instead of the feed being incorrect is when it gets a problem?I don't think that will do it either. You can replicate that bu putting in an invalid domain (as opposed to a valid domain with an invalid feed) and seeing what happens.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.