• Welcome to Simple Machines Community Forum. Please login or sign up.
December 08, 2021, 10:28:35 PM

News:

Wondering if this will always be free?  See why free is better.


RSS Feeder

Started by SlammedDime, January 11, 2009, 06:06:42 AM

Previous topic - Next topic

rii

February 04, 2009, 01:12:11 PM #200 Last Edit: February 04, 2009, 07:24:42 PM by rii
Thank you for the correction. CDATA issue is fixed now.

I have just noticed old feeds issue. I know a few related posts are already in this forum topic. I am also having the similar issue. Where is the old feeds info stored? I am testing news articles to be posted using rss feeder. It worked great but I cannot make any correction to the existing xml file. It will not update and still post the same info. It is strange. I deleted xml file, removed feed from admin, and also double checked it in sql db (smf_rssfeeds). They'd be successfully removed but only the old deleted info are posted again as soon as I clicked on the Schedule Tasks link. Do I have to remove something else from the smf_log_rssfeeds table too? If so, how to find the right one from the log table? I don't know why I have to create totally a new xml file (with new name) each time to see the correction. Is there anywhere else like cache or something that I need to turn on/off?

Thank you again.

Quote from: SlammedDime on February 04, 2009, 04:55:08 AM
You didn't properly close your cdata section...

All you have is ]].  It needs to be ]]>

Smoky "Rider" Blue

Quote from: Rbbn39 on February 04, 2009, 08:18:46 AM
Quote from: SmokyBlue on February 03, 2009, 08:19:55 PM
might want to run that url, www.tcof.nl/rssn.php

thru http://www.feedburner.com  that will set up the rss thread correct for your site..  ;)
Does feedburner also update my feed automatic like my script does?

@SlammedDine: If I have to change my RSS feed is also ok for me, the RSS feed won't be used for something else than this.
Quote from: Rbbn39 on February 04, 2009, 08:18:46 AM
Quote from: SmokyBlue on February 03, 2009, 08:19:55 PM
might want to run that url, www.tcof.nl/rssn.php

thru http://www.feedburner.com  that will set up the rss thread correct for your site..  ;)
Does feedburner also update my feed automatic like my script does?

@SlammedDine: If I have to change my RSS feed is also ok for me, the RSS feed won't be used for something else than this.

feedburner is a "agrivator" meaning it translates the url into something the mod can use..

[offtopic]
im not sure if slammeddime's mod is like vbgamers, but on the old one, if you had a feed that was slow etc., it could and would hang the feeds up.. im presuming that since he is using snoopy and not magpie, the kinks are worked out..
[/offtopic]

you should not have to worry about yhour feeds, unless the site you are linking to has no new ones.. feedburner will send the info on to you..  ;)

Quote from: rii on February 04, 2009, 01:12:11 PM
Thank you for the correction. CDATA issue is fixed now.

I have just noticed old feeds issue. I know a few related posts are already in this forum topic. I am also having the similar issue. Where is the old feeds info stored? I am testing news articles to be posted using rss feeder. It worked great but I cannot make any correction to the existing xml file. It will not update and still post the same info. It is strange. I deleted xml file, removed feed from admin, and also double checked it in sql db (smf_rssfeeds). They'd be successfully removed but only the old deleted info are posted again as soon as I clicked on the Schedule Tasks link. Do I have to remove something else from the smf_log_rssfeeds table too? If so, how to find the right one from the log table? I don't know why I have to create totally a new xml file (with new name) each time to see the correction. Is there anywhere else like cache or something that I need to turn on/off?

Thank you again.

to clear your cache, if you are on the beta: admin>maintaincea>routine
**Take the time to remember friendships and family.. Sometimes it's all we have, and missed very much**

SlammedDime

The feed is in deed cached in your cache folder... this is done to prevent overloading of servers.  What are you testing that you need to keep trying to import the same feed over and over to test?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PJC2006

Hi, first of all i loved this mod when i had it working :S

Unfortunately i seem to have broken it and im unable to find a solution to fix it...

Quote from: KahneFan on January 20, 2009, 05:29:02 AM
"Topic #1104 is in board #9, which is missing."

And when I click "yes" to proceed, it dumps a feed article into a "salvaged board"

I don't have a board #9, and when I check the feed that is attached to the article that is being "salvaged", the feed is assigned to board #11, so I'm not sure why the feeder is trying to post to a board #9 that doesn't exist.

I too have this error except it is sending it to id_ board 3 ( which i no longer have) when i need it to go to id_board 4.

Quote from: KahneFan on January 20, 2009, 11:03:22 AM
Quote from: SlammedDime on January 20, 2009, 07:54:29 AM
In the database, is the feed's id_board set to 11?

About half of my boards had an ID of 9 for some reason. I've reset them. I'll just chalk it up to 'something happened in my upgrade process' and see what happens. If they reset to 9 for some reason, I'll let you know.

Quote from: SlammedDime on January 20, 2009, 07:54:29 AM
In the modify feed settings page, can you view the HTML source and verify that the board name you're selecting has an id of 11 for that option.


<option value="11" selected="selected">Poker Blogs</option>


UPDATE: After correcting the db "All selected tasks were completed "  :D

Please tell me in simple terms how you edited the id_board numbers?



SlammedDime

You'll have to go into the database and make the change manually for that feed in the rssfeeds table.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PJC2006

Thanks for the quick reply

This is all new to me but how do i do what you just said?

Where is the database, is it a file?

