News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

RSS Feeder

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

Previous topic - Next topic

Garou

Wow thanks that is exactly what I was looking for and I think it will help a lot of people.

SlammedDime

Nao:
If I didn't escape it, it didn't work right for me... I didn't think it did matter, but better safe than sorry.

As for using? to go ungreedy, because of the typical simplicity needed for this type of application, using U should work okay.  I can see cases when it wouldn't be desired, but I don't think this is one of them.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

dWhite

Quote from: SlammedDime on January 11, 2009, 07:47:57 AM
Sorry, I won't be making a version of this for 1.1.x.  vbgamer has an archived version that still works with 1.1.7 as far as I know, you may want to give that one a shot.

The one by vbgamer doesn't exactly work like it should, as I've been having extremely hard time getting his mod to pull feeds even from my own blog.

Nao 尚

Quote from: SlammedDime on January 12, 2009, 12:35:41 PM
Nao:
If I didn't escape it, it didn't work right for me... I didn't think it did matter, but better safe than sorry.
Just so you know -- / isn't part of the preg_quote list either.

QuoteAs for using? to go ungreedy, because of the typical simplicity needed for this type of application, using U should work okay.  I can see cases when it wouldn't be desired, but I don't think this is one of them.
I just think it's good practice to learn what the extra "?" is all about, asap.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

shanksta13

I'm having trouble.  Great mod by the way, can't wait to get it working.  I've installed successfully but get this error when taken to the settings page under "Modifications - RSS Feeder"

Unknown column 'f.id_feed' in 'field list'
File: /home/secsport/public_html/forum/Sources/ManageSettings.php
Line: 2577

SlammedDime

If I had to guess, it'd be because the table in the database wasn't created properly.  You can try rerunning add_settings.php from the mod package by putting it into your main forum directory and navigating to it.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

shanksta13

Quote from: SlammedDime on January 12, 2009, 04:29:22 PM
If I had to guess, it'd be because the table in the database wasn't created properly.  You can try rerunning add_settings.php from the mod package by putting it into your main forum directory and navigating to it.

That didn't work.  Anyway I can manually create the table?  If so, how?

shanksta13

Nevermind, I've got it fixed.  For whatever reason I already had an smf_rssfeed table.  ;)

SlammedDime

yea, I made the add_settings so that if the table already existed, it was ignored on creation... :) Glad you got it sorted.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

shanksta13

Another quick question. On my test site, the feed poster won't duplicate posts, but on my live site it seems to be duplicating them.

The only difference in settings is that I have my live site option to "Mark as Read" for the RSS posts.  Any solution, or is this an unintended bug?

SlammedDime

Any errors in the error log?  Make sure you have the log_rssfeeds table in your database.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

shanksta13

Quote from: SlammedDime on January 12, 2009, 07:30:48 PM
Any errors in the error log?  Make sure you have the log_rssfeeds table in your database.

Nevermind, I just realized that I was on my boardtester account, which is using a different theme than my admin account used to install the modification. 

Is there any way to install the mod to multiple themes without having to manually go through all of the edits?  My site runs team themes (12 different ones) and I'd like this feed to work on all of them.  If there is no automatic way to do it, where can I find a list of the manual edits I'd need to make?

SlammedDime

This makes no theme edits, it is theme independent, works across any and all.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

bloodfire

great tutorial on the full article retrieval, SlammedDime.

Few questions

RSS from moreover.com [nofollow] retrieves news from different news resources. Let say i set the expression to retrieve full article based on one of the resources, does the mod still retrieves other information from other resources + the full article based on the expression resource?

Second:
If i create more entries to retrieve from a same rss feed url (like moreover.com [nofollow]) but each entry with different expressions... will it work?

Trying to test them but I have to wait tomorrow to see the result as the sites i want to get already retrieved...

Regards

SlammedDime

#54
In the case of moreover.com, I would not use the retrieve full article option.  It will end up posting just the description of the item if the regex isn't matched.  It could possibly be changed to not post anything if the regex isn't matched.

If I were to implement something like that, then your idea of multiple feeds with the same url would probably work okay.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Sudhakar Arjunan

Quote from: SlammedDime on January 12, 2009, 07:53:12 AM
A.SK - Swell idea... although it would be much better (IMO) to utilize the existing information from the feed, and throw the source in as the Feed's title that is sent via RSS, rather than allow an admin to set the source... this way I can also hyperlink it automatically.


I was used to it, that's a rule on my board to enter source on every page.
That's why i have requested it.

But what you have did is also meaningful.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

shanksta13

Quote from: SlammedDime on January 12, 2009, 08:58:40 PM
This makes no theme edits, it is theme independent, works across any and all.

Yeah, I just noticed that.  In that case, I'm not really sure why it's not working.  I have the Mark Topic as Read button checked, but the new articles are still showing up as unread in the "Read unread posts since your last visit" link.

The only thing that I notice the Mark Topic as Read button doing is making it so that the on.gif image doesn't come on, as in the board appears that there are no new posts.

However, I really would like the articles from the RSS feeds to stay off of the unread posts link.  Is that possible?

Sudhakar Arjunan

Quote from: SlammedDime on January 12, 2009, 10:33:53 AM


Here is the feed: http://www.azcentral.com/rss/feeds/northphoenix.xml

Here is one of the items from that feed: http://www.azcentral.com/community/phoenix/articles/2009/01/12/20090112phxpopulation0107.html


~<div id="articlestory">(.*)<\/div>~siU




I have tried to use the full article method,

But it resulted me in one single line and it does not print after enter symbol.

Referred PCRE format also,

http://feeds.reuters.com/reuters/INVideoTechnology?format=xml

Full Article format : ~<div id="article primaryContent">(.*)<\/div>~siU

http://www.rediff.com/rss/bporss.xml

Full Article format : ~<div id="business_storyMiddle">(.*)<\/div>~siU

Do correct me if possible, thank you .
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

SlammedDime

I'm not sure where you came up with those regex's.... For your first one... that has a lot of video feeds... so to extract the text from the video feeds, you'd want to use

~<div id="videoText">.*<\/div>(.*)<\/div>~siU (untested, but should work)

And for the second one

~<p><font class="sb13">(.*)<\/font><\/p>~siU (again, untested, but should work)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

shanksta13

I'm still having a few different problems with this RSS Feeder.  First off, I've tried completely uninstalling and removing all the tables and then reinstalling, but  that hasn't worked.

On my test site, I have the problem that despite the feed using the "Mark as Read" option, these articles are still showing up as unread, and they won't even turn "read" after I've read them.  So they stay in my list of unread posts.

On my live site, my feeds are enabled, but then seem to automatically become disabled as soon as the RSS Feeder scheduled task runs.  Anyone that can help me would be greatly appreciated.

I'd really love to get this mod working on my site.

Advertisement: