SimplePortal
Support => English Support => Topic started by: ronnie42 on November 03, 2009, 06:13:10 PM
-
Hello Nathaniel,
Here's another little prob where i run in to.
I trie to set up a block on the left site of the index page an RSS block,
i copy the specific RSS link in the field and it says "invalid feed" do you know at could be wrong here?
It seems that the block does it with other feeds to i have tried others and still it tells me "invalid feed"
thanks m8
-
Can you post the feed urls that you are trying to use?
The RSS feed block uses the inbuilt SMF rss functions, which aren't very tolerant. Hence some feeds may actually be invalid, but they will still be shown okay by more tolerant RSS viewers (firefox seems to display RSS feeds even if they are quite broken).
-
This is the link:
http://www.ttm.nl/nieuws/rss.php
and i tried this one to:
http://www.ttm.nl/nieuws/rss
but they do not work
-
The first RSS feed is appears to have an incorrect encoding (validator link (http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.ttm.nl%2Fnieuws%2Frss.php)), while it is a valid feed, encoding issues could be causing the PHP rss functions to fail.
The second link is a webpage, not an RSS feed.
-
Hmm :'(
It seems that all the feeds to be found no matter wich gives the message "invalid feed"
I have tried more then 25 different feeds and they all come up with the same message.
:'(
-
Hi
I'm having the same problem with every feed I try e..g http://www.windows7news.com/feed and http://www.windows8news.com/feed to name a few. Any ideas how to fix please?
Thanks
EB
-
Bump! :)
Please, i would like to kindly request the Developers Team to fix this little incompatibility issue, so we can use those rss feeds. We already know this is NOT sm portal's fault...
-
I too am having a similar problem but mine is strange in that the feed WORKS when previewed but gives invalid feed when the block is placed anywhere on the site.
Here is the feed.
http://www.calendarofupdates.com/updates/index.php?act=rssout&type=calendar&id=1
-
I too am having trouble with the RSS feed :( This would be so great if it actually worked :'(
-
you can create an custom php block and insert any php rss reader free on the net.
Example: use http://www.scriptol.com/rss/rss-reader.php and put content of rsslib.php in block content and call the function to view rss from the example.
-
you can create an custom php block and insert any php rss reader free on the net.
Example: use http://www.scriptol.com/rss/rss-reader.php and put content of rsslib.php in block content and call the function to view rss from the example.
Thanks DonMucios, I will look into this. I appreciate the response.
8)
-
ronnie42, try this:
./Sources/PortalBlocks.php
$xml_parser = xml_parser_create();
$xml_array = new xmlArray($xml_data);
if (!$xml_array->exists('rss[0]'))
echo 'error';
$xml_array = $xml_array->path('rss[0]');
$xml_array = $xml_array->path('channel[0]');
$items = array();
$counter = 0;
foreach ($xml_array->set('item') as $item)
{
$items[$counter] = array(
'title' => strip_tags($item->fetch('title')),
'content' => strip_tags($item->fetch('description')),
'href' => strip_tags($item->fetch('link')),
);
$items[$counter]['link'] = '<a href="' . $items[$counter]['href'] . '" target="_blank" class="new_win">' . $items[$counter]['title'] . '</a>';
$counter++;
}
/*
$xml_parser = xml_parser_create();
if (empty($items))
{
echo '
', $txt['error_sp_invalid_feed'];
*/
if (empty($items))
{
echo '
', $txt['error_sp_invalid_feed'];
This may not work for everyone. If you want a fix too, please ask.
Bump! :)
Please, i would like to kindly request the Developers Team to fix this little incompatibility issue, so we can use those rss feeds. We already know this is NOT sm portal's fault...
Yeah, it isn't very easy since people like ignoring standards and creating their own.
-
I know what you mean dear Sinan, at least we could try ... :)
-
So do you want to link me to your feed to check it out?
-
Sadly, i don't have online (at least not yet) my smf forum, all the tests i made, were locally. But i suppose i could share with you a couple of interesting greek rss feeds just to check it out with your time...
http://www.naftemporiki.gr/news/static/rss/news.xml
http://www.in.gr/RSS/feed.asp?FeedSelect=FirstPage
The above feeds i tried to use with the smf's rss reader (locally) with no success :(
According to online rss validators the 1st link complies with most of the rss rules, the second does not, but still remains a good rss source.
I must inform you that i tested valid rss links too, but no luck :(
-
For the first one, the code I suggested for ronnie42 above should work.
For the second one, I'm not sure but again the same code with this minor change should work:
if (!$xml_array->exists('rss[0]'))
echo 'error';
$xml_array = $xml_array->path('rss[0]');
if (!$xml_array->exists('rdf:RDF[0]'))
echo 'error';
$xml_array = $xml_array->path('rdf:RDF[0]');
-
I will check it out and reply about dear Sinan, thanks for your time helping us :)
-
Okay, let us know how it goes.
-
I have read your post [SINaN]
Iwill try this options later on this week and tell you wat i have find out.
Comming weekend i have some spare time left for this. ;)
Greetz.
-
hi everyone,
I want to display RSS from my blog on the blogger.com
http://graphix.huongtinhyeu.net/feeds/posts/default
what I can do?
I configured the above URL, I get this message: "Invalid feed."
thanks
-
Members in this topic, except ronnie42, please create a new topic for your issues. We can't deal with all RSS issues in a single topic.
-
ronnie42, try this:
./Sources/PortalBlocks.php
$xml_parser = xml_parser_create();
$xml_array = new xmlArray($xml_data);
if (!$xml_array->exists('rss[0]'))
echo 'error';
$xml_array = $xml_array->path('rss[0]');
$xml_array = $xml_array->path('channel[0]');
$items = array();
$counter = 0;
foreach ($xml_array->set('item') as $item)
{
$items[$counter] = array(
'title' => strip_tags($item->fetch('title')),
'content' => strip_tags($item->fetch('description')),
'href' => strip_tags($item->fetch('link')),
);
$items[$counter]['link'] = '<a href="' . $items[$counter]['href'] . '" target="_blank" class="new_win">' . $items[$counter]['title'] . '</a>';
$counter++;
}
/*
$xml_parser = xml_parser_create();
if (empty($items))
{
echo '
', $txt['error_sp_invalid_feed'];
*/
if (empty($items))
{
echo '
', $txt['error_sp_invalid_feed'];
This may not work for everyone. If you want a fix too, please ask.
Bump! :)
Please, i would like to kindly request the Developers Team to fix this little incompatibility issue, so we can use those rss feeds. We already know this is NOT sm portal's fault...
Yeah, it isn't very easy since people like ignoring standards and creating their own.
It's not working yet :|
But it does say anymore: Invalid Feed so thats a bit of progress.
It does not give an error anymore but it leaves the field blank so there is no sign of an working block.
Any ideas?
-
Can you link me to the feed your are trying it with?
-
This is the feed i wanna use.
http://www.ttm.nl/nieuws/rss.php
It seems to be a valid one altough there are some errors on THIS (http://validator.w3.org/feed/check.cgi?url=http://www.ttm.nl/nieuws/rss.php) check
-
I have tried feed with RSS Feed block on SP 2.3.1 and SMF 2.0 RC3; it works fine for me without any modifications.
-
Hmmm that is weird because i have un-installed all my mods and put the forum in the curve theme and did the same with the portal front page.
So i went back to basic and did an other shot and guess wat, no function of the RSS feed.
It drives me mad :angry-yell:
-
By "without modifications" I meant; without making any edits to RSS Feed block code. What do you mean by "no function of the RSS feed"?
-
Sorry for that: I mean it did not shows the feed in the block, and when i un-instaled all the mods i had indeed the portalblocks.php wich you presented me earlyer in this topic.
could it realy be 1 of the mods?
i use the avea mod and the contact form mod
no more.
-
I didn't say it could be related to another mod. I just said the feed you posted (http://www.ttm.nl/nieuws/rss.php) works perfect for me without changing anything in the SimplePortal files. What error do you get when you add that feed (without the edit I provided before)?
-
What error do you get when you add that feed (without the edit I provided before)?
when i use your replaced code:
I do net get no error when i place the feed but it just shows an empty block with no feed in it, just a blanco field completley empty.
When i use the original php file as you download SP it says: error invalid feed
-
Did you update your portal to 2.3.2? If you haven't yet, please do and try again. I have just tested the feed again and it works with the default RSS Feed block.