Thanks in advance

SlammedDime

If you can wait a couple of hours, I'll release a new version that will take care of this... :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PJC2006


SlammedDime

Just a glimpse of fixes...

! 'Source' used HTML instead of BBCode for URL... doesn't work right if poster is non-admin (ScheduledTasks.php)
! Charset wasn't read properly (ScheduledTasks.php)
! Show feed even if it's board doesn't exist (ManageSettings.php)
! Feeds were being returned newest to oldest, instead of oldest to newest (Subs-Rss.php)
! Took into account <br> as well as <br /> in feeds
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

Ok, I've updated it to 1.1.1... hopefully I've covered the bugs found.... and didn't make any more
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Teunel

Hi,

Would it be possible to change the topic subject to display the "guid" instead of the "title" of the feed? And how could I change this? Thanks!

rii

I had to change the file name while I was working on CDATA correction as the code correction was not reflected.

I also would like to know if is possible NOT to strip the html in RSS post. the admin will be the only user who will use it. At this moment I am having trouble with it like:

I am having the similar issue.

I design the html messages and importing them automatically to the forum as Posts using the this mod with my own xml file. 

I use CDATA and html tag like this in the description field of my xml file:

<![CDATA[ [ h t m l ] here is the <font color=#00FF00>regular</font> html <b>coded</b> message[ h t m l ]  ]]>

It only posted the message like just normal text in one paragraph. Html designs are gone.

If I manually post the same message using the same [ h t m l ] code above, it work just fine as I designed.

(I put extra space in html portion in order to show it to you here)

Please look into this and advise me.


Thank you.

Quote from: SlammedDime on February 05, 2009, 10:50:22 AM
The feed is in deed cached in your cache folder... this is done to prevent overloading of servers.  What are you testing that you need to keep trying to import the same feed over and over to test?

SlammedDime

teunel - It would be possible, you'll have to make the change in ScheduledTasks.php where the $subject variable is set near the bottom.  If there is no guid, it will return the item title instead.
$title = striphtml($item->get_title());

$title = $item->get_id();


rii - Because most people using this mod are retrieving their data from outside sources, I purposely strip all html tags from the contents of the feed... the last thing I want is to introduce a XSS vulnerability to anyone's board due to a feed they don't have control over.  I also will not introduce an option to turn this off.

If you wish to do this in the code manually, you can make the following change:
Code (find) Select
// We're all set to finally create the post
// Strip out all of the tags so it's just text with new lines and line breaks
$body = striphtml($body);
$title = striphtml($item->get_title());
$feed_title = $rss_data->get_title() !== null ? striphtml($rss_data->get_title()) : '';

Code (replace) Select

// We're all set to finally create the post
// Strip out all of the tags so it's just text with new lines and line breaks
$body = $body;
$title = $item->get_title();
$feed_title = $rss_data->get_title() !== null ? $rss_data->get_title() : '';
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

rii

February 06, 2009, 06:38:57 PM #213 Last Edit: February 06, 2009, 06:42:39 PM by rii
Thank you for your help. It now does as I wanted.

I have to import lots of messages from my old (very old) forum which use the different formatted database so I found yours as a better bridge so far. You are very supportive and your mod is flexibly useful. Response is the most important task to keep discussion alive, and you ruled it. You are getting the positive feedbacks from every user.

I have security concern with the html code now. I currently use rss feed only under Admin login. Do I need to worry about the security hacks because most of my imported posts have html codes (i.e.: <, >, /, &), but I actually have full control over the xml file?


Thank you.

SlammedDime

The feed does not clean anything fed into the database, so if the feeds are only posted as an admin using the  bbcode, I don't think you'll have any problems.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

Yea, sorry, I forgot the find and replace attributes on the code tags.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Teunel

Already found it, it works! Thanks! :D

Jimi1810

Sorry if this has been covered but I am able to import the full article without any problems, except one; when ever there is a "£" symbol the text stops.

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/gossip_and_transfers/rss.xml [nofollow]

thats the feed I'm using so if I take this post for example:

http://news.bbc.co.uk/sport1/hi/football/gossip_and_transfers/7878186.stm [nofollow]

where it says "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at £15m. (Daily Mirror)"

I don't get that in the thread, I get "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at"

It stops at the "£" and doesn't post anything else below it from the page, it does this for every story it imported which contains a "£" symbol, is there any way I can fix this? if it matters, the regular expression I am using is:

~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU

thanks, I love this mod, it's the main reason I am converting to SMF  :D

Dark-Master

I'm in love with smf 2.0 now, because of your GREAT addon ! But I cannot get it work. No post was made by RSS Feeder. I've set things up since 1 hour ago.

http://img.xgaming.in.th/pub/rss-feeder.png

Is there any solution or requirement to get RSS Feeder woking on? thanks.........

Jimi1810

Quote from: Dark-Master on February 09, 2009, 06:45:48 AM
I'm in love with smf 2.0 now, because of your GREAT addon ! But I cannot get it work. No post was made by RSS Feeder. I've set things up since 1 hour ago.

http://img.xgaming.in.th/pub/rss-feeder.png [nofollow]

Is there any solution or requirement to get RSS Feeder woking on? thanks.........

I'm not sure how these boards work, whether only the person who created the code is meant to offer support, but have you gone to maintenance >> scheduled tasks in the admin area? you have to setup the time and frequency RSS feeder runs, there is also a 'run now' option to test it.

Advertisement: