Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SlammedDime on January 11, 2009, 06:06:42 AM

Title: RSS Feeder
Post by: SlammedDime on January 11, 2009, 06:06:42 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1590)

RSS Feeder
This allows you to add RSS Feed 'Bots' to your forum to display information from RSS Feeds.

Features of this mod:

Change Log:
Version 1.1.0
-------------
* Added a 'Source' bit at the bottom of each post (ManageSettings.php, RSSFeeds.template.php, ScheduledTasks.php)
* Add a footer to the bottom of the post after the feed content (ManageSettings.php, RSSFeeds.template.php, ScheduledTasks.php)
* Selectable message icons for each feed (ManageSettings.php, RSSFeeds.template.php)
+ Allow images in the posts by converting <img> tags to bbcode [img] tags (Subs-Rss.php)
* Feeds keep track of items posted from them, viewable in the feed setup page (ManageSettings.php, ScheduledTasks.php)
? Mark as read option causing errors on scheduled task run, removed feature (ManageSettings.php, RSSFeeds.template.php, ScheduledTasks.php)
! Forgot to check if description was empty (ScheduledTasks.php)
* Option to post all feed items into a single topic, instead of seperate topics (ManageSettings.php, RSSFeeds.template.php)
! Error might be thrown if regular expression didn't find anything (ScheduledTasks.php)
+ Switched from MagPie to SimplePie for the RSS api (Subs-Rss.php)
+ Added logging for feeds that become disabled when the scheduled task runs (ScheduledTasks.php)

Version 1.0.0
-------------
* Release

Legend:
* = New feature
+ = Improved feature
! = Fixed bug
? = Other stuff


Regex Help
Attached to this post is a file named regex.php... you can upload this script to your web server to test out your regular expressions with a given input.  It's pretty self explanatory... the goal is end up with what you want in the [1] => part of the array returned.  For debugging purposes, the entire matches array is displayed.  See this post (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) of the topic as well.



*Known Issues*
This was meant to work with Auto Suggest for choosing who to post as, but I didn't realize that there was a change in the auto suggest script from Beta 4 to RC1, so auto suggest will only work on RC1+.  This does not hinder the mod in any way, except that you must properly enter the username / displayname otherwise you will get thrown back to an error.

Doesn't play nice with utf-8 characters, cuts off strings or converts to ?s in the Prefix or Footer fields, possible database collation issue.

Suggestions
Title: Re: RSS Feeder
Post by: qubbah on January 11, 2009, 06:56:30 AM
hope next time it can be used with 1.1.7

Title: Re: RSS Feeder
Post by: 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.
Title: Re: RSS Feeder
Post by: Nao 尚 on January 11, 2009, 08:05:10 AM
Oh... By any chance, is this mod related to the one Smoky Blue was looking into making at some point last week?

I'll have a look into it later if I don't forget. :)
Title: Re: RSS Feeder
Post by: Robi052 on January 11, 2009, 09:10:57 AM
my IPP disallow url_fopen. Working this mod with curl?
Title: Re: RSS Feeder
Post by: Nao 尚 on January 11, 2009, 09:25:02 AM
The mod seems to use fsockopen, just like SMF does for its fetch_web_data function (which retrieves external packages or SMF news etc). If your SMF works fine, then this should work fine too.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 10:07:12 AM
It uses Snoopy php Web browser to retrieve feeds... I really didn't look into it too much, but I do believe it supports curl as well.

Nao - I'm not sure... I didn't know SmokyBlue was working on something like this.  Looking at topics in mod requests, I see that KahneFan was wanting something similar to this and Smoky was working on it.
Title: Re: RSS Feeder
Post by: TheDisturbedOne on January 11, 2009, 01:50:04 PM
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.
It doesn't work well I'm afraid.  It posts once and then it dies :(
Title: Re: RSS Feeder
Post by: Yağız... on January 11, 2009, 01:58:58 PM
There is an error with Turkish characters. It shows '?' instead of 'ı', 'İ', 'ğ', 'ş', 'Ş'.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 02:54:10 PM
I wonder if it's because of the __striptext function of Snoopy... Can you provide a feed as an example.
Title: Re: RSS Feeder
Post by: Yağız... on January 11, 2009, 03:07:41 PM
Yes, http://www.sabah.com.tr/rss/sondakika.xml .
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 11, 2009, 03:11:11 PM
yes i had something in the works like this

i have a bunch of stuff for rss posters from vb, ipb, drupal, wp, ee, and more..

good to know you tried SlammedDime, and thank you..

on the issues of it only posting once, will check things out..

i did get vbgamers mod working perfect, so..  ;)
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 03:21:51 PM
Currently trying this on a test site.

1) Is there a cron page I need to have my server hit, or does it run a cron job automatically or....?

2) Will it import old articles from feeds or only new articles?
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 03:28:19 PM
It runs off of SMF's Scheduled tasks - Fake Cron if you will.

You *could* create your own cron if you wanted by writing a simple PHP script that included SSI.php, Sources/ScheduledTasks.php, then ran the scheduled_rss_feeds() function.

It will import anything in the feed based on what you specify in the settings for that feed.  Want to import the entire feed, set the number to import to 0.  Want to import only feeds with certain keywords, put in the keywords... or any combination of both.
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 03:34:08 PM
Do you know how often SMF's tasks run? I ask for 2 reasons. 1) 24 hours would be minimum (I would think). 2) On another site I had with feeds, I had so many that 15 minutes was actually too far apart.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 03:36:14 PM
You can go to the scheduled tasks part of SMF's admin panel and specify how often you want any of your scheduled tasks to run, including this one.  I set the default to every 6 hours.
Title: Re: RSS Feeder
Post by: Bigguy on January 11, 2009, 03:37:41 PM
I have it running here and it works great, thanks SlammedDime.

http://forum.pctweakr.com/index.php/board,3.0.html (http://forum.pctweakr.com/index.php/board,3.0.html)
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 03:39:31 PM
Thanks for posting that Bigguy.
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 03:41:13 PM
Quote from: SlammedDime on January 11, 2009, 03:36:14 PM
You can go to the scheduled tasks part of SMF's admin panel and specify how often you want any of your scheduled tasks to run, including this one.  I set the default to every 6 hours.

Learn something new every day. Thanks!
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 03:43:55 PM
"Ran Now" and works like a charm. This is great, thanks!
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 03:59:35 PM
np ;)
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 04:11:26 PM
If you're taking suggestions for a next version :)

It might be nice to see a column for "Feed Items" or even just "Total" in the admin area, so that you can see how many articles each feed has brought through. (hope that makes sense)

| Feed Enabled | Feed Title | Feed Total | ...

Also, when a feed is deleted, if possible, it would be nice to delete the articles of that feed. For example, you have a feed that you no longer want to associate with, for whatever reason, you delete the feed, but the articles are still there.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 04:16:39 PM
The first would be easy to implement because I already have a log table that keeps track of the feed items posted, or I could add a column to the rssfeeds table to keep a count and update it when I update the last updated time of the feed.

The second would be easy to implement, again, because I already have the log table, would just have to add a column for topic id.

The only issue I see overcoming is that is someone deletes feeds already posted, or if they have the posts set to require approval, and they delete instead of approve, the feed won't be removed in the feed table, so the 'Total' wouldn't be accurate to what is actually on the forum, but to what has actually been posted, regardless of whether or not it's still there.
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 11, 2009, 04:27:34 PM
also SlammedDime, Kahne wanted to be able to allow users to add feeds as well..

so if you can swing this, i know he would be very happy..  ;)
Title: Re: RSS Feeder
Post by: Bigguy on January 11, 2009, 04:30:57 PM
Might be nice to integrate this into the News Fader. :)
Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 04:34:56 PM
Quote from: SmokyBlue on January 11, 2009, 04:27:34 PM
also SlammedDime, Kahne wanted to be able to allow users to add feeds as well..

so if you can swing this, i know he would be very happy..  ;)

;)

It sounds as though this would be a tough one though. So, having members contact me is OK for now. But if it could happen... :P

Also, I just tried it HERE (http://www.texasfelt.com/index.php?board=9.0) and when I ran it from admin to pull the old articles (535 and ran smoooooth), it posted them by either 1) the order in which I input them (z-newest -> a-oldest) or 2) in alphabeticle (z-a), instead of by date (originally) posted. As long as it posts them in date order from here out will be OK with me. Do you know if future updates will be posted by date order?
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 11, 2009, 04:43:31 PM
i thought of that too BigGuy and i actually have one rss with its own db and page..

set up like the google home pages that you can move around.. happy thoughts tho, since i dont know what im doing with it, nor the time to play like i would like and actually learn, so..

but im more than willing to send my stuff to whoever that would be interested.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2009, 05:03:25 PM
It may be possible to allow this to extend to allow users to create feeds, actually might be quite easy to extend that functionality now that I think about it.  I already store the id_member of the poster in the feed table, so I would just have to create an additional profile page that allows a user to edit his/her feed and they could have the same options that an admin would have.

As for how they are imported... the script will run from the top of the feed down to the bottom of the feed, so however they are placed in the feed is how they will be imported, top being imported first, and bottom being imported last (most recent imported).  Now that I think about this, it should probably be reversed, but it's something to keep in mind for later versions

Kahne - it's nice to know it worked on that large of a feed. :)

Title: Re: RSS Feeder
Post by: KahneFan on January 11, 2009, 05:12:28 PM
Quote from: SlammedDime on January 11, 2009, 05:03:25 PM
It may be possible to allow this to extend to allow users to create feeds, actually might be quite easy to extend that functionality now that I think about it.  I already store the id_member of the poster in the feed table, so I would just have to create an additional profile page that allows a user to edit his/her feed and they could have the same options that an admin would have.

The only thing here would be making sure they know where to post them. If user feeds is a possibility, admin approval might be needed, which is still easier than entering them. OR, if admin could specify a single setting of: Post all user feeds in: {board}
Title: Re: RSS Feeder
Post by: Sabre™ on January 11, 2009, 08:58:48 PM
wOOt!!
Ive only just setup a test site with smf2(bout time to move on from 1.1.7), and whats the first mod I see!?? lol
Very nice mate, thanks :)
Title: Re: RSS Feeder
Post by: bloodfire on January 12, 2009, 12:17:57 AM
Hi, thanks for this mod.. love it.

Just wanna know any1 tried using the Retrieve Full article features? Any example of the expression or how to use it?

Regards
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on January 12, 2009, 05:28:25 AM
SlammedDime such a excellent mod.

I will install it and comment here.

Have some suggestions.

Need a Auto filler column under each feed settings.

Say if i add the feed from cnet & reuters.

On the settins page, under feeds i will enter " Source : Cnet " or " Source : Reuters " on the new column you create.

so every time a feed is added , it will enroll the Source text ever time feed is posted on our forum.

Ex Post :

Subject : - Subject already printed here

Body : - Feed information is printer here.

Footer :-  Source - CNET.
Title: Re: RSS Feeder
Post by: Lamarck on January 12, 2009, 07:20:49 AM
Hi,this mod is just awesome.

However,I have a problem with spanish characters: the mod "cuts" every word with a spanish character and all the text that goes behind.

Example: "tecnología" (technology in english)---> tecnolog 

The other words that go behind a spanish character are also deleted.
Exemple: "Penélope Cruz gana del Oscar" (Penelope Cruz wins the Oscar) ----> "Pen"

This problem makes that almost every topic tittle doesn't show full,and also links and the news itself are almost deleted.
Could you fix that,please?.It's very important for people using SMF in other languages than engliss/feeds in other language.

More feedback/suggestions:

-A feature that would be so useful is the option to insert a "footer" to the rss post.I mean,for example: If I set up a rss for "news",It would be nice to have the option that allows you to insert a footer such as "What do you think about this? We want your opinion!",that automatically is inserted on every topic created by the rss "bot".
That way,you can make posts more "human",and ask for participation.
Is that possible? just a suggestion  ;)

-Also: can you (or someone) make a mini "tutorial" to use the "Retrieve full article" feature?.

Thank you very much and good work.
Title: Re: RSS Feeder
Post by: 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.

Lamarck - This is probably related to the Snoopy PHP Web browser that the mod utilizes to retrieve feeds and might be an easy fix.  I asked another user on the previous page for a direct link to a feed that has such characters so I can further test this.  Can you provide me with a link as well?

As for the footer - that wouldn't be a bad idea either.

Once 2.0 goes RC and I'm sure this still works as is with it, I'll look into incorporating many peoples suggestions.

As for a tutorial on the regular expression and full article... I'll see if I can throw a mini article together later today after work.
Title: Re: RSS Feeder
Post by: Garou on January 12, 2009, 07:56:09 AM
SlammedDime You rock man, a lot of people have been wanting this for a while.  Ill be testing it out later today and cant wait. :)

Ok I tested and it works great. In fact it does a much better job of reading poorly written RSS Feeds then VB's version does.

Question though can we get an example of how the regular expression in PCRE is supposed to work. Ive never had to use that for anything and I'm sure others have not either.

Definitely and Awesome mod.  :)
Title: Re: RSS Feeder
Post by: Lamarck on January 12, 2009, 09:50:50 AM
Yes,of course...here is a link:

http://www.20minutos.es/rss (http://www.20minutos.es/rss)

Ah,the problem is not only with "´",the same thing happen with "ñ".

Thanks!.
Title: Re: RSS Feeder
Post by: Nao 尚 on January 12, 2009, 10:14:01 AM
I'm not sure, but... Shouldn't accented data and single quotes be enclosed in CDATA blocks?
Title: Re: RSS Feeder
Post by: SlammedDime on January 12, 2009, 10:33:53 AM
First off, to use the retreive full article feature, the news source must have a decent design on their website that will make it easy.  If not, it won't work.  Here's a quick example of using the Retrieve full article feature from AZCentral.com (Arizona's Newspaper and NBC affiliate site), as well as the regular expression syntax to retreive it for this particular feed.

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

If you look at the HTML source for the feed, you'll find the article in the following HTML code...
<span fd-type="start" fd-id="default"></span>

  <h1 class="topHeadline">For first time in modern history, Phoenix may be losing people</h1>

        <h2 class="subHeadline">Population dip would further strain budget</h2>                <p class="byline vcard clearfix">
          <a href="#comments"><span class="bylinecomments" id="commentcount"></span></a>
          by <strong>Michael Clancy  and Casey Newton</strong> - Jan. 12, 2009 12:00 AM<br />
         
          <span class="org">The Arizona Republic</span>
        </p>

          <div id="articlestory"><p>For the first time in modern history, Phoenix's population could be shrinking. </p>
<p>It's an idea that would have been unimaginable just a few years ago, when Phoenix was surging up the list of the nation's most populous cities. Now, a variety of indicators suggest that fewer people are living here than a year ago.</p>
<p>No one knows for sure exactly how many people have moved in or out. But with the 2010 census about to get under way, some indicators suggest Phoenix's population may be smaller than the projected 1,636,170 people.
<span id="articleFlex1"><script type="text/javascript">OAS_AD('ArticleFlex_1')</script></span>
</p>
<p>City records show declining trends in several key areas. Among them: </p>
<p><br /> • Foreclosure numbers have skyrocketed, meaning fewer city homes are occupied. </p>
<p><br /> • Water hookups are down, suggesting the same. </p>

<p><br /> • Some aspects of trash collection have ebbed because fewer people are buying things that produce waste. </p>
<p><br /> • Crime has declined across the city while police are getting fewer calls for services, a possible indicator of fewer people. </p>
<p><br /> • Sales-tax revenues are likely to drop for the second year in a row, with this year's collections off almost 8 percent from last year. </p>
<p>Experts say each trend can be explained in part by other factors, such as the national recession and the bursting of the housing bubble. When consumer spending decreases, so do tax revenues and the amount of trash that people throw away.</p>
<p>Still, an <i>Arizona Republic </i>analysis of the trends suggests Phoenix has anywhere from a few hundred to several thousand people fewer than projected.</p>
<p>"I think the number is minor, but with all these indicators moving down, I think it is real," said City Manager Frank Fairbanks, declining to speculate of the number of people the city may have lost.</p>

<p>Several factors could be behind a population loss, Fairbanks and others say. The state law requiring employers to verify immigration status of their workers is believed to have driven many immigrants out of the state in 2008. The regional decline in construction jobs also could be behind an exodus. </p>
<p>Statewide, growth has slowed to a crawl. A population report released in December showed Arizona grew by 1.6 percent, or about 100,000 residents, in the previous fiscal year - less than half the growth rate of two years prior. </p>
<p>But the possibility that Phoenix has declined relative to other cities has leaders worried.</p>
<p><h3>Tax revenue at risk

</h3></p>
<p>Losing any fraction of the city's population could mean less revenue to Phoenix from the state.</p>
<p>Arizona shares 15 percent of its income-tax collections with cities based on those cities' population. </p>
<p>Phoenix's population now represents about 30 percent of Arizona's population. This year, Phoenix got $435 million from the state. That made up 38.7 percent of the city's general fund. </p>
<p>Assuming that the suburbs maintain or grow their current populations, Phoenix's share of revenue from the state could shrink in coming years, compounding the city's budget crisis.</p>
<p></p>

<p>Phoenix already is facing cuts of $270 million, or more than 22 percent, from its budget this year. The city is weighing cuts from community centers, senior centers, libraries, police and fire protection, and other services.</p>
<p>"It's an important, pressing issue for all of our cities here, but Phoenix probably most of all," said Rita Walton, who monitors population for the Maricopa Association of Governments. "They're the biggest and stand to lose the most."</p>
<p><h3>The evidence

</h3></p>
<p>Several indicators exist showing that the population could be declining. Among them: </p>
<p><b><br /> • Water: </b>The number of water-using accounts fell about 5,600 from fiscal 2007-08 to 2008-09. The number of accounts using no water almost doubled, on average, meaning those homes still have water connections but are probably empty. </p>
<p>Tracking population by water hookups is "a good way of watching for population change," said Steve Doig, a journalism professor at Arizona State University who used a similar method to track the return of people to southern Florida after Hurricane Andrew. </p>
<p>Evidence about the increasing number of water accounts using no water and the decreasing number of accounts generally indicates population decline. </p>
<p><b><br /> • Trash:</b> Trash collection dropped 2 percent overall from fiscal year 2006-07 to 2007-08. While the amount of recyclable material picked up increased slightly, bulk-trash pickup dropped almost 15 percent during the same period. </p>

<p>Dennis Hoffman, professor of economics at the W. P. Carey School of Business at ASU, said trash collections, just like electrical and water hookups, frequently are used to gauge more precise population shifts than a census provides.</p>
<p><b><br /> • Foreclosures: </b>Bank repossessions of homes continue to increase. The key areas of decline are in the western part of the city. Phoenix overall had a staggering 534 percent increase in foreclosures in the first half of 2008, or an increase of about 5,000 additional homes in foreclosure compared with the first half of 2007. Figures for the last half of the year are not yet available. </p>
<p><b><br /> • Taxes: </b>Sales-tax collections have declined dramatically. Although not tied to growth as directly as water hookups, increases in sales-tax collections began slowing in 2006-07, then dropped in the next two years. </p>
<p>Hoffman said that since the retail sector thrives on population growth, it is reasonable to conclude that with the retail sector in so much trouble, declining sales-tax revenue could correlate to declining population.</p>
<p><b><br /> • Crime: </b>Phoenix saw violent crime decrease 0.3 percent last year, along with a 0.3 percent decrease in total property crimes. Crime has continued to fall in 2008, records show. In addition, Phoenix police have had fewer calls for service this year than last year, Police Chief Jack Harris said. Growing populations almost always result in more calls to police.</p>
<p><h3>Hope ahead?


</h3></p>
<p>Not everyone is pessimistic. Mayor Phil Gordon expressed skepticism at the idea of a shrinking city.</p>
<p>"The growth of Phoenix, like all cities in the Valley, has slowed significantly. But Phoenix's net growth is still positive, both in jobs and population," he said. </p>
<p>Gordon said the city is poised to resume steady growth as soon as the economy emerges from the current recession.</p>
<p>"When the recovery comes, we will be better positioned to recover faster and take advantage of it than many other cities locally and throughout the U.S. The world and the nation know Phoenix.... Whether it's national or international, we're first on the list of cities to invest in as the economy turns."</p>
<p></p>
<p><b>Reporters Astrid Galvan, Rebekah Sanders, Dianna M. Náñez, Edythe Jensen, Elias C. Arnold, Lynh Bui and Gary Nelson contributed to this article.</p>
<p></b></p>
<p></p></div>


The main thing that I want is the story... I don't need the title or the author, and they make this easy because the store is wrapped in a div tag with the id of "articlestory" (find <div id="articlestory">, and then the closing </div> is at the bottom of the code block.

Perfect, so I know my article is always wrapped in this HTML, so it'll be easy to always pull it out.  This also makes the regex easy to write.

For those that aren't familiar with PCRE, there is sooooooo much to it that I can't really explain, but I'll give the regex I use, and why I've used it, and hopefully that will give you a starting place...

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

In parts:
Each regex must start and end with a character, any characters, as long as it's the same.  I choose to use ~.  You could just as easily use any non-Meta character (see the PCRE reference) like /, or : or whatever works for you.  I like ~, its easy to remember and isn't used a lot in text, so it normally won't be used in your regex at all.

Next I have the beginning div tag - <div id="articlestory">

Then I have (.*).  This means grab EVERYTHING that follows that starting div tag until the end of the line.  (note, I'll get to it later)

The purpose of being in () is that whatever is found in this () will be captured into the first index of the array that the mod will use to post.  If you have to use () to enclose anything BEFORE this (.*), then you'll want to prevent it from being captured and being put into the array by starting it with (?:search string here)

If you have to use any parenthesis in your regex BEFORE your (.*), you will have to use (?: to start it.  In most cases, I dont think this will be required, but it is something to keep in mind if you see your feed being posted incorrectly.

The next part is the closing div... <\/div>.  All / in a regex need to be escaped using a \.

Following that is the closing ~ that I discussed earlier.

After that are a few letters, siU.  These are called pattern modifiers.  These can change the way your regex works.  Here is what the siU stand for -
s - means that .* should capture all characters including newlines and carriage returns.  Without this, .* will stop at the end of the line.  So by using the s modifier, .* will capture everything from where it starts to the end of the document (more to come on that too, since we want to stop at some point)
i - this means that the search is caseless.  So if you want to search for <DIV>, but <div> is the document, your regex will still find it.
U - this is the ungreedy modifier.  Remember how I said that .* will capture everything until the end of the document... this stops it.  This forces .* to stop when it comes across the next part of the pattern

Well, I hope I confused you enough... have fun... :)
Title: Re: RSS Feeder
Post by: KahneFan on January 12, 2009, 10:44:35 AM
Great information, thanks!
Title: Re: RSS Feeder
Post by: Nao 尚 on January 12, 2009, 11:16:07 AM
I think it's best to use (.*?) and no ungreendy parameter, rather than the other way around. It can be confusing otherwise.
Also, / usually doesn't need to be escaped.
Title: Re: RSS Feeder
Post by: Garou on January 12, 2009, 12:24:31 PM
Wow thanks that is exactly what I was looking for and I think it will help a lot of people.
Title: Re: RSS Feeder
Post by: 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.

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.
Title: Re: RSS Feeder
Post by: dWhite on January 12, 2009, 12:48:47 PM
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.
Title: Re: RSS Feeder
Post by: Nao 尚 on January 12, 2009, 02:14:31 PM
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.
Title: Re: RSS Feeder
Post by: shanksta13 on January 12, 2009, 03:17:27 PM
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
Title: Re: RSS Feeder
Post by: 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.
Title: Re: RSS Feeder
Post by: shanksta13 on January 12, 2009, 04:43:29 PM
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?
Title: Re: RSS Feeder
Post by: shanksta13 on January 12, 2009, 04:49:22 PM
Nevermind, I've got it fixed.  For whatever reason I already had an smf_rssfeed table.  ;)
Title: Re: RSS Feeder
Post by: SlammedDime on January 12, 2009, 05:03:53 PM
yea, I made the add_settings so that if the table already existed, it was ignored on creation... :) Glad you got it sorted.
Title: Re: RSS Feeder
Post by: shanksta13 on January 12, 2009, 07:25:40 PM
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?
Title: Re: RSS Feeder
Post by: 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.
Title: Re: RSS Feeder
Post by: shanksta13 on January 12, 2009, 07:49:36 PM
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?
Title: Re: RSS Feeder
Post by: SlammedDime on January 12, 2009, 08:58:40 PM
This makes no theme edits, it is theme independent, works across any and all.
Title: Re: RSS Feeder
Post by: bloodfire on January 12, 2009, 10:54:28 PM
great tutorial on the full article retrieval, SlammedDime.

Few questions

RSS from moreover.com 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) 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
Title: Re: RSS Feeder
Post by: SlammedDime on January 12, 2009, 11:04:09 PM
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.
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on January 13, 2009, 08:00:32 AM
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.
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 10:45:09 AM
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?
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on January 13, 2009, 11:56:51 AM
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 .
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 01:13:16 PM
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)
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 03:52:26 PM
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.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 04:03:16 PM
If they become disabled when the task runs, it's because your host may have fsockopen disabled... something to look into.  The only reason it would become disabled is if the feeder is unable to connect to the feed.  (you can check your error log on this too, I believe MagPie throws up a User created PHP error if it can't connect to the feed and SMF will log it)

As far as the mark as read problem on your test site, I'll investigate this on my Beta 4 and Rc1 installs, but I never ran into this issue.

Edit: I just tested the Mark As Read option and it worked just as it should on both of my test installs.
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 04:52:36 PM
Interestingly enough, it only does this for certain feeds...

How can I check to see if my host has fsockopen disabled or not?
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 04:58:15 PM
The easiest way to know is to visit your SMF Admin main page.  If the SMF Latest News box updates, then you do have it enabled, as SMF uses the same function to retrieve the latest news from our servers.
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 05:02:53 PM
Okay, I figured out why the feed wasn't working.  For whatever reason I had the URL wrong, stupid me.

Anyway, it works great on my admin account now.  It just updated the feeds and they showed up as unread on my account.  However, when I logged onto another account (my boardtester account), all of the posts were unread.

Has anyone else tried this mod from an account other than the admin account?  If so, does it do the same for you or is it just on my site that this is happening?
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 05:05:44 PM
Or maybe it's just a first time thing?  Will they display as unread when it pulls the next new article?
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 05:24:43 PM
Oh, another awesome feature request that probably wouldn't be too hard:

The option to specify a particular message icon for each individual feed.  For instance, my board has message icons for ESPN, CBSSports, etc.  Now that I have the RSS Feeder to automatically pull the articles, it would be awesome if I could automatically assign them the message icons, rather than having to manually do it.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 05:28:58 PM
Quote from: Yağız on January 11, 2009, 01:58:58 PM
There is an error with Turkish characters. It shows '?' instead of 'ı', 'İ', 'ğ', 'ş', 'Ş'.
I've fixed this bug... I didn't realize how powerful Magpie is in parsing RSS and returning results.  I added a line that sets the output character set of Magpie to be whatever the forum is, so it now parses your feed properly that you gave as an example...
Quote from: Lamarck on January 12, 2009, 09:50:50 AM
Yes,of course...here is a link:

http://www.20minutos.es/rss (http://www.20minutos.es/rss)

Ah,the problem is not only with "´",the same thing happen with "ñ".

Thanks!.
The above fixed your problem as well.

shanksta13 - message icon selection it is.... :)

Thanks everyone so far for testing and bug reporting and providing ideas for new features.
Title: Re: RSS Feeder
Post by: Miles Marshall on January 13, 2009, 05:35:20 PM
Wonderful mod I must say, Is there anyway to limit the number of articles?, Or parse some aritcles like specfic topics
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 05:41:10 PM
The limit is what your board can hold... If you want only certain articles based on keywords, specify those keywords for that feed.
Title: Re: RSS Feeder
Post by: KahneFan on January 13, 2009, 05:52:39 PM
SD, could there be anyway of allowing those with AEVA to embed videos into the posts? As well as images? I have many members who like to post images (screenshots of graphs) in their blog. I also have members who use YouTube and other players to post videos. For the videos, I would think that anyone with AEVE would just need to allow a link to the vid.

Here's a sample (http://www.tiltedblog.com/aggregator/sources/35) with a graph and a player.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 06:32:43 PM
The mod is made to strip all html from feeds, not only for security, but also because it isn't needed in the posts.

As for allowing AEVA - I don't know how items are included in posts, but if it is through the use of BBcode, then if the blog utilized bbcode in the description tag, then that would be passed to the feeder and the bbcode would be parsed in the post.
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 07:07:50 PM
Okay, I've got the feed behaving mostly properly now, however the Mark as Read option still isn't working.  The feed articles are being pulled up properly, but they're showing up as unread.  Any ideas?
Title: Re: RSS Feeder
Post by: digger on January 13, 2009, 07:13:59 PM
Another suggestion.
Can you make an option to post feed as posts in one topic, instead of many topics for one feed.
It's not hard to implement, but more suitable than a tons of topics.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 08:00:11 PM
shanksta - All I can think of is a mod is interfering with it.  I have no problems with it on stock installs of Beta4 or RC1.  Can you list the mods you have installed?

digger - I'll entertain that thought... however answer me these questions:
Should the title of the topic be the title of the feed, or that of the first item pulled from the feed
I assume you mean each feed would have it's own topic?  Not all feeds posting to one topic?
Title: Re: RSS Feeder
Post by: shanksta13 on January 13, 2009, 08:16:47 PM
Quote from: SlammedDime on January 13, 2009, 08:00:11 PM
shanksta - All I can think of is a mod is interfering with it.  I have no problems with it on stock installs of Beta4 or RC1.  Can you list the mods you have installed?

digger - I'll entertain that thought... however answer me these questions:
Should the title of the topic be the title of the feed, or that of the first item pulled from the feed
I assume you mean each feed would have it's own topic?  Not all feeds posting to one topic?

Haha, probably won't help much, I have a pretty modded up forum.  :D

Mod Name     Version     
1.    RSS Feeder    1.0.0    [ Uninstall ]
2.    Profile Visitors    4.1    [ Uninstall ]
3.    Prettier_Quotes    1.12    [ Uninstall ]
4.    Member Color Link    3.0.5    [ Uninstall ]
5.    Time Logged-In    1.0    [ Uninstall ]
6.    Excellent Smileys    1.0    [ Uninstall ]
7.    vBulletin Style Meta Tags    1.1    [ Uninstall ]
8.    Custom Copyright    1.1    [ Uninstall ]
9.    Users Online Today    1.5.4    [ Uninstall ]
10.    SMF Arcade    2.5 Beta 2.2 Public    [ Uninstall ]
11.    User Control Panel By Alan S    3.0    [ Uninstall ]
12.    Simple Award System    2.0.0.4b    [ Uninstall ]
13.    Show Joined, Location, Username In Topic View    1.0    [ Uninstall ]
14.    SMF Chat - by Joseph Szenasi    1.0    [ Uninstall ]
15.    Advanced Reputation System    1.5.2    [ Uninstall ]
16.    Referrals Mod    2.1.1    [ Uninstall ]
17.    Recent posts user preference    3.04    [ Uninstall ]
18.    Auto Embed Video/Audio Clips    4.0.2    [ Uninstall ]
19.    Ellow green smiley set    1.1.0.1    [ Uninstall ]
20.    Tagging System    2.1    [ Uninstall ]
21.    Pm_Informer    2.0    [ Uninstall ]
22.    Show Local Url Titles    1.1    [ Uninstall ]
23.    Internal_Links_Use_Same_Window    1.2    [ Uninstall ]
24.    YouTube BBCode    2.3    [ Uninstall ]
25.    New In Topic View    1.1    [ Uninstall ]
26.    Last Post On MemberList    1    [ Uninstall ]
27.    Previous and Next Links for Page Index    1.0    [ Uninstall ]
28.    Top 10 Posters Today And This Week Stats    1.1    [ Uninstall ]
29.    New Style Message Icon    1.0    [ Uninstall ]
30.    MessagePreviewOnHover    1.7    [ Uninstall ]
31.    Irritate lurkers with 0 posts    0.1    [ Uninstall ]
32.    Images On Board    1.1    [ Uninstall ]
33.    Colorize Boards    3.0    [ Uninstall ]
34.    Bookmarks    2.2.1    [ Uninstall ]
35.    Birthday on Profile Summary    1.0    [ Uninstall ]
36.    Ad Managment    2.3.4    [ Uninstall ]

Not to mention I'm using an SMF-Joomla Bridge.  Don't worry, I'll try to figure it out on my own, just have to do a little more research on how to make a thread appear "read".
Title: Re: RSS Feeder
Post by: digger on January 13, 2009, 08:27:54 PM
Quote from: SlammedDime on January 13, 2009, 08:00:11 PM
digger - I'll entertain that thought... however answer me these questions:
Should the title of the topic be the title of the feed, or that of the first item pulled from the feed
I assume you mean each feed would have it's own topic?  Not all feeds posting to one topic?
Each feed would have it's own topic.
Title of the topic would be the title of the feed and titles of the posts might be a titles of the rss items.
Title: Re: RSS Feeder
Post by: KahneFan on January 13, 2009, 08:45:27 PM
SD, thank you for your quick responses to us all it very refreshing!

As for AEVA, all you have to do is allow the link to the video to pass through and AEVA automatically turns it into a video. The video I have posted HERE (http://ipostyoupost.com/index.php?topic=15.msg205#msg205) was embeded by me simply posting a link to the video and AEVA did the rest.

Also, if you could allow image URL's through: 1) people could click to see the image, 2) Someone might be able to make a mod which would allow images inline in posts.

Come to think of it, just allowing all URL's through would probably be a good thing. I've seen mention to security, but if the admin is (currently) the one allowing feeds, then they should be selective of their feeds.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 09:11:12 PM
Right, but how do I know what is a valid video link??  AEVA does it because of the hundreds of regular expressions that it uses to parse the videos... not sure I'd want to add all of that.

Although, I should ask for clarification... how do you mean, post a link to the video?  is it as simple as typing:

http://www.youtube.com/myvideolinkhere

And AEVA parses it and displays the video?

As for images - I can probably make a regular expression to pull out images and convert them to bbcode.  Shouldn't be hard.
Title: Re: RSS Feeder
Post by: KahneFan on January 13, 2009, 09:26:22 PM
Quote from: SlammedDime on January 13, 2009, 09:11:12 PM
is it as simple as typing:

http://www.youtube.com/myvideolinkhere

And AEVA parses it and displays the video?

Exactly that. If someone post a YouTube URL on a site with AEVA it will automatically become an embeded video. So you would just need to allow the URL through and AEVA will do the rest. This would also allow people to use your mod with any of the (currently) 185 sites that AEVA works with.

BTW: AEVA Mod Link (http://custom.simplemachines.org/mods/index.php?mod=977) if it helps.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 09:32:13 PM
ah, no problem then... this doesn't strip any urls... only <a>... </a> tags or any other HTML tags.  If it's just a pure link, it will still be allowed because it's considered plain text as far as this mod is concerned, so no modifications are needed on my part, it should work as it stands now.

As for the images, I can add a regular expression to the part that actually strips out HTML to keep the images... easy fix.
Title: Re: RSS Feeder
Post by: KahneFan on January 13, 2009, 10:13:28 PM
But THIS (http://texasfelt.com/index.php?topic=545.0) doesn't show the video like THIS (http://www.tiltedblog.com/aggregator/sources/6). It's the same feed. Both my sites, one using SMF (obviously) the other with Drupal.
Title: Re: RSS Feeder
Post by: SlammedDime on January 13, 2009, 10:19:55 PM
That's because the RSS feed is not just a link to the video... it has the whole <object> tag, which would be parsed out because it is an html tag.
Title: Re: RSS Feeder
Post by: KahneFan on January 13, 2009, 11:28:44 PM
So there would be no way to pull the <object> tag out?

Now that you say that, it reminds me that there is an area of the Drupal aggregate system which allows admins to specify the tags they will allow through. Which I DID have to add <object> to my admin to allow the videos and players. Do you think this could be a possibility with your mod? This would allow admins complete access to tags they feel are OK to be passed through. Below is a screen shot of the Drupal admin screen. Their defaults seem pretty safe...


<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul> <img>


However, I guess with SMF, you have to rebuild all of these in order to allow them through to a post?
Title: Re: RSS Feeder
Post by: bloodfire on January 14, 2009, 02:14:20 AM
Quote from: SlammedDime on January 12, 2009, 11:04:09 PM
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.

I've tried the multiple feeds method... it works alright but then after awhile I get the 500 Internal server error. Guessed all i have to do it increase the timeout value from 60 to a higher value? If so, any maximum value?

Title: Re: RSS Feeder
Post by: DirtRider on January 14, 2009, 02:57:34 AM
Great mod I have been waiting for this one  :D
Title: Re: RSS Feeder
Post by: Nao 尚 on January 14, 2009, 03:21:14 AM
Just FYI: anything will parse through Aeva when you call parse_bbc(). Still, it requires links to be autolinked ([ url ] tag).
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2009, 05:04:49 AM
Quote from: bloodfire on January 14, 2009, 02:14:20 AM
Quote from: SlammedDime on January 12, 2009, 11:04:09 PM
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.

I've tried the multiple feeds method... it works alright but then after awhile I get the 500 Internal server error. Guessed all i have to do it increase the timeout value from 60 to a higher value? If so, any maximum value?


For a 500 error, you'll need to check your server error logs to see what caused the error.  If it was a timeout value, that would probably show in the forum error log.

Nao - good to know, thx.
Title: Re: RSS Feeder
Post by: Yağız... on January 14, 2009, 06:26:37 AM
Quote from: SlammedDime on January 13, 2009, 05:28:58 PM
Quote from: Yağız on January 11, 2009, 01:58:58 PM
There is an error with Turkish characters. It shows '?' instead of 'ı', 'İ', 'ğ', 'ş', 'Ş'.
I've fixed this bug... I didn't realize how powerful Magpie is in parsing RSS and returning results.  I added a line that sets the output character set of Magpie to be whatever the forum is, so it now parses your feed properly that you gave as an example...
Thank you. I'm waiting for the new release.
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on January 14, 2009, 08:25:26 AM
Quote from: SlammedDime on January 13, 2009, 01:13:16 PM
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)

That worked perfectly.

Thanks a lot for it SlammedDime.

I have an suggestion.  Is there any way to add tags on the post using vbgamer tags mod.
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2009, 10:17:31 AM
not sure, i've never looked into the tags mod, not sure how hard it would be to implement... I don't normally try and code to work with other mods, only because if they are ever updated, I don't want to break functionality with my mods.
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2009, 10:45:54 AM
I've just noticed a few bugs on my live site that I'm testing this on, one due to a bug in SMF, but also revealed why the Mark as Read wasn't working properly and my lack of understanding...

The mark-as-read option only works for the user who the task was run under, be it a guest visiting your site that triggers the tasks, another user, or yourself, because of the createPost function that uses $user_info['id'] instead of $posterInfo['id'].  Regardless though, that still only means that whatever posterId is used will have the mark-as-read option enabled.

Because of that, I'm going to remove that option, as making the topic marked as read for everyone on the board would be exhausting, especially on large boards.

I'll also be filing a bug report on the issue as well for SMF.

I also have another error in my error log regarding an undefined index error for 'description'..

Apply Filter: Only show the error messages of this URL  http://www.ccwlaws.com/forum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: description
Apply Filter: Only show the errors from this file
File: /home/mattzuba/public_html/ccwlaws.com/forum/Sources/ScheduledTasks.php
Line: 1666

Can anyone else confirm or deny that error as well?
Title: Re: RSS Feeder
Post by: KahneFan on January 14, 2009, 11:01:58 AM
Error confirmed... says the one with 550 articles.
Title: Re: RSS Feeder
Post by: bloodfire on January 14, 2009, 09:46:03 PM
SlammedDime, I've encountered the same error... including errors on Subs-Rss.php and subs-post.php

Apply Filter: Only show the error messages of this URL  http://www.bruneimarket.co.cc/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined offset: 1
Apply Filter: Only show the errors from this file
File: /home/bnmart/public_html/Sources/ScheduledTasks.php
Line: 1733


Apply Filter: Only show the error messages of this URL  http://www.bruneimarket.co.cc/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: description
Apply Filter: Only show the errors from this file
File: /home/bnmart/public_html/Sources/Subs-Rss.php
Line: 497


[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  utf8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1272
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  utf8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1274
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  server in /home/bnmart/public_html/Sources/Subs-Post.php on line 1290
[14-Jan-2009 05:08:29] PHP Warning:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: invalid UTF-8 string at offset 8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1290
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  character_set in /home/bnmart/public_html/Sources/Subs-Post.php on line 1233


14-Jan-2009 20:00:37] PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.theborneopost.com:80 (Connection refused) in /home/bnmart/public_html/Sources/Subs-Rss.php on line 2040
[14-Jan-2009 20:00:59] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/bnmart/public_html/Sources/ScheduledTasks.php:1734) in /home/bnmart/public_html/Sources/ScheduledTasks.php on line 183
[14-Jan-2009 20:00:59] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/bnmart/public_html/Sources/ScheduledTasks.php:1734) in /home/bnmart/public_html/Sources/ScheduledTasks.php on line 184


Sometimes it works fine.... without any errors
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2009, 10:06:54 PM
Quote from: bloodfire on January 14, 2009, 09:46:03 PM
SlammedDime, I've encountered the same error... including errors on Subs-Rss.php and subs-post.php

Apply Filter: Only show the error messages of this URL  http://www.bruneimarket.co.cc/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined offset: 1
Apply Filter: Only show the errors from this file
File: /home/bnmart/public_html/Sources/ScheduledTasks.php
Line: 1733


Apply Filter: Only show the error messages of this URL  http://www.bruneimarket.co.cc/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: description
Apply Filter: Only show the errors from this file
File: /home/bnmart/public_html/Sources/Subs-Rss.php
Line: 497
These two are caused by this mod... although I'm unsure of the first one.  Can you post what line of code you have on that line?
Quote from: bloodfire on January 14, 2009, 09:46:03 PM
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  utf8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1272
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  utf8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1274
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  server in /home/bnmart/public_html/Sources/Subs-Post.php on line 1290
[14-Jan-2009 05:08:29] PHP Warning:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: invalid UTF-8 string at offset 8 in /home/bnmart/public_html/Sources/Subs-Post.php on line 1290
[14-Jan-2009 05:08:29] PHP Notice:  Undefined index:  character_set in /home/bnmart/public_html/Sources/Subs-Post.php on line 1233
These are not caused by this mod... the function that those error fall in is not called by this mod
Quote from: bloodfire on January 14, 2009, 09:46:03 PM
14-Jan-2009 20:00:37] PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.theborneopost.com:80 (Connection refused) in /home/bnmart/public_html/Sources/Subs-Rss.php on line 2040
[14-Jan-2009 20:00:59] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/bnmart/public_html/Sources/ScheduledTasks.php:1734) in /home/bnmart/public_html/Sources/ScheduledTasks.php on line 183
[14-Jan-2009 20:00:59] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/bnmart/public_html/Sources/ScheduledTasks.php:1734) in /home/bnmart/public_html/Sources/ScheduledTasks.php on line 184


Sometimes it works fine.... without any errors
The first one caused the second two, but the first one isn't the fault of the mod, but because the php function was not able to connect to the server specified.  I'm not sure they even were caused by the mod, unless you're trying to call a RSS feed from your own site.
Title: Re: RSS Feeder
Post by: bloodfire on January 15, 2009, 01:37:33 AM
ScheduledTasks.php


1731 $matches = array();
1732 preg_match($feed['regex'], $browser->results, $matches);
1733 $body = $matches[1];



14-Jan-2009 20:00:37] PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.theborneopost.com:80 (Connection refused) in /home/bnmart/public_html/Sources/Subs-Rss.php on line 2040

as for this, it stops there everytime, only to this url... this is from bignewsnetwork.com not from my website... however, there are times it works...
Title: Re: RSS Feeder
Post by: shanksta13 on January 15, 2009, 10:53:58 AM
Okay good, I thought I was the only one having the "Mark as Read" option.  That sucks though, that feature is the one reason I really liked the mod.  I've decided to pull it from my live site now, because the relevant feeds I was using post rather frequently and I don't want to smother my members.

The Mark as Read option was exactly what I was looking for, something that allowed users to view the articles if they wanted to, but wouldn't interfere with the normal functioning of the forum (i.e. showing up in the unread posts list).

Anyway, good try on the mod.  If you guys ever figure out how to get that Mark as Read option working, this mod would be incredible.  Thanks for all the hard work, I almost thought it would be the one I was looking for.

Good luck on the mod!
Title: Re: RSS Feeder
Post by: KahneFan on January 15, 2009, 11:19:07 AM
There's a way you can achieve the above, but it will not create a new topic per article.

0) You may want to create a new board for this, keep that in mind for step 8.

1) Install Simple Portal
2) DISABLE Simple Portal (Configuration Menu)
3) DISABLE Redirect to Simple Portal
- The above two steps will make you forum look/run as usual
4) Go to: Blocks --> Add Block --> (bottom of page) RSS Feed Block
5) Fill in the pertinent top information
6) For the "Column" drop down select {TOP} or {BOTTOM} You may change this later, I would suggest Top.
7) On the bottom "Display Options" check "Advanced Options"
8 ) Click the "[ +] Select Boards" and select which board of your forum this feed applies to (this is where you may want to create a new board just for this feed)
9) Click "Add Block"

Now go to the board which you assigned this to and you should see all feeds above/below the posts in that board. This is where selecting Top/Bottom will depend if you want comments below the articles or above the articles. Using "Top" above will make it so that members can read the articles, then comment below.

Is this the best method, probably not, but it will list your articles and not effect your board new/no new system.
Title: Re: RSS Feeder
Post by: shanksta13 on January 15, 2009, 11:25:50 AM
Quote from: KahneFan on January 15, 2009, 11:19:07 AM
There's a way you can achieve the above, but it will not create a new topic per article.

0) You may want to create a new board for this, keep that in mind for step 8.

1) Install Simple Portal
2) DISABLE Simple Portal (Configuration Menu)
3) DISABLE Redirect to Simple Portal
- The above two steps will make you forum look/run as usual
4) Go to: Blocks --> Add Block --> (bottom of page) RSS Feed Block
5) Fill in the pertinent top information
6) For the "Column" drop down select {TOP} or {BOTTOM} You may change this later, I would suggest Top.
7) On the bottom "Display Options" check "Advanced Options"
8 ) Click the "[ +] Select Boards" and select which board of your forum this feed applies to (this is where you may want to create a new board just for this feed)
9) Click "Add Block"

Now go to the board which you assigned this to and you should see all feeds above/below the posts in that board. This is where selecting Top/Bottom will depend if you want comments below the articles or above the articles. Using "Top" above will make it so that members can read the articles, then comment below.

Is this the best method, probably not, but it will list your articles and not effect your board new/no new system.

Awesome, I had a already created a new board for this RSS Feeder and I haven't deleted it yet, so I very well may do this.  If I do, I'll be sure to let you know and thank you!
Title: Re: RSS Feeder
Post by: SlammedDime on January 15, 2009, 12:16:53 PM
shanksta - before I release the next version, I'll take a hard look at how I can make it work.  The only way I think I can do it is to mark the whole board that the news feed is posted to as read, but then if you have one feed you don't want marked as read, but one feed you do, and they post to the same board, then you're SOL.

Quote from: bloodfire on January 15, 2009, 01:37:33 AM
ScheduledTasks.php


1731 $matches = array();
1732 preg_match($feed['regex'], $browser->results, $matches);
1733 $body = $matches[1];



14-Jan-2009 20:00:37] PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.theborneopost.com:80 (Connection refused) in /home/bnmart/public_html/Sources/Subs-Rss.php on line 2040

as for this, it stops there everytime, only to this url... this is from bignewsnetwork.com not from my website... however, there are times it works...

Thanks for posting that code, I've corrected the code so an error will no longer be thrown in the first case above.

For the fsockopen error - it simply means fsockopen wasn't able to connect to the specified server, normally because the server denied the request.  Nothing I can really do to work around it except suppress the error, which I've done for the next version.
Title: Re: RSS Feeder
Post by: KahneFan on January 15, 2009, 12:39:53 PM
SD, if you figure out a way to let images/html through, you may want to have a "Settings" page which changes settings for the whole mod. If you added this page, you could place "Mark Feeds As Read" in this area, which would let people know that it is a setting for all feeds. You could then place a small font note below it stating "All feeds and posts on this board will be marked as read" or something of that nature.

Side question: ...will you be allowing images through on the next version?
Title: Re: RSS Feeder
Post by: SlammedDime on January 15, 2009, 01:13:25 PM
Yea, I'm still gonna have to ponder on the Mark as Read option.

As for images, yes, I've edited the stripping function to convert image tags to [ img] bbc tags :)

I actually have version 1.1.0 ready to roll out and I've tested the upgrade script to upgrade anyone already running 1.0.0, but I want to further investigate the mark as read option first.
Title: Re: RSS Feeder
Post by: SlammedDime on January 15, 2009, 06:11:16 PM
After digging through the SMF code, adding Mark As Read support just isn't feasable, at least not at this point in SMF time.

Think about it this way...

Let's say you have 10000 members and 10 different feeds, and when the scheduled tasks run, you end up importing 50 items, creating 50 new topics... that is an extra 500,000 rows that would need to be added to the log_topics table, 1 row per item per member.

Likewise, if I enabled 'by board' mark as read, if you have 10000 members, that's at least 10000 rows that would need to be updated, or created, assuming all feeds post to the same board.  If each feed posts in a different board, with 10 feeds you'll be updating or creating 100,000 rows in the table.

As you can see, it's just not feasable to do, and I don't think you'll be able to find any mod that can do it.

A suggestion to try would be the ignore board feature.  Allow your members to Ignore Boards, then have your feeds post to boards that your members can ignore, then the new topics and posts won't show up in their Unread Topics list.

As a side note, I've decided to switch from MagPie RSS to SimplePie RSS for the API.  Much more solid, and much more recent (1 month since last version, vs 2+ years with MagPie).  There will be no difference to anyone using the mod.
Title: Re: RSS Feeder
Post by: bloodfire on January 15, 2009, 08:30:11 PM
Quote from: SlammedDime on January 15, 2009, 12:16:53 PM
shanksta - before I release the next version, I'll take a hard look at how I can make it work.  The only way I think I can do it is to mark the whole board that the news feed is posted to as read, but then if you have one feed you don't want marked as read, but one feed you do, and they post to the same board, then you're SOL.

Quote from: bloodfire on January 15, 2009, 01:37:33 AM
ScheduledTasks.php


1731 $matches = array();
1732 preg_match($feed['regex'], $browser->results, $matches);
1733 $body = $matches[1];



14-Jan-2009 20:00:37] PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to www.theborneopost.com:80 (Connection refused) in /home/bnmart/public_html/Sources/Subs-Rss.php on line 2040

as for this, it stops there everytime, only to this url... this is from bignewsnetwork.com not from my website... however, there are times it works...

Thanks for posting that code, I've corrected the code so an error will no longer be thrown in the first case above.

For the fsockopen error - it simply means fsockopen wasn't able to connect to the specified server, normally because the server denied the request.  Nothing I can really do to work around it except suppress the error, which I've done for the next version.

Great... can't wait for the update version.

Yeah... looks like the server denied the request... nothing to do with the script nor the command... most probably the connection to the server...
Title: Re: RSS Feeder
Post by: bloodfire on January 16, 2009, 12:34:56 AM
Another thing I found... since using this mod.... I found core dump files in my server....

core.12437
core.24225
core.9285
core.6443

Does any1 getting these files? At first, I just delete them, ignoring it. Only just now, when I test this mod by 'run now' on the schedule tasks and abt 1 minute or so, the page shows 500 Internal Service page. Then I try to retrieve the error.log using ftp from my server to find wat other errors... my server seems to be timeout as well... then i reconnect and found the core file... however, no error was shown.
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 12:52:26 AM
If you're trying to use the 'full article option', try disabling it and then try again.  It is possible that you're using an expression that is causing a core dump... if so, you'll need to revise the expression your using

If you get the 500 error and are able to retrieve the log to see what it shows, please post it.  I'd be interested to see where it came from.
Title: Re: RSS Feeder
Post by: Nao 尚 on January 16, 2009, 05:56:46 AM
Quote from: SlammedDime on January 16, 2009, 12:52:26 AM
If you're trying to use the 'full article option', try disabling it and then try again.  It is possible that you're using an expression that is causing a core dump... if so, you'll need to revise the expression your using
Ohhhh...... Fun memories! lol
Title: Re: RSS Feeder
Post by: Drivin and Cryin on January 16, 2009, 08:29:34 AM
I'm not sure if this is a stupid mistake on my part or a genuine error.  I just setup 2.0 beta and have been trying to get this to work, but after i install it and it tries to redirect, i get this error:

Fatal error: Cannot redeclare modifyrssfeedsettings() (previously declared in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php:1982) in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php on line 2700

Any ideas would be greatly appreciated.
Title: Re: RSS Feeder
Post by: bloodfire on January 16, 2009, 10:16:53 AM
Quote from: SlammedDime on January 16, 2009, 12:52:26 AM
If you're trying to use the 'full article option', try disabling it and then try again.  It is possible that you're using an expression that is causing a core dump... if so, you'll need to revise the expression your using

If you get the 500 error and are able to retrieve the log to see what it shows, please post it.  I'd be interested to see where it came from.

I've tried disabling the full article option...still get the 500 error and the dump core... however... if the rss feed is around 30 like moreover.com... it gets all the news but shows the 500 error page but no dump core file... as for 100 rss list like bignewsnetwork.com... gets both but only until certain amount of rss being retrieved...

the expression is ok... at times... it works fine... retrieving all those match them...

Still no error logs or any indications of wat causing the error... :(
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 16, 2009, 10:26:12 AM
http://en.wikipedia.org/wiki/Core_dump
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 11:39:23 AM
Quote from: Nao 尚 on January 16, 2009, 05:56:46 AM
Quote from: SlammedDime on January 16, 2009, 12:52:26 AM
If you're trying to use the 'full article option', try disabling it and then try again.  It is possible that you're using an expression that is causing a core dump... if so, you'll need to revise the expression your using
Ohhhh...... Fun memories! lol
LOL

Quote from: Drivin and Cryin on January 16, 2009, 08:29:34 AM
I'm not sure if this is a stupid mistake on my part or a genuine error.  I just setup 2.0 beta and have been trying to get this to work, but after i install it and it tries to redirect, i get this error:

Fatal error: Cannot redeclare modifyrssfeedsettings() (previously declared in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php:1982) in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php on line 2700

Any ideas would be greatly appreciated.
That means the mod was installed twice... you'll need to go through and remove the duplicate code by hand.
Title: Re: RSS Feeder
Post by: Drivin and Cryin on January 16, 2009, 12:58:31 PM
Quote from: SlammedDime on January 16, 2009, 11:39:23 AM
That means the mod was installed twice... you'll need to go through and remove the duplicate code by hand.

Thanks, i got that sorted out and it's working now.

Maybe this will help someone else out, but i couldn't get it working with the clean blue theme.  For some reason, the setup screen just wouldn't show up.  So when i kept going to the configuration screen|modifications - rss feeder wasn't listed, which is probably why i ended up with it installed twice in the first place.  I switched to the default theme and everything worked fine.
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 01:14:37 PM
Can you link me to which theme you are using?  This mod doesn't make any theme or template changes except to add information to the modifications.english.php, which only the default theme should have in it's language folder.
Title: Re: RSS Feeder
Post by: Lamarck on January 16, 2009, 02:20:54 PM
You are working hard in this mod,very good job.I'm looking forward the new release.
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 02:22:02 PM
Mainly because it's a crucial part of my new site I'm launching... lol.
Title: Re: RSS Feeder
Post by: KahneFan on January 16, 2009, 03:52:58 PM
Quote from: SlammedDime on January 16, 2009, 02:22:02 PM
Mainly because it's a crucial part of my new site I'm launching... lol.

Still, thank you for sharing it with us and for the quick responses.

What's your new site? (or did I miss a link?)
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 04:10:18 PM
No worries....

www.ccwlaws.com
Title: Re: RSS Feeder
Post by: KahneFan on January 16, 2009, 04:34:17 PM
Ah, that's right. I remember seeing that board. Going live next Tuesday (1-20). Looks good.

[/off topic]
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 06:08:10 PM
Okay, if anyone would be willing, can you give 1.1.0 a shot... I won't post it on the download site quite yet, so for now it'll have to be through my SVN...

[link removed]

Click on 'Tarball' next to the 1.1.0 under Tags and save the file to your desktop.

I would not recommend this for anyone already using 1.0.0 until I have fixed any bugs that may be found in this version, UNLESS you are comfortable in working in the database and able to drop and restore tables without help.  In that case, then you can install the above version and it will upgrade your existing install and update the database tables.  PLEASE take a backup of the rssfeeds and log_rssfeeds tables BEFORE upgrading, incase you do need to revert back to 1.0.0 for any reason.

If you do need to downgrade, uninstall version 1.1.0, then in the 'Browse Mods' section of your Package Manager, delete version 1.0.0, ignoring the error that it may still be installed, yada yada... then install 1.0.0 again, then go into the database drop, then recreate the tables from your backup.

(if you didn't understand all of the above, then you probably shouldn't upgrade just yet)
Title: Re: RSS Feeder
Post by: Lamarck on January 16, 2009, 07:01:58 PM
I have the new version installed in my test board and it seems to work fine.

I found a "bug" or two: 

-Spanish characters appear as "?" in footer and prefix.

-Also,I get this:

QuoteAn Error Has Occurred!
The database value you're trying to insert does not exist: hash

In the scheduled tasks tab if I press "run now" with RSS Feeder option enabled.Despite this error,a new topic from the rss feed is created with no problem.But mod get only one topic from the feed,even If I have set that option to 2 or 3.


I will be testing this more tomorrow,thanks.


P.S: It's a "fresh" installation,not an updated version from 1.0.0 to 1.1.0,if that helps.
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 07:33:01 PM
The reason for the ? might be because of an incorrect collation on the database table... I'm not sure I can change it with the install of the mod using SMF's functions, but I'll try.  the ? problem will probably go away if you go into mysql to the tables and change their collation to utf-8

As for the hash... I know why that's not working... stupid last minute change, thanks.

Edit: The hash problem is fixed in the download now...
Title: Re: RSS Feeder
Post by: SlammedDime on January 16, 2009, 10:47:00 PM
I'm waiting to hear from the dev's on the utf8 table creation issue, but until that point, i've released 1.1.0, it's available for download on the mods download page.

Anyone currently running 1.0.0, just upload this and click the upgrade option and you're existing installation will be upgraded.
Title: Re: RSS Feeder
Post by: KahneFan on January 16, 2009, 11:35:42 PM
I have this on two sites I'm setting up. On 1 site I tried the upgrade and it didn't work, so I tried uninstalling old, installig new... got a few errors on install, but it appeared to go through. After Install I ran it and it uploaded a couple of articles again that it had loaded previously. I will monitor this and my error log. As long as I don't see anymore duplicates I'm OK with it.

On the other board, I fully uninstalled 1.0 and inistalled 1.1 and now I get this message on the RSS Admin page

Quote
Unknown column 'f.icon' in 'field list'
File: /home/content/b/u/d/budaadmin/html/sites/pickaline/Sources/ScheduledTasks.php
Line: 1611

On a side note: It pulls images through PERFECTLY! and I like the date/source additions.

Anymore thought on videos? :P  (what a pain in the @$$ I am :))
Title: Re: RSS Feeder
Post by: SlammedDime on January 17, 2009, 05:02:59 AM
if you uninstalled 1.0, it didn't remove the tables from the database, so your old tables are still there.  Try running upgrade.php from the download package and it should upgrade your tables for 1.1.

To verify this before hand, look at the rssfeeds table.  If you're missing an 'icon', or 'id_topic' row, the new structure is not there and upgrade.php should be run.
Title: Re: RSS Feeder
Post by: bloodfire on January 17, 2009, 05:06:10 AM
So far the new update works fine for me by uninstalling the old one and manually delete the database... the only thing is the images are not gathered... is it implemented? I have not fully tested it yet.. but so far getting rss from moreover.com with full article features... works fine and no more dump cores or time out... will try them in full capacity and c how far can it goes...

Good work with the updates...
Title: Re: RSS Feeder
Post by: SlammedDime on January 17, 2009, 05:10:22 AM
The only thing that I worked on images with was if they are in the description, or summary, or if they are contained in the full article.  If the feed uses an <img> xml tag, I didn't implement that.  To be honest, I wasn't even thinking about that.  I'll keep it in mind for future versions.
Title: Re: RSS Feeder
Post by: bloodfire on January 17, 2009, 05:13:49 AM
I actually meant when the full article that is to be retrieve has <img>(s) in it not the feed with img tag in xml. :)
Title: Re: RSS Feeder
Post by: digger on January 17, 2009, 06:06:00 AM
Hi.
"Post Items In Single Topic" work perfect! Thanks. And I think no need to show "Source: ... " in every post in this case.
There is one problem with mod. In all posts tag <br> removed, and posts looks not so good.
Title: Re: RSS Feeder
Post by: digger on January 17, 2009, 07:21:37 AM
Another problem.
Posts looks good when i start update task manually.
When it starts automatically Cyrillic characters looks like ?????????
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on January 17, 2009, 07:40:54 AM
Quote from: bloodfire on January 16, 2009, 12:34:56 AM
Another thing I found... since using this mod.... I found core dump files in my server....

core.12437
core.24225
core.9285
core.6443

Does any1 getting these files? At first, I just delete them, ignoring it. Only just now, when I test this mod by 'run now' on the schedule tasks and abt 1 minute or so, the page shows 500 Internal Service page. Then I try to retrieve the error.log using ftp from my server to find wat other errors... my server seems to be timeout as well... then i reconnect and found the core file... however, no error was shown.

I do have many core dumps, and i have enable full article mode and not upgraded to latest version.
Title: Re: RSS Feeder
Post by: bloodfire on January 17, 2009, 07:58:05 AM
Quote from: A.SK on January 17, 2009, 07:40:54 AM
Quote from: bloodfire on January 16, 2009, 12:34:56 AM
Another thing I found... since using this mod.... I found core dump files in my server....

core.12437
core.24225
core.9285
core.6443

Does any1 getting these files? At first, I just delete them, ignoring it. Only just now, when I test this mod by 'run now' on the schedule tasks and abt 1 minute or so, the page shows 500 Internal Service page. Then I try to retrieve the error.log using ftp from my server to find wat other errors... my server seems to be timeout as well... then i reconnect and found the core file... however, no error was shown.

I do have many core dumps, and i have enable full article mode and not upgraded to latest version.

My advice... Download the updated mod and you won't get the dump core... however, I still get the 500 internal server error... but i guessed the limit this mod can gather the rss feed but then it gathered all the news.. hmmmm... no error shown in the error log...
Title: Re: RSS Feeder
Post by: SlammedDime on January 17, 2009, 08:10:37 AM
Quote from: bloodfire on January 17, 2009, 05:13:49 AM
I actually meant when the full article that is to be retrieve has <img>(s) in it not the feed with img tag in xml. :)
Can you give me a specific article that has images that I can use to test?  In my tests it worked okay.

Quote from: digger on January 17, 2009, 06:06:00 AM
Hi.
"Post Items In Single Topic" work perfect! Thanks. And I think no need to show "Source: ... " in every post in this case.
There is one problem with mod. In all posts tag <br> removed, and posts looks not so good.
I thought I had fixed the <br> problem, UNLESS, the site is not using xhtml <br />s... and just using <br>.  I didn't think of that.  I'll try and account for that next version.  As for source in every post, one thing that the API I use is capable of is 'MultiFeeds', which I may implement in the mod, where you can specify multiple feeds that can all post to the same topic.  I'm still learning more about the API and seeing what it can do.

Quote from: digger on January 17, 2009, 07:21:37 AM
Another problem.
Posts looks good when i start update task manually.
When it starts automatically Cyrillic characters looks like ?????????
Does the actual post have ? in it?  Can you link me to a specific article this happens with?

Quote from: A.SK on January 17, 2009, 07:40:54 AM
Quote from: bloodfire on January 16, 2009, 12:34:56 AM
Another thing I found... since using this mod.... I found core dump files in my server....

core.12437
core.24225
core.9285
core.6443

Does any1 getting these files? At first, I just delete them, ignoring it. Only just now, when I test this mod by 'run now' on the schedule tasks and abt 1 minute or so, the page shows 500 Internal Service page. Then I try to retrieve the error.log using ftp from my server to find wat other errors... my server seems to be timeout as well... then i reconnect and found the core file... however, no error was shown.

I do have many core dumps, and i have enable full article mode and not upgraded to latest version.
As said earlier, if you're getting core dumps with this mod, it is normally because of an invalid, or ambiguous regular expression that causes PHP to crash.  I think the latest builds of PCRE are having some issues, I've seen a lot of core dumps lately from PCRE.
Title: Re: RSS Feeder
Post by: bloodfire on January 17, 2009, 08:24:18 AM
Feed URL:
http://www.bt.com.bn/en/front/feed

Regular Expression:
~<h1 class="title">(.*)printer friendly version~siU

Example of the news from the rss website:
http://www.bt.com.bn/en/home_news/2009/01/14/imported_items_may_pose_threat_to_brunei_eco_system

This is what it gathered in my website
http://www.bruneimarket.co.cc/index.php/topic,1617.0.html

Title: Re: RSS Feeder
Post by: bloodfire on January 17, 2009, 08:36:20 AM
Quote from: bloodfire on January 17, 2009, 08:24:18 AM
Feed URL:
http://www.bt.com.bn/en/front/feed

Regular Expression:
~<h1 class="title">(.*)printer friendly version~siU

Example of the news from the rss website:
http://www.bt.com.bn/en/home_news/2009/01/14/imported_items_may_pose_threat_to_brunei_eco_system

This is what it gathered in my website
http://www.bruneimarket.co.cc/index.php/topic,1617.0.html



There's nothing wrong with the mod..it's getting the img... it's the url of the image in that the original website. The image is working fine.

My bad... I just try to modify the post to try to add the img manually... however... the img is in the post, it's the url of the img... the original url of the website have src of the image without it's full domain... the post is trying to find the img in my website...

In the post
[img]/en/files/images/photos/2009-01-14/13_envir.jpg[/img]

original from the website

<img src="/en/files/images/photos/2009-01-14/13_envir.jpg" alt="" title="" border="0" style="width:200px; height:auto;" />

now the problem is how to get the full url of the image heheehhe...
Title: Re: RSS Feeder
Post by: digger on January 17, 2009, 10:50:56 AM
Quote from: SlammedDime on January 17, 2009, 08:10:37 AM
Quote from: digger on January 17, 2009, 07:21:37 AM
Another problem.
Posts looks good when i start update task manually.
When it starts automatically Cyrillic characters looks like ?????????
Does the actual post have ? in it?  Can you link me to a specific article this happens with?

http://bash.org.ru/rss
Title: Re: RSS Feeder
Post by: SlammedDime on January 17, 2009, 12:33:13 PM
Quite odd... So if you run the task manually, the post turns out just fine, but if you let the scheduled task run as it should, then it goes crazy?
Title: Re: RSS Feeder
Post by: Lamarck on January 17, 2009, 12:41:50 PM
I don't know why,but in my forum (not the test site),It still cuts the text with spanish characters.But now,this only happens with post,not in the topic subject.

I uninstalled version 1.0.0 and deleted the data base tables (rss_feeds,log_rss and that colum in scheduled tasks) and then installed version 1.1.0.

It must be something related to the "upgrade",because I have no problems with spanish characters in my test site.I don't know what to do.
Title: Re: RSS Feeder
Post by: digger on January 17, 2009, 01:52:25 PM
Quote from: SlammedDime on January 17, 2009, 12:33:13 PM
Quite odd... So if you run the task manually, the post turns out just fine, but if you let the scheduled task run as it should, then it goes crazy?
yes
Title: Re: RSS Feeder
Post by: Lamarck on January 17, 2009, 06:29:41 PM
I have tested more,and if i let the scheduled task run by itself,I get 1 post of 3 correctly (I have set to 3 posts every time),and the other 2 with the problem in spanish characters.Any ideas?

EDIT:If I run it manually,every post has the problem with the characters  >:(
Title: Re: RSS Feeder
Post by: SlammedDime on January 17, 2009, 06:47:15 PM
I'll have to do more testing on that... it's quite odd that sometimes it works, and others it doesn't.  Seems to be a similar problem as digger has....
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 18, 2009, 03:56:19 AM
hmm ok boys...

here is something to think on:

QuoteAuthor : Bryan (IP: 67.177.216.184 , c-67-177-216-184.hsd1.co.comcast.net)
E-mail : [email protected]
URL    : http://www.grandmasterb.com
Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=67.177.216.184
Comment:
This is a Notice of Infringement as authorized in § 512(c) of the U.S. Copyright Law under the Digital Millennium Copyright Act (DMCA).
This article is an unauthorized reproduction of copyrighted material originally found at: GrandmasterB dot com (http://www.grandmasterb.com)
Please remove this article and others originally published by GrandmasterB dot com immediately or we will file an official complaint with the U.S. Copyright Office, FeedBurner and Google, Inc.  Google's response may include removing or disabling access to material claimed to be the subject of infringing activity and/or terminating subscribers.
Thank you,
Bryan Davis

i got this nice notice from this swell guy that called me a "scrapper" wth??  :o

is this going to be a serious issue or?? just wondering..  was using rss feed poster.. so.. i dont know..
Title: Re: RSS Feeder
Post by: KahneFan on January 18, 2009, 04:03:57 AM
I could be wrong, but as long as you reference the original source, shouldn't that be OK... especially if they are OFFERING a feed?
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 18, 2009, 04:12:51 AM
hmm well he is offereing, if anyone wants him.. but he needs to get his web design figured out..

not sure if you want his stuff or not but hey lmao

info is there.

im just wondering, is it or is it not illegal? hmm

and for him to call me a scraper?? gesh.. little sissy boy.. where is my whip??  >:(

Title: Re: RSS Feeder
Post by: SlammedDime on January 18, 2009, 05:05:04 AM
As stupid as it is, they are well within their rights to ask you to remove their content.  I don't understand why they would even want RSS feeds if they didn't want a way to get their info out....

Their loss I suppose.
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 18, 2009, 05:09:32 AM
i guess so too slammeddime.. and to be honest, im glad i did remove it..

for someone to be so ignorant of seo, site marketing etc., they should have taken it as a compliment..

least they could have done is drop me a pm or email on it.. the baby boi sent me 5 spams and then had his  lil friend post up a real manly comment too.. hmm..

Smoky strikes again.. lol..  O:)
Title: Re: RSS Feeder
Post by: SlammedDime on January 18, 2009, 05:21:00 PM
Those having the character problems, I think I've figured out the problem and why it works manually and why it doesn't normally... I'll have to work on this, as it's slightly complicated and I have to trace existing code and figure it out.

Edit: Okay, for anyone having character set problems, try this...

Open ScheduledTasks.php

Code (Find) Select

// Lets do this....
// First grab all of the enabled feeds...
$request = $smcFunc['db_query']('', '
SELECT f.id_feed, f.id_board, t.id_topic, f.icon, f.feedurl, f.postername, f.id_member, f.keywords, f.getfull, f.regex, f.locked, f.approve, f.singletopic, f.topicprefix, f.footer, f.numbertoimport
FROM {db_prefix}rssfeeds as f
LEFT JOIN {db_prefix}topics as t ON (t.id_topic = f.id_topic)
WHERE enabled = 1',
array()
);


Code (Add BEFORE) Select

loadEssentialThemeData();
$context['character_set'] = empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set'];


And see if that fixes the problem when it runs on it's own.
Title: Re: RSS Feeder
Post by: digger on January 18, 2009, 06:06:55 PM
Quote from: SlammedDime on January 18, 2009, 05:21:00 PM
And see if that fixes the problem when it runs on it's own.

Yes, it fixes the problem.

What about <br> tag ?
Title: Re: RSS Feeder
Post by: Lamarck on January 18, 2009, 08:30:57 PM
I have the same problem even with that "patch" >___<.
Title: Re: RSS Feeder
Post by: SlammedDime on January 18, 2009, 10:25:12 PM
I'm working on a better way to take care of the <br> issue... I tried just making my own function but I realized there was a bit more to do than what I was trying, so I'm trying to implement an 'end all' solution for any possibilty.

Lamarck - Can you link me to a topic on your board that has the problem??
Title: Re: RSS Feeder
Post by: bloodfire on January 18, 2009, 10:34:30 PM
Quote from: SmokyBlue on January 18, 2009, 05:09:32 AM
i guess so too slammeddime.. and to be honest, im glad i did remove it..

for someone to be so ignorant of seo, site marketing etc., they should have taken it as a compliment..

least they could have done is drop me a pm or email on it.. the baby boi sent me 5 spams and then had his  lil friend post up a real manly comment too.. hmm..

Smoky strikes again.. lol..  O:)

Well, all I can think is unless u just use the normal title, short description and link to them (similar to wat moreover.com is displaying for their free rss feeder), it should be alright and legal but if u're grabbing their full article and post it on your website without their permission regardless you have post a link back to them - they still have the right but debatable.

So, the best solution is ask for their permission for the full article grabbing to your website and post the approval on your website then... no more problem... eheheh this is wat i'll be doing before I launch my website :)
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 18, 2009, 10:52:00 PM
good thinking bloodfire, but that is what i had it set to..

no worries tho, and i hope people do learn from this.. ;)

Title: Re: RSS Feeder
Post by: Lamarck on January 19, 2009, 09:43:55 AM
Yes,for example:

http://silvanost.byethost31.com/foro/index.php?topic=478.0 (http://silvanost.byethost31.com/foro/index.php?topic=478.0)

or

http://silvanost.byethost31.com/foro/index.php?topic=477.0 (http://silvanost.byethost31.com/foro/index.php?topic=477.0)
Title: Re: RSS Feeder
Post by: SlammedDime on January 19, 2009, 10:13:56 AM
Something must be wrong with the Regular expression you're trying to use.  It worked just fine for me.  If you turn off the 'retrieve full article' option, does it work fine?

http://dev.ccwlaws.com/forum/index.php?topic=68.0

The regex I used is: ~<div id="cuerpo_noticia">(.*?)</div>~si
Title: Re: RSS Feeder
Post by: Lamarck on January 19, 2009, 10:43:46 AM
Ok,I tested it and without the retrieve full article option,It works.It don't work even with your regex if it's enabled.
Title: Re: RSS Feeder
Post by: Drivin and Cryin on January 19, 2009, 12:27:58 PM
Quote from: SlammedDime on January 16, 2009, 01:14:37 PM
Can you link me to which theme you are using?  This mod doesn't make any theme or template changes except to add information to the modifications.english.php, which only the default theme should have in it's language folder.

Sorry for the delay, i'm pretty sure the error was my fault.  I had 1.1.17 installed, and then i upgraded and in the process i forgot to change themes to one that's 2.0 beta 4 friendly.  The theme name was CleanBlue - http://custom.simplemachines.org/themes/index.php?lemma=874

I do have another question.  Is there a limit to the feed length that you can enter?  I've been testing it with ebay rss feeds with an affiliate id, and it strips them out.  When i go back to edit the feed, i notice that it's not all there and i'm guessing there's a character limit to the feed?  Is there any way around this?  Other than that, it's listing them okay, just without an aff id.

If there's a hard limit to the feed length, i may be able to get around this by using a yahoo pipe.  Not sure though, i'm still learning. 
Title: Re: RSS Feeder
Post by: SlammedDime on January 19, 2009, 12:32:43 PM
I think I may have limited it to 255 characters to avoid database bloat, but I'll double check when I get home.  Can you post a sample feed that you're using so I have something to test against?
Title: Re: RSS Feeder
Post by: Drivin and Cryin on January 19, 2009, 01:02:11 PM
Quote from: SlammedDime on January 19, 2009, 12:32:43 PM
I think I may have limited it to 255 characters to avoid database bloat, but I'll double check when I get home.  Can you post a sample feed that you're using so I have something to test against?

I was editing my post while you were replying.  How's that for customer service eh?  :D

Here's a feed with my aff id removed,  since ebay is touchy about posting this stuff on third party boards.  The feed will be the same except for the affid, and the fact that the returned links are  cgi.ebay.com instead of rover.ebay.com.  Keep in mind though that this feed can be MUCH larger than this sample when doing an advanced search and adding keywords to ignore, add bidding options, location options, buying preferences, bid numbers,  etc, etc, etc. 

For instance, a very basic search for  red corvette -

http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&floc=1&afmp=&sacqy=&sacat=-1&fcl=3&sacqyop=ge&satitle=red+corvette&sacur=0&frpp=50&sabfmts=0&dfsp=32&saprclo=&ftrt=1&ftrv=1&saprchi=&saobfmts=exsif&fss=0&catref=C5&saslc=0&saaff=afepn&from=R6&nojspr=y&saslop=1

If you'd like try a search yourself, you can do an advanced search on ebay and you'll see the form with a large number of options.  Go through that form,  hit search, and then on the results page, if you scroll to the bottom you'll see a tiny rss icon.  Right click on that then copy link location.  That will be the rss feed i'm using.

I know these long urls work well with simple pie, since i use that on another wordpress site to list some auctions.  And i think you mentioned you were using simple pie.
Title: Re: RSS Feeder
Post by: KahneFan on January 20, 2009, 12:53:23 AM
I just started getting this error for some reason...

Board structure corrupt: unable to find parent board
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 20, 2009, 02:57:45 AM
on the forum or in the error log??  :o
Title: Re: RSS Feeder
Post by: KahneFan on January 20, 2009, 03:15:34 AM
When I run it manually from scheduled tasks it gives me that error, which also shows up in the error log after displayed from the run.
Title: Re: RSS Feeder
Post by: SlammedDime on January 20, 2009, 05:12:28 AM
If you run 'Find and Repair errors' on your board, does it return anything having to do with your boards?

The error is not caused by the mod, but rather the update functions after a post is created....
Title: Re: RSS Feeder
Post by: 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.

The error is showing up in the error log every two hours, which is when I have the feeder running.
Title: Re: RSS Feeder
Post by: SlammedDime on January 20, 2009, 07:54:29 AM
In the database, is the feed's id_board set to 11?

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.
Title: Re: RSS Feeder
Post by: 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
Title: Re: RSS Feeder
Post by: SlammedDime on January 20, 2009, 01:16:01 PM
;)
Title: Re: RSS Feeder
Post by: rii on January 20, 2009, 07:44:16 PM
I thought I was fine with this mod after I installed it about three days ago, but I just logged in to the site today and found out that "RSS" menu tab has disappeared from the admin section. Although the existing feeds seemed going well in the forum, I was unable to modify the feeds becasue of its buttons were gone.

Then I visited the original mod page and downloaded the latest RSS feeder (rss_feeder_1.1.0.zip). However, as soon as I installed it, I got the error this message while redirecting to admin page:

Unknown column 'f.importcount' in 'field list'
File: /ManageSettings.php
Line: 2406

What am I missing? I have removed and reinstalled it again but still having the same issue.

Please help me.

Thank you.
Title: Re: RSS Feeder
Post by: SlammedDime on January 20, 2009, 07:52:05 PM
Your database has not been upgraded from the first version of the mod.  upload Upgrade.php from the mod package to your root smf directory and run it, then delete it, then try again.
Title: Re: RSS Feeder
Post by: rii on January 20, 2009, 08:14:23 PM
I removed it and ran the upgrade.php file. Then I reinstalled it. I don't get the similar text error, but the menu tab and buttons are blank and not clickable.

I don't know how this happened. Please advise me.

(Thank you for the quick response.)
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 20, 2009, 08:34:55 PM
if you are running a custom theme the file edits need to be done to that theme for your info to show..

see where you downloaded the mod from for the edits.. ;)
Title: Re: RSS Feeder
Post by: rii on January 20, 2009, 08:39:43 PM
I use the default theme and it worked fine for afew days and jst found this out today. I have a blank menu tab (for RSS) in Admin section that is not clickable too. If I go to that page manually, the two form buttons (for Edit and Delete) are blank and not working too.

Is this some type of file permission or language file issue?

Thank you.
Title: Re: RSS Feeder
Post by: SlammedDime on January 21, 2009, 05:13:30 AM
sounds like the language strings are missing from Modifications.english.php
Title: Re: RSS Feeder
Post by: Galedon on January 21, 2009, 09:57:54 AM
Hey

very nice mod :D

one question:

http://www.mmo-champion.com/index.php?type=rss;action=.xml;board=2.0;sa=news;

^^

this rss have many links inside - and html block´s - how can i import this with the mod correctly ?!

ths

PS: sorry for my bad english ;)
Title: Re: RSS Feeder
Post by: SlammedDime on January 21, 2009, 10:20:45 AM
I can't view the link here at work, so it'll have to wait until I get home, but have you tried importing yet?  What were the results?
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on January 22, 2009, 06:51:02 AM
you need to take that url you have, and go to:

http://www.feedburner.com

sign up for an account and then run the feed thru the agrevator.. then take that outcome and place it int hte leads for where you are trying to insert into smf.

the feed will show then ;)
Title: Re: RSS Feeder
Post by: choloman05 on January 22, 2009, 04:22:29 PM
Thanks very much for the mod.    I installed the mod on a 2.0 beta 4 site HERE (http://www.randallkehoelaw.com/SMF/index.php) and it doesn't seem to be posting anything. 

Do I just have to wait longer, or am is there something I'm not doing?

This is on a fresh install of 2.0, no mods, no custom theme, no errors either.        Thanks.
Title: Re: RSS Feeder
Post by: SlammedDime on January 22, 2009, 04:47:54 PM
By default it runs ever 6 hours... unless you edit the scheduled task to run in shorter increments.
Title: Re: RSS Feeder
Post by: Garry1953 on January 22, 2009, 05:46:05 PM
Hi
I just installed RSS Feeder and getting this error when I select from the admin area.

Maintenance / Scheduled Tasks / Run Now (Radio Button selected)

Fatal error: Call to undefined function: hash() in /home/xxxxxx/public_html/art-forum/Sources/ScheduledTasks.php on line 1701

I'm using SMF 2.0 Beta 4

Any ideas how to fix this?
Title: Re: RSS Feeder
Post by: choloman05 on January 22, 2009, 07:45:15 PM
Quote from: SlammedDime on January 22, 2009, 04:47:54 PM
By default it runs ever 6 hours... unless you edit the scheduled task to run in shorter increments.

Sorry, but where do I go to change that?   and thanks for the quick response.

EDIT:  nvm, lol, getting used to smf2.0 myself.
Title: Re: RSS Feeder
Post by: SlammedDime on January 22, 2009, 09:40:34 PM
Quote from: Garry1953 on January 22, 2009, 05:46:05 PM
Hi
I just installed RSS Feeder and getting this error when I select from the admin area.

Maintenance / Scheduled Tasks / Run Now (Radio Button selected)

Fatal error: Call to undefined function: hash() in /home/xxxxxx/public_html/art-forum/Sources/ScheduledTasks.php on line 1701

I'm using SMF 2.0 Beta 4

Any ideas how to fix this?
Awesome... I didn't realize that the 'hash' function was only available on PHP 5.1.2+, so I'll have to fix that...
Title: Re: RSS Feeder
Post by: Garry1953 on January 22, 2009, 10:59:06 PM
SlammedDime
Thanks.

I'll wait for your next release.
Title: Re: RSS Feeder
Post by: KahneFan on January 23, 2009, 06:07:40 PM
Maybe something to look into for your next version:

If you delete the board that the feeds go to... it deletes the feeds all together as well. For instance, I added about 40 feeds and directed them to a board. In order to easily delete the feeds brought through so I could start over, I deleted the board... which deleted all 40 feeds as well :o

Is there a way so that you can make it so that if the board is deleted the feeds are just disabled or something of that nature? Now I will need to rebuild all 40 feeds :(
Title: Re: RSS Feeder
Post by: SlammedDime on January 23, 2009, 09:23:23 PM
The feeds are still in the database.... probably not displayed though... There is no code that would remove the feeds from the database when a board is deleted, but if I do remember correctly, the feeds are only displayed if they have a valid board, because of the SQL query used.

I'll keep in mind some different ways of accounting for deleted boards though... thanks.
Title: Re: RSS Feeder
Post by: KahneFan on January 24, 2009, 12:04:39 AM
That would explain why my feeds were being doubled. I entered them twice since I thought they were gone.

(note to SD in case people mention double posts in future)
Title: Re: RSS Feeder
Post by: rii on February 01, 2009, 07:36:57 PM
My RSS Feed is working well after the reinstallation. Thank you.

I now want to modify it. Please let me know how to take care of these:

- I want to exclude an extra title, time stamp and Source link from the automatic posts. How can I do this?

- There is a large extra space between the top post title and horizontal line. This is actually caused by the SMF but I don't know which file to look at. I use default theme. Is this in css file or php file?


Please help me.

Thank you.
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on February 02, 2009, 02:36:08 AM
Quote from: bloodfire on January 17, 2009, 07:58:05 AM
Quote from: A.SK on January 17, 2009, 07:40:54 AM
Quote from: bloodfire on January 16, 2009, 12:34:56 AM
Another thing I found... since using this mod.... I found core dump files in my server....

core.12437
core.24225
core.9285
core.6443

Does any1 getting these files? At first, I just delete them, ignoring it. Only just now, when I test this mod by 'run now' on the schedule tasks and abt 1 minute or so, the page shows 500 Internal Service page. Then I try to retrieve the error.log using ftp from my server to find wat other errors... my server seems to be timeout as well... then i reconnect and found the core file... however, no error was shown.

I do have many core dumps, and i have enable full article mode and not upgraded to latest version.

My advice... Download the updated mod and you won't get the dump core... however, I still get the 500 internal server error... but i guessed the limit this mod can gather the rss feed but then it gathered all the news.. hmmmm... no error shown in the error log...

I was not using it for long time, deactivated all the rss i have configured.

After a Month i have 38 core dump files with 40 mb sized file each.

So now i was really worried that could i able to delete them or not.

Any suggestions on it. I have not upgraded this mod as said by bloodfire.
Title: Re: RSS Feeder
Post by: SlammedDime on February 02, 2009, 04:57:45 AM
rii - As for modifying how the post is created, you'll have to look in ScheduledTasks.php in the rss_feeder() function at the bottom and modify the $message variable.

As for the CSS issue, I'm not sure on that.  I developed this on RC1 which didn't have that problem.

A.SK - if you're still getting core dumps after disabling the rss feeds, then the problem is not with the mod... Can you delete them?  Yes, no harm in doing that.
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on February 02, 2009, 05:58:49 AM
Quote from: SlammedDime on February 02, 2009, 04:57:45 AM

A.SK - if you're still getting core dumps after disabling the rss feeds, then the problem is not with the mod... Can you delete them?  Yes, no harm in doing that.

Hi SlammedDime.

I have deleted the core dump files.

And these dumps were created on 16 & 17th Jan during i was using RSS Mod.
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on February 02, 2009, 06:48:38 AM
those dump files could also come from the server having a memory loss as well..

i'd have your host check his server and see what is said, if you are still having the issue.. ;)
Title: Re: RSS Feeder
Post by: Drivin and Cryin on February 02, 2009, 08:31:09 PM
I'm getting a ton of errors in my error log from simplepie.  On the forum, it seems to be working alright, but it's building a huge error log.  Is it because of the feeds i've set up?  I'm using yahoo pipes for some of the feeds  in order to get them to work with your mod.  Maybe that's why?  I'm clueless when it comes to programming.


here's a very small sample of the errors.   


[02-Feb-2009 16:32:03] PHP Strict Standards:  is_a(): Deprecated. Please use the instanceof operator in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 1729
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::get_curl_version() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 7713
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::get_curl_version() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 7725
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::xml_encoding() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 1833
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::change_encoding() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 1852
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 9179
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 9180
[02-Feb-2009 16:32:03] PHP Strict Standards:  is_a(): Deprecated. Please use the instanceof operator in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 8683
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Parse_Date::get() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 3652
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::absolutize_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 13699
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::parse_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 8779
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::compress_parse_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 8837
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::normalize_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 8843
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::percent_encoding_normalization() cannot be called statically in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 9103
[02-Feb-2009 16:32:03] PHP Strict Standards:  Non-static method SimplePie_Misc::percent_encoding_normalization() cannot be called statically in /home/xxxxxxx/public_html/yyyyyyy/forum/Sources/Subs-Rss.php on line 9103

Title: Re: RSS Feeder
Post by: SlammedDime on February 02, 2009, 08:47:33 PM
If you have the option of changing php.ini settings, or the error reporting level of PHP, change it to E_ALL, instead of E_STRICT.

I don't have the time or man power to navigate someone else's code and try to fix those errors, and they're not errors that are really worth fixing at this point time.

As for the very first one about is_a being deprecated, it has been undeprecated as of php 5.3, so I don't see a point in adjusting that line of code either, but all of the errors will go away if you adjust your reporting level to E_ALL.

If you have no clue about adjusting the error reporting level, ask your host to adjust it, or you can just ignore them.
Title: Re: RSS Feeder
Post by: Drivin and Cryin on February 02, 2009, 09:13:09 PM
Quote from: SlammedDime on February 02, 2009, 08:47:33 PM
If you have the option of changing php.ini settings, or the error reporting level of PHP, change it to E_ALL, instead of E_STRICT.

I don't have the time or man power to navigate someone else's code and try to fix those errors, and they're not errors that are really worth fixing at this point time.

but all of the errors will go away if you adjust your reporting level to E_ALL.

If you have no clue about adjusting the error reporting level, ask your host to adjust it, or you can just ignore them.


I'm not sure how to do it, but i'll figure it out eventually, i just needed a direction to look into.  I normally wouldn't worry about it, but it grows about 10 meg/day.  I'd like to eliminate that.

thanks again.
Title: Re: RSS Feeder
Post by: webhosting123 on February 02, 2009, 11:02:21 PM
i install RSS Feed Poster in SMf 1.1.7 and create many rss feed post but not show they post in my forum.
why?
Title: Re: RSS Feeder
Post by: SlammedDime on February 03, 2009, 04:58:54 AM
This mod is for 2.0... if you have vb's mod for 1.1.7, you'll need to ask in that topic for support, not here: http://www.simplemachines.org/community/index.php?topic=141776.0
Title: Re: RSS Feeder
Post by: Rbbn39 on February 03, 2009, 05:16:47 PM
I have tried to use the SMF Feeder at my  SMF 2.0 beta 4 forum. www.voetbaltalk.nl/index.php I always tried to import te RSS file www.tcof.nl/rssn.php. You see it at many forums, but always the oldest post on the site, is the newest one one the forum.

I tried already to change some things in de PHP files. But always I got the same problem. For me it is important that the forum can be online tomorrow. So does someone here have a solution for this problem?

(Sorry for the bad English, I live in Belgium so I do not speak it every day)
Title: Re: RSS Feeder
Post by: SlammedDime on February 03, 2009, 06:11:45 PM
I'll look in the SimplePie() code and see if it's possible... i'm not entirely sure that it is without turning the script into a memory hog...

Edit: It is possible to do with existing methods in SimplePie, but I'm not sure I can have a solution for you by tomorrow.  Unfortunately it's not entirely simple, no pun intended.
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue 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..  ;)
Title: Re: RSS Feeder
Post by: rii on February 03, 2009, 09:13:55 PM
Thank for the advice. I removed the unwanted lines from that file.

I use CDATA in XML file to take care of html codes and auto post it to the forum but the word [CDATA [ is also display in the post. Do you know why?

For example - I have this in my xml file:
<description><![ CDATA [ blah blah blah ]]</description>

After it posted, the code CDATA is also displayed like this:
[CDATA [ blah blah blah ]]

The forum is working functioned with other code but I don't know why CDATA is not working for me. The post works fine too.

Please help.

Thank you.

Quote from: SlammedDime on February 02, 2009, 04:57:45 AM
rii - As for modifying how the post is created, you'll have to look in ScheduledTasks.php in the rss_feeder() function at the bottom and modify the $message variable.

As for the CSS issue, I'm not sure on that.  I developed this on RC1 which didn't have that problem....
Title: Re: RSS Feeder
Post by: SlammedDime on February 03, 2009, 09:47:44 PM
Can you link to the XML file that your specifically working with?
Title: Re: RSS Feeder
Post by: rii on February 03, 2009, 11:49:28 PM
I have attached it to this message.


Thank you.
Title: Re: RSS Feeder
Post by: 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 ]]>
Title: Re: RSS Feeder
Post by: 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.
Title: Re: RSS Feeder
Post by: 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.

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 ]]>
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on February 04, 2009, 11:25:36 PM
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
Title: Re: RSS Feeder
Post by: 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?
Title: Re: RSS Feeder
Post by: PJC2006 on February 05, 2009, 10:52:02 AM
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?


Title: Re: RSS Feeder
Post by: SlammedDime on February 05, 2009, 10:55:11 AM
You'll have to go into the database and make the change manually for that feed in the rssfeeds table.
Title: Re: RSS Feeder
Post by: PJC2006 on February 05, 2009, 11:01:54 AM
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
Title: Re: RSS Feeder
Post by: SlammedDime on February 05, 2009, 11:33:22 AM
If you can wait a couple of hours, I'll release a new version that will take care of this... :)
Title: Re: RSS Feeder
Post by: PJC2006 on February 05, 2009, 11:52:34 AM
wow... Thanks

:D
Title: Re: RSS Feeder
Post by: SlammedDime on February 05, 2009, 02:12:08 PM
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
Title: Re: RSS Feeder
Post by: SlammedDime on February 05, 2009, 04:22:01 PM
Ok, I've updated it to 1.1.1... hopefully I've covered the bugs found.... and didn't make any more
Title: Re: RSS Feeder
Post by: Teunel on February 06, 2009, 01:49:13 PM
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!
Title: Re: RSS Feeder
Post by: rii on February 06, 2009, 04:25:43 PM
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?
Title: Re: RSS Feeder
Post by: SlammedDime on February 06, 2009, 05:23:14 PM
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() : '';
Title: Re: RSS Feeder
Post by: rii on February 06, 2009, 06:38:57 PM
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.
Title: Re: RSS Feeder
Post by: SlammedDime on February 06, 2009, 07:08:26 PM
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.
Title: Re: RSS Feeder
Post by: SlammedDime on February 07, 2009, 12:32:12 PM
Yea, sorry, I forgot the find and replace attributes on the code tags.
Title: Re: RSS Feeder
Post by: Teunel on February 08, 2009, 05:15:38 PM
Already found it, it works! Thanks! :D
Title: Re: RSS Feeder
Post by: Jimi1810 on February 09, 2009, 04:56:19 AM
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

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

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
Title: Re: RSS Feeder
Post by: 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

Is there any solution or requirement to get RSS Feeder woking on? thanks.........
Title: Re: RSS Feeder
Post by: Jimi1810 on February 09, 2009, 07:22:56 AM
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

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.
Title: Re: RSS Feeder
Post by: Dark-Master on February 09, 2009, 07:27:26 AM
Quote from: Jimi1810 on February 09, 2009, 07:22:56 AM
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

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.

Big thanks to you, it works now. :D
Title: Re: RSS Feeder
Post by: Smoky "Rider" Blue on February 09, 2009, 07:30:20 AM
thanks Jimi..

if you have noticed, slameddime is keeping up with the rss mod.. and doing very well.. takes a bit of reading for the mod.. but im sure you guys can do.. and glad you helped him out..

cheers ;)
Title: Re: RSS Feeder
Post by: SlammedDime on February 09, 2009, 10:18:03 AM
Thanks for the help Jimi... anyone is welcome to help with support... helps me out for sure. :)  As for your issue, I'll look at it when I get home from work... thanks for posting the feed to look at.
Title: Re: RSS Feeder
Post by: Jimi1810 on February 09, 2009, 10:22:17 AM
Okay no problem, and thanks I would appreciate that  :)
Title: Re: RSS Feeder
Post by: Dark-Master on February 09, 2009, 11:40:58 PM
Hello, I still don't understand about regex....if I want to get a full article from some website. What do I need to check on the webpage about regex?

Could you please give me some example. Sorry to ask this kind of favor, but I'm really new to regex. :D

ex:
http://www.gotfrag.com/cs/story/43829/
http://www.gotfrag.com/cs/story/43826/
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 02:02:21 AM
Hi,

Great mod!
I do have one issue do:
Alltough the task is sheduled to run every 2 minutes, it doesn't import the feed right away, only after a long time. A local installed program 'feedreader' fetches the feed almost instantly, so the error is not in the feed.

Is there any delay for fetching? Is there some string I can change?
Title: Re: RSS Feeder
Post by: SlammedDime on February 11, 2009, 05:00:11 AM
Scheduled tasks run based on visits to your forum.... if you get one hit to your site every 5 minutes... or maybe even every 10 minutes because you do not have a busy site, the scheduled task will run every 5 or 10 minutes, if you have it set to less than that.  If you have a busy site, or one that gets a lot of hits every minute, then the scheduled task will run every 2 minutes.  It's just the nature of how SMF's scheduled tasks run.
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 05:20:49 AM
The tasklog says that the job is executed several times:
RSS Feeder  Vandaag om 09:25:18  0 seconden
RSS Feeder Vandaag om 09:23:18 0 seconden
RSS Feeder Vandaag om 09:21:12 0 seconden
RSS Feeder Vandaag om 09:20:07 0 seconden
RSS Feeder Vandaag om 09:17:56 0 seconden
RSS Feeder Vandaag om 09:15:50 0 seconden
RSS Feeder Vandaag om 09:13:32 0 seconden


while there are 2 feeds who have been fetched after more than one hour:
http://forum.cindyenguy.be/index.php/topic,2675.msg132982.html#msg132982
http://forum.cindyenguy.be/index.php/topic,2675.msg132986.html#msg132986

Why is the feed not fetched earlier?
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 07:31:00 AM
Another one:
feed created at 12:35 imported in SMF at 13:25 while the task has run several times:

RSS Feeder  Vandaag om 13:27:56  0 seconden
RSS Feeder Vandaag om 13:25:51 0 seconden
RSS Feeder Vandaag om 13:23:14 0 seconden
RSS Feeder Vandaag om 13:21:12 0 seconden
RSS Feeder Vandaag om 13:20:04 0 seconden
RSS Feeder Vandaag om 13:17:56 0 seconden
RSS Feeder Vandaag om 13:15:47 0 seconden
RSS Feeder Vandaag om 13:13:42 0 seconden
RSS Feeder Vandaag om 13:11:29 0 seconden
RSS Feeder Vandaag om 13:09:21 0 seconden
RSS Feeder Vandaag om 13:07:14 0 seconden
RSS Feeder Vandaag om 13:05:08 0 seconden
RSS Feeder Vandaag om 13:04:01 0 seconden
RSS Feeder Vandaag om 13:01:50 0 seconden
Goedkeuringsnotificaties Vandaag om 13:01:24 0 seconden
RSS Feeder Vandaag om 12:59:34 0 seconden
RSS Feeder Vandaag om 12:58:30 0 seconden
RSS Feeder Vandaag om 12:55:38 0 seconden
RSS Feeder Vandaag om 12:53:17 0 seconden
RSS Feeder Vandaag om 12:51:15 0 seconden
RSS Feeder Vandaag om 12:50:06 0 seconden
RSS Feeder Vandaag om 12:47:48 0 seconden
RSS Feeder Vandaag om 12:45:47 0 seconden
RSS Feeder Vandaag om 12:44:26 0 seconden
RSS Feeder Vandaag om 12:41:54 0 seconden
RSS Feeder Vandaag om 12:39:31 0 seconden
RSS Feeder Vandaag om 12:38:18 0 seconden
RSS Feeder Vandaag om 12:35:58 0 seconden
RSS Feeder Vandaag om 12:33:48 0 seconden
RSS Feeder Vandaag om 12:31:46 0 seconden
Title: Re: RSS Feeder
Post by: SlammedDime on February 11, 2009, 08:00:51 AM
What do you have set for the number of items to import each time the feed runs?
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 09:31:51 AM
0 = all

any ideas?
Title: Re: RSS Feeder
Post by: SlammedDime on February 11, 2009, 10:25:23 AM
Any errors in the forum error log related to the mod?
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 10:28:46 AM
Nope, none at all.

Does the mod remembers when he last fetched an feed?
Is there any setting for the frequency of fetching other than the sheduled task?
Title: Re: RSS Feeder
Post by: SlammedDime on February 11, 2009, 10:33:26 AM
It keeps track of when a feed was last fetched, but it isn't used for anything at this point.  It does, however, cache feeds for 2 hours, so if the feed changes that rapidly, it may not update.  It trys to use 'Smart Caching' to where it will detect if the feed has changed or not, but that is assuming that the feed is set to send the proper headers.  When I get home from work, I'll post some code you can use to disable the caching to see if that helps.
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 11, 2009, 10:35:10 AM
OK, thank you!
Title: Re: RSS Feeder
Post by: gffb on February 12, 2009, 12:53:51 PM
tried to install on fresh 2.0 RC1 install and get the following screen. (see image)
Title: Re: RSS Feeder
Post by: SlammedDime on February 12, 2009, 01:03:24 PM
If you tried clicking the 'Install Now' link from the Package browser in SMF, there is a bug in that.  You'll need to download the mod from the mods page here and then upload it to your site from the 'Download Packages' screen in your admin panel.
Title: Re: RSS Feeder
Post by: gffb on February 12, 2009, 01:04:50 PM
That is what I did downloaded to my local pc then went in to my admin and ulpoaded from my pc to server then the error came up?
Title: Re: RSS Feeder
Post by: SlammedDime on February 12, 2009, 01:06:45 PM
Could be a software firewall on your computer causing an issue... open the file up on your local pc (you'll need something like 7 zip or Winrar) and make sure the files are there.  I just tested downloading from the mod site then uploading and it worked fine for me.


Guy - Open up ScheduledTasks.php and find the following:

      $rss_data->set_cache_location($cachedir);
      $rss_data->set_cache_duration(60*60*2); // 2 hours

and add this AFTER that.

      $rss_data->enable_cache(false);
Title: Re: RSS Feeder
Post by: gffb on February 12, 2009, 01:10:19 PM
This is the first mod that this has happened to so I am not sure about it being a firewall issue, however as you have asked I opened the file and winzip asked to decompress it to a temp folder and  inside the rss_feeder_1.1.1.tar.gz file was the following.(image)
Title: Re: RSS Feeder
Post by: gffb on February 12, 2009, 01:11:23 PM
Can I suggest that you make a zip version please and see if its my server thats causing the issue?
Title: Re: RSS Feeder
Post by: gffb on February 12, 2009, 01:26:05 PM
Ok I solved this issue by extracting all the files to my local PC then making a .ZIP file and uploading that.
Title: Re: RSS Feeder
Post by: Jimi1810 on February 12, 2009, 04:04:57 PM
Quote from: Jimi1810 on February 09, 2009, 04:56:19 AM
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

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

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

Sorry don't mean to be a pain SlammedDime, but have you had a chance to check this out at all?
Title: Re: RSS Feeder
Post by: SlammedDime on February 13, 2009, 11:14:13 AM
Jimi- I've started looking into it... it looks like the regex is okay, so simple pie is doing it's job, it must be something with the code I wrote, i'll have to dig through it a bit more.
Title: Re: RSS Feeder
Post by: Jimi1810 on February 13, 2009, 12:39:34 PM
Thanks again, I appreciate your help :)
Title: Re: RSS Feeder
Post by: rii on February 14, 2009, 02:39:58 AM
I would like to limit the length of the post titles. I have some article items with very long names. I just want them to be shown up about 20 characters only.

Please help me.


Thank you.
Title: Re: RSS Feeder
Post by: MrSandman on February 14, 2009, 11:35:04 AM
is this limited to 1 page of feeds? i have filled 1 page and cannot add anymore feeds? any ideas/suggestions
Title: Re: RSS Feeder
Post by: SlammedDime on February 14, 2009, 02:43:16 PM
rii - you'll have to modify the relevant code in ScheduledTasks.php, search for $subject =


MrSandman - What happens when you try to add another one?  Does it just not show up?  It should show multiple page selections at the top.
Edit, I found the problem, damn...  I'll release a new version in the next day or two to solve the issue.
If you want to fix it yourself for the time being (you'll have to reverse the change to upgrade or uninstall)
Open ManageSettings.php
Code (Find) Select
list($numFeeds) = $smcFunc['db_fetch_row'];

Code (Replace) Select
list($numFeeds) = $smcFunc['db_fetch_row']($request);
Title: Re: RSS Feeder
Post by: MrSandman on February 14, 2009, 02:59:04 PM
Quote from: SlammedDime on February 14, 2009, 02:43:16 PM

Edit, I found the problem, damn...  I'll release a new version in the next day or two to solve the issue.
If you want to fix it yourself for the time being (you'll have to reverse the change to upgrade or uninstall)
Open ManageSettings.php
Code (Find) Select
list($numFeeds) = $smcFunc['db_fetch_row'];

Code (Replace) Select
list($numFeeds) = $smcFunc['db_fetch_row']($request);



thanks. great mod by the way
Title: Re: RSS Feeder
Post by: derby on February 14, 2009, 04:26:53 PM
@poster pls how do i add it to my forum smf 1.1.8 step by step manual pls
Title: Re: RSS Feeder
Post by: MrSandman on February 14, 2009, 04:31:01 PM
Quote from: MrSandman on February 14, 2009, 02:59:04 PM
Quote from: SlammedDime on February 14, 2009, 02:43:16 PM

Edit, I found the problem, damn...  I'll release a new version in the next day or two to solve the issue.
If you want to fix it yourself for the time being (you'll have to reverse the change to upgrade or uninstall)
Open ManageSettings.php
Code (Find) Select
list($numFeeds) = $smcFunc['db_fetch_row'];

Code (Replace) Select
list($numFeeds) = $smcFunc['db_fetch_row']($request);



thanks. great mod by the way

I made the change and am still only allowed 40 feeds. it does show "The feed was created successfully "
but then the feed is not listed. still only have 1 page of 40 feeds.
Title: Re: RSS Feeder
Post by: MrSandman on February 14, 2009, 04:44:27 PM
never mind. its working fine now. i forgot to save my changes. LOL

thanks again
Title: Re: RSS Feeder
Post by: SlammedDime on February 14, 2009, 06:26:00 PM
Quote from: derby on February 14, 2009, 04:26:53 PM
@poster pls how do i add it to my forum smf 1.1.8 step by step manual pls
Upgrade to SMF 2.0.

This does not support 1.1.8, nor will it ever.  Sorry.
Title: Re: RSS Feeder
Post by: rii on February 14, 2009, 06:37:53 PM
Thank you for the response. I tried it like this in ScheduledTasks.php file. No error but not happening yet. The inserted lines are between //Test subject/title length comments.



// Might have to update the subject for the single topic people

$subject = (!empty($feed['topic_prefix']) ? $feed['topic_prefix'] . ' ' : '') . (!empty($feed['single_topic']) && empty($feed['topic_id']) && !empty($feed_title) ? $feed_title : $title);

//start Test subject/title length
$lengthnew=20;
$subjectnew= substr($subject, 0, $lengthnew);
//end Test subject/title length

// Create the message/topic/poster options and insert the topic on the board
$msgOptions = array(
'subject' => $subjectnew,
'body' => $message,
'approved' => !$feed['require_approval'],
'smileys_enabled' => false,
'icon' => $feed['icon'],
);


Can you look into this one?

Thanks.
Title: Re: RSS Feeder
Post by: SlammedDime on February 14, 2009, 07:01:51 PM
I don't see an issue with it... not sure why it wouldn't be working.  Is it still posting the regular length subject?
Title: Re: RSS Feeder
Post by: rii on February 14, 2009, 07:14:56 PM
Yes. It works on the forum subject only but not on RSS block. Can you please test it on yours?

Thanks.
Title: Re: RSS Feeder
Post by: SlammedDime on February 14, 2009, 10:14:54 PM
It works like it should for me.  Are you sure you saved your changes to the file?
Title: Re: RSS Feeder
Post by: NHWD on February 14, 2009, 10:21:29 PM
Quote from: SlammedDime on February 14, 2009, 06:26:00 PM
Quote from: derby on February 14, 2009, 04:26:53 PM
@poster pls how do i add it to my forum smf 1.1.8 step by step manual pls
Upgrade to SMF 2.0.

This does not support 1.1.8, nor will it ever.  Sorry.
just wondering but why not?
Title: Re: RSS Feeder
Post by: SlammedDime on February 14, 2009, 10:26:05 PM
Quote from: CL0WNER on February 14, 2009, 10:21:29 PM
Quote from: SlammedDime on February 14, 2009, 06:26:00 PM
Quote from: derby on February 14, 2009, 04:26:53 PM
@poster pls how do i add it to my forum smf 1.1.8 step by step manual pls
Upgrade to SMF 2.0.

This does not support 1.1.8, nor will it ever.  Sorry.
just wondering but why not?
It would be far too difficult to backport and would require a lot of recoding and I don't have the time for it, nor do I plan on running any new sites of my own on the 1.1 line of SMF.  I don't normally do mods because other's need them, I do them because I need the functionality for one of my sites, so I choose to release my work because I know others will probably benefit from it.  It also uses a lot of 2.0 specific functions to perform tasks, so I would have to rewrite it to manually support what 2.0 does for me.  Not to mention the scheduled tasks portion.  And vbgamer wrote a similar mod to this for the 1.1 series, although he is no longer supporting it.
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 15, 2009, 02:28:47 AM
Any solution yet for http://www.simplemachines.org/community/index.php?topic=285356.msg1926488#msg1926488 ?
Title: Re: RSS Feeder
Post by: SlammedDime on February 15, 2009, 05:12:07 AM
Quote from: SlammedDime on February 12, 2009, 01:06:45 PM
Could be a software firewall on your computer causing an issue... open the file up on your local pc (you'll need something like 7 zip or Winrar) and make sure the files are there.  I just tested downloading from the mod site then uploading and it worked fine for me.


Guy - Open up ScheduledTasks.php and find the following:

      $rss_data->set_cache_location($cachedir);
      $rss_data->set_cache_duration(60*60*2); // 2 hours

and add this AFTER that.

      $rss_data->enable_cache(false);

Title: Re: RSS Feeder
Post by: Guy Verschuere on February 15, 2009, 06:04:31 AM
Oops, guess I haven't seen that post. Sorry.

Doesn't do it. The posts are still not imported right away.
I allready had disabled cache werever I could in Sub-Rss.php and changed times from 3600 to 300 seconds.

Any other ideas?
Title: Re: RSS Feeder
Post by: chifliiiii on February 15, 2009, 02:31:31 PM
I tried with 2 diferent feeds and im getting similar error in both.
Feeds urls are:
http://www.noticiasdot.com/feed/
http://www.kriptopolis.org/rss
and the errors shown on logs are

Apply Filter: Only show the errors with the same message
RSS Feeder: http://www.noticiasdot.com/feed/ (cURL error 28: connect() timed out!)

Apply Filter: Only show the errors with the same message
RSS Feeder: http://www.kriptopolis.org/rss (cURL error 6: name lookup timed out)

I tried them by running the shedule task and waiting it for running auto. Any clue?
Title: Re: RSS Feeder
Post by: SlammedDime on February 15, 2009, 06:16:02 PM
I can't do anything about those errors chifliiiii - I more or less allowed them to be thrown so users could see what is wrong with the feed.  It has nothing to do with the mod.  I'd suggest doing a google search for those cURL errors for more information on what they mean.  I would only guess that on the first one, the feed took too long to respond, so it timed out.  The second one looks like it couldn't lookup the hostname properly, which would lead to a bad DNS configuration of your host.

Guy - I'm not really sure then why it's not working.  I've never had an issue with a feed not posting every 2 minutes on a scheduled task like it should.  The only thing I can think of is that the script is timing out after 300 seconds and only importing so many, but then you'd see php errors related to that. Sorry, I'm not really sure where to go on that.
Title: Re: RSS Feeder
Post by: Guy Verschuere on February 16, 2009, 06:37:12 AM
It works! Thanks!

The problem was that I didn't add
Quoteand add this AFTER that.

      $rss_data->enable_cache(false);
because that line was above it.
Since I moved that line under the others it works great!

Maybe it would be a good option to set cache expiry and feed interval in the feed settings.
Title: Re: RSS Feeder
Post by: TheDisturbedOne on February 23, 2009, 07:46:16 PM
SlammedDime, maybe you can help me with this.  How do I add a feed?  I have spent the last 30 minutes trying to find the area :(
Thanks
Title: Re: RSS Feeder
Post by: SlammedDime on February 23, 2009, 08:18:21 PM
You should have automagically been redirected to the admin interface after installing, unless you clicked elsewhere.

It's under Configuration > Modifications > RSS Feeder
Title: Re: RSS Feeder
Post by: Killer-B on February 25, 2009, 06:10:45 AM
Quote from: SlammedDime on January 13, 2009, 01:13:16 PM
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)

Great Mod SlammedDime... Works like a charm straight out of the box on www.f-1chat.com ... using over 20+ RSS Feeds (with specifics) and does a steller job... thanks!

That said, I too am wanting to pull the full article if possible - I've been researching PCRE - and since I'm not the best coder in the world - am truly lost as to proper syntax -

Is there a PCRE guide for dummies out there?? I've searched the SMF boards and google  - and lots and lots of code out there... just nothing that says "do this, to get that" kind of thing -

Sorry to ask such a stupid Q - but am new to this... and trying to wrap my brain around it all (PCRE) - any resources you can point me to?

Thanks -

KB

PS: Well that didn't link to the forum I wanted it to ... so let me offer another example -

This is a RSS Feed with a photo attached http://f-1chat.com/forum/index.php/topic,214.0.html
and as you can see, the article got cut...

So, if I'm looking for the PCRE "code" to be able to show all that bit -- hope that clarifies... TIA
Title: Re: RSS Feeder
Post by: DirtRider on February 25, 2009, 09:17:29 AM
Well let me say this is one great mod and well done on this one. Not sure if this would be at all possible to add as a feature but how about the ability for members to ignore post made by the feeder if they want to. Something in their profile like an ignore RSS feeds
Title: Re: RSS Feeder
Post by: Killer-B on February 26, 2009, 04:29:59 PM
PCRE anyone? *bump*
Title: Re: RSS Feeder
Post by: SlammedDime on February 27, 2009, 02:53:55 AM
I'm currently at a meeting with other SMF teamies and only have a 56K connection to work with, so unfortunately I can't do much until I get home Saturday afternoon.
Title: Re: RSS Feeder
Post by: Killer-B on February 27, 2009, 02:56:35 AM
Quote from: SlammedDime on February 27, 2009, 02:53:55 AM
I'm currently at a meeting with other SMF teamies and only have a 56K connection to work with, so unfortunately I can't do much until I get home Saturday afternoon.

No problemo - just wanted to see if anyone was still at home :P

We'll pick it up SAT if you're free...

Thanks -!

KB
Title: Re: RSS Feeder
Post by: nikku on March 01, 2009, 10:41:31 AM
is working. thx. I just dont know how to pull the entire blog feed from blogger.
Title: Re: RSS Feeder
Post by: SlammedDime on March 01, 2009, 02:44:02 PM
Ok... the phrase 'not working', or 'not importing' doesn't give any detail... any errors in your error log?  That feed takes quite a while to load... it may not work with the mod... PHP will only run for so long before timing out, so I have to set a delay that if the feed doesn't return anything fast enough, it times out.

Killer-B - did you see the link in the first post of this topic that links to another post in this same topic on how I came up with, or come up with the regex to use?  Your particular feed might prove difficult because of all of the extra stuff at the top of the article, like the pictures and captions.
Title: Re: RSS Feeder
Post by: nikku on March 01, 2009, 03:03:31 PM
I guess is working now. i forgot the schedule  :-X

http://www.ipergames.com/forum/index.php/topic,681.0.html


but... i cannot make links for download to be clickable. i enabled html for posts but seems that i cannot make to click on download.

question please:

anyone know how to pull entire feeds from a blog from blogger ?

http://pes-patch.blogspot.com/feeds/posts/default?alt=rss     

feeds/posts/default?alt=rss      get only the last ones... from the day ?
Title: Re: RSS Feeder
Post by: Killer-B on March 01, 2009, 03:18:29 PM
Quote from: SlammedDime on March 01, 2009, 02:44:02 PM

Killer-B - did you see the link in the first post of this topic that links to another post in this same topic on how I came up with, or come up with the regex to use?  Your particular feed might prove difficult because of all of the extra stuff at the top of the article, like the pictures and captions.

I read the first 4 pages... then honestly skipped to the end, as there was no discussion about it (not on "search" for PCRE) - but will look more... as I do not know about REGEX either...

I'll understand if it doesn't pull all the data per the example I gave - but I'd like to at least learn the proper syntax and give it a try....

Thanks for the response -

KB
Title: Re: RSS Feeder
Post by: Killer-B on March 01, 2009, 03:21:02 PM
Quote from: nikku on March 01, 2009, 03:03:31 PM
I guess is working now. i forgot the schedule  :-X

http://www.ipergames.com/forum/index.php/topic,681.0.html


but... i cannot make links for download to be clickable. i enabled html for posts but seems that i cannot make to click on download.

question please:

anyone know how to pull entire feeds from a blog from blogger ?

http://pes-patch.blogspot.com/feeds/posts/default?alt=rss    

feeds/posts/default?alt=rss      get only the last ones... from the day ?

Nikku,

May I ask how you were able to get the designer theme to stretch out so wide? I wanted to use that theme, but was too narrow with the portal.... if I could get it out like 800-900 px - that'd be awesome - Let me know will ya?

Thanks -

KB
Title: Re: RSS Feeder
Post by: SlammedDime on March 01, 2009, 03:27:40 PM
Quote from: nikku on March 01, 2009, 03:03:31 PM
I guess is working now. i forgot the schedule  :-X

http://www.ipergames.com/forum/index.php/topic,681.0.html


but... i cannot make links for download to be clickable. i enabled html for posts but seems that i cannot make to click on download.

question please:

anyone know how to pull entire feeds from a blog from blogger ?

http://pes-patch.blogspot.com/feeds/posts/default?alt=rss    

feeds/posts/default?alt=rss      get only the last ones... from the day ?
it won't be possible to make them clickable at this point in time.  I may look at using SMF 2's html_to_bbc function in the next release, depending on how well it will work.
Title: Re: RSS Feeder
Post by: nikku on March 01, 2009, 03:31:15 PM
i searched my bookmark for the answer i couldnt find it  now... >:( ... where is the theme. go to forum and browse it. there is the answer or just ask a topic. is very simple to do it. I forgot how  :-\


thank you SlammedDime. hope to do it someday (make clickable)

How to remove - Source: ... ?
Title: Re: RSS Feeder
Post by: Hiver101 on March 04, 2009, 09:50:41 AM
Hi,
can i have the SQL create table scrip for RSS Feeder? i'm having problem installing this mod.

Thanks.
Title: Re: RSS Feeder
Post by: GazOutEast on March 04, 2009, 01:35:12 PM
Excellent mod SD and many thanks

Although I never had an issue with vb's for 1.1.x it did stop permitting direct edit of entries sometime around the forum upgrade to 1.1.12 so I just used to edit them in the database every three months, but the actual feeds behaved perfectly - on time and into the correct board etc.  So I was very happy to find yours that allows me control through the ACP again.

Unfortunately, yours has got me pulling my hair a bit

I'm using RSS Feeder 1.1.1 on SMF 2.0 RC1 and everything except one thing is working normally.  Feeds are scheduled for 3-hourly some to retrieve 1 item, some to retrieve up to 4 (they're announcement feeds normally updated 2 or 3 times a day with single posts).

The problem is they they are relentlessly marching backwards in time - after just 24 hours, one of the fed boards had over 500 posts going back to the Indian Ocean tsunami on Boxing Day 2004 and beyond.

I need them to only pull new posts from within the last 3 hours since their last check.

Any idea what could be causing this?

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on March 04, 2009, 02:37:15 PM
The feeder pulls from the bottom of the RSS feed to the top, so they will be posted in the order that the feed has them, oldest posted first.  If the feed has 100 items, and you're doing 1 at a time, it will start at the bottom and work it's way to the top.
Title: Re: RSS Feeder
Post by: SlammedDime on March 04, 2009, 02:38:14 PM
Quote from: resti on March 04, 2009, 09:50:41 AM
Hi,
can i have the SQL create table scrip for RSS Feeder? i'm having problem installing this mod.

Thanks.
Just put add_settings.php into your main SMF directory and run it.

Quote from: nikku on March 01, 2009, 03:31:15 PM
i searched my bookmark for the answer i couldnt find it  now... >:( ... where is the theme. go to forum and browse it. there is the answer or just ask a topic. is very simple to do it. I forgot how  :-\


thank you SlammedDime. hope to do it someday (make clickable)

How to remove - Source: ... ?

You'll have to edit that in ScheduledTasks.php
Title: Re: RSS Feeder
Post by: GazOutEast on March 04, 2009, 03:02:01 PM
Quote from: SlammedDime on March 04, 2009, 02:37:15 PM
The feeder pulls from the bottom of the RSS feed to the top, so they will be posted in the order that the feed has them, oldest posted first.  If the feed has 100 items, and you're doing 1 at a time, it will start at the bottom and work it's way to the top.

OK - so would you recommend I do a single manual run of unlimited posts to clear the backlog and "bring it up to date"?  After which it should only pull new posts even if I've deleted all the old ones because they've already been captured and posted previously.

(appreciate the rapid help by the way - such a refreshing change)

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on March 04, 2009, 05:38:10 PM
If you are not retrieving the full article, then yes, I would recommend that.
Title: Re: RSS Feeder
Post by: GazOutEast on March 05, 2009, 01:23:39 AM
OK - have given it a go - now waiting for the feed creators to add something new and see if it performs the way I'm hoping it will.  I'll post back with results.

just a thought - if this does do what we're discussing, it could be a nice idea to add a little explanation of this particular bit of "how to" to the pop-up help for when selecting number of posts to pull - it might save less experienced users some heartache.  What do you think?

Gaz
Title: Re: RSS Feeder
Post by: Hiver101 on March 05, 2009, 04:01:52 AM
Hello Everybody!
I'm having problem installing RSS Feed. The problem is, the tables were not created when i install it. I hope you guys can give me a create table sql script for RSS Feed.

Many thanks,
Title: Re: RSS Feeder
Post by: SlammedDime on March 05, 2009, 10:11:03 AM
Gaz - good idear

resti - As I said above, you need to put add_settings.php from the install package into your main SMF directory and run it.  There is more to it than just adding database tables, it also adds settings and values to the database.
Title: Re: RSS Feeder
Post by: Hiver101 on March 05, 2009, 12:34:24 PM
Quote from: SlammedDime on March 04, 2009, 02:38:14 PM
Quote from: resti on March 04, 2009, 09:50:41 AM
Hi,
can i have the SQL create table scrip for RSS Feeder? i'm having problem installing this mod.

Thanks.
Just put add_settings.php into your main SMF directory and run it.

Hi i got this error when i executed the add_settings.php

/* RSS Feeder Settings */ function ModifyRSSFeedSettings() { global $context, $txt, $sourcedir, $scripturl, $smcFunc; loadTemplate('RSSFeeds'); $context['page_title'] = $txt['rss_feeder']; if (!empty($_REQUEST['feed']) && (isset($_REQUEST['enable']) || isset($_REQUEST['disable']))) { // Quick change on the status... $smcFunc['db_query']('', ' UPDATE {db_prefix}rssfeeds SET enabled = {int:option} WHERE id_feed = {int:feed}', array( 'option' => isset($_REQUEST['enable']) ? 1 : 0, 'feed' => (int) $_REQUEST['feed'], ) ); redirectExit('action=admin;area=modsettings;sa=rssfeeds'); } if (!empty($_REQUEST['feed']) || !empty($_REQUEST['add'])) { $context['sub_template'] = 'rss_feeder_add'; // Load the boards and categories for adding or editing a feed. $request = $smcFunc['db_query']('', ' SELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat FROM {db_prefix}boards AS b LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)', array() ); $context['categories'] = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { if (!isset($context['categories'][$row['id_cat']])) $context['categories'][$row['id_cat']] = array ( 'name' => strip_tags($row['cat_name']), 'boards' => array(), ); $context['categories'][$row['id_cat']]['boards'][] = array( 'id' => $row['id_board'], 'name' => strip_tags($row['name']), 'category' => strip_tags($row['cat_name']), 'child_level' => $row['child_level'], 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board, ); } $smcFunc['db_free_result']($request); if (empty($context['categories'])) fatal_lang_error('rss_feed_no_boards', false); // If we're just adding a feed, we can return, don't need to do anything further if (empty($_REQUEST['add'])) { // Lets get the feed from the database $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}rssfeeds WHERE id_feed = {int:feed} LIMIT 1', array( 'feed' => ((int) $_REQUEST['feed']), ) ); // No Feed?? ut oh... hacker!! if ($smcFunc['db_num_rows']($request) != 1) fatal_lang_error('rss_feed_not_found', false); $context['rss_feed'] = $smcFunc['db_fetch_assoc']($request); $context['rss_feed'] = htmlspecialchars__recursive($context['rss_feed']); $smcFunc['db_free_result']($request); } $context['icon'] = !empty($context['rss_feed']['icon']) ? $context['rss_feed']['icon'] : 'xx'; require_once($sourcedir . '/Subs-Editor.php'); // Message icons - customized icons are off? $context['icons'] = getMessageIcons(!empty($context['rss_feed']['id_board']) ? $context['rss_feed']['id_board'] : 0); if (!empty($context['icons'])) $context['icons'][count($context['icons']) - 1]['is_last'] = true; $context['icon_url'] = ''; for ($i = 0, $n = count($context['icons']); $i < $n; $i++) { $context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value']; if ($context['icons'][$i]['selected']) $context['icon_url'] = $context['icons'][$i]['url']; } if (empty($context['icon_url'])) { $context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif'; array_unshift($context['icons'], array( 'value' => $context['icon'], 'name' => $txt['current_icon'], 'url' => $context['icon_url'], 'is_last' => empty($context['icons']), 'selected' => true, )); } return; } // What about deleting one or more?? elseif (!empty($_REQUEST['delete'])) { //$_POST['checked_feeds'] // We already asked that they wanted to delete, so we'll just delete... no confirmation foreach ($_POST['checked_feeds'] as $key => $id) $_POST['checked_feeds'][$key] = (int) $id; $smcFunc['db_query']('', ' DELETE FROM {db_prefix}rssfeeds WHERE id_feed IN ({array_int:feed_list})', array( 'feed_list' => $_POST['checked_feeds'], ) ); } // Or are they saving one being modified?? elseif (!empty($_REQUEST['save']) && !empty($_POST['sc'])) { // First we check the session... checkSession(); // Put the insert array together... $insertOptions = array(); // Let's do the 'unrequireds' first... $insertOptions['id_board'] = (int)$_POST['feed_board']; $insertOptions['icon'] = isset($_POST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']) : 'xx'; $insertOptions['enabled'] = isset($_POST['feed_enabled']) ? 1 : 0; $insertOptions['keywords'] = trim($_POST['feed_keywords']) != '' ? trim($_POST['feed_keywords']) : ''; $insertOptions['locked'] = isset($_POST['feed_locked']) ? 1 : 0; $insertOptions['getfull'] = isset($_POST['feed_full']) ? 1 : 0; $insertOptions['approve'] = isset($_POST['feed_approve']) ? 1 : 0; $insertOptions['singletopic'] = isset($_POST['feed_singletopic']) ? 1 : 0; $insertOptions['topicprefix'] = trim($_POST['feed_prefix']) != '' ? trim($_POST['feed_prefix']) : ''; $insertOptions['footer'] = !empty($_POST['feed_footer']) ? trim($_POST['feed_footer']) : ''; $insertOptions['numbertoimport'] = trim($_POST['feed_import']) != '' ? (int) trim($_POST['feed_import']) : 0; $context['feed_errors'] = array(); // And now the requireds that we can throw errors on... if (empty($_POST['feed_title'])) $context['feed_errors']['feed_title'] = ($insertOptions['title'] = ''); else $insertOptions['title'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&$1', $_POST['feed_title']); if (empty($_POST['feed_url'])) $context['feed_errors']['feed_url'] = ($insertOptions['feedurl'] = ''); else $insertOptions['feedurl'] = trim($_POST['feed_url']); if (empty($_POST['feed_poster'])) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = ''); // Do a query to get the member's id else { $request = $smcFunc['db_query']('', ' SELECT id_member FROM {db_prefix}members WHERE real_name = {string:name} OR member_name = {string:name} LIMIT 1', array( 'name' => trim($_POST['feed_poster']), ) ); if ($smcFunc['db_num_rows']($request) != 1) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = trim($_POST['feed_poster'])); else { $insertOptions['postername'] = trim($_POST['feed_poster']); list($insertOptions['id_member']) = $smcFunc['db_fetch_row']($request); } $smcFunc['db_free_result']($request); } $insertOptions['regex'] = trim($_POST['feed_regex']); if (!empty($insertOptions['getfull']) && empty($insertOptions['regex'])) $context['feed_errors']['feed_regex'] = ''; // if we had any errors, lets kick back a screen and highlight them... if (!empty($context['feed_errors'])) { $context['rss_feed'] = $insertOptions; if (!empty($_POST['feed_id'])) $_REQUEST['feed'] = $_POST['feed_id']; $_REQUEST['add'] = true; return ModifyRSSFeedSettings(); } // Looks like we're good. // Modifying an existing feed? if (!empty($_REQUEST['feed_id'])) { $smcFunc['db_query']('',' UPDATE {db_prefix}rssfeeds SET id_board = {int:id_board}, feedurl = {string:feedurl}, title = {string:title}, icon = {string:icon}, enabled = {int:enabled}, postername = {string:postername}, id_member = {int:id_member}, keywords = {string:keywords}, regex = {string:regex}, locked = {int:locked}, getfull = {int:getfull}, approve = {int:approve}, singletopic = {int:singletopic}, topicprefix = {string:topicprefix}, footer = {string:footer}, numbertoimport = {int:numbertoimport} WHERE id_feed = {int:id_feed}', array_merge(array('id_feed' => (int)$_REQUEST['feed_id']), $insertOptions) ); $context['feed_insert_success'] = $txt['rss_feed_update_success']; } // Or I guess we're inserting a new one else { // Fix up the stuff for insertion, make sure the arrays are aligned $insertRows = array( 'singletopic' => 'int', 'icon' => 'string', 'footer' => 'string', 'getfull' => 'int', 'id_board' => 'int', 'feedurl' => 'string', 'title' => 'string', 'enabled' => 'int', 'postername' => 'string', 'id_member' => 'int', 'keywords' => 'string', 'regex' => 'string', 'locked' => 'int', 'approve' => 'int', 'topicprefix' => 'string', 'numbertoimport' => 'int' ); ksort($insertRows); ksort($insertOptions); $smcFunc['db_insert']('', '{db_prefix}rssfeeds', $insertRows, $insertOptions, array('id_feed') ); $id_feed = $smcFunc['db_insert_id']('{db_prefix}rssfeeds', 'id_feed'); if (empty($id_feed)) $context['feed_insert_error'] = $txt['rss_feed_insert_error']; else $context['feed_insert_success'] = $txt['rss_feed_insert_success']; } } // If they deleted or saved, let's show the main list $context['sub_template'] = 'rss_feeder_list'; // Create the table that will display the feeds $listOptions = array( 'id' => 'rss_feeder_list', 'items_per_page' => 40, 'default_sort_col' => 'icon', 'base_href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'no_items_label' => $txt['rss_feed_none'], 'get_items' => array( 'function' => 'list_getFeeds', ), 'get_count' => array( 'function' => 'list_getNumFeeds', ), 'columns' => array( 'icon' => array( 'header' => array( 'value' => $txt['rss_feed_enabled'], ), 'data' => array( 'function' => create_function('$rowData', ' global $settings, $scripturl, $smcFunc, $txt; if (empty($rowData[\'name\']) && $rowData[\'enabled\']) { $smcFunc[\'db_query\'](\'\', \' UPDATE {db_prefix}rssfeeds SET enabled = 0 WHERE id_feed = {int:feed}\', array( \'feed\' => $rowData[\'id_feed\'], ) ); // Log an error about the issue, just so the user can see why their feed was disabled... log_error($txt[\'rss_feeder\'] . \': \' . $rowData[\'title\'] . \' (\' . $txt[\'rss_feed_board_error\'] . \')\'); $rowData[\'enabled\'] = 0; } return \'\';' ), 'style' => 'text-align: center; width: 130px;', ), 'sort' => array( 'default' => 'f.enabled', 'reverse' => 'f.enabled DESC', ), ), 'title' => array( 'header' => array( 'value' => $txt['rss_feed_title'], ), 'data' => array( 'db' => 'title', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.title', 'reverse' => 'f.title DESC', ), ), 'url' => array( 'header' => array( 'value' => $txt['rss_feed_url'], ), 'data' => array( 'sprintf' => array( 'format' => '%1$s', 'params' => array( 'feedurl' => true, ), ), ), 'sort' => array( 'default' => 'f.feedurl', 'reverse' => 'f.feedurl DESC', ), ), 'board' => array( 'header' => array( 'value' => $txt['rss_feed_board'], ), 'data' => array( 'function' => create_function('$rowData', ' global $txt; return empty($rowData[\'name\']) ? \'<< \' . $txt[\'rss_feed_board_error\'] . \' >>\' : $rowData[\'name\'];' ), 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'b.name', 'reverse' => 'b.name DESC', ), ), 'count' => array( 'header' => array( 'value' => $txt['rss_feed_count'], ), 'data' => array( 'db' => 'importcount', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.importcount', 'reverse' => 'f.importcount DESC', ), ), 'modify' => array( 'header' => array( 'value' => $txt['rss_feed_modify'], ), 'data' => array( 'sprintf' => array( 'format' => '' . $txt['rss_feed_modify'] . '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 50px;', ), ), 'check' => array( 'header' => array( 'value' => '', ), 'data' => array( 'sprintf' => array( 'format' => '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 32px;', ), ), ), 'form' => array( 'href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'name' => 'rssfeedForm', ), 'additional_rows' => array( array( 'position' => 'above_column_headers', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), array( 'position' => 'below_table_data', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), ), ); require_once($sourcedir . '/Subs-List.php'); createList($listOptions); } // Get information for the list above... grabs all of the feeds from the database function list_getFeeds($start, $items_per_page, $sort) { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT f.id_feed, b.name, f.title, f.feedurl, f.enabled, f.importcount FROM {db_prefix}rssfeeds AS f LEFT JOIN {db_prefix}boards AS b ON (b.id_board = f.id_board) ORDER BY {raw:sort} LIMIT ' . $start . ', ' . $items_per_page, array ( 'sort' => $sort, ) ); $feeds = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) $feeds[] = $row; $smcFunc['db_free_result']($request); return $feeds; } // The number grabbed above could be limited at 40... this just gets a count of all of them. function list_getNumFeeds() { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}rssfeeds', array( ) ); list($numFeeds) = $smcFunc['db_fetch_row']; $smcFunc['db_free_result']($request); return $numFeeds; }
Fatal error: Call to undefined function ModifyRSSFeedSettings() in D:\inetpub\vhosts\thegamershive.net\httpdocs\forum\Sources\ManageSettings.php on line 217


hope you can help me on this
Title: Re: RSS Feeder
Post by: SlammedDime on March 05, 2009, 12:52:50 PM
Looks like the mod did not install correctly to ManageSettings.php.

You'll need to open that file up and make sure that ?> is the VERY last line of the file.  It looks like it is probably above /* RSS Feeder Settings */
Title: Re: RSS Feeder
Post by: mrtrc266 on March 06, 2009, 01:55:52 AM
Very nice MOD!

I had the same prob on the install, the >? was not at then end of the file. Easy fix though I'm sure :-)
Title: Re: RSS Feeder
Post by: Killer-B on March 06, 2009, 03:29:10 AM
If someone (anyone) has PCRE coding experience - please PM me... or leave you info as a post in this thread regarding how to get an entire RSS content to show in a feed -

Thank$

KB
Title: Re: RSS Feeder
Post by: Hiver101 on March 06, 2009, 05:18:51 AM
Quote from: SlammedDime on March 05, 2009, 12:52:50 PM
Looks like the mod did not install correctly to ManageSettings.php.

You'll need to open that file up and make sure that ?> is the VERY last line of the file.  It looks like it is probably above /* RSS Feeder Settings */

Thanks and now i'm back to table problem and i got this error.

Table 's01win_mysqlb00fd8797d6746085396ce7e1314cece.******_rssfeeds' doesn't exist
File: D:\inetpub\vhosts\*********\httpdocs\forum\Sources\ManageSettings.php
Line: 2561

Please help me, it would be beter if you can give my the SQL string to create the table manualy... thanks
Title: Re: RSS Feeder
Post by: Groundhog on March 08, 2009, 05:46:26 PM
SlammedDime

Just had to say that this is such a good mod. Thanks so much for providing it and also for the very important info regarding how to use the "retrieve full article" feature.

What this mod does is turn a board that has members that don't post regularly into a board that now appears to be really busy. Hopefully this will attract more interest to our sites. Of coarse you know this already but had to drop by and say how much I appreciate your work.  :)

Regards
Title: Re: RSS Feeder
Post by: Killer-B on March 16, 2009, 12:41:19 AM
OK, new issue...

I have 43 RSS feeds (no worries, some are 24hour 1x weather updates) but, I need to "edit" 2 of them, but are not showing on my panel now?

I've just counted, and it displays 40 RSS Feeds, and lists "Page 1" at the bottom (making me assume, there should be a "Page 2" tab) but there is not? - Is there a reason for this I don't know about - or more importantly, how can I access #41, #42, #43 etc?

TIA -

KB
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 16, 2009, 06:15:54 PM
anythign like this that is compatible with 1.1.8 ?
Title: Re: RSS Feeder
Post by: SlammedDime on March 16, 2009, 08:00:07 PM
Killer - I haven't had a chance to release a new version yet, but you can fix it by the following
Quote from: SlammedDime on February 14, 2009, 02:43:16 PM
rii - you'll have to modify the relevant code in ScheduledTasks.php, search for $subject =


MrSandman - What happens when you try to add another one?  Does it just not show up?  It should show multiple page selections at the top.
Edit, I found the problem, damn...  I'll release a new version in the next day or two to solve the issue.
If you want to fix it yourself for the time being (you'll have to reverse the change to upgrade or uninstall)
Open ManageSettings.php
Code (Find) Select
list($numFeeds) = $smcFunc['db_fetch_row'];

Code (Replace) Select
list($numFeeds) = $smcFunc['db_fetch_row']($request);


Nena - vbgamer has one for 1.1.x, but it is no longer supported, and I'm not sure how well it works.  Some people have reported problems with it.
Title: Re: RSS Feeder
Post by: Killer-B on March 16, 2009, 08:57:18 PM
Thanks SD - I couldn't find someone else who had the same problem... Will try the mod now...

Cheers

NB: That did it! Thanks!
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 16, 2009, 10:14:25 PM
Quote from: SlammedDime on March 16, 2009, 08:00:07 PM
Nena - vbgamer has one for 1.1.x, but it is no longer supported, and I'm not sure how well it works.  Some people have reported problems with it.

Yeah the bugs w/out support is my worry...i would really like to be able to add this to my members ultimate profile so they can link their blogs to it to display their blog feed... I hope I get to use this mod soon...it sounds fantastic.
Title: Re: RSS Feeder
Post by: mrtrc266 on March 18, 2009, 02:27:14 PM
This works great SD, thank you very much.

I'm having a problem with "Full Article" though. I would like to get the full articales from http://www.railbirds.com/rss/latestblogs.php

And I can't find the proper <div id... The div right before the content of the article is "<div class="blog-body">"

Here is  a link to a blog if anyone can look to see how I can get this working
http://www.railbirds.com/blog/255412/found-a-way-to-win-more-dollars-in-every-tourney.html

I tried http://www.railbirds.com/rss/latestblogs.php for the Feed URL ( This works good for just getting the feed)

and

~<div class="blog-body">(.*)<\/div>~siU for the Regular Expression. Does it have to be <div id... ?

Sorry for my ignorance in this stuff.

Thank you in advance.

Title: Re: RSS Feeder
Post by: mrtrc266 on March 21, 2009, 10:04:34 AM
Just making sure this topic didn't get locked....Bumping after 3 days  ;)

I know that the code I tried above is totally wrong but any ideas anyone?

Thanks again
Title: Re: RSS Feeder
Post by: SlammedDime on March 21, 2009, 11:35:40 AM
Sorry, didn't see your post before.  It can be *anything*, not just <div something... whatever works to get what you need.  I can't check the site right now to verify the regex (work restrictions), but I'll take a look when I get home from work.  Does it not work for you?
Title: Re: RSS Feeder
Post by: Killer-B on March 21, 2009, 11:47:48 AM
Quote from: mrtrc266 on March 18, 2009, 02:27:14 PM
This works great SD, thank you very much.

I'm having a problem with "Full Article" though. I would like to get the full articales from http://www.railbirds.com/rss/latestblogs.php

And I can't find the proper <div id... The div right before the content of the article is "<div class="blog-body">"

Here is  a link to a blog if anyone can look to see how I can get this working
http://www.railbirds.com/blog/255412/found-a-way-to-win-more-dollars-in-every-tourney.html

I tried http://www.railbirds.com/rss/latestblogs.php for the Feed URL ( This works good for just getting the feed)

and

~<div class="blog-body">(.*)<\/div>~siU for the Regular Expression. Does it have to be <div id... ?

Sorry for my ignorance in this stuff.

Thank you in advance.



mrtrc... I've kinda asked about this before... with no luck - but where are you getting these "codes" to pull the full articles from? As I'm trying to do the same.. but have no idea about PRC coding... I've asked for links or manuals or anywhere where I can study up and learn... but to no avail - the RSS feeder works GREAT.. but am only getting about 300 characters... and am wanting more...

TIA for any guidance -

Cheers-

KB
Title: Re: RSS Feeder
Post by: SlammedDime on March 21, 2009, 11:55:07 AM
Killer - You never did answer me to if you checked out the small tutorial that I posted in this topic.  There really isnt' any more to it, and unfortunately, I don't think I can really explain it any simpler.  There is plenty of information on the net regarding regular expressions... http://www.regular-expressions.info/ is a popular site with lots of info.
Title: Re: RSS Feeder
Post by: Killer-B on March 21, 2009, 12:00:45 PM
SD - Sorry, I know you field tons of questions with this, and all your other mods - but honestly, I did go thru all the posts here - and never saw anything of value (sorry if I overlooked something) - I did see your response, where you doubted it would/could pull the photos (as it has been doing very well) - I'm even using it on flickr now and pulling in great feeds -

That said, thanks for the link here... I'll take a look and see if I can get my head around it... and maybe it'll work afterall :)

Cheers-

KB
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 21, 2009, 02:45:22 PM
any plans on this working with 1.1.8?
Title: Re: RSS Feeder
Post by: SlammedDime on March 21, 2009, 03:41:10 PM
Sorry Nena, I won't be backporting this, it relys on too many of SMF 2.0's built in functions, and I would have to rewrite a lot of the mod to work.
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 21, 2009, 04:31:20 PM
ehh thanks anyway :) maybe once 2.0 is more worked in I will upgrade. :) i do look forward to trying out your mod.
Title: Re: RSS Feeder
Post by: mrtrc266 on March 22, 2009, 12:56:23 AM
Quote from: SlammedDime on March 21, 2009, 11:35:40 AM
Sorry, didn't see your post before.  It can be *anything*, not just <div something... whatever works to get what you need.  I can't check the site right now to verify the regex (work restrictions), but I'll take a look when I get home from work.  Does it not work for you?

It does work but I only get a few characters, I'm trying to get full articles to pull from this feed.

http://www.railbirds.com/rss/latestblogs.php

I did read the tutorial and tried everything I can think of but I can't get it going. I am truly clueless and any help is greatly appreciated.
Title: Re: RSS Feeder
Post by: SlammedDime on March 22, 2009, 05:56:49 AM
Well I did some preliminary testing with the regex you're using and that feed and it seems to work fine... I'll throw it into the mod itself and see how it does...
Title: Re: RSS Feeder
Post by: mrtrc266 on March 22, 2009, 10:44:07 AM
Here is a link to my test site that I'm trying it out on.

http://monsters-mansion.com/testrc1/index.php

As you can see in the Latest Railbird Blogs it pulls the feed but only shows the title of the blog. Full articles would be awesome :D
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 02:36:01 PM
Hey could u look at this plz all

http://www.itsyoursite.info/index.php?action=admin;area=modsettings;sa=rssfeeds

It just gives me text, could anyone help me with this

Thank you
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 23, 2009, 03:52:07 PM
judgey - this link is requiring us to log in?
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 04:25:34 PM
Sorry my bad -

Im just getting a screen with loads of text, this is just some of it

/* RSS Feeder Settings */ function ModifyRSSFeedSettings() { global $context, $txt, $sourcedir, $scripturl, $smcFunc; loadTemplate('RSSFeeds'); $context['page_title'] = $txt['rss_feeder']; if (!empty($_REQUEST['feed']) && (isset($_REQUEST['enable']) || isset($_REQUEST['disable']))) { // Quick change on the status... $smcFunc['db_query']('', ' UPDATE {db_prefix}rssfeeds SET enabled = {int:option} WHERE id_feed = {int:feed}', array( 'option' => isset($_REQUEST['enable']) ? 1 : 0, 'feed' => (int) $_REQUEST['feed'], ) ); redirectExit('action=admin;area=modsettings;sa=rssfeeds'); } if (!empty($_REQUEST['feed']) || !empty($_REQUEST['add'])) { $context['sub_template'] = 'rss_feeder_add'; // Load the boards and categories for adding or editing a feed. $request = $smcFunc['db_query']('', ' SELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat FROM {db_prefix}boards AS b LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)', array() ); $context['categories'] = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { if (!isset($context['categories'][$row['id_cat']])) $context['categories'][$row['id_cat']] = array ( 'name' => strip_tags($row['cat_name']), 'boards' => array(), ); $context['categories'][$row['id_cat']]['boards'][] = array( 'id' => $row['id_board'], 'name' => strip_tags($row['name']), 'category' => strip_tags($row['cat_name']), 'child_level' => $row['child_level'], 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board, ); } $smcFunc['db_free_result']($request); if (empty($context['categories'])) fatal_lang_error('rss_feed_no_boards', false); // If we're just adding a feed, we can return, don't need to do anything further if (empty($_REQUEST['add'])) { // Lets get the feed from the database $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}rssfeeds WHERE id_feed = {int:feed} LIMIT 1', array( 'feed' => ((int) $_REQUEST['feed']), ) ); // No Feed?? ut oh... hacker!! if ($smcFunc['db_num_rows']($request) != 1) fatal_lang_error('rss_feed_not_found', false); $context['rss_feed'] = $smcFunc['db_fetch_assoc']($request); $context['rss_feed'] = htmlspecialchars__recursive($context['rss_feed']); $smcFunc['db_free_result']($request); } $context['icon'] = !empty($context['rss_feed']['icon']) ? $context['rss_feed']['icon'] : 'xx'; require_once($sourcedir . '/Subs-Editor.php'); // Message icons - customized icons are off? $context['icons'] = getMessageIcons(!empty($context['rss_feed']['id_board']) ? $context['rss_feed']['id_board'] : 0); if (!empty($context['icons'])) $context['icons'][count($context['icons']) - 1]['is_last'] = true; $context['icon_url'] = ''; for ($i = 0, $n = count($context['icons']); $i < $n; $i++) { $context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value']; if ($context['icons'][$i]['selected']) $context['icon_url'] = $context['icons'][$i]['url']; } if (empty($context['icon_url'])) { $context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif'; array_unshift($context['icons'], array( 'value' => $context['icon'], 'name' => $txt['current_icon'], 'url' => $context['icon_url'], 'is_last' => empty($context['icons']), 'selected' => true, )); } return; } // What about deleting one or more?? elseif (!empty($_REQUEST['delete'])) { //$_POST['checked_feeds'] // We already asked that they wanted to delete, so we'll just delete... no confirmation foreach
Title: Re: RSS Feeder
Post by: Xavi-Nena on March 23, 2009, 04:50:22 PM
do you have a screen shot?
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 05:17:00 PM
Here you, and thanks for helping :)

Title: Re: RSS Feeder
Post by: Xavi-Nena on March 23, 2009, 05:21:25 PM
i recently had a similar problem and it ended up being my php tags were not closed...im sure if you attach the file in question someone with more experience would be able to help you out. But that looks almost exactly like an issue I was having and it was I was missing some php tags.
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 06:19:35 PM
Here is the whole page could not work out wot page to upload, again thank you :)

/* RSS Feeder Settings */
function ModifyRSSFeedSettings()
{
global $context, $txt, $sourcedir, $scripturl, $smcFunc;

loadTemplate('RSSFeeds');
$context['page_title'] = $txt['rss_feeder'];

if (!empty($_REQUEST['feed']) && (isset($_REQUEST['enable']) || isset($_REQUEST['disable'])))
{
// Quick change on the status...
$smcFunc['db_query']('', '
UPDATE {db_prefix}rssfeeds
SET enabled = {int:option}
WHERE id_feed = {int:feed}',
array(
'option' => isset($_REQUEST['enable']) ? 1 : 0,
'feed' => (int) $_REQUEST['feed'],
)
);
redirectExit('action=admin;area=modsettings;sa=rssfeeds');
}

if (!empty($_REQUEST['feed']) || !empty($_REQUEST['add']))
{

$context['sub_template'] = 'rss_feeder_add';

// Load the boards and categories for adding or editing a feed.
$request = $smcFunc['db_query']('', '
SELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat
FROM {db_prefix}boards AS b
LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)',
array()
);
$context['categories'] = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
if (!isset($context['categories'][$row['id_cat']]))
$context['categories'][$row['id_cat']] = array (
'name' => strip_tags($row['cat_name']),
'boards' => array(),
);

$context['categories'][$row['id_cat']]['boards'][] = array(
'id' => $row['id_board'],
'name' => strip_tags($row['name']),
'category' => strip_tags($row['cat_name']),
'child_level' => $row['child_level'],
'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,
);
}
$smcFunc['db_free_result']($request);

if (empty($context['categories']))
fatal_lang_error('rss_feed_no_boards', false);

// If we're just adding a feed, we can return, don't need to do anything further
if (empty($_REQUEST['add']))
{
// Lets get the feed from the database
$request = $smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}rssfeeds
WHERE id_feed = {int:feed}
LIMIT 1',
array(
'feed' => ((int) $_REQUEST['feed']),
)
);

// No Feed?? ut oh... hacker!!
if ($smcFunc['db_num_rows']($request) != 1)
fatal_lang_error('rss_feed_not_found', false);
$context['rss_feed'] = $smcFunc['db_fetch_assoc']($request);
$context['rss_feed'] = htmlspecialchars__recursive($context['rss_feed']);
$smcFunc['db_free_result']($request);
}

$context['icon'] = !empty($context['rss_feed']['icon']) ? $context['rss_feed']['icon'] : 'xx';

require_once($sourcedir . '/Subs-Editor.php');
// Message icons - customized icons are off?
$context['icons'] = getMessageIcons(!empty($context['rss_feed']['id_board']) ? $context['rss_feed']['id_board'] : 0);

if (!empty($context['icons']))
$context['icons'][count($context['icons']) - 1]['is_last'] = true;

$context['icon_url'] = '';
for ($i = 0, $n = count($context['icons']); $i < $n; $i++)
{
$context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value'];
if ($context['icons'][$i]['selected'])
$context['icon_url'] = $context['icons'][$i]['url'];
}
if (empty($context['icon_url']))
{
$context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif';
array_unshift($context['icons'], array(
'value' => $context['icon'],
'name' => $txt['current_icon'],
'url' => $context['icon_url'],
'is_last' => empty($context['icons']),
'selected' => true,
));
}


return;
}
// What about deleting one or more??
elseif (!empty($_REQUEST['delete']))
{
//$_POST['checked_feeds']
// We already asked that they wanted to delete, so we'll just delete... no confirmation
foreach ($_POST['checked_feeds'] as $key => $id)
$_POST['checked_feeds'][$key] = (int) $id;

$smcFunc['db_query']('', '
DELETE FROM {db_prefix}rssfeeds
WHERE id_feed IN ({array_int:feed_list})',
array(
'feed_list' => $_POST['checked_feeds'],
)
);
}
// Or are they saving one being modified??
elseif (!empty($_REQUEST['save']) && !empty($_POST['sc']))
{
// First we check the session...
checkSession();

// Put the insert array together...
$insertOptions = array();

// Let's do the 'unrequireds' first...
$insertOptions['id_board'] = (int)$_POST['feed_board'];
$insertOptions['icon'] = isset($_POST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']) : 'xx';
$insertOptions['enabled'] = isset($_POST['feed_enabled']) ? 1 : 0;
$insertOptions['keywords'] = trim($_POST['feed_keywords']) != '' ? trim($_POST['feed_keywords']) : '';
$insertOptions['locked'] = isset($_POST['feed_locked']) ? 1 : 0;
$insertOptions['getfull'] = isset($_POST['feed_full']) ? 1 : 0;
$insertOptions['approve'] = isset($_POST['feed_approve']) ? 1 : 0;
$insertOptions['singletopic'] = isset($_POST['feed_singletopic']) ? 1 : 0;
$insertOptions['topicprefix'] = trim($_POST['feed_prefix']) != '' ? trim($_POST['feed_prefix']) : '';
$insertOptions['footer'] = !empty($_POST['feed_footer']) ? trim($_POST['feed_footer']) : '';
$insertOptions['numbertoimport'] = trim($_POST['feed_import']) != '' ? (int) trim($_POST['feed_import']) : 0;

$context['feed_errors'] = array();
// And now the requireds that we can throw errors on...
if (empty($_POST['feed_title']))
$context['feed_errors']['feed_title'] = ($insertOptions['title'] = '');
else
$insertOptions['title'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&amp;$1', $_POST['feed_title']);

if (empty($_POST['feed_url']))
$context['feed_errors']['feed_url'] = ($insertOptions['feedurl'] = '');
else
$insertOptions['feedurl'] = trim($_POST['feed_url']);

if (empty($_POST['feed_poster']))
$context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = '');
// Do a query to get the member's id
else
{
$request = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE real_name = {string:name}
OR member_name = {string:name}
LIMIT 1',
array(
'name' => trim($_POST['feed_poster']),
)
);
if ($smcFunc['db_num_rows']($request) != 1)
$context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = trim($_POST['feed_poster']));
else
{
$insertOptions['postername'] = trim($_POST['feed_poster']);
list($insertOptions['id_member']) = $smcFunc['db_fetch_row']($request);
}
$smcFunc['db_free_result']($request);
}

$insertOptions['regex'] = trim($_POST['feed_regex']);
if (!empty($insertOptions['getfull']) && empty($insertOptions['regex']))
$context['feed_errors']['feed_regex'] = '';

// if we had any errors, lets kick back a screen and highlight them...
if (!empty($context['feed_errors']))
{
$context['rss_feed'] = $insertOptions;
if (!empty($_POST['feed_id']))
$_REQUEST['feed'] = $_POST['feed_id'];
$_REQUEST['add'] = true;
return ModifyRSSFeedSettings();
}

// Looks like we're good.
// Modifying an existing feed?
if (!empty($_REQUEST['feed_id']))
{
$smcFunc['db_query']('','
UPDATE {db_prefix}rssfeeds
SET
id_board = {int:id_board},
feedurl = {string:feedurl},
title = {string:title},
icon = {string:icon},
enabled = {int:enabled},
postername = {string:postername},
id_member = {int:id_member},
keywords = {string:keywords},
regex = {string:regex},
locked = {int:locked},
getfull = {int:getfull},
approve = {int:approve},
singletopic = {int:singletopic},
topicprefix = {string:topicprefix},
footer = {string:footer},
numbertoimport = {int:numbertoimport}
WHERE id_feed = {int:id_feed}',
array_merge(array('id_feed' => (int)$_REQUEST['feed_id']), $insertOptions)
);
$context['feed_insert_success'] = $txt['rss_feed_update_success'];
}
// Or I guess we're inserting a new one
else
{
// Fix up the stuff for insertion, make sure the arrays are aligned
$insertRows = array( 'singletopic' => 'int', 'icon' => 'string', 'footer' => 'string', 'getfull' => 'int', 'id_board' => 'int', 'feedurl' => 'string', 'title' => 'string', 'enabled' => 'int', 'postername' => 'string', 'id_member' => 'int', 'keywords' => 'string', 'regex' => 'string', 'locked' => 'int', 'approve' => 'int', 'topicprefix' => 'string', 'numbertoimport' => 'int' );
ksort($insertRows);
ksort($insertOptions);

$smcFunc['db_insert']('',
'{db_prefix}rssfeeds',
$insertRows,
$insertOptions,
array('id_feed')
);
$id_feed = $smcFunc['db_insert_id']('{db_prefix}rssfeeds', 'id_feed');
if (empty($id_feed))
$context['feed_insert_error'] = $txt['rss_feed_insert_error'];
else
$context['feed_insert_success'] = $txt['rss_feed_insert_success'];
}
}

// If they deleted or saved, let's show the main list
$context['sub_template'] = 'rss_feeder_list';
// Create the table that will display the feeds
$listOptions = array(
'id' => 'rss_feeder_list',
'items_per_page' => 40,
'default_sort_col' => 'icon',
'base_href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds',
'no_items_label' => $txt['rss_feed_none'],
'get_items' => array(
'function' => 'list_getFeeds',
),
'get_count' => array(
'function' => 'list_getNumFeeds',
),
'columns' => array(
'icon' => array(
'header' => array(
'value' => $txt['rss_feed_enabled'],
),
'data' => array(
'function' => create_function('$rowData', '
global $settings, $scripturl, $smcFunc, $txt;

if (empty($rowData[\'name\']) && $rowData[\'enabled\'])
{
$smcFunc[\'db_query\'](\'\', \'
UPDATE {db_prefix}rssfeeds
SET enabled = 0
WHERE id_feed = {int:feed}\',
array(
\'feed\' => $rowData[\'id_feed\'],
)
);

// Log an error about the issue, just so the user can see why their feed was disabled...
log_error($txt[\'rss_feeder\'] . \': \' . $rowData[\'title\'] . \' (\' . $txt[\'rss_feed_board_error\'] . \')\');

$rowData[\'enabled\'] = 0;
}
return \'<a href="\' . $scripturl . \'?action=admin;area=modsettings;sa=rssfeeds;feed=\' . $rowData[\'id_feed\'] . ($rowData[\'enabled\'] ? \';disable\' : \';enable\') . \'"><img src="\' . $settings[\'images_url\'] . ($rowData[\'enabled\'] ? \'/rss_enabled.gif\' : \'/rss_disabled.gif\') . \'"></a>\';'
),
'style' => 'text-align: center; width: 130px;',
),
'sort' => array(
'default' => 'f.enabled',
'reverse' => 'f.enabled DESC',
),
),
'title' => array(
'header' => array(
'value' => $txt['rss_feed_title'],
),
'data' => array(
'db' => 'title',
'style' => 'text-align: center;',
),
'sort' => array(
'default' => 'f.title',
'reverse' => 'f.title DESC',
),
),
'url' => array(
'header' => array(
'value' => $txt['rss_feed_url'],
),
'data' => array(
'sprintf' => array(
'format' => '<a target="_blank" href="%1$s">%1$s</a>',
'params' => array(
'feedurl' => true,
),
),
),
'sort' => array(
'default' => 'f.feedurl',
'reverse' => 'f.feedurl DESC',
),
),
'board' => array(
'header' => array(
'value' => $txt['rss_feed_board'],
),
'data' => array(
'function' => create_function('$rowData', '
global $txt;
return empty($rowData[\'name\']) ? \'<em><< \' . $txt[\'rss_feed_board_error\'] . \' >></em>\' : $rowData[\'name\'];'
),
'style' => 'text-align: center;',
),
'sort' => array(
'default' => 'b.name',
'reverse' => 'b.name DESC',
),
),
'count' => array(
'header' => array(
'value' => $txt['rss_feed_count'],
),
'data' => array(
'db' => 'importcount',
'style' => 'text-align: center;',
),
'sort' => array(
'default' => 'f.importcount',
'reverse' => 'f.importcount DESC',
),
),
'modify' => array(
'header' => array(
'value' => $txt['rss_feed_modify'],
),
'data' => array(
'sprintf' => array(
'format' => '<a href="' . $scripturl . '?action=admin;area=modsettings;sa=rssfeeds;feed=%1$d">' . $txt['rss_feed_modify'] . '</a>',
'params' => array(
'id_feed' => false,
),
),
'style' => 'text-align: center; width: 50px;',
),
),
'check' => array(
'header' => array(
'value' => '<input type="checkbox" onclick="invertAll(this, this.form);" class="check" />',
),
'data' => array(
'sprintf' => array(
'format' => '<input type="checkbox" name="checked_feeds[]" value="%1$d" class="check" />',
'params' => array(
'id_feed' => false,
),
),
'style' => 'text-align: center; width: 32px;',
),
),
),
'form' => array(
'href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds',
'name' => 'rssfeedForm',
),
'additional_rows' => array(
array(
'position' => 'above_column_headers',
'value' => '
<input type="submit" name="add" value="'. $txt['rss_feed_add'] . '" />',
'style' => 'text-align: right;',
'class' => 'titlebg',
),
array(
'position' => 'below_table_data',
'value' => '
<input type="submit" onclick="return confirm(\'' . $txt['rss_feed_confirm'] . '\')" name="delete" value="'. $txt['rss_feed_delete'] . '" />',
'style' => 'text-align: right;',
'class' => 'titlebg',
),
),
);


require_once($sourcedir . '/Subs-List.php');
createList($listOptions);
}

// Get information for the list above... grabs all of the feeds from the database
function list_getFeeds($start, $items_per_page, $sort)
{
global $smcFunc;
$request = $smcFunc['db_query']('', '
SELECT f.id_feed, b.name, f.title, f.feedurl, f.enabled, f.importcount
FROM {db_prefix}rssfeeds AS f
LEFT JOIN {db_prefix}boards AS b ON (b.id_board = f.id_board)
ORDER BY {raw:sort}
LIMIT ' . $start . ', ' . $items_per_page,
array (
'sort' => $sort,
)
);
$feeds = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$feeds[] = $row;
$smcFunc['db_free_result']($request);

return $feeds;
}

// The number grabbed above could be limited at 40... this just gets a count of all of them.
function list_getNumFeeds()
{
global $smcFunc;

$request = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}rssfeeds',
array(
)
);
list($numFeeds) = $smcFunc['db_fetch_row'];
$smcFunc['db_free_result']($request);

return $numFeeds;
}

<br />
<b>Fatal error</b>:  Call to undefined function ModifyRSSFeedSettings() in <b>/var/www/vhosts/judgey/itsyoursite.info/httpdocs/Sources/ManageSettings.php</b> on line <b>226</b><br />
Title: Re: RSS Feeder
Post by: SlammedDime on March 23, 2009, 06:59:30 PM
Open up the ManageSettings.php and move ?> to the very end of the file.
Title: Re: RSS Feeder
Post by: SlammedDime on March 23, 2009, 07:03:44 PM
mrtrc - I ran your feed through with the Regex enabled with the regex you provided above, and it grabbed the full article without a problem.
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 07:23:50 PM
Quote from: SlammedDime on March 23, 2009, 06:59:30 PM
Open up the ManageSettings.php and move ?> to the very end of the file.

Hey mate sorry wots the path to that file, sorry just can not think

Thank you
Title: Re: RSS Feeder
Post by: SlammedDime on March 23, 2009, 07:33:21 PM
It's in the Sources directory
Title: Re: RSS Feeder
Post by: Judgey on March 23, 2009, 07:41:21 PM
Thank you so much :)
Title: Re: RSS Feeder
Post by: mrtrc266 on March 24, 2009, 01:11:09 AM
Quote from: SlammedDime on March 23, 2009, 07:03:44 PM
mrtrc - I ran your feed through with the Regex enabled with the regex you provided above, and it grabbed the full article without a problem.

I'm not sure what the problem was but I uninstalled the Mod then reinstalled and used the same regex. Now it works perfectly. Thank you very much for your help and a GREAT Mod!
Title: Re: RSS Feeder
Post by: Killer-B on March 24, 2009, 01:35:20 AM
Quote from: mrtrc266 on March 24, 2009, 01:11:09 AM
Quote from: SlammedDime on March 23, 2009, 07:03:44 PM
mrtrc - I ran your feed through with the Regex enabled with the regex you provided above, and it grabbed the full article without a problem.

I'm not sure what the problem was but I uninstalled the Mod then reinstalled and used the same regex. Now it works perfectly. Thank you very much for your help and a GREAT Mod!

I saw that it pulled the full articles on your site... looks good! Can you post the regex line you used for others to try?

TIA

KB
Title: Re: RSS Feeder
Post by: mrtrc266 on March 24, 2009, 01:43:59 AM
Quote from: Killer-B on March 24, 2009, 01:35:20 AM
Quote from: mrtrc266 on March 24, 2009, 01:11:09 AM
Quote from: SlammedDime on March 23, 2009, 07:03:44 PM
mrtrc - I ran your feed through with the Regex enabled with the regex you provided above, and it grabbed the full article without a problem.

I'm not sure what the problem was but I uninstalled the Mod then reinstalled and used the same regex. Now it works perfectly. Thank you very much for your help and a GREAT Mod!

I saw that it pulled the full articles on your site... looks good! Can you post the regex line you used for others to try?

TIA

KB

Here is the link to the feeds I was trying to pull http://www.railbirds.com/rss/latestblogs.php

I viewed the source code and just found the DIV right before where the article started and found this...

<div class="blog-body">

And then used this for the regex.

~<div class="blog-body">(.*)<\/div>~siU

As I stated above I'm not sure why it wasn't working before but I dropped the table, uninstalled the Mod and then reinstalled. Now it works great.
Title: Re: RSS Feeder
Post by: SilverKnight on March 24, 2009, 01:38:48 PM
Needs 1.1x version....
Title: Re: RSS Feeder
Post by: Killer-B on March 24, 2009, 02:01:13 PM
Quote from: mrtrc266 on March 24, 2009, 01:43:59 AM
Quote from: Killer-B on March 24, 2009, 01:35:20 AM
Quote from: mrtrc266 on March 24, 2009, 01:11:09 AM
Quote from: SlammedDime on March 23, 2009, 07:03:44 PM
mrtrc - I ran your feed through with the Regex enabled with the regex you provided above, and it grabbed the full article without a problem.

I'm not sure what the problem was but I uninstalled the Mod then reinstalled and used the same regex. Now it works perfectly. Thank you very much for your help and a GREAT Mod!

I saw that it pulled the full articles on your site... looks good! Can you post the regex line you used for others to try?

TIA

KB

Here is the link to the feeds I was trying to pull http://www.railbirds.com/rss/latestblogs.php

I viewed the source code and just found the DIV right before where the article started and found this...

<div class="blog-body">

And then used this for the regex.

~<div class="blog-body">(.*)<\/div>~siU

As I stated above I'm not sure why it wasn't working before but I dropped the table, uninstalled the Mod and then reinstalled. Now it works great.

Ahhhhhh - gotcha! Great way to find that out....

Many thanks - will research my feeds, and see if I can have the same success!

Cheers!

KB

@SilverKnight - "Needs 1.1x version" - Are you referring to the RSS feed (vs. 2.0) or 1.1x for SMF?  - I'm running 2.0RC1 and all my feeds are 2.0
Title: Re: RSS Feeder
Post by: Gimenez on March 25, 2009, 01:09:14 AM
Hello, and first of all thanks for this great mod! Is there a way I can remove the "Source:" from the feed? I noticed you added that feature in like version 1 but is there any way to get rid of it?
Title: Re: RSS Feeder
Post by: SlammedDime on March 25, 2009, 05:54:33 AM
Anything is possible... It can be removed in ScheduledTasks.php.  Just do a search for 'Source:' in that file and remove that line.
Title: Re: RSS Feeder
Post by: SilverKnight on March 25, 2009, 10:25:15 PM
Quote from: SlammedDime on March 25, 2009, 05:54:33 AM
Anything is possible... It can be removed in ScheduledTasks.php.  Just do a search for 'Source:' in that file and remove that line.

I don't suppose you are/planning to make a 1.1x version? it's a needed feature for everyone...  :-\
Title: Re: RSS Feeder
Post by: SlammedDime on March 25, 2009, 11:19:11 PM
Please see this quote from the previous page:
Quote from: SlammedDime on March 21, 2009, 03:41:10 PM
Sorry Nena, I won't be backporting this, it relys on too many of SMF 2.0's built in functions, and I would have to rewrite a lot of the mod to work.
Title: Re: RSS Feeder
Post by: jayman2 on March 26, 2009, 02:27:49 PM
Great mod!  I've had it running for a while now without any problems.  I just have one question.  Is there any way to automatically delete old posts?  For example, I'm importing a few news post everyday and the post count is growing.  I know I can go in and delete posts individually, but I would like to be able to delete posts that are over, for example 2 weeks old, or when the post count reaches a cerain number.  Does anybody have any suggestions?  hanks in advance.
Title: Re: RSS Feeder
Post by: SlammedDime on March 26, 2009, 03:06:55 PM
That's a bit beyond the scope of this mod, but SMF 2.0 does have a maintenance section that allows you to do this at will...

http://[yourboard]/index.php?action=admin;area=maintain;sa=topics
Title: Re: RSS Feeder
Post by: Judgey on March 28, 2009, 09:37:48 AM
Were can i find the settings for this mod, i can add a url thats fine, just like the settings like when to post and stuff?

Thank you
Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2009, 12:40:35 PM
Each feed has it's own settings.  The only global setting is the Scheduled Task, and that can be found with the rest of the scheduled tasks settings in the admin panel.
Title: Re: RSS Feeder
Post by: Judgey on March 28, 2009, 12:48:06 PM
Thanks for that, i wonder wots up then, it dont seem to post anything from anysites :(
Title: Re: RSS Feeder
Post by: Killer-B on March 28, 2009, 12:49:22 PM
Quote from: SlammedDime on March 28, 2009, 12:40:35 PM
Each feed has it's own settings.  The only global setting is the Scheduled Task, and that can be found with the rest of the scheduled tasks settings in the admin panel.

Hey Slammed...

My RSS feeder has worked like a champ the past 3 weeks (2.0RC1) but suddenly "stopped" at 09:00 yesterday... and have not received any feeds since - (I have over 40 feeds)

I removed any dormant feeds - and checked/parsed the others  -and the links all resolve...

Also, I then went to "Scheduled Tasks" and try to run it manually (it's set to start at 08:00 every 1 hour) - and now after trying to start that, it takes me to a BLANK page.... it's obviously hanging... I loaded it on a new demo site, same URL's/Feeds - and it works fine...!? I have not added any new Mods - nor have I changed my RSS Feeds (except remove the inactive ones) - and it's still stuck - and am still getting the white screen when I try to execute manually - And there are no "errors" in the RSS Error Log either...

Thoughts??? I'm stumped!

Thanks -

KB
Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2009, 01:06:24 PM
Any errors in your hosting error log?  Have you installed any mods since installing this?

Judgey - Have you tried running it manually in the scheduled tasks screen?  Are the feeds enabled (Green checkmark)?  Any errors in your forum error log?
Title: Re: RSS Feeder
Post by: Killer-B on March 28, 2009, 01:10:40 PM
Quote from: SlammedDime on March 28, 2009, 01:06:24 PM
Any errors in your hosting error log?  Have you installed any mods since installing this?

Judgey - Have you tried running it manually in the scheduled tasks screen?  Are the feeds enabled (Green checkmark)?  Any errors in your forum error log?

I don't know if you meant that for me, or for Judgy - but as stated in my original Q ... there are no new mods, and no errors are in the logs... It does show "other" activities (member notices, etc.) did happen today... just nothing on the RSS front.. :-(
Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2009, 01:18:01 PM
Well you had said that there are no 'errors' in the RSS error log.... so really I assumed you meant SMF's error log, hence I asked about your hosts error log, normally available through cPanel, or there may be an error_log file in your SMF directory.

My suggestion would be to disable all feeds (easy with the one click disable/enable, just click the green check mark), then try and run the scheduled task... if it runs okay (although none will be posted), start enabling them one by one until you find the one that causes the white screen.

Let me know what happens :)
Title: Re: RSS Feeder
Post by: Judgey on March 28, 2009, 01:25:14 PM
Hey, im getting "cURL error 7: couldn't connect to host" and then it keeps turning its self of (the rss feeder bit)


Title: Re: RSS Feeder
Post by: Killer-B on March 28, 2009, 01:27:14 PM
Quote from: SlammedDime on March 28, 2009, 01:18:01 PM
Well you had said that there are no 'errors' in the RSS error log.... so really I assumed you meant SMF's error log, hence I asked about your hosts error log, normally available through cPanel, or there may be an error_log file in your SMF directory.

My suggestion would be to disable all feeds (easy with the one click disable/enable, just click the green check mark), then try and run the scheduled task... if it runs okay (although none will be posted), start enabling them one by one until you find the one that causes the white screen.

Let me know what happens :)

Well, I meant the "scheduled tasks" error (task) log... showed no errors... but also showed no RSS activity since yesterday...

Approval Notifications  Today at 11:00:10 AM  0 seconds
Weekly Maintenance Today at 10:42:01 AM 0 seconds
Fetch Simple Machines Files Today at 10:42:01 AM 3 seconds
Weekly Notification Summary Today at 10:41:58 AM 0 seconds
Daily Notification Summary Today at 10:41:58 AM 0 seconds
Daily Maintenance Today at 10:41:58 AM 0 seconds
Approval Notifications Today at 10:41:58 AM 0 seconds
Approval Notifications Today at 09:00:10 AM 0 seconds
Approval Notifications Today at 07:00:59 AM 0 seconds
Approval Notifications Today at 05:00:58 AM 0 seconds
Approval Notifications Today at 03:00:59 AM 0 seconds
Approval Notifications Today at 01:02:58 AM 0 seconds
Approval Notifications Yesterday at 11:07:00 PM 0 seconds
Approval Notifications Yesterday at 09:01:53 PM 0 seconds
Fetch Simple Machines Files Yesterday at 08:22:02 PM 3 seconds
Approval Notifications Yesterday at 07:04:34 PM 0 seconds
Paid Subscription Checks Yesterday at 05:14:31 PM 0 seconds
Daily Maintenance Yesterday at 05:14:07 PM 0 seconds
Daily Notification Summary Yesterday at 05:11:23 PM 0 seconds
Approval Notifications Yesterday at 05:02:39 PM 0 seconds
Approval Notifications Yesterday at 03:03:13 PM 0 seconds
Approval Notifications Yesterday at 01:00:04 PM 0 seconds
Approval Notifications Yesterday at 11:02:34 AM 0 seconds
RSS Feeder Yesterday at 10:04:20 AM 1 seconds
RSS Feeder Yesterday at 09:07:03 AM 29 seconds
Approval Notifications Yesterday at 09:00:13 AM 0 seconds
RSS Feeder Yesterday at 08:00:49 AM 1 seconds
RSS Feeder Yesterday at 07:04:52 AM 15 seconds
Approval Notifications Yesterday at 07:02:07 AM 0 seconds
RSS Feeder Yesterday at 06:00:57 AM 2 seconds


I guess I'll disable them all, and see what that nets?... Is there a way to "back up" all my feeds in case I have to uninstall/reinstall the RSS mod?

And FWIW, I created an Admin account for you... but will try this first before crying on your shoulder more... It's just that today is THE first race of the season, and our busiest day... and losing all these feeds couldn't have come at a worse time :(

Thanks -

KB

Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2009, 01:33:32 PM
If you have to uninstall the mod, it will not remove the feeds from the database, nor the feed log... they will all stay there. :)
Title: Re: RSS Feeder
Post by: Judgey on March 28, 2009, 01:42:40 PM
Dont forget about me :)
Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2009, 01:45:58 PM
Just as the error stated, the mod could not connect to the host to retrieve the feed... what is the feed you're trying to use.
Title: Re: RSS Feeder
Post by: Killer-B on March 28, 2009, 01:53:34 PM
Quote from: SlammedDime on March 28, 2009, 01:33:32 PM
If you have to uninstall the mod, it will not remove the feeds from the database, nor the feed log... they will all stay there. :)

Thanks for the tip...

I unchecked all 40+ feeds, and now it allows for Tasks to run... I put 2 or 3 feeds back in, ran it manually, and it works now...

Soooooooo - Now, I have to find the one "bad feed" that was causing it to hang -

Thanks for the prompt help

Cheers

KB
Title: Re: RSS Feeder
Post by: mrtrc266 on March 29, 2009, 12:34:51 PM
Everything is working great except I can't seem to enter any keywords. When I put in a keyword it doesn't pull any feeds.

I went to the site that I pull the blogs from and there are blogs that contain the keywords that I use. Here is my list, does it look ok?

monster, monsters, rbcl, r.b.c.l., botc, b.o.t.c., bocl, b.o.c.l., mayhem, mash

EDIT: I even tried using just one keyword "monster" and get the same results...nothing :(
Title: Re: RSS Feeder
Post by: SlammedDime on March 29, 2009, 01:38:59 PM
What is the feed you are trying to use?

Killer - any updates?
Title: Re: RSS Feeder
Post by: mrtrc266 on March 29, 2009, 01:41:13 PM
The same as before here, It's working perfectly until I try to enter a keyword.
http://www.simplemachines.org/community/index.php?topic=285356.msg1988596#msg1988596
Title: Re: RSS Feeder
Post by: Killer-B on March 29, 2009, 04:10:56 PM
Yeah - sorry -

Like I said, I removed them all like you suggested, and that allowed me to do manual tasks... and then I loaded (enabled) them 1 by 1 till I found the culprit... Had some RSS feeds from SpeedTV - and for whatever reason, when I turn(ed) those on, it kills everything... so, I just removed them ... and is working double time.. :D  In fact, loaded some other pic feeds.. and can't keep up with all its pulling in! so - working like a champ - thanks for the help - For a moment there thought I was gonna have to fill out 40 forms from scratch again LOL-

Thanks -

KB
Title: Re: RSS Feeder
Post by: dextrous on March 30, 2009, 05:52:23 PM
First off, awesome mod.

My one question--is it possible to have different update schedule for one of my feeds (it is a scorecard and should be updated regularly)? Perhaps I could install two instances of Feeder (1, 2)...is such a thing possible?

If not, how would I go about doing this manually and linking it from my forum, i.e. calling upon a RSS code full text using the "regular expression" tool?

Thanks.
Title: Re: RSS Feeder
Post by: SlammedDime on March 30, 2009, 07:12:18 PM
At this point, it's not possible to setup feeds for different schedules.  I will probably be doing that in the next version.  As for doing it manually... it wouldn't be easy... at all... there is a lot of code that is run through for just one feed, so you would have to copy it, and modify it to work with just one feed. 
Title: Re: RSS Feeder
Post by: dextrous on March 30, 2009, 08:27:05 PM
Thanks, look forward to those changes.
Would setting it to 2 minutes for all the 5 feeds cause a lot of bandwith to be taken up by the program?

On an unrelated note, sometimes when I get the full text, there's a gap (http://cricketvoice.com/testforum/index.php?topic=68.0) -- white space on top, which is not a problem on the forum itself. But when I try do to an XML feed for that board, the same gap carries over. I'm wondering if it is possible to trim the space as a last command before it injects the text into the forum? Or maybe the XML could trim spaces; not sure which one might be easier.

Also, some feeds capture the image and others don't; any idea how I could get them all to be consistent?

Thanks, and look forward to using it on my live site (cricketvoice.com) very soon!
Title: Re: RSS Feeder
Post by: Vampy on April 02, 2009, 07:32:16 AM
Hi

I know this has been asked before but I still don't know how to get what I need. I want it to post the full article from this feed http://rss.news.yahoo.com/rss/world and not just the pic and small amount of text on the index page - what code do I have to put in to "Regular Expression - Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1])." to get it to do that?

Also I'm using a theme with a dark background, I can't see anything on the Add Feed page unless I switch to default theme - is there any way to fix this?

Thanks in advance for your kind help
Title: Re: RSS Feeder
Post by: SlammedDime on April 02, 2009, 12:21:24 PM
I don't use any special css for the add feed page, it should be using all SMF default colors based on the theme, I'll have to look into it.

As for the regular expression, have you looked at the small tutorial that is linked in the first topic of this post?
Title: Re: RSS Feeder
Post by: Vampy on April 02, 2009, 01:25:08 PM
Yea I have - I saved and uploaded the file regex.php but all I get is 2 blank white boxes titled Regex: and Body: then a submit button

Could this all be to do with the add_settings.php file? Do I need to manually upload this file as I can't find it anywhere, and if so which folder do I need to upload it to?
Title: Re: RSS Feeder
Post by: SlammedDime on April 02, 2009, 03:04:15 PM
regex.php is only a small script to test regular expressions.  If you installed the mod already, you don't need to run add_settings.php, as that was done on install.

Did you attempt at creating any regular expressions based on my tutorial?  What was your result?
Title: Re: RSS Feeder
Post by: Vampy on April 02, 2009, 03:32:04 PM
I've only just found the link, they're not always easy to see LOL - I'll read it and try it out for myself and let you know how I get on - thanks

EDIT: I keep getting errors but then I don't know what to put into each box, I pretty much copied your example - this is what I wanted to try

~<div id="yn-story-secondary" class="ult-section">(.*)<\/div>~siU

Title: Re: RSS Feeder
Post by: mrtrc266 on April 02, 2009, 05:18:50 PM
Try this, that worked for me.

Feed URL
http://rss.news.yahoo.com/rss/world

Regular Expression
~<div class="yn-story-content">(.*)<\/div>~siU
Title: Re: RSS Feeder
Post by: Vampy on April 02, 2009, 05:33:05 PM
Thanks mrtrc266 I'll try that :D

Thanks that worked - now just one question - any way to get the main pic as well as the text?
Title: Re: RSS Feeder
Post by: Killer-B on April 02, 2009, 06:04:56 PM
mrtrc -

Where'd you pull this code from for her news? "yn-story-content"

yn = yahoo news obviously...  but the "story" and "content' bits... did you go into the HTML header files and look again?

Title: Re: RSS Feeder
Post by: mrtrc266 on April 02, 2009, 06:18:10 PM
@ Killer & Vampy

This works for all feed I have used so far, we'll use this as an example...

Feed URL...
http://rss.news.yahoo.com/rss/world

Once you click on that you'll see the list of feeds and click on the first feed...
http://news.yahoo.com/s/nm/20090402/od_uk_nm/oukoe_uk_g20_australia_apology

Look for the first words in the article "LONDON (Reuters)"

Right click and view the source and search for "LONDON (Reuters)"

Find the first DIV before that, in this case its <div class="yn-story-content"> so the Regular Expression will be...

~<div class="yn-story-content">(.*)<\/div>~siU

Hope that helps
Title: Re: RSS Feeder
Post by: mrtrc266 on April 02, 2009, 06:20:50 PM
QuoteThanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.
Title: Re: RSS Feeder
Post by: Vampy on April 02, 2009, 06:36:37 PM
Quote from: mrtrc266 on April 02, 2009, 06:20:50 PM
QuoteThanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.
Yeah I checked and it is - If I go back to that div all I get is the pic and the "teaser" text - just like the main index page

Thanks for trying I appreciate it
Title: Re: RSS Feeder
Post by: mrtrc266 on April 08, 2009, 02:13:38 AM
This is working great in retrieving the full articles but for some reason it won't pull the pics. Check it out here....

http://monsters-mansion.com/index.php/topic,3134.msg5850/topicseen.html

Any ideas on this?


Thanks in advance.
Title: Re: RSS Feeder
Post by: SlammedDime on April 08, 2009, 05:54:25 AM
It is pulling the images, the problem is the site doesn't use full urls in their image src tags like they should, they use relative urls, which means the image tries to load relative to your site, which of course doesn't work.  I'll think of a way to fix it, but I don't know how easy it will be.
Title: Re: RSS Feeder
Post by: mrtrc266 on April 08, 2009, 10:25:27 AM
Thank you very much, that would be awesome ig you could get that going.
Title: Re: RSS Feeder
Post by: Jimi1810 on April 08, 2009, 12:50:56 PM
Quote from: Jimi1810 on February 09, 2009, 04:56:19 AM
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

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

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

Sorry I've not checked in a while so not 100% sure, but did you get a chance to have a look at this SlammedDime? if not no worries, thanks.
Title: Re: RSS Feeder
Post by: mrtrc266 on April 08, 2009, 01:03:11 PM
@ Jimi1810 

Try this DIV instead, I just got it to pull the full article using that.

<div class="ch1">
Title: Re: RSS Feeder
Post by: Jimi1810 on April 08, 2009, 01:44:06 PM
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.
Title: Re: RSS Feeder
Post by: mrtrc266 on April 08, 2009, 02:16:02 PM
Quote from: Jimi1810 on April 08, 2009, 01:44:06 PM
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.

Hmmm, I actually just tried it with the regex your were using ~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU and the result is here....

http://www.monsters-mansion.com/smf2/index.php/topic,2782.0.html

Then tried with the ch1 div ~<div class="ch1">(.*)<h3>Bookmark with:<\/h3>~siU and result is here...
http://www.monsters-mansion.com/smf2/index.php/topic,2783.0.html
and here
http://www.monsters-mansion.com/smf2/index.php/topic,2784.0.html

Only diff really is that one tries to pull the pic? Sorry I thought I was onto something but as usual I'm waayyy off....LOL






Title: Re: RSS Feeder
Post by: Jimi1810 on April 09, 2009, 06:08:43 AM
Oh you actually have it working! thanks a lot for that, at least I know it is possible. I'll try installing it on another of my test forums and see if that makes a difference.

*edit* tried a clean install of SMF 2.0 RC1 and downloaded the latest 1.1.1 of this mod (had 1.1.0 before) but still getting the same problem, hmm.
Title: Re: RSS Feeder
Post by: Vampy on April 10, 2009, 10:08:42 AM
Sorry to be a pain again but do you think the regex <div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU would work with this feed - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml ? I'm still trying to find a way to get the pictures in it too



In addition to this I still have the issue when using my theme (tabs-purple)- all I get is a blank white box when I want to add or edit a feed (see attached) - is there some file within my theme I need to edit to get it to show properly? I couldn't see anything outside of default files etc within the install xml file
Title: Re: RSS Feeder
Post by: SlammedDime on April 10, 2009, 01:09:09 PM
Vampy, you probably have a blank screen like that because there is a Modifications.english.php in the languages folder in your Theme directory.  There should not be.  You should copy everything in that file into the Modifications.english.php folder in the default theme language directory, then delete it.

For that feed, you'd want to use: ~<td class="storybody">(.*?)</td>~si and that should get everything.
Title: Re: RSS Feeder
Post by: Vampy on April 11, 2009, 11:10:33 AM
Thanks SlammedDime but that's what's causing me such a headache with this - there IS no Modifications.english.php file in my themes languages folder, the only thing in there is ThemeStrings.english.php - everything else runs from the default files.

I'll try that string for the BBC feed - fingers crossed :D
Title: Re: RSS Feeder
Post by: SlammedDime on April 11, 2009, 11:22:48 AM
Are there any errors in your error log?
Title: Re: RSS Feeder
Post by: Vampy on April 11, 2009, 11:35:05 AM
From within SMF error logs this is all I have

Apply Filter: Only show the error messages of this URL  http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845
   

Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
2: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '('
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/ScheduledTasks.php
Line: 1723
   


     Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845


Nothing looks suspicious - do you want me to look on the server error logs too?
Title: Re: RSS Feeder
Post by: Mack450 on April 11, 2009, 03:31:47 PM
cronrss.php is not working for me
Title: Re: RSS Feeder
Post by: SlammedDime on April 12, 2009, 12:20:09 AM
Can't really help you... this mod doesn't have such a file.
Title: Re: RSS Feeder
Post by: Özgür on April 12, 2009, 03:39:42 PM
Hi SlammedDime. This is wonderfull mod, but i see now :(.
Whatever i use the mod for wordpress post to my smf forum.
I use regexp :  ~<div class="entry clearfloat">(.*)<\/div>~siU
My feed is : http://www.rockayseri.net/feed
I want to change something. I want to delete post time, because this is not required. And Source code & item link?
You put this code by knowing as i know, but i use this for mysite to mysite. Can you help me with this ? Or can i edit mod files ?

And..
The line spacing is increasing on feeding. This is fixable?
Title: Re: RSS Feeder
Post by: dextrous on April 13, 2009, 03:43:34 PM
This is working great on my site--http://www.cricketvoice.com/

My only problem is with the big space between the title and text for each post it makes (as I'm planning on using the feed on a CMS to display as articles)
Title: Re: RSS Feeder
Post by: mrtrc266 on April 14, 2009, 09:04:32 PM
I have 1 feed that has a key word to search for and for whatever reason I keeps getting disabled all by itself ???

Any ideas on this one?

Thanks in advance.
Title: Re: RSS Feeder
Post by: SlammedDime on April 14, 2009, 09:17:54 PM
If the feed get's disabled, it should be throwing an error into the error log.  Any errors there related to the feed?
Title: Re: RSS Feeder
Post by: mrtrc266 on April 14, 2009, 09:24:29 PM
Guest
Today at 07:01:02 PM
4573e1cc082a0a730df11155f964eaf4
Type of error: General
  http://monsters-mansion.com/index.php?http://monsters-mansion.com/ (http://monsters-mansion.com/index.php?http://monsters-mansion.com/)
  RSS Feeder: http://www.railbirds.com/rss/latestblogs.php (XML error: XML_ERR_NAME_REQUIRED at line 82, column 27)

This is the only error I see related to the rss feeds
Title: Re: RSS Feeder
Post by: Groundhog on April 15, 2009, 01:02:47 AM
Hi

This is just for anyone who has experienced the same problem as me:

I found the problem and solution for anyone else with this error. Firstly I don't think it is caused by this mod.

If you move an existing topic from a board into the board's child board then the feeder continues to feed to the original board but SMF is smart enough to redirect the feed to the moved topic but not smart enough to reset the new post (on.gif) setting to the child board.

In other words. The next time the feeder makes a post, to the moved topic, the new post icon will be lit on the original board even though it's not in that board but in it's child board. The child board doesn't show the new post (on.gif) icon even though there is a new post in the moved topic. I assume that is a bug with SMF?

However, Updating the link in the RSS Feed setting fixes the problem. 
Title: Re: RSS Feeder
Post by: SlammedDime on April 15, 2009, 06:13:48 AM
mrtrc266 - That means the XML file is malformed, nothing I can really do about that.  It's up to the site that publishes the feed to ensure it's done properly.  Any text *should* be wrapped in CDATA tags if it's going to contain any special characters.
Title: Re: RSS Feeder
Post by: SlammedDime on April 15, 2009, 06:16:14 AM
Quote from: Groundhog on April 15, 2009, 01:02:47 AM
Hi

This is just for anyone who has experienced the same problem as me:

I found the problem and solution for anyone else with this error. Firstly I don't think it is caused by this mod.

If you move an existing topic from a board into the board's child board then the feeder continues to feed to the original board but SMF is smart enough to redirect the feed to the moved topic but not smart enough to reset the new post (on.gif) setting to the child board.

In other words. The next time the feeder makes a post, to the moved topic, the new post icon will be lit on the original board even though it's not in that board but in it's child board. The child board doesn't show the new post (on.gif) icon even though there is a new post in the moved topic. I assume that is a bug with SMF?

However, Updating the link in the RSS Feed setting fixes the problem. 
It is likely a bug with the mod, something I didn't think about happening.... if you are using the option to throw the feed into a single post, this will happen.  I'll have to dig through the code to remember how I did the attaching to an existing topic and try and fix that.  Thanks.
Title: Re: RSS Feeder
Post by: Groundhog on April 15, 2009, 12:58:18 PM
QuoteIt is likely a bug with the mod, something I didn't think about happening.... if you are using the option to throw the feed into a single post, this will happen.  I'll have to dig through the code to remember how I did the attaching to an existing topic and try and fix that.  Thanks.

This is probably not how most people would use it so possibly might not be worth bothering about. Just thought that I would highlight this for the few people that may use it this way.

The only reason that I did this is because I needed to move the existing topics into a child board after installing the "Childboards Only" mod.

Thanks for the response. I'm enjoying using your mod.
Title: Re: RSS Feeder
Post by: dextrous on April 16, 2009, 04:00:19 AM
One question--how do I make it so right on top of the post there's no link and repetition of the title.

There must be a file which controls the display?

Thanks.
Title: Re: RSS Feeder
Post by: zach21uk on April 17, 2009, 04:12:23 AM
I Installed the mod, however I do not see a corrosponding section for it in the Admin Panel - where exactly can enter my feeds into the mod?

Edit: I tried going to "index.php?action=admin;area=modsettings;sa=rssfeeds" however I just got redirected back to my main admin page - like the mod didnt install right.

I uninstalled and reinstalled the mod again (no problems) - but I still cannont access the admin page.

Edit 2: It seems the mod wasnt installing its code correctly in managesettings.php - I ran through and did it manually and all is well now.
Title: Re: RSS Feeder
Post by: Verso on April 17, 2009, 08:38:17 AM
I have installed this MOD.......

I get the following:-


/* RSS Feeder Settings */ function ModifyRSSFeedSettings() { global $context, $txt, $sourcedir, $scripturl, $smcFunc; loadTemplate('RSSFeeds'); $context['page_title'] = $txt['rss_feeder']; if (!empty($_REQUEST['feed']) && (isset($_REQUEST['enable']) || isset($_REQUEST['disable']))) { // Quick change on the status... $smcFunc['db_query']('', ' UPDATE {db_prefix}rssfeeds SET enabled = {int:option} WHERE id_feed = {int:feed}', array( 'option' => isset($_REQUEST['enable']) ? 1 : 0, 'feed' => (int) $_REQUEST['feed'], ) ); redirectExit('action=admin;area=modsettings;sa=rssfeeds'); } if (!empty($_REQUEST['feed']) || !empty($_REQUEST['add'])) { $context['sub_template'] = 'rss_feeder_add'; // Load the boards and categories for adding or editing a feed. $request = $smcFunc['db_query']('', ' SELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat FROM {db_prefix}boards AS b LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)', array() ); $context['categories'] = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { if (!isset($context['categories'][$row['id_cat']])) $context['categories'][$row['id_cat']] = array ( 'name' => strip_tags($row['cat_name']), 'boards' => array(), ); $context['categories'][$row['id_cat']]['boards'][] = array( 'id' => $row['id_board'], 'name' => strip_tags($row['name']), 'category' => strip_tags($row['cat_name']), 'child_level' => $row['child_level'], 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board, ); } $smcFunc['db_free_result']($request); if (empty($context['categories'])) fatal_lang_error('rss_feed_no_boards', false); // If we're just adding a feed, we can return, don't need to do anything further if (empty($_REQUEST['add'])) { // Lets get the feed from the database $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}rssfeeds WHERE id_feed = {int:feed} LIMIT 1', array( 'feed' => ((int) $_REQUEST['feed']), ) ); // No Feed?? ut oh... hacker!! if ($smcFunc['db_num_rows']($request) != 1) fatal_lang_error('rss_feed_not_found', false); $context['rss_feed'] = $smcFunc['db_fetch_assoc']($request); $context['rss_feed'] = htmlspecialchars__recursive($context['rss_feed']); $smcFunc['db_free_result']($request); } $context['icon'] = !empty($context['rss_feed']['icon']) ? $context['rss_feed']['icon'] : 'xx'; require_once($sourcedir . '/Subs-Editor.php'); // Message icons - customized icons are off? $context['icons'] = getMessageIcons(!empty($context['rss_feed']['id_board']) ? $context['rss_feed']['id_board'] : 0); if (!empty($context['icons'])) $context['icons'][count($context['icons']) - 1]['is_last'] = true; $context['icon_url'] = ''; for ($i = 0, $n = count($context['icons']); $i < $n; $i++) { $context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value']; if ($context['icons'][$i]['selected']) $context['icon_url'] = $context['icons'][$i]['url']; } if (empty($context['icon_url'])) { $context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif'; array_unshift($context['icons'], array( 'value' => $context['icon'], 'name' => $txt['current_icon'], 'url' => $context['icon_url'], 'is_last' => empty($context['icons']), 'selected' => true, )); } return; } // What about deleting one or more?? elseif (!empty($_REQUEST['delete'])) { //$_POST['checked_feeds'] // We already asked that they wanted to delete, so we'll just delete... no confirmation foreach ($_POST['checked_feeds'] as $key => $id) $_POST['checked_feeds'][$key] = (int) $id; $smcFunc['db_query']('', ' DELETE FROM {db_prefix}rssfeeds WHERE id_feed IN ({array_int:feed_list})', array( 'feed_list' => $_POST['checked_feeds'], ) ); } // Or are they saving one being modified?? elseif (!empty($_REQUEST['save']) && !empty($_POST['sc'])) { // First we check the session... checkSession(); // Put the insert array together... $insertOptions = array(); // Let's do the 'unrequireds' first... $insertOptions['id_board'] = (int)$_POST['feed_board']; $insertOptions['icon'] = isset($_POST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']) : 'xx'; $insertOptions['enabled'] = isset($_POST['feed_enabled']) ? 1 : 0; $insertOptions['keywords'] = trim($_POST['feed_keywords']) != '' ? trim($_POST['feed_keywords']) : ''; $insertOptions['locked'] = isset($_POST['feed_locked']) ? 1 : 0; $insertOptions['getfull'] = isset($_POST['feed_full']) ? 1 : 0; $insertOptions['approve'] = isset($_POST['feed_approve']) ? 1 : 0; $insertOptions['singletopic'] = isset($_POST['feed_singletopic']) ? 1 : 0; $insertOptions['topicprefix'] = trim($_POST['feed_prefix']) != '' ? trim($_POST['feed_prefix']) : ''; $insertOptions['footer'] = !empty($_POST['feed_footer']) ? trim($_POST['feed_footer']) : ''; $insertOptions['numbertoimport'] = trim($_POST['feed_import']) != '' ? (int) trim($_POST['feed_import']) : 0; $context['feed_errors'] = array(); // And now the requireds that we can throw errors on... if (empty($_POST['feed_title'])) $context['feed_errors']['feed_title'] = ($insertOptions['title'] = ''); else $insertOptions['title'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&$1', $_POST['feed_title']); if (empty($_POST['feed_url'])) $context['feed_errors']['feed_url'] = ($insertOptions['feedurl'] = ''); else $insertOptions['feedurl'] = trim($_POST['feed_url']); if (empty($_POST['feed_poster'])) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = ''); // Do a query to get the member's id else { $request = $smcFunc['db_query']('', ' SELECT id_member FROM {db_prefix}members WHERE real_name = {string:name} OR member_name = {string:name} LIMIT 1', array( 'name' => trim($_POST['feed_poster']), ) ); if ($smcFunc['db_num_rows']($request) != 1) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = trim($_POST['feed_poster'])); else { $insertOptions['postername'] = trim($_POST['feed_poster']); list($insertOptions['id_member']) = $smcFunc['db_fetch_row']($request); } $smcFunc['db_free_result']($request); } $insertOptions['regex'] = trim($_POST['feed_regex']); if (!empty($insertOptions['getfull']) && empty($insertOptions['regex'])) $context['feed_errors']['feed_regex'] = ''; // if we had any errors, lets kick back a screen and highlight them... if (!empty($context['feed_errors'])) { $context['rss_feed'] = $insertOptions; if (!empty($_POST['feed_id'])) $_REQUEST['feed'] = $_POST['feed_id']; $_REQUEST['add'] = true; return ModifyRSSFeedSettings(); } // Looks like we're good. // Modifying an existing feed? if (!empty($_REQUEST['feed_id'])) { $smcFunc['db_query']('',' UPDATE {db_prefix}rssfeeds SET id_board = {int:id_board}, feedurl = {string:feedurl}, title = {string:title}, icon = {string:icon}, enabled = {int:enabled}, postername = {string:postername}, id_member = {int:id_member}, keywords = {string:keywords}, regex = {string:regex}, locked = {int:locked}, getfull = {int:getfull}, approve = {int:approve}, singletopic = {int:singletopic}, topicprefix = {string:topicprefix}, footer = {string:footer}, numbertoimport = {int:numbertoimport} WHERE id_feed = {int:id_feed}', array_merge(array('id_feed' => (int)$_REQUEST['feed_id']), $insertOptions) ); $context['feed_insert_success'] = $txt['rss_feed_update_success']; } // Or I guess we're inserting a new one else { // Fix up the stuff for insertion, make sure the arrays are aligned $insertRows = array( 'singletopic' => 'int', 'icon' => 'string', 'footer' => 'string', 'getfull' => 'int', 'id_board' => 'int', 'feedurl' => 'string', 'title' => 'string', 'enabled' => 'int', 'postername' => 'string', 'id_member' => 'int', 'keywords' => 'string', 'regex' => 'string', 'locked' => 'int', 'approve' => 'int', 'topicprefix' => 'string', 'numbertoimport' => 'int' ); ksort($insertRows); ksort($insertOptions); $smcFunc['db_insert']('', '{db_prefix}rssfeeds', $insertRows, $insertOptions, array('id_feed') ); $id_feed = $smcFunc['db_insert_id']('{db_prefix}rssfeeds', 'id_feed'); if (empty($id_feed)) $context['feed_insert_error'] = $txt['rss_feed_insert_error']; else $context['feed_insert_success'] = $txt['rss_feed_insert_success']; } } // If they deleted or saved, let's show the main list $context['sub_template'] = 'rss_feeder_list'; // Create the table that will display the feeds $listOptions = array( 'id' => 'rss_feeder_list', 'items_per_page' => 40, 'default_sort_col' => 'icon', 'base_href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'no_items_label' => $txt['rss_feed_none'], 'get_items' => array( 'function' => 'list_getFeeds', ), 'get_count' => array( 'function' => 'list_getNumFeeds', ), 'columns' => array( 'icon' => array( 'header' => array( 'value' => $txt['rss_feed_enabled'], ), 'data' => array( 'function' => create_function('$rowData', ' global $settings, $scripturl, $smcFunc, $txt; if (empty($rowData[\'name\']) && $rowData[\'enabled\']) { $smcFunc[\'db_query\'](\'\', \' UPDATE {db_prefix}rssfeeds SET enabled = 0 WHERE id_feed = {int:feed}\', array( \'feed\' => $rowData[\'id_feed\'], ) ); // Log an error about the issue, just so the user can see why their feed was disabled... log_error($txt[\'rss_feeder\'] . \': \' . $rowData[\'title\'] . \' (\' . $txt[\'rss_feed_board_error\'] . \')\'); $rowData[\'enabled\'] = 0; } return \'\';' ), 'style' => 'text-align: center; width: 130px;', ), 'sort' => array( 'default' => 'f.enabled', 'reverse' => 'f.enabled DESC', ), ), 'title' => array( 'header' => array( 'value' => $txt['rss_feed_title'], ), 'data' => array( 'db' => 'title', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.title', 'reverse' => 'f.title DESC', ), ), 'url' => array( 'header' => array( 'value' => $txt['rss_feed_url'], ), 'data' => array( 'sprintf' => array( 'format' => '%1$s', 'params' => array( 'feedurl' => true, ), ), ), 'sort' => array( 'default' => 'f.feedurl', 'reverse' => 'f.feedurl DESC', ), ), 'board' => array( 'header' => array( 'value' => $txt['rss_feed_board'], ), 'data' => array( 'function' => create_function('$rowData', ' global $txt; return empty($rowData[\'name\']) ? \'<< \' . $txt[\'rss_feed_board_error\'] . \' >>\' : $rowData[\'name\'];' ), 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'b.name', 'reverse' => 'b.name DESC', ), ), 'count' => array( 'header' => array( 'value' => $txt['rss_feed_count'], ), 'data' => array( 'db' => 'importcount', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.importcount', 'reverse' => 'f.importcount DESC', ), ), 'modify' => array( 'header' => array( 'value' => $txt['rss_feed_modify'], ), 'data' => array( 'sprintf' => array( 'format' => '' . $txt['rss_feed_modify'] . '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 50px;', ), ), 'check' => array( 'header' => array( 'value' => '', ), 'data' => array( 'sprintf' => array( 'format' => '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 32px;', ), ), ), 'form' => array( 'href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'name' => 'rssfeedForm', ), 'additional_rows' => array( array( 'position' => 'above_column_headers', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), array( 'position' => 'below_table_data', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), ), ); require_once($sourcedir . '/Subs-List.php'); createList($listOptions); } // Get information for the list above... grabs all of the feeds from the database function list_getFeeds($start, $items_per_page, $sort) { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT f.id_feed, b.name, f.title, f.feedurl, f.enabled, f.importcount FROM {db_prefix}rssfeeds AS f LEFT JOIN {db_prefix}boards AS b ON (b.id_board = f.id_board) ORDER BY {raw:sort} LIMIT ' . $start . ', ' . $items_per_page, array ( 'sort' => $sort, ) ); $feeds = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) $feeds[] = $row; $smcFunc['db_free_result']($request); return $feeds; } // The number grabbed above could be limited at 40... this just gets a count of all of them. function list_getNumFeeds() { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}rssfeeds', array( ) ); list($numFeeds) = $smcFunc['db_fetch_row']; $smcFunc['db_free_result']($request); return $numFeeds; }
Title: Re: RSS Feeder
Post by: mrtrc266 on April 17, 2009, 10:19:37 AM
@ Verso in Sources/ModSettings.php you need to put this ?> at the very bottom of the file.
Title: Re: RSS Feeder
Post by: GazOutEast on April 18, 2009, 10:37:56 AM
SD

Any chance of adding a "post expire" and "auto delete" function like the one available in WordPress?

Ideally it would need to be part of the feed admin - Some of my feeds have a post life-span of just 24 hours

I could really use such a feature for some of my feeds - the manual sort and delete is getting ridiculous

Thanks
Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on April 18, 2009, 03:45:49 PM
It's possible... would require another scheduled task and a bit more database work.  I'll think about it for the next version, but no promises.
Title: Re: RSS Feeder
Post by: Verso on April 19, 2009, 05:04:10 AM
Quote from: mrtrc266 on April 17, 2009, 10:19:37 AM
@ Verso in Sources/ModSettings.php you need to put this ?> at the very bottom of the file.

I don't seem to have a file of this name.........
Title: Re: RSS Feeder
Post by: SlammedDime on April 19, 2009, 05:59:52 AM
Try Sources/ManageSettings.php
Title: Re: RSS Feeder
Post by: GazOutEast on April 19, 2009, 06:34:53 AM
Quote from: SlammedDime on April 18, 2009, 03:45:49 PM
It's possible... would require another scheduled task and a bit more database work.  I'll think about it for the next version, but no promises.

That would be very much appreciated ... and I won't hold you to it
Title: Re: RSS Feeder
Post by: Verso on April 19, 2009, 07:35:49 AM
Quote from: SlammedDime on April 19, 2009, 05:59:52 AM
Try Sources/ManageSettings.php


I tried that.......

I have included my ManageSettings.php


Hopefully one of you kind people will have a look at it for me
Title: Re: RSS Feeder
Post by: mrtrc266 on April 19, 2009, 10:50:07 AM
Here you go, the ?> was in there twice
Title: Re: RSS Feeder
Post by: Verso on April 19, 2009, 11:15:57 AM
Thanks........

Nearly there...........

Just got a white screen now
Title: Re: RSS Feeder
Post by: mrtrc266 on April 19, 2009, 11:39:53 AM
In you original file from right after you installed the mod find
?>

and move to the very end of the file
Title: Re: RSS Feeder
Post by: Verso on April 19, 2009, 11:45:18 AM
What I done was reinstalled then re-uploaded the file you altered and hey presto it worked.......


Thanks
Title: Re: RSS Feeder
Post by: mrtrc266 on April 19, 2009, 11:58:34 AM
No problem, glad you got it going
Title: Re: RSS Feeder
Post by: Galaxy Computers on April 27, 2009, 11:59:42 PM
This mod doesn't work for my 2.0 version.
Title: Re: RSS Feeder
Post by: SlammedDime on April 28, 2009, 05:52:22 AM
without any more detail, i can't really help you.
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 06:07:32 PM
hey  guys i in stalled the RSS Feeder im using 2.0rc1 installed great but when i got redirected i got this at the top (pic1)and (pic2) you can see it not there please help me fig it out
Title: Re: RSS Feeder
Post by: Özgür on April 29, 2009, 06:36:02 PM
Can you upload your /themes/default/languages/modification.{yourlanguage}.php
Title: Re: RSS Feeder
Post by: SlammedDime on April 29, 2009, 07:01:17 PM
Rather than upload it here, just open it locally, and make sure there is only ?> and it is located at the very end of the file.
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 07:28:46 PM
sure i look at the file and ?> is there so here is the file
Title: Re: RSS Feeder
Post by: SlammedDime on April 29, 2009, 07:32:36 PM
Odd... that file looks fine to me... and you're still having an issue with it?
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 07:34:00 PM
yes i have deleted it  reinstalled it  5 times and i have re phased it 2 times just to make sure
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 08:00:24 PM
let me ask you this where is the   add_settings.php  file located maybe its not open  to execute
Title: Re: RSS Feeder
Post by: SlammedDime on April 29, 2009, 08:04:21 PM
add_settings doesn't look like the issue, but it's in the archive with all of the other files.

Do you have any other languages, like english-utf8?
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 08:14:49 PM
it looks good too
Title: Re: RSS Feeder
Post by: SlammedDime on April 29, 2009, 08:51:06 PM
Not really... it's missing the opening <?php tag... Not sure if that is part of the problem, but it's worth correcting to see...
Title: Re: RSS Feeder
Post by: chefjohnnie on April 29, 2009, 09:00:24 PM
thanks ill check in a bit i got to to stop looking at the screen
Title: Re: RSS Feeder
Post by: SlammedDime on April 30, 2009, 08:03:20 PM
If that didn't work, you can try using the file_check.php file attached to this post and see if you can figure out where the extraneous code is... http://www.simplemachines.org/community/index.php?topic=300626.msg1989826#msg1989826
Title: Arabic Translation for RSS Feeder
Post by: 3wasef on May 03, 2009, 11:53:44 AM
Great  Mod, Thanx a lot.

Here is an Arabic translation:

Modifications.arabic-utf8.php

Find:
?>

Add before:

/* RSS Feeder */
$txt['mods_cat_modifications_rssfeeds'] = 'الأخبار العاجلة (RSS)';
$txt['rss_feeder'] = 'الأخبار العاجلة (RSS)';
$txt['rss_feeder_desc'] = 'هذا القسم يسمح لك بإعداد وعرض الأخبار العاجلة (RSS) التي أرسلت للمنتدى.';
$txt['rss_feed_enabled'] = 'السماح بها';
$txt['rss_feed_title'] = ' الأسم الجهة المغذية';
$txt['rss_feed_title_desc'] = 'هذا يجب أن يكون العنوان الداخلي للجهة التي تقوم بتغذية الأخبار العاجلة.';
$txt['rss_feed_url'] = 'رابط الجهة المغذية';
$txt['rss_feed_url_desc'] = 'ينبغي أن يكون هذا رابط صحيح للجهة المغذية بالأخبار العاجلة(RSS). إذا وجده المعرب اللغوي  غير صحيح، سيقوم بإلغائه.';
$txt['rss_feed_poster'] = 'المشاركة بالأخبار العاجلة كـ (إسم العضو)';
$txt['rss_feed_poster_desc'] = 'أدخل كيف ستكون المشاركة بالأخبار العاجلة.';
$txt['rss_feed_prefix'] = 'مقدمة الموضوع';
$txt['rss_feed_prefix_desc'] = 'إذا رغبت بمقدمات هذه المشاركات للأخبار العاجلةو أدخل أحدهم هنا. هذه الخاصية إختيارية';
$txt['rss_feed_import'] = 'العدد للإستيراد';
$txt['rss_feed_import_desc'] = 'يمكنك تحديد العدد للأخبار المستوردة لكل حمل. 0 لهم جميعاً.';
$txt['rss_feed_locked'] = 'الموضوع مغلق';
$txt['rss_feed_approve'] = 'يتطلب الموافقة على الخبر';
$txt['rss_feed_full_article'] = 'إستيراد كامل الخبر';
$txt['rss_feed_singletopic'] = 'شارك بالأخبار في موضوع واحد';
$txt['rss_feed_regex'] = 'التعابير المعتادة';
$txt['rss_feed_regex_desc'] = 'مطلوب عند إستيراد الأخبار الكاملة. هذا يجب أن يكون على هيئة <a href-"http://us.php.net/manual/en/book.pcre.php">PCRE</a>. المتوافق متوقع أن يكون في الفهرس الثاني من  المصفوفة([1]).';
$txt['rss_feed_keywords'] = 'كلمات رئيسيه للبحث عنها';
$txt['rss_feed_keywords_desc'] = 'إذا أردت إستيراد أخبار عاجلة تحتوي على كلمات رئيسية محددة، أدخل هذه الكلمات مع فواصل بينهم(مثال: كلمة1, كلمة2).';
$txt['rss_feed_board'] = 'المنتدى';
$txt['rss_feed_modify'] = 'تعديل';
$txt['rss_feed_none'] = 'لا توجد أخبار عاجلة للعرض';
$txt['rss_feed_add'] = 'إضافة جهة مغذية للأخبار';
$txt['rss_feed_delete'] = 'حذف المحدد';
$txt['rss_feed_confirm'] = 'هل أنت متأكد من حذف الجهة المحددة?';
$txt['rss_feed_not_found'] = 'لا يمكن العثور على هوية هذه الجهة.';
$txt['rss_feed_no_boards'] = 'لا يوجد منتدى للمشاركة بالأخبار العاجلة به.';
$txt['rss_feed_add_error'] = 'المعلومات البارزة باللون الأحمر مطلوبة';
$txt['rss_feed_insert_error'] = 'لم تتم عملية إدخال الأخبار بنجاح';
$txt['rss_feed_insert_success'] = 'تم إنشاء الأخبار العاجلة بنجاح';
$txt['rss_feed_update_success'] = 'تم تعديل الأخبار العاجلة بنجاح';
$txt['scheduled_task_desc_rss_feeder'] = 'إستيراد الأخبار العاجلة المعدة مسبقاً.';
$txt['scheduled_task_rss_feeder'] = 'الأخبار العاجلة (RSS)';
$txt['pruneRssFeedLog'] = 'إزالة مغذي الأخبار العاجلة (RSS) الأقدم من :<div class="smalltext">(0 للإلغاء)</div>';
$txt['rss_feed_footer'] = 'هامش النص';
$txt['rss_feed_footer_desc'] = 'إذا أردت أي نص أن يكون بعد الخبر العاجل، فضلاً أدخله هنا. أي رموز لـ BBC مسموح بها';
$txt['rss_feed_count'] = 'المشاركات';
$txt['rss_feed_board_error'] = 'لا يوجد منتدى';
/*RSS Feeder */




3wasef.com (http://3wasef.com)
Title: Re: RSS Feeder
Post by: Owdy on May 04, 2009, 01:44:18 PM
QuoteRegular Expression
Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]).
What is that and where do i get that? Feed what im using is

http://feeds2.feedburner.com/uutiset-terveys_ja_hyvinvointi
http://feeds2.feedburner.com/uutiset-terveys_ja_hyvinvointi?format=xml

edit: and i want to translate those dates and that "Sourse:" part in posts. Where do i find them?

Quote from: Bigguy on January 11, 2009, 03:37:41 PM
I have it running here and it works great, thanks SlammedDime.

http://forum.pctweakr.com/index.php/board,3.0.html (http://forum.pctweakr.com/index.php/board,3.0.html)
That looks perfect. How do you have removed that Source part?

Mine looks like this:

Quote
Vähemmän keskeytyksiä, enemmän tulosta (Mediuutiset)
4 May 2009, 11:01 am

Vähemmän keskeytyksiä, enemmän tulosta (Mediuutiset)

Source: Terveys ja hyvinvointi - Uutiset - Ampparit.com
Title: Re: RSS Feeder
Post by: SlammedDime on May 04, 2009, 03:30:49 PM
For the 'Source' bit, I don't think I was thinking and hardcoded the string in there when I was testing and forgot to change it... it's in ScheduledTasks.php

As for the date format, in order to normalize any possible feed, SimplePie reformats the date, so I just spit out how it reformatted it... I suppose I could change it to use the forum's default time conversion function.

As for the regular expression, there is a small tutorial in this topic that is linked in the first post of the topic that I'd suggest reading first... no sense in reiterating all the same stuff.  If you have questions after that, feel free to ask.
Title: Re: RSS Feeder
Post by: Owdy on May 05, 2009, 06:38:57 AM
Any idea why this isnt working urls like this?
http://www.helistin.fi/rss/
http://www.tohtori.fi/rss/
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on May 05, 2009, 01:52:05 PM
I have two smf forums of same 2.0. RC1 version.

If i need to update one board in one forum.

And the second forum need to grab the post in the other forums board of smf.

Then what is the Relative full path or Regular Expression i have to use.
Title: Re: RSS Feeder
Post by: SlammedDime on May 05, 2009, 03:28:52 PM
Quote from: Owdy on May 05, 2009, 06:38:57 AM
Any idea why this isnt working urls like this?
http://www.helistin.fi/rss/
http://www.tohtori.fi/rss/
Any errors in the error log?

Quote from: A.SK on May 05, 2009, 01:52:05 PM
I have two smf forums of same 2.0. RC1 version.

If i need to update one board in one forum.

And the second forum need to grab the post in the other forums board of smf.

Then what is the Relative full path or Regular Expression i have to use.
I'm afraid there is no easy way to do that that I can think of.
Title: Re: RSS Feeder
Post by: Owdy on May 05, 2009, 03:33:09 PM
Quote from: SlammedDime on May 05, 2009, 03:28:52 PM
Quote from: Owdy on May 05, 2009, 06:38:57 AM
Any idea why this isnt working urls like this?
http://www.helistin.fi/rss/
http://www.tohtori.fi/rss/
Any errors in the error log?
None.
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on May 06, 2009, 05:46:51 AM
Quote from: SlammedDime on May 05, 2009, 03:28:52 PM
I'm afraid there is no easy way to do that that I can think of.

Its possible. Both the sites were my own.

So i could do it, kindly give me out the relative path for getting full content from smf 2.0 rc1 forum.
Title: Re: RSS Feeder
Post by: ostin on May 06, 2009, 01:52:12 PM
I suggest you to use UserID when selecting user than will post news. I got board with non-latin letters in usernames and so i can't use them.
Title: Re: RSS Feeder
Post by: SlammedDime on May 06, 2009, 04:24:51 PM
It should work fine with UTF-8, what was going wrong when you tried?

A.SK - It's not a matter of where the sites are located... I can't find a good regex that will accomplish what you need.
Title: Re: RSS Feeder
Post by: daveaite on May 06, 2009, 06:59:42 PM
I'm having the exact same problem as chefjohnnie.

Was there a solution for this?
Title: Re: RSS Feeder
Post by: SlammedDime on May 06, 2009, 07:06:58 PM
Quote from: SlammedDime on April 30, 2009, 08:03:20 PM
If that didn't work, you can try using the file_check.php file attached to this post and see if you can figure out where the extraneous code is... http://www.simplemachines.org/community/index.php?topic=300626.msg1989826#msg1989826
Title: Re: RSS Feeder
Post by: ostin on May 06, 2009, 07:58:43 PM
Quote from: SlammedDime on May 06, 2009, 04:24:51 PM
It should work fine with UTF-8, what was going wrong when you tried?
I just couldn't get name to be understood by the feeder. It showed me that name has to be filled in. When I renamed account into latin letter everything worked.
Title: Re: RSS Feeder
Post by: SlammedDime on May 06, 2009, 09:11:01 PM
Can you PM me the name if you don't want to post it here so I can test with it?
Title: Re: RSS Feeder
Post by: ostin on May 07, 2009, 05:31:37 AM
I tried several names in russian, f.e. "помошник" or "бот"
Title: Re: RSS Feeder
Post by: JamesD01 on May 07, 2009, 05:43:25 PM
I don't understand the regex bit, could someone please provide a breif description?
I don't know php, maybe that's why..
Title: Re: RSS Feeder
Post by: daveaite on May 07, 2009, 06:19:10 PM
Hey guys....

I still don' t understand the regular expressions after doing a few tutorials. I tried my own regular expressions for yahoo's RSS feeds and they seemed to have no effect. The same thing was still being published.

Anyways. I was hoping someone could create a regular expression for yahoo's RSS articles. I will be forever grateful!!

http://news.yahoo.com/rss;_ylt=AmZWmT9KLlRhdmZ6QtHvlxCs0NUE;_ylu=X3oDMTBsa3NwcDZrBHBvcwMxNQRzZWMDYm4Ec2xrA3Jzcw--
Title: Re: RSS Feeder
Post by: Sudhakar Arjunan on May 08, 2009, 07:55:34 AM
Quote from: SlammedDime on May 06, 2009, 04:24:51 PM
A.SK - It's not a matter of where the sites are located... I can't find a good regex that will accomplish what you need.

Thank you. but as i understood. Regular expression could be easily learned from all websites.

Why could not we get any regular expression for smf alone. More or less ok, even if does not work properly.
Title: Re: RSS Feeder
Post by: Eclipse16V on May 11, 2009, 12:52:23 AM
Hello, only once thanks Mod for this super. Runs with me in 2.0 RC1 without problems. I have times one only ask now. How can I make it that the RSS news those than 7 days am older, automatically to be deleted? Is there there in the Mod already a function which I unfortunately yet did not find or there is another possibility? Thanks
Title: Re: RSS Feeder
Post by: Underfunded on May 11, 2009, 04:43:21 PM
The auto-install from within SMF is not creating the tables in the MYSQL DB. I tried running the add_settings.php manually from the forum directory and it did not work so I copied all the files to the root of the forum directory and it still will not create the database tables.

Any suggestions?
Title: Re: RSS Feeder
Post by: SlammedDime on May 11, 2009, 07:43:11 PM
Do you get any errors?
Title: Re: RSS Feeder
Post by: Underfunded on May 11, 2009, 11:43:31 PM
I do not get any errors on the installation of the Mod.  When I try to go to the mods config page I get
QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420

Where the database is smf2 and that is the proper path to the file.
Title: Re: RSS Feeder
Post by: SlammedDime on May 12, 2009, 05:56:36 AM
When you try to run add_settings.php stand alone, you didn't get any errors?
Title: Re: RSS Feeder
Post by: Eclipse16V on May 12, 2009, 07:15:46 AM
Quote from: Eclipse16V on May 11, 2009, 12:52:23 AM
Hello, only once thanks Mod for this super. Runs with me in 2.0 RC1 without problems. I have times one only ask now. How can I make it that the RSS news those than 7 days am older, automatically to be deleted? Is there there in the Mod already a function which I unfortunately yet did not find or there is another possibility? Thanks
No one?  :(
Title: Re: RSS Feeder
Post by: andy40 on May 12, 2009, 08:00:22 AM
hi i have this installed but where in admin do find it and how do i check its working ok ?
Title: Re: RSS Feeder
Post by: Underfunded on May 12, 2009, 08:02:28 AM
When I place add_settings.php in the root of the forum and access it manually I am brought to admin>config>rss feeder and get the same error as before about the table not being created:

QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420
Title: Re: RSS Feeder
Post by: Underfunded on May 12, 2009, 08:04:05 AM
Quote from: andy40 on May 12, 2009, 08:00:22 AM
hi i have this installed but where in admin do find it and how do i check its working ok ?

You can find this under Admin > Configuration > Modifications > Rss Feeder

To check if it is working ok setup an rss feed.
Title: Re: RSS Feeder
Post by: andy40 on May 12, 2009, 08:05:44 AM
hi its says installed but it cant as i cant find that in admin  :(
Title: Re: RSS Feeder
Post by: Underfunded on May 12, 2009, 08:48:16 PM
Quote from: andy40 on May 12, 2009, 08:05:44 AM
hi its says installed but it cant as i cant find that in admin  :(

So is it listed under both Installed Packages and Browse Packaged but not listed under Configurations>Modifications>RSS Feeder?
Title: Re: RSS Feeder
Post by: Underfunded on May 13, 2009, 12:10:30 AM
Quote from: Underfunded on May 12, 2009, 08:02:28 AM
When I place add_settings.php in the root of the forum and access it manually I am brought to admin>config>rss feeder and get the same error as before about the table not being created:

QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420

Any more thoughts Slammed?  Can you provide the raw SQL commands that I can paste into my SQL command prompt to create them, or a different way of making the tables?  I'd be more than happy to be your test subject on this as I have full server control and can easily modify anything you would like me to!  I have started playing with the info from the add_settings.php to make the tables manually but I am enough of a beginner that I haven't deciphered it all yet (plus it's late).  Any help is greatly appreciated!

P.S.  I have determined the ultimate issue is that the database table is not being created but I do not know why.
Title: Re: RSS Feeder
Post by: SlammedDime on May 13, 2009, 05:56:27 AM
andy40 - if it's not installing through the package manager, then you may have to install manually..

Underfunded, can you PM me your email address and I'll email you an SQL file with the table structure?
Title: Re: RSS Feeder
Post by: Underfunded on May 13, 2009, 07:48:47 AM
Quote from: SlammedDime on May 13, 2009, 05:56:27 AM
andy40 - if it's not installing through the package manager, then you may have to install manually..

Underfunded, can you PM me your email address and I'll email you an SQL file with the table structure?

I sent you the PM. thank you!
Title: Re: RSS Feeder
Post by: andy40 on May 13, 2009, 08:27:18 AM
Quote from: SlammedDime on May 13, 2009, 05:56:27 AM
andy40 - if it's not installing through the package manager, then you may have to install manually..

hi yes it says its installed but i cant find it anywhere?
Title: Re: RSS Feeder
Post by: andy40 on May 13, 2009, 08:32:06 AM
hi i have just took it off and tried to insatll it but i get this message  The package you are trying to download or install is either corrupt or not compatible with this version of SMF. i am using 1.1.8
Title: Re: RSS Feeder
Post by: Underfunded on May 13, 2009, 12:15:32 PM
Quote from: andy40 on May 13, 2009, 08:32:06 AM
hi i have just took it off and tried to insatll it but i get this message  The package you are trying to download or install is either corrupt or not compatible with this version of SMF. i am using 1.1.8

That is your problem. This Mod is for SMF 2.0 RC1.
Title: Re: RSS Feeder
Post by: andy40 on May 13, 2009, 12:17:18 PM
 :D sorry
Title: Re: RSS Feeder
Post by: ოկtђ on May 17, 2009, 12:56:14 PM
Hello,
Can I translate to turkish this  modification
Title: Re: RSS Feeder
Post by: zach21uk on May 17, 2009, 01:24:26 PM
Hi There.  I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".

Any idea why this is happening?  Its quite annoying...
Title: Re: RSS Feeder
Post by: ostin on May 17, 2009, 01:41:46 PM
Quote from: zach21uk on May 17, 2009, 01:24:26 PM
Hi There.  I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".

Any idea why this is happening?  Its quite annoying...
Did you look at your logs? I got same issue and noticed errors in forum logs, where was an error in rss-source and feed went offline.
Title: Re: RSS Feeder
Post by: SlammedDime on May 17, 2009, 03:35:31 PM
Quote from: mythcomeback on May 17, 2009, 12:56:14 PM
Hello,
Can I translate to turkish this  modification
Sure :)

Quote from: zach21uk on May 17, 2009, 01:24:26 PM
Hi There.  I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".

Any idea why this is happening?  Its quite annoying...
I haven't looked at the code in a few weeks, but I do remember making it so that whenever a feed changed, an error was put into the error log as to why.
Title: Re: RSS Feeder
Post by: ოկtђ on May 18, 2009, 05:11:37 AM
Turkish translate ..

RSS Feeder



Forumunuza RSS ile konu çeken Bot.

Modifikasyon Linki (http://custom.simplemachines.org/mods/index.php?mod=1590)

Bu modifikasyonunu özellikleriTürkçesi

ScheduledTasks.php aç ve

Code (bul) Select
Source:
Code (değiştir) Select
Kaynak:


Modifications.turkish.php aç ve

Code (bul) Select
?>
Code (önüne ekle) Select
/* RSS Feeder */
$txt['mods_cat_modifications_rssfeeds'] = 'RSS Besleyici';
$txt['rss_feeder'] = 'RSS Besleyici';
$txt['rss_feeder_desc'] = 'Bu bölüm RSS beslemeleri için kurulum yapmanızı sağlar.';
$txt['rss_feed_enabled'] = 'Ektin';
$txt['rss_feed_title'] = 'Besleme başlığı';
$txt['rss_feed_title_desc'] = 'Bu başlık RSS tanımak için kullanılacaktır.';
$txt['rss_feed_url'] = 'Besleme adresi';
$txt['rss_feed_url_desc'] = 'Geçerli bir RSS besleme adresi girmelisiniz.  Geçersiz bir adres yazarsanız besleme geçersiz olacaktır.';
$txt['rss_feed_poster'] = 'Gönderen ';
$txt['rss_feed_poster_desc'] = 'Mesajı göndermiş olarak görünecek kullanıcının adı.';
$txt['rss_feed_prefix'] = 'Konu ön eki';
$txt['rss_feed_prefix_desc'] = 'İsteğe bağlıdır.Mesajlardan önce yazılacaktır.';
$txt['rss_feed_import'] = 'Alıcak satır';
$txt['rss_feed_import_desc'] = 'Mesajın ne kadarı alıncak? Eğer tamamının alınmasını istiyorsanız 0 yazın.';
$txt['rss_feed_locked'] = 'Başlık kilitli mi? ';
$txt['rss_feed_approve'] = 'Konuyu açmadan önce onay iste';
$txt['rss_feed_full_article'] = 'Tam makaleyi al';
$txt['rss_feed_singletopic'] = 'Tüm mesajları tek konuya yaz';
$txt['rss_feed_regex'] = 'Normal ifade';
$txt['rss_feed_regex_desc'] = 'Tam makale almak istiyorsanız zorunludur..  Metin <a href-"http://us.php.net/manual/en/book.pcre.php">PCRE</a> formatına uygun olmalıdır.';
$txt['rss_feed_keywords'] = 'Anahtar kelimeler';
$txt['rss_feed_keywords_desc'] = 'Seçtiğiniz anahtar kelimeleri içeren yazılar alınır.';
$txt['rss_feed_board'] = 'Forum';
$txt['rss_feed_modify'] = 'Düzenle';
$txt['rss_feed_none'] = 'Çalışmıyor';
$txt['rss_feed_add'] = 'Besleme Ekle';
$txt['rss_feed_delete'] = 'Seçinlenleri sil';
$txt['rss_feed_confirm'] = 'Seçili beslemeleri silmek istediğinize emin misiniz? ';
$txt['rss_feed_not_found'] = 'Bir besleme bulunamadı.';
$txt['rss_feed_no_boards'] = 'Forum seçilmedi.';
$txt['rss_feed_add_error'] = 'Kırmızı olarak vurgulanan bu bilgiler gereklidir.';
$txt['rss_feed_insert_error'] = 'Yazım işlemi başarısız';
$txt['rss_feed_insert_success'] = 'Besleme başarıyla oluşturuldu.';
$txt['rss_feed_update_success'] = 'Besleme başarıyla güncellendi.';
$txt['scheduled_task_desc_rss_feeder'] = 'RSS besleme işleminin hangi aralıklarla yapılacağını gösterir.';
$txt['scheduled_task_rss_feeder'] = 'RSS Besleyici';
$txt['pruneRssFeedLog'] = 'Eski beslemeleri kaldır:<div class="smalltext">(0 to disable)</div>';
$txt['rss_feed_footer'] = 'Alt metin';
$txt['rss_feed_footer_desc'] = 'Açılan konunun en altında görünecektir.';
$txt['rss_feed_count'] = 'Mesaj';
$txt['rss_feed_board_error'] = ' Forum seçilmedi';
/*RSS Feeder */

Title: Re: RSS Feeder
Post by: MUSTAfaINE on May 20, 2009, 06:12:22 AM
it isnt show the links;

look like that  [url  = BLABLA]www.blabla.com[/url]

its showing BLABLA and its is not a link
Title: Re: RSS Feeder
Post by: SlammedDime on May 20, 2009, 04:22:57 PM
Link?
Title: Re: RSS Feeder
Post by: lukasz.nowicki on May 20, 2009, 05:20:34 PM
I am sorry, I've just read the footer :)

I got two questions about this (great anyway) mod:

1. How to change word "Source:" at the bottom of added topic to my language? I'd prefer something like "Źródło: " ("Zrodlo" without polish characters).

2. Is there a way to run strip_tags function on body from feed? My feed give me images and I don't need them :)

Thank you in advance.

PS: sorry for my english.
Title: Re: RSS Feeder
Post by: mrtrc266 on May 21, 2009, 01:39:21 AM
Quote from: zach21uk on May 17, 2009, 01:24:26 PM
Hi There.  I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".

Any idea why this is happening?  Its quite annoying...

The same thing happens to me, this only seems to happen on feeds that I have keywords for though. I haven't been able to catch an error in the error log though.
Title: Re: RSS Feeder
Post by: Eclipse16V on May 21, 2009, 04:27:39 AM
Quote from: Eclipse16V on May 11, 2009, 12:52:23 AM
Hello, only once thanks Mod for this super. Runs with me in 2.0 RC1 without problems. I have times one only ask now. How can I make it that the RSS news those than 7 days am older, automatically to be deleted? Is there there in the Mod already a function which I unfortunately yet did not find or there is another possibility? Thanks
Help  ::)
Title: Re: RSS Feeder
Post by: MUSTAfaINE on May 21, 2009, 05:01:01 AM
Quote from: SlammedDime on May 20, 2009, 04:22:57 PM
Link?

yeah man if th links are writen look like that www.blabla.com[ /ur l]

not working only writes something you know please check it or how can i edit the mod. (http://something)
Title: Re: RSS Feeder
Post by: SlammedDime on May 21, 2009, 12:13:16 PM
Quote from: lukasz.nowicki on May 20, 2009, 05:20:34 PM
I am sorry, I've just read the footer :)

I got two questions about this (great anyway) mod:

1. How to change word "Source:" at the bottom of added topic to my language? I'd prefer something like "Źródło: " ("Zrodlo" without polish characters).

2. Is there a way to run strip_tags function on body from feed? My feed give me images and I don't need them :)

Thank you in advance.

PS: sorry for my english.
1) It's in ScheduledTasks.php.  I forgot to put the language string in the language file.
2) It already strips tags, but I purposefully left images in the feed.  You can look in the Subs-Rss.php file at the strip tags function and modify the <img> search and replace and change the replace variable to ''

Quote from: Eclipse16V on May 21, 2009, 04:27:39 AM
Quote from: Eclipse16V on May 11, 2009, 12:52:23 AM
Hello, only once thanks Mod for this super. Runs with me in 2.0 RC1 without problems. I have times one only ask now. How can I make it that the RSS news those than 7 days am older, automatically to be deleted? Is there there in the Mod already a function which I unfortunately yet did not find or there is another possibility? Thanks
Help  ::)
I thought I already replied to this.... it's not possible with the mod, and I probably won't be building that in.

Quote from: MUSTAfaINE on May 21, 2009, 05:01:01 AM
Quote from: SlammedDime on May 20, 2009, 04:22:57 PM
Link?

yeah man if th links are writen look like that www.blabla.com[ /ur l]

not working only writes something you know please check it or how can i edit the mod.
(http://something)
No, I mean, I need a link to your board with an example.
Title: Re: RSS Feeder
Post by: lukasz.nowicki on May 21, 2009, 02:20:29 PM
Quote from: SlammedDime on May 21, 2009, 12:13:16 PM1) It's in ScheduledTasks.php.  I forgot to put the language string in the language file.
2) It already strips tags, but I purposefully left images in the feed.  You can look in the Subs-Rss.php file at the strip tags function and modify the <img> search and replace and change the replace variable to ''

Thank you very much, that was very helpful and it works great.
Best regards
Title: Re: RSS Feeder
Post by: MUSTAfaINE on May 22, 2009, 03:02:16 AM
slammeddime

http://metalfrm.com/index.php/topic,26381.0.html

i hope this link is shows you what i want to say

please look at the CYNIC - PROMO DEMO 2008 must be a download link..
Title: Re: RSS Feeder
Post by: TommyJoe on May 22, 2009, 10:41:23 AM
Well it looks like the 2.0RC1-1 also is not compatible with the feeder.

Any suggestions?

TIA
Title: Re: RSS Feeder
Post by: SlammedDime on May 22, 2009, 12:55:36 PM
Sure it is, I just haven't updated the package to be installable on RC1-1... You can emulate the RC1 version by clicking the 'Advanced' button below all of your installed packages and change the version to RC1
Title: Re: RSS Feeder
Post by: TommyJoe on May 22, 2009, 04:15:39 PM
Quote from: SlammedDime on May 22, 2009, 12:55:36 PM
Sure it is, I just haven't updated the package to be installable on RC1-1... You can emulate the RC1 version by clicking the 'Advanced' button below all of your installed packages and change the version to RC1

And you are absolutely correct, it did work. Surprised, I never saw any documentation on that little button!

Thank You! :D
Title: Re: RSS Feeder
Post by: lukasz.nowicki on May 23, 2009, 05:20:39 AM
Suggestion: additional checkbox "Mark as read for everybody" in options.
Is is possible or maybe even consider?
Best regards
Title: Re: RSS Feeder
Post by: SlammedDime on May 23, 2009, 05:50:36 AM
Quote from: lukasz.nowicki on May 23, 2009, 05:20:39 AM
Suggestion: additional checkbox "Mark as read for everybody" in options.
Is is possible or maybe even consider?
Best regards

Unfortunately it's not easily possible, I've already tried and considered it in the very first release of the mod.
Title: Re: RSS Feeder
Post by: MUSTAfaINE on May 25, 2009, 02:30:09 AM
no man, its not working in 2.0 also..
Title: Re: RSS Feeder
Post by: Garou on May 25, 2009, 08:06:55 AM
Check the Feed at...
http://validator.w3.org/feed
It could be the link isn't in the feed to begin with or something else is configured in the feed incorrectly.
Title: Re: RSS Feeder
Post by: mrtrc266 on May 26, 2009, 01:53:42 PM
Ok, I finally snagged a couple of errors.

As previously mentioned for one feed I have some keywords and that feed always was disabled automatically every day or 2. (that was the only feed that got disabled)

Today I checked again and both of my feed were disabled and here are the errors.

http://monsters-mansion.com/index.php?scheduled=task;ts=1243296000 (http://monsters-mansion.com/index.php?scheduled=task;ts=1243296000) 
RSS Feeder: http://www.pokernews.com/news/rss.xml (http://www.pokernews.com/news/rss.xml) (cURL error 7: couldn't connect to host)

http://monsters-mansion.com/index.php?scheduled=task;ts=1243296000 (http://monsters-mansion.com/index.php?scheduled=task;ts=1243296000) 
RSS Feeder: http://www.railbirds.com/rss/latestblogs.php (http://www.railbirds.com/rss/latestblogs.php) (XML error: XML_ERR_NAME_REQUIRED at line 10, column 21)

Even if an error occures is there a way to make it so it won't disable the feed?

Thank in advance as always.
Title: Re: RSS Feeder
Post by: SlammedDime on May 26, 2009, 03:47:45 PM
Yea, it is easy enough just to comment out that block of code in ScheduledTasks.php... the purpose of it is to alert you that there may be an issue with the feed and if you have it set to run the feed script frequently, to prevent timeouts or script errors.
Title: Re: RSS Feeder
Post by: mrtrc266 on May 26, 2009, 04:06:09 PM
Sorry for my ignorance but what exactly would I comment out?
Title: Re: RSS Feeder
Post by: SlammedDime on May 26, 2009, 04:27:57 PM
In ScheduledTasks.php
$smcFunc['db_query']('', '
UPDATE {db_prefix}rssfeeds
SET enabled = 0
WHERE id_feed = {int:feed}',
array(
'feed' => $id,
)
Title: Re: RSS Feeder
Post by: mrtrc266 on May 26, 2009, 04:42:43 PM
Did I do this right? Now when I run a scheduled task it gives me a 500 error.


   /*$smcFunc['db_query']('', '
    UPDATE {db_prefix}rssfeeds
    SET enabled = 0
    WHERE id_feed = {int:feed}',
    array(
     'feed' => $id,
    )*/
Title: Re: RSS Feeder
Post by: mrtrc266 on May 26, 2009, 05:27:27 PM
Ok I think I got it...is this correct? This will not make it disable the feed and it won't put any errors in the error log? One last question, is there any risk in doing this?


  /* If we don't get a valid chunk of data back, disable the feed
  if ($rss_data->error())
  {
   $smcFunc['db_query']('', '
    UPDATE {db_prefix}rssfeeds
    SET enabled = 0
    WHERE id_feed = {int:feed}',
    array(
     'feed' => $id,
    )
   );
   
   // Log an error about the issue, just so the user can see why their feed was disabled...
   log_error($txt['rss_feeder'] . ': ' . $feed['url'] . ' (' . $rss_data->error() . ')');
   continue;
  }*/
Title: Re: RSS Feeder
Post by: SlammedDime on May 26, 2009, 07:03:55 PM
I'd only comment out the sql query and keep the error log entry in there, unless you really don't want any error logging of failed feeds, but at that point it will be quite hard to provide any support on the mod.

No risk in commenting that out.
Title: Re: RSS Feeder
Post by: mghq on May 27, 2009, 09:48:16 PM
Hey seeing as this mod is similar to the one for SMF 1.1.X could you tell me how you fixed the html problem because i cant figure it out
Title: Re: RSS Feeder
Post by: SlammedDime on May 27, 2009, 10:12:31 PM
What HTML problem?
Title: Re: RSS Feeder
Post by: mrtrc266 on May 27, 2009, 10:15:29 PM
Thank you very much Slammed, feeds have not been automatically disabled all day :D
Title: Re: RSS Feeder
Post by: mghq on May 27, 2009, 10:30:51 PM
Quote from: SlammedDime on May 27, 2009, 10:12:31 PM
What HTML problem?

Well with the one from vbgamer, it will not add the  code tag even for an administrator. And if it does it always screws up these symbols <, >, "

i thought if i edit Subs-RSS.php it would fix it, but it messed the symbols up but put the html tags. So how did you go about fixing that
Title: Re: RSS Feeder
Post by: SlammedDime on May 27, 2009, 10:35:26 PM
Here is the PHP function that I run everything through...

function striphtml($document)
{
// Just in case there aren't breaks after a </p>...
$document = str_replace(array('</p>', '<br />', '<br>',  '</div>'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n"), $document);

$search = array('~<style[^>]*?>.*?</style>~siU',    // Strip style tags properly
"'<script[^>]*?>.*?</script>'si", // strip out javascript
"~<img.*?src=\"(.*?)\".*?>~si", // convert img tags
"'<[\/\!]*?[^<>]*?>'si", // strip out html tags
"'([\r\n])[\s]+'", // strip out white space
"'&(quot|#34|#034|#x22);'i", // replace html entities
"'&(amp|#38|#038|#x26);'i", // added hexadecimal values
"'&(lt|#60|#060|#x3c);'i",
"'&(gt|#62|#062|#x3e);'i",
"'&(nbsp|#160|#xa0);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'&(reg|#174);'i",
"'&(deg|#176);'i",
"'&(#39|#039|#x27);'",
"'&(euro|#8364);'i", // europe
"'&a(uml|UML);'", // german
"'&o(uml|UML);'",
"'&u(uml|UML);'",
"'&A(uml|UML);'",
"'&O(uml|UML);'",
"'&U(uml|UML);'",
"'&szlig;'i",
"~(\r\n|\n|\r)+~",
);
$replace = array( "",
"",
"",
"",
"\\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169),
chr(174),
chr(176),
chr(39),
chr(128),
"ä",
"ö",
"ü",
"Ä",
"Ö",
"Ü",
"ß",
"\n\n",
);

$text = preg_replace($search,$replace,$document);

return $text;
}
Title: Re: RSS Feeder
Post by: mghq on May 27, 2009, 10:39:44 PM
Do you know how we could fix that for this one
<?php
/*
RSS Feed Poster
Version 1.0.4
by:vbgamer45
http://www.smfhacks.com
*/
if (!defined('SMF'))
die('Hacking attempt...');

// Globals
$feedcount 0;
$maxitemcount 0;
$tag '';
$insideitem false;

function 
verify_rss_url($url)
{
global $txt$modSettings;

// Rss Data storage
$finalrss '';
$failed true;

if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'fopen')
{
$fp2 = @fopen($url"r");
if ($fp2)
{
$failed false;
$contents '';
while (!feof($fp2))
{
  $contents .= fread($fp28192);
}

fclose($fp2);

$finalrss $contents;
}
}


// Use Fsockopen
if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'fsockopen')
{


if($failed == true)
{
$url_array parse_url($url);

$fp = @fsockopen($url_array['host'], 80$errno$errstr30);
if (!$fp)
{

}
else
{
$failed false;

   $out "GET " $url_array['path'] . @$url_array['query'] . "  HTTP/1.1\r\n";
   $out .= "Host: " $url_array['host'] . "\r\n";
   $out .= "Connection: Close\r\n\r\n";

   fwrite($fp$out);

   $rssdata '';

   while (!feof($fp))
   {
       $rssdata .= fgets($fp128);
   }
   fclose($fp);

   // Get rid of the stupid header information! Wish the function did it for me.
   $rss2 explode("\\r\\"$rssdata);
   @$finalrss = @$rss2[1];

}
}
}

// Use cURL
if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'curl')
{
if($failed == true)
{
if(function_exists("curl_init"))
{
$failed false;
// Last but not least try cUrl
$ch curl_init();

// set URL and other appropriate options
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);

// grab URL, and return output
$output curl_exec($ch);

// close curl resource, and free up system resources
curl_close($ch);
return $output;
}
}
}



// XML Parser functions to verify the XML Feed
if($failed == false)
{
$depth = array();

$xml_parser xml_parser_create();
xml_set_element_handler($xml_parser"startElement2""endElement2");


   if (!xml_parse($xml_parser$finalrss)) {
      fatal_error(sprintf($txt['feedposter_err_xmlerror'],
                   xml_error_string(xml_get_error_code($xml_parser)),
                   xml_get_current_line_number($xml_parser)), false);
   }

xml_parser_free($xml_parser);
}
else
{
// We were not able to download the feed :(
fatal_error($txt['feedposter_err_nodownload'], false);
}


}


function 
startElement2($parser$name$attrs)
{
   global 
$depth;
   
$depth[$parser]++;
}

function 
endElement2($parser$name)
{
   global 
$depth;
   
$depth[$parser]--;
}

function 
UpdateRSSFeedBots()
{
global $db_prefix$context$sourcedir$feedcount$func$maxitemcount$insideitem$tag$modSettings;

// First get all the enabled bots
$context['feeds'] = array();
$request db_query("
SELECT
ID_FEED, ID_BOARD, feedurl, title, postername, updatetime, enabled, html,
ID_MEMBER, locked, articlelink, topicprefix, numbertoimport, importevery
FROM 
{$db_prefix}feedbot
WHERE enabled = 1"
__FILE____LINE__);

while ($row mysql_fetch_assoc($request))
{
$context['feeds'][] = array(
'ID_FEED' => $row['ID_FEED'],
'ID_BOARD' => $row['ID_BOARD'],
'feedurl' => $row['feedurl'],
'title' => $row['title'],
'postername' => $row['postername'],
'enabled' => $row['enabled'],
'html' => $row['html'],
'ID_MEMBER' => $row['ID_MEMBER'],
'locked' => $row['locked'],
'articlelink' => $row['articlelink'],
'topicprefix' => $row['topicprefix'],
'numbertoimport' => $row['numbertoimport'],
'importevery' => $row['importevery'],
'updatetime' => $row['updatetime']
);
}

mysql_free_result($request);

// For the createPost function
require_once($sourcedir '/Subs-Post.php');

// Check if a field expired
foreach ($context['feeds'] as $key => $feed)
{

$current_time time();


// If the feedbot time to next import has expired
if (($current_time mktime(0$feed['importevery'])) > $feed['updatetime'])
//if( 1 == 1)
{

$feeddata GetRSSData($feed['feedurl']);



if ($feeddata != false)
{

// Process the XML
$xml_parser xml_parser_create();
$context['feeditems'] = array();
$feedcount 0;
$maxitemcount $feed['numbertoimport'];
$tag '';
$insideitem false;
$context['feeditems'][0] = array();
$context['feeditems'][0][] = array();
$context['feeditems'][0]['title'] = '';
$context['feeditems'][0]['description'] = '';
$context['feeditems'][0]['link'] = '';



xml_set_element_handler($xml_parser"startElement1""endElement1");
xml_set_character_data_handler($xml_parser"characterData1");

if (!xml_parse($xml_parser$feeddata))
 {
// Error reading xml data

     xml_parser_free($xml_parser);
 }
else
{
    // Data must be valid lets extra some information from it
    // RSS Feeds are a list of items that might contain title, description, and link


    // Free the xml parser memory
xml_parser_free($xml_parser);

// Loop though all the items

for ($i 0$i < ($maxitemcount); $i++)
{
// Check feed Log
// Generate the hash for the log
if(!isset($context['feeditems'][$i]['title']) || !isset($context['feeditems'][$i]['description']) || !isset($context['feeditems'][$i]['link']))
continue;


$itemhash md5($context['feeditems'][$i]['title'] . $context['feeditems'][$i]['description']);
$request db_query("
SELECT
feedtime
FROM 
{$db_prefix}feedbot_log
WHERE feedhash = '
$itemhash'"__FILE____LINE__);

mysql_freeresult($request);


// If no has has found that means no duplicate entry
if (db_affected_rows() == 0)
{


// Create the Post
$msg_title $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['title'] : strip_tags($context['feeditems'][$i]['title'])), ENT_QUOTES);

$msg_body =  $func['htmlspecialchars'](($feed['html'] ? $context['feeditems'][$i]['description'] . "\n\n" $context['feeditems'][$i]['link']  : strip_tags($context['feeditems'][$i]['description'] .  "\n\n" $context['feeditems'][$i]['link'])), ENT_QUOTES);

if ($feed['html'])
{
$msg_body '[html]' $msg_body '[/html]';
preparsecode($msg_body);
}
$msgOptions = array(
'id' => 0,
'subject' => $feed['topicprefix'] . $msg_title,
'body' => '[b]' $msg_title "[/b]\n\n" $msg_body,
'icon' => 'xx',
'smileys_enabled' => 1,
'attachments' => array(),
);
$topicOptions = array(
'id' => 0,
'board' => $feed['ID_BOARD'],
'poll' => null,
'lock_mode' => $feed['locked'],
'sticky_mode' => null,
'mark_as_read' => true,
);
$posterOptions = array(
'id' => $feed['ID_MEMBER'],
'name' => $feed['postername'],
'email' => '',
'update_post_count' => (($feed['ID_MEMBER'] == 0) ? 1),
);

createPost($msgOptions$topicOptions$posterOptions);

// Add Feed Log
$fid $feed['ID_FEED'];
$ftime time();

db_query("
INSERT INTO 
{$db_prefix}feedbot_log
(ID_FEED, feedhash, feedtime)
VALUES
(
$fid,'$itemhash',$ftime)"__FILE____LINE__);

}
}

 } // End valid XML check



}  // End get feed data

// End expire check


// End for each feed

}

function 
GetRSSData($url)
{
global $modSettings;
$url_array parse_url($url);


if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'fopen')
{
$fp2 = @fopen($url"r");
if ($fp2)
{
$contents '';
while (!feof($fp2))
{
  $contents .= fread($fp28192);
}

fclose($fp2);

return $contents;
}
}

if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'fsockopen')
{
$fp fsockopen($url_array['host'], 80$errno$errstr30);
if (!$fp)
{

}
else
{


   $out "GET " $url_array['path'] . @$url_array['query'] . "  HTTP/1.1\r\n";
   $out .= "Host: " $url_array['host'] . "\r\n";
   $out .= "Connection: Close\r\n\r\n";

   fwrite($fp$out);

   $rssdata '';

   while (!feof($fp))
   {
       $rssdata .= fgets($fp128);
   }
   fclose($fp);

   // Get rid of the stupid header information! Wish the function did it for me.
   $rss2 explode("\\r\\"$rssdata);
   $finalrss $rss2[1];

   return  $finalrss;
}
}

if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'curl')
{
if(function_exists("curl_init"))
{
// Last but not least try cUrl
$ch curl_init();

// set URL and other appropriate options
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);

// grab URL, and return output
$output curl_exec($ch);

// close curl resource, and free up system resources
curl_close($ch);

return $output;
}
}


// Failure return false
return false;

}

function 
startElement1($parser$name$attrs)
 {
global $insideitem$tag;
if ($insideitem)
{
$tag $name;
}
elseif ($name == "ITEM")
{
$insideitem true;
}
}

function 
endElement1($parser$name)
{
global $insideitem$tag$feedcount$context;

if ($name == "ITEM")
{
$feedcount++;
$context['feeditems'][$feedcount] = array();
$context['feeditems'][$feedcount][] = array();
$context['feeditems'][$feedcount]['title'] = '';
$context['feeditems'][$feedcount]['description'] = '';
$context['feeditems'][$feedcount]['link'] = '';
$insideitem false;
}
}

function 
characterData1($parser$data)
 {
global $insideitem$tag,  $feedcount$context$maxitemcount;

if ($insideitem && $feedcount $maxitemcount)
 
{
switch ($tag)
{
case "TITLE":
$context['feeditems'][$feedcount]['title'] .= $data;
break;

case "DESCRIPTION":
$context['feeditems'][$feedcount]['description'] .= $data;

break;

case "LINK":
$context['feeditems'][$feedcount]['link'] .= $data;
break;
}
}
}
?>
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 11:12:20 AM
I have enter the address of an feeder from a website and that website has updates of news but my mod isn't pulling the feed from that site. Why?
Title: Re: RSS Feeder
Post by: SlammedDime on June 03, 2009, 03:34:20 PM
Sorry mghq - I'm not sure how his mod works, so I wouldn't be able to give any good advised on how to do that there.

mtechama - I have no clue why... what is the time you have set for the scheduled task to run?  Any errors in your forum error log related to the mod?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 06:09:43 PM
These are the Scheduled Tasks Settings are as follows:

Next Due: Today at 04:00:00 PM
Regularity: Starting at 04:00, repeating every 6 hour(s)

Title: Re: RSS Feeder
Post by: SlammedDime on June 03, 2009, 07:40:38 PM
mmk.... does the Scheduled task log show any runs for the RSS Feeder?  If not, did you try manually running it (Click check box next to task and click 'Run Now')?  Any errors in the error log?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 07:59:23 PM
It shows alot of logs on Task Logs but it is still not pulling News feed from a webiste. No errors.
Title: Re: RSS Feeder
Post by: SlammedDime on June 03, 2009, 10:13:47 PM
Quote from: SlammedDime on June 03, 2009, 07:40:38 PM
mmk.... does the Scheduled task log show any runs for the RSS Feeder?  If not, did you try manually running it (Click check box next to task and click 'Run Now')?  Any errors in the error log?


Also, what is the feed you are trying to pull?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 10:16:01 PM
Its this one http://aras.ab.ca/newsfeed.xml
Title: Re: RSS Feeder
Post by: SlammedDime on June 03, 2009, 10:41:03 PM
Ok, I'm only going to ask one more time... have you tried running the scheduled task manually to see what happens?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 10:42:58 PM
What do mean manually? How do you do that?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 03, 2009, 11:21:58 PM
Would you like to know what I have when add a new feed?
Title: Re: RSS Feeder
Post by: SlammedDime on June 03, 2009, 11:58:16 PM
Screen shot of run now...

Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 12:03:07 AM
I have done that but still no changes.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 02:14:42 PM
Any other options?
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 03:54:58 PM
Are you trying to grab the full article with a regular expression?  or are you using keywords?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 03:57:29 PM
I don't know what you mean?
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 03:58:50 PM
Have you added any feeds?  Did you NOT look at any of the options for when you added the feed?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 04:08:04 PM
This what I have when I added a  feed.

Feed Title: David Crowe
Feed URL: http://aras.ab.ca/newsfeed.xml
Board Name: Example
Post Feed As: News Feeder
Topic Prefix: feeds
Number to Imports: 0
Keywords to find: None
Enabled: Checked
Retrieve full article: Not Checked
Topic Locked: Not Checked
Post Items in Single Topic: Not Checked
Footer Text: Blank
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 04:25:23 PM
Sorry... Don't know what to tell you... I punched in all of the same stuff and it worked just fine for me.  All I can think of is that your host doesn't have the necessary libraries activated or installed for SimplePie to pull feeds.  You can upload the attached file to your webhost and navigate to it, and it will tell you if you if SimplePie will work on your server...

Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 04:31:19 PM
Here is a link to the test http://www.mtechama.com/sp.php
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 04:48:23 PM
I'm sorry, I'm out of options then... I tested the feed and it works fine on my test site... without any errors showing in the error log (are you sure error logging is enabled?), and without PHP throwing any errors, there's nothing else I can think of.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 04:52:36 PM
How do I find out how to see logging is enabled? Matter of fact can I see your Test site?
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 05:09:39 PM
My test site is on my local machine, so it wouldn't be possible for you to see it.  The error logging option is in Configuration > Security and moderation > General
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 05:12:39 PM
Its shows its enabled.
Title: Re: RSS Feeder
Post by: cheatkiller on June 04, 2009, 05:12:49 PM
How can i fix my errors?

here my error log


Filter hinzufügen: Nur Fehlermeldungen dieser URL anzeigen  http://wizard09.bplaced.com/smf/index.php?action=admin;area=scheduledtasks
Filter hinzufügen: Nur Fehlermeldungen mit der gleichen Nachricht anzeigen
RSS Feeder: http://www.tagesschau.de/ (fsockopen error: )
Datei: /users/wizard09/www/smf/Sources/Subs-Rss.php
Zeile: 7786
RSS Feeder: http://www.autobild.de/rss/rss_feed_marke_bmw.xml (fsockopen error: )
Filter hinzufügen: Nur Fehlermeldungen dieser URL anzeigen  http://wizard09.bplaced.com/smf/index.php?action=admin;area=scheduledtasks
Filter hinzufügen: Nur Fehlermeldungen mit der gleichen Nachricht anzeigen
8: Undefined variable: errstr
Filter hinzufügen: Nur Fehler von dieser Datei zeigen
Datei: /users/wizard09/www/smf/Sources/Subs-Rss.php
Zeile: 7786

Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 05:16:04 PM
Not sure... fsockopen threw an error on your host and rssfeeder just reported it...

although rather than using that feed url... try this, since that feed redirects here: http://feeds2.feedburner.com/autobild-bmw
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 05:21:00 PM
SlammedDime,

Its shows that the error logged is enabled. I also delete the old one add a new feed It shows no error and still didn't pull anything from that site.
Title: Re: RSS Feeder
Post by: cheatkiller on June 04, 2009, 05:22:23 PM
mhmm... i got the same error

RSS Feeder: http://feeds2.feedburner.com/autobild-bmw (fsockopen error: )


cant i fix it?


my hoster is bplaced.com. it is a freehoster for testing.
Title: Re: RSS Feeder
Post by: SlammedDime on June 04, 2009, 05:44:48 PM
mtechama - sorry, I'm out of ideas then, my last suggestion is to find more feeds and try with them... if every feed fails to pull anything, then chances are there is something the way your host is configured that is stopping the mod somewhere.

cheatkiller - sounds like they have fsockopen disabled... nothing you can really do about it... if it's a free host, i'll bet they won't enable it for you.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 05:54:06 PM
SlammedDime when you said it worked fine for you did you able get a thread from one of the news off that site?
Title: Re: RSS Feeder
Post by: cheatkiller on June 04, 2009, 06:57:31 PM
ok now on my paidspace it works. But what must i do that the mod posts every new title in a new thread, and not all in one thread.


Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 09:11:35 PM
SlammedDime,

When you said its working with no errors did you get a thread from that website?
Title: Re: RSS Feeder
Post by: Garou on June 04, 2009, 09:20:20 PM
mtechama, I have an idea of why the feed may not be working right. http://validator.w3.org/feed/check.cgi?url=http%3A//aras.ab.ca/newsfeed.xml

Poorly formatted feeds like that can easily cause the issues you are having.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 04, 2009, 09:25:17 PM
Then how can I fix it?
Title: Re: RSS Feeder
Post by: SlammedDime on June 05, 2009, 01:05:36 AM
Quote from: mtechama on June 04, 2009, 05:54:06 PM
SlammedDime when you said it worked fine for you did you able get a thread from one of the news off that site?
Actually I got about 70 new threads, one for each item in the feed...
Quote from: cheatkiller on June 04, 2009, 06:57:31 PM
ok now on my paidspace it works. But what must i do that the mod posts every new title in a new thread, and not all in one thread.



By default, it creates a new topic for every item unless you checked the box to put it all in one topic.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 05, 2009, 01:16:34 AM
Do you think it has to be the username settings?
Title: Re: RSS Feeder
Post by: SlammedDime on June 05, 2009, 01:19:48 AM
I don't see how it could be.... feel free to test it out with different options and settings, and if you're able to get something that works, let me know.  I'm out of ideas on this one... no one else has reported any issue like this...
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 05, 2009, 01:38:02 AM
I am going to delete the old feed and add a fresh new one.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 05, 2009, 01:47:22 AM
Ok, I have deleted the old one and start a new fresh one. Tried different ways still can't get it it work.
Title: Re: RSS Feeder
Post by: Fulg de nea on June 08, 2009, 12:49:23 PM
Quote from: SlammedDime on June 03, 2009, 11:58:16 PM
Screen shot of run now...



where can i find this ?


I have some errors:


Apply Filter: Only show the errors with the same message
2: curl_setopt(): supplied argument is not a valid cURL handle resource
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7725

Apply Filter: Only show the errors with the same message
2: curl_setopt(): supplied argument is not a valid cURL handle resource
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7726


Apply Filter: Only show the errors with the same message
2: curl_setopt(): supplied argument is not a valid cURL handle resource
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7727

Apply Filter: Only show the errors with the same message
2: curl_setopt(): supplied argument is not a valid cURL handle resource
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7726

Apply Filter: Only show the errors with the same message
2: curl_exec(): supplied argument is not a valid cURL handle resource
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7738


Apply Filter: Only show the errors with the same message
2: curl_init() has been disabled for security reasons
Apply Filter: Only show the errors from this file
File: /home/www/allconsoles.host-ed.net/Sources/Subs-Rss.php
Line: 7714


Here i upload a file that i read it must check something:

http://allconsoles.host-ed.net/sp.php
Title: Re: RSS Feeder
Post by: SlammedDime on June 08, 2009, 03:20:28 PM
Looks like you have curl installed, but your host has it disabled, so this mod won't work for you until they enable it.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 12, 2009, 05:19:00 PM
SlammedDime I am totally redoing the website then when I re-download the file 3 times and after I apply the mod it was telling me this:

Installations actions for "RSS Feeder":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

the version I am using is 2.0 RC1-1
Title: Re: RSS Feeder
Post by: SlammedDime on June 12, 2009, 05:44:30 PM
You'll have to change your version of SMF with the emulate version advanced box on the Browse Packages page to 2.0 RC1 as I haven't yet updated the mod to install on RC1-1 (it will work without issue, however)
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 12, 2009, 05:49:20 PM
I don't see an availible download of that version just the latest of RC1-1.
Title: Re: RSS Feeder
Post by: SlammedDime on June 12, 2009, 05:51:41 PM
I never said you had to download anything...

In your package manager in your admin panel...

Title: Re: RSS Feeder
Post by: Galaxy Computers on June 12, 2009, 06:01:14 PM
It doesn't give me that option at all.

Nevermind I have that opition.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 13, 2009, 12:16:25 AM
SlammedDime,

I have installed the mod. Is it should pull the 70 different news off that website right away?
Title: Re: RSS Feeder
Post by: SlammedDime on June 13, 2009, 05:50:58 AM
It will pull them either when the scheduled task runs, or if you run it manually...
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 13, 2009, 09:04:42 AM
Well I have cleaned out every thing and start all over from scratch it seems nothing is pulling it.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 13, 2009, 01:41:59 PM
SlammedDime,

I am still having trouble to get everything going. Would help walk me through it?
Title: Re: RSS Feeder
Post by: SlammedDime on June 13, 2009, 03:19:18 PM
There really isn't much to help with... fill in the feed title and url, choose a board, type in a member to post as, mark the feed enabled, and either wait for the scheduled task to run, or run it manually...
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 13, 2009, 03:32:23 PM
I have done all that and its still not pulling the feeds.
Title: Re: RSS Feeder
Post by: zorro18 on June 14, 2009, 06:55:53 AM
Hi,

I have a pretty simple question.. This is the feed url which I want to retrieve as a full article..

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/cricket/rss.xml

What should be entered in Regular expression field??

Thanks in advance :)
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 14, 2009, 02:50:20 PM
SlammedDime,

I have change somethings around and add an Child board I am still unable to pull the feeds. I have used CMS (Content Manangement System) e107.org It was able to pull the feeds from that.
Title: Re: RSS Feeder
Post by: SlammedDime on June 14, 2009, 03:22:05 PM
if it was able to pull one feed and not another, then the problem lies with the feed, not this mod, so there really isn't anything that I can do to help with that...
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 15, 2009, 02:56:56 PM
SlammedDime,

Do you have a website that you suggest that can I test a feed?
Title: Re: RSS Feeder
Post by: SlammedDime on June 15, 2009, 03:25:00 PM
You can try it here... http://simplepie.org/demo/

If this can parse it, then the mod *should* be able to handle it.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 15, 2009, 03:32:01 PM
Well I entered this url http://aras.ab.ca/newsfeed.xml and it will pull it. I think I enter the all the information in the mod wrong. or the mod will not work for me.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 15, 2009, 03:45:50 PM
I added a new URL feed with this url http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml and it will not pull this feed either. I have done a Schedule Task and run it manually it still won't pull the feed from that site either.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 15, 2009, 04:50:32 PM
SlammedDime,

I have added another URL Feed to BBC News and it doesn't pull from that site either. Well if you said you can pull it and I can't then its not the site its the mod.

Title: Re: RSS Feeder
Post by: SlammedDime on June 15, 2009, 08:13:46 PM
Then my guess is there is something in your server configuration that is preventing the feed from running, it really isn't possible to tell what it is digging in deep and checking the settings and php_info.  Unfortunately I don't have the time right now to dig through to find what may be happening.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 15, 2009, 08:57:33 PM
How can I find out or tell on the server configuration?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 16, 2009, 05:46:25 PM
SlammedDime,  how can I found out on the server configuration?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 16, 2009, 07:32:27 PM
Quote from: SlammedDime on June 15, 2009, 08:13:46 PM
Then my guess is there is something in your server configuration that is preventing the feed from running, it really isn't possible to tell what it is digging in deep and checking the settings and php_info.  Unfortunately I don't have the time right now to dig through to find what may be happening.

How can I find this prevention on the server configuration?
Title: Re: RSS Feeder
Post by: SlammedDime on June 16, 2009, 08:17:20 PM
Continually bumping the topic is not going to help you.  I do have a life outside of SMF and a full time job.

There are numerous things to check, not just any one thing... if your server has any disabled functions that this uses such as any curl functions, or if it prevents resetting the timeout limit for the php script, or if it disallows the bumping of memory the script uses up.  As the feed your posted much earlier worked for me, I have to guess and assume it is a server issue, but as I said, I unfortunately don't have the time to dig through it and find out why.  I'm sorry.
Title: Re: RSS Feeder
Post by: imno007 on June 16, 2009, 08:21:55 PM
Any chance you'll be updating this for 2.0 RC1-1? I'd really like to try it. :)
Title: Re: RSS Feeder
Post by: SlammedDime on June 16, 2009, 08:23:32 PM
It works for RC1-1, just haven't updated it to actually install on it... you can manually do this as I suggested a page or so back...

Quote from: SlammedDime on June 12, 2009, 05:51:41 PM
I never said you had to download anything...

In your package manager in your admin panel...



:)
Title: Re: RSS Feeder
Post by: imno007 on June 17, 2009, 04:33:27 PM
Crazy, I never even noticed that down there at the bottom of the page before. Thanks much, I'll give it a try. 8)
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 17, 2009, 08:48:08 PM
SlammedDime I have made a file on my server http://www.mtechama.com/info.php what am I looking for?
Title: Re: RSS Feeder
Post by: zorro18 on June 18, 2009, 12:42:16 AM
Quote from: zorro18 on June 14, 2009, 06:55:53 AM
Hi,

I have a pretty simple question.. This is the feed url which I want to retrieve as a full article..

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/cricket/rss.xml

What should be entered in Regular expression field??

Thanks in advance :)

Sorry for the bump.. Any thoughts on this will be much appreciated.
Title: Re: RSS Feeder
Post by: MUSTAfaINE on June 18, 2009, 03:52:30 AM
please help for this http://metalfrm.com/index.php/topic,28057.msg37862/boardseen.html#new..

the mod is working but it is not showing the links.. look like this download links..
Title: Re: RSS Feeder
Post by: SlammedDime on June 18, 2009, 04:53:40 PM
Quote from: mtechama on June 17, 2009, 08:48:08 PM
SlammedDime I have made a file on my server http://www.mtechama.com/info.php what am I looking for?
I don't really see anything out of the ordinary there... i'm out of ideas on this one.  When I have some free time hopefully soon, perhaps you can give me ftp access to your site and I can poke around and try to figure it out.

Quote from: zorro18 on June 18, 2009, 12:42:16 AM
Quote from: zorro18 on June 14, 2009, 06:55:53 AM
Hi,

I have a pretty simple question.. This is the feed url which I want to retrieve as a full article..

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/cricket/rss.xml

What should be entered in Regular expression field??

Thanks in advance :)

Sorry for the bump.. Any thoughts on this will be much appreciated.

It's a bit complicated, and it may not yield perfect results, but you can try this:
~<!-- S SF -->(.*?)<!-- E BO -->~si

Quote from: MUSTAfaINE on June 18, 2009, 03:52:30 AM
please help for this http://metalfrm.com/index.php/topic,28057.msg37862/boardseen.html#new..

the mod is working but it is not showing the links.. look like this download links..
If I remember correct, all links are stripped out (only images were kept when I wrote the mod).  I can try to look into keeping links as well.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 18, 2009, 06:27:06 PM
SlammedDime,

That is fine there is no rush I just would like to get this fixed and going soon. So let me know.
Title: Re: RSS Feeder
Post by: canadiancray on June 20, 2009, 09:56:25 AM
I'm running SMF 2.0 RC1-1 & an getting this error any time I try to apply the package.

QuoteInstall Actions
Installations actions for "RSS Feeder":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: RSS Feeder
Post by: SlammedDime on June 20, 2009, 03:32:23 PM
Again...
Quote from: SlammedDime on June 16, 2009, 08:23:32 PM
It works for RC1-1, just haven't updated it to actually install on it... you can manually do this as I suggested a page or so back...

Quote from: SlammedDime on June 12, 2009, 05:51:41 PM
I never said you had to download anything...

In your package manager in your admin panel...



:)
Title: Re: RSS Feeder
Post by: canadiancray on June 20, 2009, 08:54:56 PM
Well I don't know how far I need to go back. I tried setting it back to SMF 1.1.17 & still got this error.

QuoteInstall Actions
Installations actions for "RSS Feeder":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: RSS Feeder
Post by: SlammedDime on June 20, 2009, 10:01:54 PM
It needs to be 2.0 RC1
Title: Re: RSS Feeder
Post by: Kyzer on June 21, 2009, 03:32:38 PM
Where do i go to change the frequency of the posts/retrievals?
Title: Re: RSS Feeder
Post by: canadiancray on June 21, 2009, 03:41:11 PM
In the system maintenance section. you select how often you want the RSS Feed to run.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 21, 2009, 03:50:55 PM
I have called my web hosting tech support they said that the Sever Configuration working fine with the feeds.
Title: Re: RSS Feeder
Post by: Kyzer on June 21, 2009, 09:45:20 PM
Thnx canadiancray
Title: Re: RSS Feeder
Post by: _Anthony_ on June 22, 2009, 03:41:14 AM
I love this mod, thanks SlammedDime!
Title: Re: RSS Feeder
Post by: jossanaijr on June 24, 2009, 01:09:06 PM
Installed 2.0 RC1-1 without any error message but cannot find admin setup...?  :-[
Title: Re: RSS Feeder
Post by: SlammedDime on June 24, 2009, 03:22:21 PM
It's under Configuration > Modifications > RSS Feeder.  If you don't see it there, then the mod didn't install properly.
Title: Re: RSS Feeder
Post by: canadiancray on June 27, 2009, 12:17:30 PM
OK So I installed this MOD about 1 week ago. It posted the RSS feeds the first time but hasn't made any other posts since then. Even if I manually run the RSS Feed scheduled maintenance it doesn't post any of the new feeds.

Did I do something wrong???
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 03:02:41 PM
Any errors in the error log?  Is the feed still enabled?  Has the feed actually updated since you last ran it?
Title: Re: RSS Feeder
Post by: уιℓмαz on June 27, 2009, 03:14:35 PM
Thanks for the mod. But i have a problem.

I was using this mod without any problem on my old server but after i have transferred my forum to new server,  there is no post that posted by rss feeder.

How can i fix this problem?
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 04:02:46 PM
any errors in the forum error log?
Title: Re: RSS Feeder
Post by: canadiancray on June 27, 2009, 05:20:29 PM
Yes all my feeds are enabled. There are 0 errors in the log. The feed has updated because I view the same feeds in my Microsoft Outlook & it has updated 3 times but the forum has not updated since first installed.

Quote from: SlammedDime on June 27, 2009, 03:02:41 PM
Any errors in the error log?  Is the feed still enabled?  Has the feed actually updated since you last ran it?
Title: Re: RSS Feeder
Post by: уιℓмαz on June 27, 2009, 05:38:06 PM
Quote from: SlammedDime on June 27, 2009, 04:02:46 PM
any errors in the forum error log?

There is no error in the error log.
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 05:52:43 PM
Perhaps there is an issue with SMF 2.0RC1-1 that is stopping this from working right... I'll investigate further.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 27, 2009, 05:54:44 PM
SlammedDime do you think I might have same problem he is having?
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 05:55:57 PM
It's entirely possible... there shouldn't have been any changes in the RC1-1 update that could cause any issues.  I'll take a look and see what's going on...
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 27, 2009, 05:57:32 PM
Ok, keep me updated.
Title: Re: RSS Feeder
Post by: уιℓмαz on June 27, 2009, 06:21:05 PM
I did not changed anything but it is working now :)

(i only fixed some errors in the log.)

But it added all 50 topics at same time ??

Edit:
Oh i see its settings can change on Scheduled Tasks.

I think the problem is fixed.
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 07:52:45 PM
And I tested the mod on a clean install of RC1-1 and it worked flawlessly.
Title: Re: RSS Feeder
Post by: canadiancray on June 27, 2009, 10:07:47 PM
Yeah it feeds the posts the first time no problem. If I add a new feed it will post everything from the new feed but after that no new posts a made.
Title: Re: RSS Feeder
Post by: SlammedDime on June 27, 2009, 10:59:51 PM
Quote from: canadiancray on June 27, 2009, 10:07:47 PM
Yeah it feeds the posts the first time no problem. If I add a new feed it will post everything from the new feed but after that no new posts a made.
And you have SMF 2.0RC1-1?  I looked breifly, but didn't see it, can you post the feed you're having an issue with?
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 27, 2009, 11:23:24 PM
I guess with mine I will have to delete the feeds and re-add them and see I can make it work again.
Title: Re: RSS Feeder
Post by: Galaxy Computers on June 30, 2009, 03:33:26 PM
I have deleted the previouse addon of the feeder and re-add the feeder I am still unable to get it to work.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 03, 2009, 12:12:38 AM
I am having a problem where I am using your code for 'Regular Expression' which is ~<div id="articlestory">(.*)<\/div>~siU but it stills keeps on showing only the description of the feed. It doesn't open the feed article and post the whole feed. Yes I have 'Retrieve Full Article' checked and the above code put in the 'Regular Expression'. How can I fix this?

After fixing the above how can I have the feed bring over links, pictures, and videos?
Title: Re: RSS Feeder
Post by: SlammedDime on July 03, 2009, 07:21:51 AM
I'd need to see the feed to know if the regex you're using is correct for not...

As for what it brings over... at the moment, only images.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 03, 2009, 04:09:15 PM
The feeds I been trying have been like 15 different ones all only bring the info not the whole story.

Here is one for instance that I been fighting with:
CNET   (there was a few on cnet like computer reviews and such)


Is there anywhere that I can look to get info on which regular expression I should be using for a particular site?
Title: Re: RSS Feeder
Post by: SlammedDime on July 03, 2009, 09:13:26 PM
Did you read my regular expression tutorial?  You really won't find any information other than that, except for the generals of creating regular expressions.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 03, 2009, 09:19:53 PM
Yes I read your tutorial ... and used also the one that you use ~<div id="articlestory">(.*)<\/div>~siU and still none grab the full story.
Title: Re: RSS Feeder
Post by: SlammedDime on July 03, 2009, 09:20:16 PM
You can't use the one I use... the purpose of the tutorial is to show you how to create one for your specific feed.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 03, 2009, 09:30:11 PM
Guess i am >>>> a moron  :P ...... I will try to reread the tut as i have 3 times maybe I can seem to make myself smarter ..... prob not  :P

One thing you said in it that I am curious on how to find its
QuoteIf you look at the HTML source for the feed, you'll find the article in the following HTML code...
How do I find the HTML source?
Title: Re: RSS Feeder
Post by: mrtrc266 on July 04, 2009, 01:56:50 AM
Quote from: Chit-Chat ChatterBox Boss on July 03, 2009, 09:30:11 PM
Guess i am >>>> a moron  :P ...... I will try to reread the tut as i have 3 times maybe I can seem to make myself smarter ..... prob not  :P

One thing you said in it that I am curious on how to find its
QuoteIf you look at the HTML source for the feed, you'll find the article in the following HTML code...
How do I find the HTML source?

When you are on the page of an aticle you want the feed from...Right Click/View Source....and search for the <div=??> above where the article/reivew starts. Whatever that DIV is replace it with the DIV used in the example that was provided in the Regular Expressions tutorial

EXAMPLE: Let's say you find a DIV that is says <div=mainstory>

Then use the following as the Regular Expression in the Mod Settings

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

If you can't get it post the link of the RSS Feed you want and I'll take a look.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 04, 2009, 01:58:37 AM
Thanks  ;D Good job confusing yourself I will try it out and see if I didnt get confused  :P
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 04, 2009, 03:58:46 AM
I keep trying over and over .... the reg expression i get from the sources ... keep pulling either the discription or parts of what is in the topic ... not EVERYTHING. Maybe you guys can solve this one and show me how you found it.

Feed url for CNET Reviews (Computer Systems)
http://reviews.cnet.com/4924-3000_7-0.xml?orderBy=-7rvDte&7rType=70-80&maxhits=10&tag=rb_content;rb_mtx (http://reviews.cnet.com/4924-3000_7-0.xml?orderBy=-7rvDte&7rType=70-80&maxhits=10&tag=rb_content;rb_mtx)
Title: Re: RSS Feeder
Post by: mrtrc266 on July 05, 2009, 12:22:04 AM
Chit Chat, I messed around with this feed quite a bit and it seems it might be impossible to retrieve the full article. Like you said you can get the Product info, the gallery, the editors review etc but they are all broken up into seperate DIV's instead of a single DIV so it's only pulling one area.

Try finding a different feed source instead of CNET and see if you can find something that's wrapped up in 1 DIV.
Title: Re: RSS Feeder
Post by: Chit-Chat ChatterBox Boss on July 05, 2009, 12:37:41 AM
I will try thanks!
Title: Re: RSS Feeder
Post by: nwobhm on July 05, 2009, 11:16:13 AM
Thanks for the great mod! Works fine on 2.0 RC1-1 :D

But I got a question.. Is there a way to prevent rss feeder posts to appear in the "recent posts" list?
Title: Re: RSS Feeder
Post by: SlammedDime on July 05, 2009, 05:00:00 PM
Quote from: nwobhm on July 05, 2009, 11:16:13 AM
Thanks for the great mod! Works fine on 2.0 RC1-1 :D

But I got a question.. Is there a way to prevent rss feeder posts to appear in the "recent posts" list?

Not really... they're posts just like any other on the forum... all you could do is if you have all of your feeds going to one board, exclude that board from the recent posts list, but you'd have to edit the recent post code.
Title: Re: RSS Feeder
Post by: nwobhm on July 05, 2009, 05:24:04 PM
Quote from: SlammedDime on July 05, 2009, 05:00:00 PM
Quote from: nwobhm on July 05, 2009, 11:16:13 AM
Thanks for the great mod! Works fine on 2.0 RC1-1 :D

But I got a question.. Is there a way to prevent rss feeder posts to appear in the "recent posts" list?

Not really... they're posts just like any other on the forum... all you could do is if you have all of your feeds going to one board, exclude that board from the recent posts list, but you'd have to edit the recent post code.
Thanks! My feeds are going into one board only, so I'll have to check that recent posts code.
Title: Re: RSS Feeder
Post by: nwobhm on July 07, 2009, 01:34:46 AM
Currently my rss feeds goes into one board only and I have disabled post count on that board, but still rss feed bots posts are counted? I wonder why?
Title: Re: RSS Feeder
Post by: SlammedDime on July 07, 2009, 05:13:22 PM
hrm... i'll have to do some testing on that one....
Title: Re: RSS Feeder
Post by: neteater on July 07, 2009, 11:58:37 PM
when you will make a version compt with 2.0rc1-1
Title: Re: RSS Feeder
Post by: SlammedDime on July 08, 2009, 07:53:44 AM
the mod is compatible with RC1-1, you just have to change the version that the package manager thinks your SMF install is by clicking 'Advanced' at the bottom of the Package manager.
Title: Re: RSS Feeder
Post by: neteater on July 10, 2009, 12:04:40 AM
ok done it but i am geting to message which is saying me to upgrade to rc1-1 on my admin cp and what if i want to install a mod which works with only with rc1-1 then waht happens
Title: Re: RSS Feeder
Post by: Xavi-Nena on July 10, 2009, 12:28:54 AM
been away for a while, are their still plans to try to make this compatible with 1.1.9
Title: Re: RSS Feeder
Post by: neteater on July 10, 2009, 02:17:57 AM
well i am uninstalling in on my 2.0rc1-1 becasue on simulation i am getting error error s in other mod to work with it which are for 2.0rc1-1 may developer update this
Title: Re: RSS Feeder
Post by: neteater on July 13, 2009, 04:10:03 AM
hey i just uninstalled this but rss feed option is still visible in modifications and as well in scheduled task how to completely remove it
Title: Re: RSS Feeder
Post by: SlammedDime on July 13, 2009, 04:30:30 AM
Did you get errors when uninstalling it?

As for the scheduled task part, you can ignore that, it won't harm your board or anything.  It's due to the database entries still being there for the scheduled task.
Title: Re: RSS Feeder
Post by: neteater on July 13, 2009, 04:34:25 AM
no it was done with out any errors
Title: Re: RSS Feeder
Post by: nwobhm on July 19, 2009, 03:03:29 AM
Quote from: nwobhm on July 07, 2009, 01:34:46 AM
Currently my rss feeds goes into one board only and I have disabled post count on that board, but still rss feed bots posts are counted? I wonder why?
Quote from: SlammedDime on July 07, 2009, 05:13:22 PM
hrm... i'll have to do some testing on that one....
Have you been able to test this post count prob?
I have to manually reset rss feed bots postcount so that it won't appear on "top poster" -list.
Title: Re: RSS Feeder
Post by: SlammedDime on July 19, 2009, 06:52:42 AM
yea, I see the issue in the code... I'll do a fix for it and add it to the next version of the mod
Title: Re: RSS Feeder
Post by: GazOutEast on July 19, 2009, 12:05:17 PM
Been away from the boards a while too ...

Still hoping for -

- post-by-post or feed-by-feed autodelete aged news / announcement posts

- dunno if I mentioned it, but the very stable wp-o-matic RSS feed poster for WordPress appears to have been abandoned by the author and needs dragged up to date with some of the excellent features in your version for SMF - wouldn't care to do the honours would you?  Hopefully it'd just be a case of tweaking it to include the keyword filtering etc.


Oh, and excellent news about identifying the post count issue for the feedposter account - I look forward to that fix appearing in due course

Gaz
Title: Re: RSS Feeder
Post by: npereira on July 20, 2009, 08:20:46 AM
is there a log file generated for errors?

one of my RSS feed, turns off on its own (red 'x' in rss feeder) and I dont know why.
Title: Re: RSS Feeder
Post by: npereira on July 20, 2009, 01:14:01 PM
Hello?
Title: Re: RSS Feeder
Post by: SlammedDime on July 20, 2009, 03:37:49 PM
My body does have to sleep, and I do have a full time job, please do not expect a response in 5 hours.

This logs error in the forum's error log.
Title: Re: RSS Feeder
Post by: npereira on July 20, 2009, 05:49:16 PM
Oh,sorry bout that. So why would this rss turn itself off?
Title: Re: RSS Feeder
Post by: SlammedDime on July 20, 2009, 08:14:51 PM
You'd have to check the error log on the forum... it normally would happen if there is an issue with the feed, which can be any number of things.
Title: Re: RSS Feeder
Post by: npereira on July 20, 2009, 08:37:22 PM
this is the error i see in the logs:

   Guest   Yesterday at 11:01:20 PM 
     
   Type of error: General 
http://www.blablabla.ca/index.php?PHPSESSID=******************&amp;amp;scheduled=task;ts=1248102000 
: http://www.blablabla.ca/index.php?action=classifieds;sa=rss;cat=2;type=recent (XML error: undefined entity at line 18, column 756)
Title: Re: RSS Feeder
Post by: SlammedDime on July 20, 2009, 09:17:26 PM
Means there is an error in the XML syntax and the file can't be parsed.
XML error: undefined entity at line 18, column 756
Title: Re: RSS Feeder
Post by: Spiritwarrior on July 21, 2009, 05:09:26 AM
Does the mod work for SMF 2.0 RC1-2 yet? It wouldn't allow me to install it. Can it be done manually and still work?
Title: Re: RSS Feeder
Post by: Eclipse16V on July 21, 2009, 05:21:42 AM
On my SMF 2.0RC1.2 work it  ;)
Title: Re: RSS Feeder
Post by: Spiritwarrior on July 21, 2009, 05:37:13 AM
Quote from: Eclipse16V on July 21, 2009, 05:21:42 AM
On my SMF 2.0RC1.2 work it  ;)

By that, did you do file edits and add the scripts for it to work?
Title: Re: RSS Feeder
Post by: SlammedDime on July 21, 2009, 07:50:06 AM
At the bottom of your package manager, lower right corner, click 'Advanced' and change your version to 2.0 RC1, install the mod, then change it back to 2.0RC1.2
Title: Re: RSS Feeder
Post by: Spiritwarrior on July 21, 2009, 11:20:17 AM
Quote from: SlammedDime on July 21, 2009, 07:50:06 AM
At the bottom of your package manager, lower right corner, click 'Advanced' and change your version to 2.0 RC1, install the mod, then change it back to 2.0RC1.2

Got it, finally installed! Thanks for the heads up, I've overlooked the Advanced option in the Packages area.  ;)
Title: Re: RSS Feeder
Post by: Bastor on July 23, 2009, 01:42:35 PM
Hi,
work you a version for RC 2.0 RC 1.2 or wait you off the final version?

Thanks
Bastor
Title: Re: RSS Feeder
Post by: SlammedDime on July 23, 2009, 05:20:28 PM
Please read two posts above yours
Title: Re: RSS Feeder
Post by: Rockz on July 23, 2009, 08:58:43 PM
Great mod Slammed.

I skimmed looking for this but didn't see anything so asking here.  Is it possible for an RSS post to "jump" to a different forum category if a member posts a reply to it?  My issue is that someone posts a reply to something they want to have a conversation about, but then that reply gets buried by the next RSS load and thus, it's pretty much impossible to have conversations regarding any of the feeds.

So if a feed has a reply posted to it, is it possible for that feed to automatically be moved to another forum category or board that I set up specifically for that purpose?  Or at the very least, is it possible for the feed that was responded to be moved to the very top and not be buried by future feed loads?

I hope I am making sense.  I'm wanting to create discussions from the feeds rather than just offering feeds for people to read and move on.

Thanks.
Title: Re: RSS Feeder
Post by: neteater on August 02, 2009, 01:52:56 AM
how to find a Regular Expression for a rss feed for posting copmlete article please help me
Title: Re: RSS Feeder
Post by: SlammedDime on August 02, 2009, 03:50:09 AM
Read first post, tutorial linked there.
Title: Re: RSS Feeder
Post by: neteater on August 03, 2009, 01:25:46 AM
may be i am wrong but i failed to find anything explaining regular expression
Title: Re: RSS Feeder
Post by: SlammedDime on August 03, 2009, 03:48:51 AM
Directly from the first post...

Quote from: SlammedDime on January 11, 2009, 06:06:42 AM
Regex Help
Attached to this post is a file named regex.php... you can upload this script to your web server to test out your regular expressions with a given input.  It's pretty self explanatory... the goal is end up with what you want in the [1] => part of the array returned.  For debugging purposes, the entire matches array is displayed.  See this post (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) of the topic as well.
Title: Re: RSS Feeder
Post by: milenmk on August 04, 2009, 01:55:29 PM
I've chanched my forum version to v2 RC1 but can't install it. Gives me an error "You cannot download or install new packages because the Packages directory or one of the files in it are not writable!", but all files and folders are set to CHMOD 777. Also tried to change the code by hand and run add_settings.php. So, if I paste in the url ~index.php?action=admin;area=modsettings;sa=rssfeeds, it opens the site but no menus there. Can you help?
Title: Re: RSS Feeder
Post by: DarkSynopsis on August 04, 2009, 10:13:29 PM
Not sure if this has been answered but installed this on SMF 2.0 RC1.2 and just noticed it did not post anything from an RSS when it ran 10 minutes ago.

I checked my Task Log and has "RSS Feeder, Today at 03:04:32 AM, 0 seconds" and it did nothing, yet the moment I run it myself it posted from the RSS.
Title: Re: RSS Feeder
Post by: milenmk on August 05, 2009, 04:21:14 AM
Ok. Got following errors:

8: Undefined index: mods_cat_rssfeeds
File: ~/Sources/Admin.php
Line: 217
// 'shout' => array($txt['shout']),
'rssfeeds' => array($txt['mods_cat_modifications_rssfeeds']), 



8: Undefined index: rss_feeder_desc
File: ~/Sources/ManageSettings.php
Line: 219
// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => &$txt['admin_modifications'],
'help' => 'modsettings',
'description' => $txt['modification_settings_desc'],
'rssfeeds' => array(
'description' => $txt['rss_feeder_desc'],



I use SMF 2.0RC1.2, and all the changes in files are made by hand - not automatic install of the mod
Title: Re: RSS Feeder
Post by: SlammedDime on August 05, 2009, 04:37:09 AM
Sounds like you just need to clear your file cache, or triple check that all of the language strings have been added to the modifications.english.php file.
Title: Re: RSS Feeder
Post by: milenmk on August 05, 2009, 05:53:11 PM
Quote from: SlammedDime on August 05, 2009, 04:37:09 AM
Sounds like you just need to clear your file cache, or triple check that all of the language strings have been added to the modifications.english.php file.

Thanks. Got it working.
Title: Re: RSS Feeder
Post by: bromacleanse on August 06, 2009, 02:29:30 PM
How do I remove the source part at the bottom of each post? Any help will be much appreciated. Anyway, SMF ROCKS :D
Title: Re: RSS Feeder
Post by: SlammedDime on August 06, 2009, 05:27:34 PM
It'll be in Sources/ScheduledTasks.php, near the bottom.
Title: Re: RSS Feeder
Post by: bromacleanse on August 07, 2009, 07:05:38 AM
Quote from: SlammedDime on August 06, 2009, 05:27:34 PM
It'll be in Sources/ScheduledTasks.php, near the bottom.

Got it bro, thanks for the great help. It worked for me. Gotta find some time off to go back to the old php days.
Title: Re: RSS Feeder
Post by: Galaxy Computers on August 08, 2009, 04:35:47 PM
I have install the 1.1.10 Version and I click the apply mod and it says:

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: RSS Feeder
Post by: SlammedDime on August 08, 2009, 05:19:02 PM
That's because the mod is not compatible with 1.1.10, it's a 2.0 only mod, as it says on the download page.
Title: Re: RSS Feeder
Post by: Galaxy Computers on August 08, 2009, 05:22:25 PM
So you are saying there is not mod for this version then?
Title: Re: RSS Feeder
Post by: SlammedDime on August 08, 2009, 05:26:26 PM
There is one, but as far as I know it doesn't work too well and the author has discontinued support for it.
Title: Re: RSS Feeder
Post by: Galaxy Computers on August 08, 2009, 05:28:41 PM
Where is that mod for that version?
Title: Re: RSS Feeder
Post by: SlammedDime on August 08, 2009, 05:41:04 PM
Please try utilizing the search feature.... http://custom.simplemachines.org/mods/index.php?mod=624
Title: Re: RSS Feeder
Post by: DirtRider on August 10, 2009, 04:29:41 AM
I am unable to get the following feed to post using the RSS Feeder http://feed43.com/7878018404721735.xml (http://feed43.com/7878018404721735.xml). However it seems to work no problem using PortaMx RRS feed option http://triumphtalk.com/index.php (http://triumphtalk.com/index.php). I would really like this feed to be posted as threads and not just as a new item on my front page
Title: Re: RSS Feeder
Post by: getandshare on August 10, 2009, 08:01:51 AM
Hi,
Admin->configuration->modification-> RSS FEEDER

i get this instead of control panel


/* RSS Feeder Settings */ function ModifyRSSFeedSettings() { global $context, $txt, $sourcedir, $scripturl, $smcFunc; loadTemplate('RSSFeeds'); $context['page_title'] = $txt['rss_feeder']; if (!empty($_REQUEST['feed']) && (isset($_REQUEST['enable']) || isset($_REQUEST['disable']))) { // Quick change on the status... $smcFunc['db_query']('', ' UPDATE {db_prefix}rssfeeds SET enabled = {int:option} WHERE id_feed = {int:feed}', array( 'option' => isset($_REQUEST['enable']) ? 1 : 0, 'feed' => (int) $_REQUEST['feed'], ) ); redirectExit('action=admin;area=modsettings;sa=rssfeeds'); } if (!empty($_REQUEST['feed']) || !empty($_REQUEST['add'])) { $context['sub_template'] = 'rss_feeder_add'; // Load the boards and categories for adding or editing a feed. $request = $smcFunc['db_query']('', ' SELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat FROM {db_prefix}boards AS b LEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)', array() ); $context['categories'] = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { if (!isset($context['categories'][$row['id_cat']])) $context['categories'][$row['id_cat']] = array ( 'name' => strip_tags($row['cat_name']), 'boards' => array(), ); $context['categories'][$row['id_cat']]['boards'][] = array( 'id' => $row['id_board'], 'name' => strip_tags($row['name']), 'category' => strip_tags($row['cat_name']), 'child_level' => $row['child_level'], 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board, ); } $smcFunc['db_free_result']($request); if (empty($context['categories'])) fatal_lang_error('rss_feed_no_boards', false); // If we're just adding a feed, we can return, don't need to do anything further if (empty($_REQUEST['add'])) { // Lets get the feed from the database $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}rssfeeds WHERE id_feed = {int:feed} LIMIT 1', array( 'feed' => ((int) $_REQUEST['feed']), ) ); // No Feed?? ut oh... hacker!! if ($smcFunc['db_num_rows']($request) != 1) fatal_lang_error('rss_feed_not_found', false); $context['rss_feed'] = $smcFunc['db_fetch_assoc']($request); $context['rss_feed'] = htmlspecialchars__recursive($context['rss_feed']); $smcFunc['db_free_result']($request); } $context['icon'] = !empty($context['rss_feed']['icon']) ? $context['rss_feed']['icon'] : 'xx'; require_once($sourcedir . '/Subs-Editor.php'); // Message icons - customized icons are off? $context['icons'] = getMessageIcons(!empty($context['rss_feed']['id_board']) ? $context['rss_feed']['id_board'] : 0); if (!empty($context['icons'])) $context['icons'][count($context['icons']) - 1]['is_last'] = true; $context['icon_url'] = ''; for ($i = 0, $n = count($context['icons']); $i < $n; $i++) { $context['icons'][$i]['selected'] = $context['icon'] == $context['icons'][$i]['value']; if ($context['icons'][$i]['selected']) $context['icon_url'] = $context['icons'][$i]['url']; } if (empty($context['icon_url'])) { $context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif'; array_unshift($context['icons'], array( 'value' => $context['icon'], 'name' => $txt['current_icon'], 'url' => $context['icon_url'], 'is_last' => empty($context['icons']), 'selected' => true, )); } return; } // What about deleting one or more?? elseif (!empty($_REQUEST['delete'])) { //$_POST['checked_feeds'] // We already asked that they wanted to delete, so we'll just delete... no confirmation foreach ($_POST['checked_feeds'] as $key => $id) $_POST['checked_feeds'][$key] = (int) $id; $smcFunc['db_query']('', ' DELETE FROM {db_prefix}rssfeeds WHERE id_feed IN ({array_int:feed_list})', array( 'feed_list' => $_POST['checked_feeds'], ) ); } // Or are they saving one being modified?? elseif (!empty($_REQUEST['save']) && !empty($_POST['sc'])) { // First we check the session... checkSession(); // Put the insert array together... $insertOptions = array(); // Let's do the 'unrequireds' first... $insertOptions['id_board'] = (int)$_POST['feed_board']; $insertOptions['icon'] = isset($_POST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']) : 'xx'; $insertOptions['enabled'] = isset($_POST['feed_enabled']) ? 1 : 0; $insertOptions['keywords'] = trim($_POST['feed_keywords']) != '' ? trim($_POST['feed_keywords']) : ''; $insertOptions['locked'] = isset($_POST['feed_locked']) ? 1 : 0; $insertOptions['getfull'] = isset($_POST['feed_full']) ? 1 : 0; $insertOptions['approve'] = isset($_POST['feed_approve']) ? 1 : 0; $insertOptions['singletopic'] = isset($_POST['feed_singletopic']) ? 1 : 0; $insertOptions['topicprefix'] = trim($_POST['feed_prefix']) != '' ? trim($_POST['feed_prefix']) : ''; $insertOptions['footer'] = !empty($_POST['feed_footer']) ? trim($_POST['feed_footer']) : ''; $insertOptions['numbertoimport'] = trim($_POST['feed_import']) != '' ? (int) trim($_POST['feed_import']) : 0; $context['feed_errors'] = array(); // And now the requireds that we can throw errors on... if (empty($_POST['feed_title'])) $context['feed_errors']['feed_title'] = ($insertOptions['title'] = ''); else $insertOptions['title'] = preg_replace('~[&]([^;]{8}|[^;]{0,8}$)~', '&$1', $_POST['feed_title']); if (empty($_POST['feed_url'])) $context['feed_errors']['feed_url'] = ($insertOptions['feedurl'] = ''); else $insertOptions['feedurl'] = trim($_POST['feed_url']); if (empty($_POST['feed_poster'])) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = ''); // Do a query to get the member's id else { $request = $smcFunc['db_query']('', ' SELECT id_member FROM {db_prefix}members WHERE real_name = {string:name} OR member_name = {string:name} LIMIT 1', array( 'name' => trim($_POST['feed_poster']), ) ); if ($smcFunc['db_num_rows']($request) != 1) $context['feed_errors']['feed_poster'] = ($insertOptions['postername'] = trim($_POST['feed_poster'])); else { $insertOptions['postername'] = trim($_POST['feed_poster']); list($insertOptions['id_member']) = $smcFunc['db_fetch_row']($request); } $smcFunc['db_free_result']($request); } $insertOptions['regex'] = trim($_POST['feed_regex']); if (!empty($insertOptions['getfull']) && empty($insertOptions['regex'])) $context['feed_errors']['feed_regex'] = ''; // if we had any errors, lets kick back a screen and highlight them... if (!empty($context['feed_errors'])) { $context['rss_feed'] = $insertOptions; if (!empty($_POST['feed_id'])) $_REQUEST['feed'] = $_POST['feed_id']; $_REQUEST['add'] = true; return ModifyRSSFeedSettings(); } // Looks like we're good. // Modifying an existing feed? if (!empty($_REQUEST['feed_id'])) { $smcFunc['db_query']('',' UPDATE {db_prefix}rssfeeds SET id_board = {int:id_board}, feedurl = {string:feedurl}, title = {string:title}, icon = {string:icon}, enabled = {int:enabled}, postername = {string:postername}, id_member = {int:id_member}, keywords = {string:keywords}, regex = {string:regex}, locked = {int:locked}, getfull = {int:getfull}, approve = {int:approve}, singletopic = {int:singletopic}, topicprefix = {string:topicprefix}, footer = {string:footer}, numbertoimport = {int:numbertoimport} WHERE id_feed = {int:id_feed}', array_merge(array('id_feed' => (int)$_REQUEST['feed_id']), $insertOptions) ); $context['feed_insert_success'] = $txt['rss_feed_update_success']; } // Or I guess we're inserting a new one else { // Fix up the stuff for insertion, make sure the arrays are aligned $insertRows = array( 'singletopic' => 'int', 'icon' => 'string', 'footer' => 'string', 'getfull' => 'int', 'id_board' => 'int', 'feedurl' => 'string', 'title' => 'string', 'enabled' => 'int', 'postername' => 'string', 'id_member' => 'int', 'keywords' => 'string', 'regex' => 'string', 'locked' => 'int', 'approve' => 'int', 'topicprefix' => 'string', 'numbertoimport' => 'int' ); ksort($insertRows); ksort($insertOptions); $smcFunc['db_insert']('', '{db_prefix}rssfeeds', $insertRows, $insertOptions, array('id_feed') ); $id_feed = $smcFunc['db_insert_id']('{db_prefix}rssfeeds', 'id_feed'); if (empty($id_feed)) $context['feed_insert_error'] = $txt['rss_feed_insert_error']; else $context['feed_insert_success'] = $txt['rss_feed_insert_success']; } } // If they deleted or saved, let's show the main list $context['sub_template'] = 'rss_feeder_list'; // Create the table that will display the feeds $listOptions = array( 'id' => 'rss_feeder_list', 'items_per_page' => 40, 'default_sort_col' => 'icon', 'base_href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'no_items_label' => $txt['rss_feed_none'], 'get_items' => array( 'function' => 'list_getFeeds', ), 'get_count' => array( 'function' => 'list_getNumFeeds', ), 'columns' => array( 'icon' => array( 'header' => array( 'value' => $txt['rss_feed_enabled'], ), 'data' => array( 'function' => create_function('$rowData', ' global $settings, $scripturl, $smcFunc, $txt; if (empty($rowData[\'name\']) && $rowData[\'enabled\']) { $smcFunc[\'db_query\'](\'\', \' UPDATE {db_prefix}rssfeeds SET enabled = 0 WHERE id_feed = {int:feed}\', array( \'feed\' => $rowData[\'id_feed\'], ) ); // Log an error about the issue, just so the user can see why their feed was disabled... log_error($txt[\'rss_feeder\'] . \': \' . $rowData[\'title\'] . \' (\' . $txt[\'rss_feed_board_error\'] . \')\'); $rowData[\'enabled\'] = 0; } return \'\';' ), 'style' => 'text-align: center; width: 130px;', ), 'sort' => array( 'default' => 'f.enabled', 'reverse' => 'f.enabled DESC', ), ), 'title' => array( 'header' => array( 'value' => $txt['rss_feed_title'], ), 'data' => array( 'db' => 'title', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.title', 'reverse' => 'f.title DESC', ), ), 'url' => array( 'header' => array( 'value' => $txt['rss_feed_url'], ), 'data' => array( 'sprintf' => array( 'format' => '%1$s', 'params' => array( 'feedurl' => true, ), ), ), 'sort' => array( 'default' => 'f.feedurl', 'reverse' => 'f.feedurl DESC', ), ), 'board' => array( 'header' => array( 'value' => $txt['rss_feed_board'], ), 'data' => array( 'function' => create_function('$rowData', ' global $txt; return empty($rowData[\'name\']) ? \'<< \' . $txt[\'rss_feed_board_error\'] . \' >>\' : $rowData[\'name\'];' ), 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'b.name', 'reverse' => 'b.name DESC', ), ), 'count' => array( 'header' => array( 'value' => $txt['rss_feed_count'], ), 'data' => array( 'db' => 'importcount', 'style' => 'text-align: center;', ), 'sort' => array( 'default' => 'f.importcount', 'reverse' => 'f.importcount DESC', ), ), 'modify' => array( 'header' => array( 'value' => $txt['rss_feed_modify'], ), 'data' => array( 'sprintf' => array( 'format' => '' . $txt['rss_feed_modify'] . '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 50px;', ), ), 'check' => array( 'header' => array( 'value' => '', ), 'data' => array( 'sprintf' => array( 'format' => '', 'params' => array( 'id_feed' => false, ), ), 'style' => 'text-align: center; width: 32px;', ), ), ), 'form' => array( 'href' => $scripturl . '?action=admin;area=modsettings;sa=rssfeeds', 'name' => 'rssfeedForm', ), 'additional_rows' => array( array( 'position' => 'above_column_headers', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), array( 'position' => 'below_table_data', 'value' => ' ', 'style' => 'text-align: right;', 'class' => 'titlebg', ), ), ); require_once($sourcedir . '/Subs-List.php'); createList($listOptions); } // Get information for the list above... grabs all of the feeds from the database function list_getFeeds($start, $items_per_page, $sort) { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT f.id_feed, b.name, f.title, f.feedurl, f.enabled, f.importcount FROM {db_prefix}rssfeeds AS f LEFT JOIN {db_prefix}boards AS b ON (b.id_board = f.id_board) ORDER BY {raw:sort} LIMIT ' . $start . ', ' . $items_per_page, array ( 'sort' => $sort, ) ); $feeds = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) $feeds[] = $row; $smcFunc['db_free_result']($request); return $feeds; } // The number grabbed above could be limited at 40... this just gets a count of all of them. function list_getNumFeeds() { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT COUNT(*) FROM {db_prefix}rssfeeds', array( ) ); list($numFeeds) = $smcFunc['db_fetch_row']; $smcFunc['db_free_result']($request); return $numFeeds; }
Fatal error: Call to undefined function ModifyRSSFeedSettings() in /home/rajqtl3/public_html/Sources/ManageSettings.php on line 223


Tried re-installing, still i get same thing..
Any help?
Title: Re: RSS Feeder
Post by: SlammedDime on August 10, 2009, 03:30:38 PM
Open up ManageSettings.php and move ?> to the very end of the file (currently it is above /* RSS Feeder Settings */)
Title: Re: RSS Feeder
Post by: Bastor on August 11, 2009, 07:38:48 AM
Hi,
i have a littel problem with special characters like ä ü ö ß:

Work with 1.1.1 its good running
and 2 RC 2.12

In my Subject stand all charakters correct:

Brennende Müllcontainer
[\code]
in my content :
[code]
Brennende Müllcontainer

Berlin. Unbekannte Täter haben gestern Abend in Prenzlauer Berg mehrere Müllcontainer in Brand gesetzt .... Greifswalder Straße bemerkt.
...
Hauswand wegzuziehen. Feuerwehrleute löschten die Flammen. Drei Container wurden vollständig zerstört, zwei weitere beschädigt.
......


All äöß a wrong.

What is my mistake, what must i change?
Thanks

Title: Re: RSS Feeder
Post by: SlammedDime on August 11, 2009, 03:32:29 PM
I'll need an actual link to the feed you use so I can do some testing with it.
Title: Re: RSS Feeder
Post by: DirtRider on August 11, 2009, 10:56:41 PM
Quote from: DirtRider on August 10, 2009, 04:29:41 AM
I am unable to get the following feed to post using the RSS Feeder http://feed43.com/7878018404721735.xml (http://feed43.com/7878018404721735.xml). However it seems to work no problem using PortaMx RRS feed option http://triumphtalk.com/index.php (http://triumphtalk.com/index.php). I would really like this feed to be posted as threads and not just as a new item on my front page

Any ideas on this one  :-[
Title: Re: RSS Feeder
Post by: Bastor on August 12, 2009, 09:44:58 AM
Thanks, hier Link to the orginalnews :
http://www.berlin-aktuell.de/junge-raeuber-festgenommen_id1266.html

and the rss link :

http://www.berlin-aktuell.de/newsfeeds/1_all.xml
Title: Re: RSS Feeder
Post by: ScottDB on August 12, 2009, 09:56:27 AM
Just curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 14, 2009, 04:49:42 PM
It would be very nice if you could make this for 1.10 :(.

I am unable to use rc due to certain reasons :(.
Title: Re: RSS Feeder
Post by: SlammedDime on August 14, 2009, 06:14:38 PM
Sorry, this won't be made for 1.1.x.  It uses too many SMF 2.0 specific functions.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 14, 2009, 06:27:23 PM
Quote from: SlammedDime on August 14, 2009, 06:14:38 PM
Sorry, this won't be made for 1.1.x.  It uses too many SMF 2.0 specific functions.

Well could you tell me why it won't install on the latest rc?
Title: Re: RSS Feeder
Post by: ScottDB on August 14, 2009, 07:26:58 PM
Just thought I would ask again and find out if anybody knows of a mod or a way to do this?

QuoteJust curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss
Title: Re: RSS Feeder
Post by: SlammedDime on August 14, 2009, 08:30:38 PM
Quote from: NBK*Twitch on August 14, 2009, 06:27:23 PM
Quote from: SlammedDime on August 14, 2009, 06:14:38 PM
Sorry, this won't be made for 1.1.x.  It uses too many SMF 2.0 specific functions.

Well could you tell me why it won't install on the latest rc?
It does, you just need to change the version number in the 'Advanced' box on the Browse Packages screen.

Quote from: ScottDB on August 14, 2009, 07:26:58 PM
Just thought I would ask again and find out if anybody knows of a mod or a way to do this?

QuoteJust curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss
I'm not at all familiar with that mod, you may want to ask the author, I think that's outside the scope of this mod.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 14, 2009, 10:12:44 PM
Quote from: SlammedDime on August 14, 2009, 08:30:38 PM
Quote from: NBK*Twitch on August 14, 2009, 06:27:23 PM
Quote from: SlammedDime on August 14, 2009, 06:14:38 PM
Sorry, this won't be made for 1.1.x.  It uses too many SMF 2.0 specific functions.

Well could you tell me why it won't install on the latest rc?
It does, you just need to change the version number in the 'Advanced' box on the Browse Packages screen.

Quote from: ScottDB on August 14, 2009, 07:26:58 PM
Just thought I would ask again and find out if anybody knows of a mod or a way to do this?

QuoteJust curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss
I'm not at all familiar with that mod, you may want to ask the author, I think that's outside the scope of this mod.

I do not see an advanced box.
Title: Re: RSS Feeder
Post by: SlammedDime on August 14, 2009, 10:42:40 PM
Quote from: SlammedDime on July 21, 2009, 07:50:06 AM
At the bottom of your package manager, lower right corner, click 'Advanced' and change your version to 2.0 RC1, install the mod, then change it back to 2.0RC1.2
Title: Re: RSS Feeder
Post by: TwitchisMental on August 14, 2009, 10:50:28 PM
Quote from: SlammedDime on August 14, 2009, 10:42:40 PM
Quote from: SlammedDime on July 21, 2009, 07:50:06 AM
At the bottom of your package manager, lower right corner, click 'Advanced' and change your version to 2.0 RC1, install the mod, then change it back to 2.0RC1.2

I just checked and I see no "advanced button"
Title: Re: RSS Feeder
Post by: SlammedDime on August 14, 2009, 10:59:35 PM
Title: Re: RSS Feeder
Post by: TwitchisMental on August 15, 2009, 02:22:15 AM
Here is a print screen of mine -

Title: Re: RSS Feeder
Post by: SlammedDime on August 15, 2009, 02:27:39 AM
Did you upgrade from the 1.1.x line or install 2.0 fresh?

Are you using a modified copy of the default theme or the actual default theme?

When you do a version check, are all of your theme files at the proper version? (Admin Panel > Maintenance > Forum Maintenance > Routine > Check all files against current versions)
Title: Re: RSS Feeder
Post by: TwitchisMental on August 15, 2009, 05:17:57 AM
Quote from: SlammedDime on August 15, 2009, 02:27:39 AM
Did you upgrade from the 1.1.x line or install 2.0 fresh?

Are you using a modified copy of the default theme or the actual default theme?

When you do a version check, are all of your theme files at the proper version? (Admin Panel > Maintenance > Forum Maintenance > Routine > Check all files against current versions)

Upgraded form 1.1.1x

Nope it is the true default.

Yes they are at proper version
Title: Re: RSS Feeder
Post by: TwitchisMental on August 16, 2009, 08:29:32 PM
Bump*
Title: Re: RSS Feeder
Post by: SlammedDime on August 16, 2009, 09:57:30 PM
I'd suggest uploading a fresh copy of the Packages.template.php file from the default theme from the SMF 2.0 RC1.2 download on our downloads page.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 16, 2009, 10:27:43 PM
Quote from: SlammedDime on August 16, 2009, 09:57:30 PM
I'd suggest uploading a fresh copy of the Packages.template.php file from the default theme from the SMF 2.0 RC1.2 download on our downloads page.

Ight I will do this :) .

Edit: Okay that did not work either :(.
Title: Re: RSS Feeder
Post by: DirtRider on August 17, 2009, 02:21:25 AM
Quote from: DirtRider on August 10, 2009, 04:29:41 AM
I am unable to get the following feed to post using the RSS Feeder http://feed43.com/7878018404721735.xml (http://feed43.com/7878018404721735.xml). However it seems to work no problem using PortaMx RRS feed option http://triumphtalk.com/index.php (http://triumphtalk.com/index.php). I would really like this feed to be posted as threads and not just as a new item on my front page

Ok as this feed is quite important to my forum and I have had no response on both request about it look like I now need to ask for paid help here. So what will it cost me to get this feed working?
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 04:25:06 AM
Sorry DirtRider, I tested your feed at SimplePie and it seemed to work fine, yet on my test board, it did indeed not work.  I'll see if I can dig into it tomorrow when I wake up to figure out why it doesn't pull in data.
Title: Re: RSS Feeder
Post by: DirtRider on August 17, 2009, 05:53:44 AM
Thanks that would really be appreciated  :D
Title: Re: RSS Feeder
Post by: bromacleanse on August 17, 2009, 06:19:29 AM
Hi there, there is something wrong with my UI at the Modification-->Rss Feeder Page. You see, after adding tons of rss feeds to a certain limit, I was not able to locate some of the feeds title(but the feeds were able to run when processed) on that page. Also, all the feeds stay in page 1, even though it should have been page 2.
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 02:46:27 PM
Quote from: bromacleanse on August 17, 2009, 06:19:29 AM
Hi there, there is something wrong with my UI at the Modification-->Rss Feeder Page. You see, after adding tons of rss feeds to a certain limit, I was not able to locate some of the feeds title(but the feeds were able to run when processed) on that page. Also, all the feeds stay in page 1, even though it should have been page 2.
Open ManageSettings.php

Code (Find) Select
list($numFeeds) = $smcFunc['db_fetch_row'];
and
Code (Replace) Select
list($numFeeds) = $smcFunc['db_fetch_row']($request);
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 03:23:22 PM
Quote from: DirtRider on August 17, 2009, 02:21:25 AM
Quote from: DirtRider on August 10, 2009, 04:29:41 AM
I am unable to get the following feed to post using the RSS Feeder http://feed43.com/7878018404721735.xml (http://feed43.com/7878018404721735.xml). However it seems to work no problem using PortaMx RRS feed option http://triumphtalk.com/index.php (http://triumphtalk.com/index.php). I would really like this feed to be posted as threads and not just as a new item on my front page

Ok as this feed is quite important to my forum and I have had no response on both request about it look like I now need to ask for paid help here. So what will it cost me to get this feed working?

Ok, this one is a bit tricky.... the actual item does not contain a link, only the feed itself does, which means I'd have to make a few changes to the workings of the code.

For the time being, you can do the following (it's not the solution I'll use, but it'll work for you).

Open Sources/ScheduledTasks.php
Code (Find) Select
// If this item doesn't have a link or title, let's skip it
if ($item->get_permalink() === null || $item->get_title() === null)
continue;

-and-
Code (Replace) Select
// If this item doesn't have a link or title, let's skip it
if ($item->get_title() === null)
continue;
Title: Re: RSS Feeder
Post by: TwitchisMental on August 17, 2009, 05:23:21 PM
Any idea for my problem?
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 05:53:15 PM
Are you getting any 'Undefined Index' errors in your error log that say anything like Undefined Index: package_advanced_options  or package_advanced_button?
Title: Re: RSS Feeder
Post by: TwitchisMental on August 17, 2009, 07:09:32 PM
Quote from: SlammedDime on August 17, 2009, 05:53:15 PM
Are you getting any 'Undefined Index' errors in your error log that say anything like Undefined Index: package_advanced_options  or package_advanced_button?
Nope
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 08:00:33 PM
Can you post your copy of Packages.template.php?
Title: Re: RSS Feeder
Post by: TwitchisMental on August 17, 2009, 08:53:12 PM
Quote from: SlammedDime on August 17, 2009, 08:00:33 PM
Can you post your copy of Packages.template.php?

Okay I will attach it.
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 09:08:51 PM
The code is there... that's odd that the advanced link isn't there... well all you can do then is extract the files from the mod, open up package-info.xml and change the install for version to your version of SMF, then rezip the file and upload it.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 17, 2009, 09:21:15 PM
Quote from: SlammedDime on August 17, 2009, 09:08:51 PM
The code is there... that's odd that the advanced link isn't there... well all you can do then is extract the files from the mod, open up package-info.xml and change the install for version to your version of SMF, then rezip the file and upload it.

Could you give me step by step on how to do this?
Title: Re: RSS Feeder
Post by: SlammedDime on August 17, 2009, 10:10:41 PM
This might be easier... go to your package manager, then in the address bar at the top, just add ;version_emulate=SMF+2.0+RC1

so it might look like /index.php?area=packages;sa=browse;version_emulate=SMF+2.0+RC1
Title: Re: RSS Feeder
Post by: TwitchisMental on August 17, 2009, 10:18:36 PM
Quote from: SlammedDime on August 17, 2009, 10:10:41 PM
This might be easier... go to your package manager, then in the address bar at the top, just add ;version_emulate=SMF+2.0+RC1

so it might look like /index.php?area=packages;sa=browse;version_emulate=SMF+2.0+RC1

Thanks trying this now

WOOT IT WORKED :D .

Edit: okay now that I did that,how to set it back to rc1.2 lol.

Oh and whats the link to rss feed editor. I can't find the tab of it lmao.
Title: Re: RSS Feeder
Post by: DirtRider on August 18, 2009, 03:30:41 AM
Quote from: SlammedDime on August 17, 2009, 03:23:22 PM
Quote from: DirtRider on August 17, 2009, 02:21:25 AM
Quote from: DirtRider on August 10, 2009, 04:29:41 AM
I am unable to get the following feed to post using the RSS Feeder http://feed43.com/7878018404721735.xml (http://feed43.com/7878018404721735.xml). However it seems to work no problem using PortaMx RRS feed option http://triumphtalk.com/index.php (http://triumphtalk.com/index.php). I would really like this feed to be posted as threads and not just as a new item on my front page

Ok as this feed is quite important to my forum and I have had no response on both request about it look like I now need to ask for paid help here. So what will it cost me to get this feed working?

Ok, this one is a bit tricky.... the actual item does not contain a link, only the feed itself does, which means I'd have to make a few changes to the workings of the code.

For the time being, you can do the following (it's not the solution I'll use, but it'll work for you).

Open Sources/ScheduledTasks.php
Code (Find) Select
// If this item doesn't have a link or title, let's skip it
if ($item->get_permalink() === null || $item->get_title() === null)
continue;

-and-
Code (Replace) Select
// If this item doesn't have a link or title, let's skip it
if ($item->get_title() === null)
continue;


Thanks will you be doing a change on the mod itself still to make this work
Title: Re: RSS Feeder
Post by: SlammedDime on August 18, 2009, 03:56:59 AM
Yea, I plan on fixing it up account for not having a link, but still post the feed.
Title: Re: RSS Feeder
Post by: DirtRider on August 18, 2009, 10:14:49 AM
Ok then I will rather just wait for the fix  ;D
Title: Re: RSS Feeder
Post by: TwitchisMental on August 18, 2009, 04:26:03 PM
Can someone tell me how to make it switch back to rc1.2 and edit the time the feeds get posted?
Title: Re: RSS Feeder
Post by: SlammedDime on August 18, 2009, 04:33:18 PM
do the version emulate again, but change it to SMF+2.0+RC1.2

You can change the frequency of when the task runs in the Scheduled Tasks portion of the admin panel under Maintenance.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 18, 2009, 06:55:54 PM
Quote from: SlammedDime on August 18, 2009, 04:33:18 PM
do the version emulate again, but change it to SMF+2.0+RC1.2

You can change the frequency of when the task runs in the Scheduled Tasks portion of the admin panel under Maintenance.

Okay

As for the scheduled tasks thing I do not see that.

Mind giving me the link like you did for version emulation?
Title: Re: RSS Feeder
Post by: SlammedDime on August 18, 2009, 07:00:31 PM
Go to your admin panel, mouse over 'Maintenance' on the menu at the top, then go down to 'Scheduled Tasks'... I can't keep babying you through all this, you need to start searching, looking at the SMF online docs and just navigating yourself around the admin panel so you know what all is there.

Title: Re: RSS Feeder
Post by: TwitchisMental on August 18, 2009, 07:08:57 PM
Quote from: SlammedDime on August 18, 2009, 07:00:31 PM
Go to your admin panel, mouse over 'Maintenance' on the menu at the top, then go down to 'Scheduled Tasks'... I can't keep babying you through all this, you need to start searching, looking at the SMF online docs and just navigating yourself around the admin panel so you know what all is there.



Well this would be easy,but I do not see that button... Even on the default theme..

Here is what mine looks like -

Title: Re: RSS Feeder
Post by: SlammedDime on August 18, 2009, 09:55:57 PM
I don't know how many mods you have installed, but you need to reupload a fresh copy of all files from the Large Upgrade package for 2.0 RC1.2 to your site and run upgrade.php again... you're missing language strings and your menu options reflect that of 2.0 Beta 4.  That's outside the scope of this topic though... If you need help, please create a new topic in the 2.0 support board.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 18, 2009, 09:57:54 PM
Quote from: SlammedDime on August 18, 2009, 09:55:57 PM
I don't know how many mods you have installed, but you need to reupload a fresh copy of all files from the Large Upgrade package for 2.0 RC1.2 to your site and run upgrade.php again... you're missing language strings and your menu options reflect that of 2.0 Beta 4.  That's outside the scope of this topic though... If you need help, please create a new topic in the 2.0 support board.

Well I have run that upgrade.php twice before...

Anyway I figured out where the url of the scheduled tasks. I try to run the feed now and no posts showed up :(.
Title: Re: RSS Feeder
Post by: SlammedDime on August 18, 2009, 10:03:38 PM
Like I said, your copy of 2.0 RC1.2 is not current/correct... I can see from that screen shot that you're atleast missing language strings... I'm not saying you just have run upgrade.php, you need to upload all fresh files using a decent FTP client that will overwrite existing files as well.  The mod does work on a fresh copy of 2.0RC1.2, so until we know that you have a properly working copy (which I know you don't), I can't really even troubleshoot it with you.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 18, 2009, 10:48:12 PM
Okay I re upgraded.

Everything seems to be the right version except the langauge part.

Edit: Okay I uploaded the langauges manually and I can see what is needed.

However the rss feed still does not work.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 02:09:51 PM
Bump
Title: Re: RSS Feeder
Post by: SlammedDime on August 20, 2009, 02:49:20 PM
Any errors in your error log?  What feed are you using?
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 03:24:00 PM
Quote from: SlammedDime on August 20, 2009, 02:49:20 PM
Any errors in your error log?  What feed are you using?

Currently only a few errors on the arcade.

I am using these feeds -

http://www.wwe.com/subscriptions/rss/ (http://www.wwe.com/subscriptions/rss/)
News[/t]
0
Modify (http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=1)
[/t]          
            
(http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=4;enable)
ROH NEWS
http//rohwrestlingnews.com/english/?feed=rss2 (http://311entertainment.co.cc/forum/http//rohwrestlingnews.com/english/?feed=rss2)
Ring Of Honor
0
Modify (http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=4)
            
(http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=5;enable)
MMA NEWS
http://www.addthis.com/feed.php?pub=einhaus&h1=http%3A%2F%2Fwww.mmanews.com%2Frss.xml&t1= (http://www.addthis.com/feed.php?pub=einhaus&h1=http%3A%2F%2Fwww.mmanews.com%2Frss.xml&t1=)
MMA Discussion
0
Modify (http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=5)
            
(http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=2;disable)
TNA NEWS
http://www.wrestlingnewsworld.com/1/2/tna.xml (http://www.wrestlingnewsworld.com/1/2/tna.xml)
News
0
Modify (http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=2)
            
(http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=3;disable)
Extra news
http://www.wrestlingnewsworld.com/1/2/news.xml (http://www.wrestlingnewsworld.com/1/2/news.xml)
Title: Re: RSS Feeder
Post by: SlammedDime on August 20, 2009, 03:39:30 PM
all the feeds show enabled? I tested a few and they work okay for me.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 03:56:18 PM
Quote from: SlammedDime on August 20, 2009, 03:39:30 PM
all the feeds show enabled? I tested a few and they work okay for me.
Yes they are all enabled.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 07:33:53 PM
Sorry for the bump,but it seems I am getting and error with the rss feeder.

                           Apply Filter: Only show the errors with the same message (http://311entertainment.co.cc/forum/index.php?action=admin;area=logs;sa=errorlog;desc;filter=message;value=OiBodHRwLy9yb2h3cmVzdGxpbmduZXdzLmNvbS9lbmdsaXNoLz9mZWVkPXJzczIgKEEgZmVlZCBjb3VsZCBub3QgYmUgZm91bmQgYXQgaHR0cDovL2h0dHAvL3JvaHdyZXN0bGluZ25ld3MuY29tL2VuZ2xpc2gvP2ZlZWQ9cnNzMik=)                            : http//rohwrestlingnews.com/english/?feed=rss2 (A feed could not be found at http://http//rohwrestlingnews.com/english/?feed=rss2)                         

Is one I get. It happens to all my feeds.
Title: Re: RSS Feeder
Post by: SlammedDime on August 20, 2009, 07:55:39 PM
perhaps because it's not a valid feed...

http//rohwrestlingnews.com/english/?feed=rss2

should probably be

http://rohwrestlingnews.com/english/?feed=rss2

You're missing a colon.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 08:10:08 PM
Quote from: SlammedDime on August 20, 2009, 07:55:39 PM
perhaps because it's not a valid feed...

http//rohwrestlingnews.com/english/?feed=rss2

should probably be

http://rohwrestlingnews.com/english/?feed=rss2 (http://rohwrestlingnews.com/english/?feed=rss2)

You're missing a colon.

okay let me try this out.

I will post results.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 08:12:17 PM
Woot that got that feed working.

The others are not working though.

Mind telling me whats wrong with them.

Btw thank you alot for helping me through this.

If I had money in my paypal I would pay you :D.
Title: Re: RSS Feeder
Post by: SlammedDime on August 20, 2009, 09:15:51 PM
Not sure why they're not working... they work fine for me on my test site.  Make sure you have the URL entered properly and if they're throwing any errors in the error log, you'll need to report them here.
Title: Re: RSS Feeder
Post by: Reinaldo23 on August 20, 2009, 09:24:10 PM
Hi, how can I do to show links that contain    
the RSS

a
   
example:
___________________________________________
   
example:

Rss News:

Blablablabla ... Download
(this has a link)

with RSS Feeder

Blablablabla ... Download
(no link)

Help :'(
Title: Re: RSS Feeder
Post by: TwitchisMental on August 20, 2009, 10:35:55 PM
Quote from: SlammedDime on August 20, 2009, 09:15:51 PM
Not sure why they're not working... they work fine for me on my test site.  Make sure you have the URL entered properly and if they're throwing any errors in the error log, you'll need to report them here.
Well I have most working now. So its just of matter of putting the right llink.
Title: Re: RSS Feeder
Post by: Reinaldo23 on August 21, 2009, 10:10:30 PM
Nobody?
Title: Re: RSS Feeder
Post by: SlammedDime on August 21, 2009, 10:20:51 PM
Quote from: Reinaldo23 on August 21, 2009, 10:10:30 PM
Nobody?
Perhaps if you ask your question right the first time, and not edit your post 10 hours later, and then post 14 hours after that trying to bump... If you're going to ask for help, don't be vague and you won't be ignored.

Currently links inside RSS feeds are not supported, only images.  The next version that will be released for 2.0 RC2 will offer as much HTML support as SMF's WYSIWYG editor has and strip out the rest.
Title: Re: RSS Feeder
Post by: TwitchisMental on August 21, 2009, 10:25:54 PM
I think I found a bug.

It seems each time I put a new rss feed or change a rss feed all of them get disabled.
Title: Re: RSS Feeder
Post by: SlammedDime on August 21, 2009, 10:34:35 PM
The feeds can only be disabled one of two ways... either an error when trying to retreive the feed (in which case an error is logged in the admin panel error log), or by clicking on the green check mark on the list of feeds.  The code for both of those is pretty solid.  If the scheduled task happens to run at a time where the server or internet connection may be down, it would cause all feeds to get disabled because none of them could be connected to, but again, that would log an error in the error log.

I'm not able to reproduce it, and your the only one out of over 3K downloads to mention it.  I don't think it's a bug in the mod.
Title: Re: RSS Feeder
Post by: Reinaldo23 on August 21, 2009, 10:56:54 PM
'm sorry only had one minute to do the message  :-[

but more or less when the next version will be ready ?
Title: Re: RSS Feeder
Post by: TwitchisMental on August 21, 2009, 11:52:52 PM
Quote from: Reinaldo23 on August 21, 2009, 10:56:54 PM
'm sorry only had one minute to do the message  :-[

but more or less when the next version will be ready ?

Look what at he said above.

He will release the next version when smf 2.0 rc 2 comes out.
Title: Re: RSS Feeder
Post by: mymktp1 on August 23, 2009, 02:20:59 PM
Hi, I'm very new to RC 1.2

I was able to install this MOD with no problem and got it running and post topics from a variety of feeds (from blogs) with out using the Full Article FUnction....However, I realized that all the feeds that originally had links when posted were gone ( Meaning the link disappeared) .... I was wondering if I was doing something incorrectly or where If I had to set up anything for the links from the feed to appear???  Are the <a href> tags all getting blocked out???
Title: Re: RSS Feeder
Post by: SlammedDime on August 23, 2009, 02:43:48 PM
Quote from: mymktp1 on August 23, 2009, 02:20:59 PM
Hi, I'm very new to RC 1.2

I was able to install this MOD with no problem and got it running and post topics from a variety of feeds (from blogs) with out using the Full Article FUnction....However, I realized that all the feeds that originally had links when posted were gone ( Meaning the link disappeared) .... I was wondering if I was doing something incorrectly or where If I had to set up anything for the links from the feed to appear???  Are the <a href> tags all getting blocked out???
the only html tags that are not stripped are <img> tags... I'll be adding html support in the next version.
Title: Re: RSS Feeder
Post by: PalmBeachPreps on August 24, 2009, 12:54:11 AM
Quote from: mymktp1 on August 23, 2009, 02:20:59 PM
Hi, I'm very new to RC 1.2

I was able to install this MOD with no problem and got it running and post topics from a variety of feeds (from blogs) with out using the Full Article FUnction....However, I realized that all the feeds that originally had links when posted were gone ( Meaning the link disappeared) .... I was wondering if I was doing something incorrectly or where If I had to set up anything for the links from the feed to appear???  Are the <a href> tags all getting blocked out???
How did you get it to work with RC 1.2?
Title: Re: RSS Feeder
Post by: robg2251 on August 26, 2009, 12:59:03 PM
By chance, is the RSS feeder work off and on for some?   

It seems like some days, this thing works like a champ, other days, it doesn't.   My feed is: http://feeds.feedburner.com/monroenews/WPkp - I'm testing it on basic RSS feeders, which, the feed is working as it should.   They randomly seem to flow into my SMF RSS feeder though.   Today, all the RSS feeds came through, but still nothing in my SMF.   I've changed the "Scheduled Maitenance" time to every 5 mins., (previously set to 1 hr.), figuring maybe they would pop in.   That didn't do it.   Any ideas??
Title: Re: RSS Feeder
Post by: TwitchisMental on August 26, 2009, 01:52:33 PM
Quote from: robg2251 on August 26, 2009, 12:59:03 PM
By chance, is the RSS feeder work off and on for some?   

It seems like some days, this thing works like a champ, other days, it doesn't.   My feed is: http://feeds.feedburner.com/monroenews/WPkp (http://feeds.feedburner.com/monroenews/WPkp) - I'm testing it on basic RSS feeders, which, the feed is working as it should.   They randomly seem to flow into my SMF RSS feeder though.   Today, all the RSS feeds came through, but still nothing in my SMF.   I've changed the "Scheduled Maintenance" time to every 5 mins., (previously set to 1 hr.), figuring maybe they would pop in.   That didn't do it.   Any ideas??
I have a similar problem,but I have to go reenable them.
Title: Re: RSS Feeder
Post by: SlammedDime on August 26, 2009, 03:35:02 PM
I might have to take a look at the cache time on the feeds... and adjust how they're cached...

Are the feeds being disabled at all, or just not pulling any data?  Got a specific link to a feed?
Title: Re: RSS Feeder
Post by: NHWD on August 31, 2009, 04:02:01 AM
I would like to use this mod to grab rss feeds from wordpress to post onto my forum
and I have 2 questions
1. If a post on wordpress is made a by a certain user can I choose which account can it post in smf?(for example there are 2 wordpress authors and they both make different posts... will it only post under one certain account in smf?)
2. My version of SMF is 1.1.10 if I update to 2.0 will it affect any of my mods installed?
Title: Re: RSS Feeder
Post by: Largo_npc on August 31, 2009, 05:28:11 AM
Edit:

Nevermind, sorted.
Title: Re: RSS Feeder
Post by: Largo_npc on August 31, 2009, 07:40:21 AM
I don't seem to be getting anything from this RSS feed: http://steamcommunity.com/groups/npcguild/rss?type=events

I get stuff from my other feed, but this one does nothing.

I'm not clued up on RSS, so am I missing something? Is this RSS valid with this mod? It looks exactly the same as the other RSS feed to me in terms of format.
Title: Re: RSS Feeder
Post by: SlammedDime on August 31, 2009, 02:44:07 PM
Quote from: CL0WNER on August 31, 2009, 04:02:01 AM
I would like to use this mod to grab rss feeds from wordpress to post onto my forum
and I have 2 questions
1. If a post on wordpress is made a by a certain user can I choose which account can it post in smf?(for example there are 2 wordpress authors and they both make different posts... will it only post under one certain account in smf?)
2. My version of SMF is 1.1.10 if I update to 2.0 will it affect any of my mods installed?

1) Each feed can only post as one SMF member

2) You will lose all mods and will have to reinstall all of them.

Quote from: Largo_npc on August 31, 2009, 07:40:21 AM
I don't seem to be getting anything from this RSS feed: http://steamcommunity.com/groups/npcguild/rss?type=events

I get stuff from my other feed, but this one does nothing.

I'm not clued up on RSS, so am I missing something? Is this RSS valid with this mod? It looks exactly the same as the other RSS feed to me in terms of format.
That feed is empty... there's nothing to pull from it.
Title: Re: RSS Feeder
Post by: Largo_npc on August 31, 2009, 04:52:59 PM
That's cause the event had passed by the time you read it. I'll post another one up later for more testing and post here if it doesn't work again.
Title: Re: RSS Feeder
Post by: NHWD on September 01, 2009, 02:40:24 AM
Quote from: SlammedDime on August 31, 2009, 02:44:07 PM
Quote from: CL0WNER on August 31, 2009, 04:02:01 AM
I would like to use this mod to grab rss feeds from wordpress to post onto my forum
and I have 2 questions
1. If a post on wordpress is made a by a certain user can I choose which account can it post in smf?(for example there are 2 wordpress authors and they both make different posts... will it only post under one certain account in smf?)
2. My version of SMF is 1.1.10 if I update to 2.0 will it affect any of my mods installed?

1) Each feed can only post as one SMF member

2) You will lose all mods and will have to reinstall all of them.

okay one more question
will it only post in one specific board? or can u pick which boards the feeds will post in?
Title: Re: RSS Feeder
Post by: nwobhm on September 01, 2009, 07:22:00 AM
I wonder why one of my rss feeds gets a date january 1. 1970? From where does this feeder picks ups it's date? Does it come form individual rss feed? Or from server? Or where?

It's bit funny that all the news from this specific rss feed are dated so old  :D
Title: Re: RSS Feeder
Post by: SlammedDime on September 01, 2009, 07:54:27 AM
It gets the date from the feed... I'm not sure how SimplePie tries to normalize the dates on feeds, but if your feed is using a weird date display, then simplepie may just be returning zero, which is Jan 1, 1970 in Epoch time.
Title: Re: RSS Feeder
Post by: nwobhm on September 01, 2009, 12:12:44 PM
Is there anything for me to do to get the date fixed?

Date on the feed is like this
<pubDate>01 Sep 2009 18:59:16 .0000</pubDate>

And this is the feed, if you wanna look it... it's in finnish

Title: Re: RSS Feeder
Post by: SlammedDime on September 01, 2009, 04:27:45 PM
It's because of that .0000 on the end of the date that's throwing it off.
Title: Re: RSS Feeder
Post by: TwitchisMental on September 02, 2009, 10:24:42 PM
Hey what does this mean - Regular ExpressionRequired if retrieving full article.  This must be  format.  The match is expected to be in second index of the array ([1]).

It says that if i want the full article.

And I do,but i have no idea what pcre means :(.
Title: Re: RSS Feeder
Post by: SlammedDime on September 03, 2009, 08:16:36 AM
Check the link to the regular expression tutorial in the first post that I did.
Title: Re: RSS Feeder
Post by: eaglex5 on September 12, 2009, 10:37:08 AM
Hi All,

I just installed SMF 2.0 RC1.2 and uploaded the RSS Feeder mod via Packages -> Download Packages -> Upload Package.

When I browse packages it appears "Browse Packages" with only the ability to delete or list files.  Is RSS feeder not compatible with 2.0 RC1.2, or am I just missing on how to install? 

New to SMF and appreciate any help.

Thanks
Title: Re: RSS Feeder
Post by: SlammedDime on September 12, 2009, 04:40:03 PM
QuoteAt the bottom of your package manager, lower right corner, click 'Advanced' and change your version to 2.0 RC1, install the mod, then change it back to 2.0RC1.2
Title: Re: RSS Feeder
Post by: kizko on September 17, 2009, 05:55:28 PM
Is those posts counted? If yes, why they don`t appear in Stats? Mounthly Stats...
Title: Re: RSS Feeder
Post by: Keith99 on September 21, 2009, 03:59:24 PM
Just messed up a bit.  I no longer have the rss bit in the 'Modification' area.  I had a problem and needed to put a file back to before I installed this.  I now can not install it or reinstall it.  Also I need add a new feed, but can not do it.

Any advice??
Title: Re: RSS Feeder
Post by: SlammedDime on September 21, 2009, 04:03:55 PM
Keith99 - You'll have to look at the manual parse instructions for the mod and add any missing parts to your install manually.
Title: Re: RSS Feeder
Post by: Keith99 on September 21, 2009, 04:12:22 PM
Quote from: SlammedDime on September 21, 2009, 04:03:55 PM
Keith99 - You'll have to look at the manual parse instructions for the mod and add any missing parts to your install manually.

Ok, how easy is it to do? I guess I don't need to do it all, as it still works.  I think I need to add the /Themes/default/languages/Modifications.english.php bit?

Added that, but it didn't work?

Scrap that! It was the admin file oh well, cheers!
Title: Re: RSS Feeder
Post by: kizko on September 22, 2009, 01:25:39 PM
UP:

Is those posts counted? If yes, why they don`t appear in Stats? Mounthly Stats...
Title: Re: RSS Feeder
Post by: SlammedDime on September 22, 2009, 06:50:00 PM
Yes, they are counted... where aren't they showing in the Monthly stats?
Title: Re: RSS Feeder
Post by: kizko on October 08, 2009, 03:15:16 PM
It worked for me about 1 mounth.

Now it soundenly stop (all feeds disable themselves).
It run every 3 hours with shedule task.

Why is that? Now (this task) it worked good.

And there aren`t any enable image in cp.
Title: Re: RSS Feeder
Post by: SlammedDime on October 08, 2009, 04:42:06 PM
If there aren't any images, they're missing from your theme folder.  If they're disabling themselves, there will be an error in the error log, if you have logging enabled.
Title: Re: RSS Feeder
Post by: kizko on October 08, 2009, 05:30:54 PM
Quote from: SlammedDime on October 08, 2009, 04:42:06 PM
If there aren't any images, they're missing from your theme folder.  If they're disabling themselves, there will be an error in the error log, if you have logging enabled.

I got this error for all RSS's:

RSS Feeder: http://feeds2.feedburner.com/DcemuPspNews?format=xml (cURL error 6: name lookup timed out)
RSS Feeder: http://kotaku.com/tag/top/index.xml (cURL error 6: name lookup timed out)
RSS Feeder: http://pspfreethemes.blogspot.com/feeds/posts/default?alt=rss (cURL error 6: name lookup timed out)
... and so on...

What is wrong?
Title: Re: RSS Feeder
Post by: SlammedDime on October 08, 2009, 05:44:24 PM
http://www.google.com/search?&q=cURL%20error%206%3A%20name%20lookup%20timed%20out

Means that the domain name couldn't be looked up via DNS properly... this would be an issue with your hosts DNS servers... nothing wrong with the mod.
Title: Re: RSS Feeder
Post by: kizko on October 10, 2009, 09:44:18 AM
Quote from: SlammedDime on October 08, 2009, 05:44:24 PM
http://www.google.com/search?&q=cURL%20error%206%3A%20name%20lookup%20timed%20out

Means that the domain name couldn't be looked up via DNS properly... this would be an issue with your hosts DNS servers... nothing wrong with the mod.

And what i supposed to do?
Title: Re: RSS Feeder
Post by: TwitchisMental on October 10, 2009, 01:57:27 PM
Quote from: kizko on October 10, 2009, 09:44:18 AM
Quote from: SlammedDime on October 08, 2009, 05:44:24 PM
http://www.google.com/search?&q=cURL%20error%206%3A%20name%20lookup%20timed%20out (http://www.google.com/search?&q=cURL%20error%206%3A%20name%20lookup%20timed%20out)

Means that the domain name couldn't be looked up via DNS properly... this would be an issue with your hosts DNS servers... nothing wrong with the mod.

And what i supposed to do?
Contact your host and show them the error.

They should fix it for you.
Title: Re: RSS Feeder
Post by: genix on October 11, 2009, 06:46:34 AM
Hey, guys, thanks for the great mod!
I had some problems with charset, htmlentities of keywords etc., solved it by myself. And one rss-feed http://www.sarbc.ru/rss/data/main.rss is working fine, but another - http://www.vzsar.ru/rss/index.rss doesn't work at all and says an error:
http://www.vzsar.ru/rss/index.rss (A feed could not be found at http://www.vzsar.ru/rss/index.rss)

UPD: in Subs-Rss.php adding
$this->force_feed = true;
before
if (!$this->force_feed)
{

magically removed that problem =)
Title: Re: RSS Feeder
Post by: PalmBeachPreps on October 11, 2009, 11:52:10 PM
My feeds have stopped and I'm getting this error:
http://forum.palmbeachpreps.com/index.php?action=feedsadmin;sa=addfeed2
Apply Filter: Only show the errors with the same message
8: Undefined offset: 31
Apply Filter: Only show the errors from this file
File: /home/content/p/a/l/palmbeachpreps/html/Sources/Subs-RSS2.php
Line: 142
Title: Re: RSS Feeder
Post by: SlammedDime on October 12, 2009, 12:44:58 AM
You should probably seek help in the right topic... that's not from this Mod.  Probably from vbgamers.
Title: Re: RSS Feeder
Post by: PalmBeachPreps on October 12, 2009, 01:59:21 AM
Quote from: SlammedDime on October 12, 2009, 12:44:58 AM
You should probably seek help in the right topic... that's not from this Mod.  Probably from vbgamers.
UH oh! Sorry about that, I guess I'll try this one out then.
Title: Re: RSS Feeder
Post by: Garou on October 13, 2009, 10:03:07 PM
This is a much better mod in my opinion. At first I had wished that it worked with 1.1.x but after trying it out on 2.x I absolutely love both. Besides once 2.0 goes gold there will be little reason to use 1.1.x unless your a die hard fan.  :)
Title: Re: RSS Feeder
Post by: Sabre™ on October 13, 2009, 11:55:27 PM
Agreed.
Once smf2 is final, then I'll move 1.1.x over, and use this mod where necessary.
Title: Re: RSS Feeder
Post by: Afro on October 14, 2009, 06:26:33 AM
DOES THIS WORK FOR rc1 1.2
Title: Re: RSS Feeder
Post by: SlammedDime on October 14, 2009, 06:51:09 AM
Yes
Title: Re: RSS Feeder
Post by: Afro on October 14, 2009, 07:51:39 AM
Quote from: SlammedDime on October 14, 2009, 06:51:09 AM
Yes

well i got this while trying to install it

Installations actions for "RSS Feeder":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Title: Re: RSS Feeder
Post by: Afro on October 14, 2009, 08:13:29 AM
Regular Expression
Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]).


I DONT UNDERSTAND THAT AT ALL
and that happens to be the only problem for now.

I have the mod installed succesifully

what should i add there ?

or does what i add there have to do with my forum?
if yes, what do i send here for some one to help me out ?
Title: Re: RSS Feeder
Post by: Afro on October 14, 2009, 09:45:34 AM
http://www.fifa.com/rss/index.xml

what is the regular expression of the link above ?
Title: Re: RSS Feeder
Post by: TwitchisMental on October 14, 2009, 01:32:12 PM
Quote from: Afro on October 14, 2009, 09:45:34 AM
http://www.fifa.com/rss/index.xml (http://www.fifa.com/rss/index.xml)

what is the regular expression of the link above ?
Look on the first post to understand how to do this. Slammed Dime explained it there =].
Title: Re: RSS Feeder
Post by: Afro on October 14, 2009, 06:38:02 PM
Ok, I got it working, I guess not every site supplies that in their source code
Title: Re: RSS Feeder
Post by: robg2251 on October 15, 2009, 09:02:17 AM
I have the latest RSS feeder running on my SMF version 2.0 RC1.2.   

I have about 20 feeds going, all blogs that are posted to maybe once a day. 

The strange thing that happens is, about every 3 days, half of them get disabled.   I have to go back in and re-enable (check the enabled box) again.   

The messy part is, it floods the boards after I re-enable them.  I figured out I can just set it to "require topic approval" then delete them, so it doesn't flood the board. 

The real question though is:   Why are these becoming disabled?   It's pretty random too, like 8 of them every three days will get disabled.. not the same ones.   It's driving me crazy! 

http://www.monroetalks.com/forum/index.php

Thanks.

[edited to add a blog feed example] - http://www.blogsmonroe.com/history/feed/  or http://feeds.feedburner.com/monroenews/WPkp 
Title: Re: RSS Feeder
Post by: SlammedDime on October 15, 2009, 05:49:05 PM
Whenever a feed is disabled, an error is thrown in the error log... there are tons of reasons, so without having the error, I can't tell you.
Title: Re: RSS Feeder
Post by: jcastellese on October 16, 2009, 02:08:38 PM
Hello, I work with Rob, I checked our log and it says that the feed isn't available, but these feeds are available in almost every case.

Here is a sample error message
http://monroetalks.com/forum/index.php?album=random&amp;cat=0&amp;pos=-325
Apply Filter: Only show the errors with the same message
RSS Feeder: http://www.blogsmonroe.com/faith/?feed=rss2 (A feed could not be found at http://www.blogsmonroe.com/faith/?feed=rss2)

I'm really not too sure what's causing this, so I'd love some ideas or common causes if you guys know of any off hand.
Title: Re: RSS Feeder
Post by: SlammedDime on October 16, 2009, 05:57:51 PM
Basically that error happens when SimplePie (the RSS backend of this mod) cannot read the feed because it is not a valid feed.  I tested the feed on the SimplePie website and it does appear to work on the latest version of SimplePie (which is 1.2), but the mod uses 1.1.2.  I'll be upgrading the mod shortly when RC2 is released.  Once I do that, we'll see if there are any more issues with it.
Title: Re: RSS Feeder
Post by: Afro on October 16, 2009, 08:06:59 PM
The mod places a link to the original topic before the short article it pulls. Then it place the url to the home page of the website again after the article. I just want one of the links, preferably, the one at the top. How do I remove, the SOURCE link ?
Title: Re: RSS Feeder
Post by: SlammedDime on October 16, 2009, 09:07:48 PM
In ScheduledTasks.php, just search for Source:
Title: Re: RSS Feeder
Post by: Afro on October 17, 2009, 06:55:18 AM
Quote from: SlammedDime on October 16, 2009, 09:07:48 PM
In ScheduledTasks.php, just search for Source:

// Format the post
         $message =
'' . $title . ' (http://'%20.%20$item->get_permalink()%20.%20')
' . ($item->get_date() !== null ? '' . $item->get_date() . '
' : '') . '
' . $body . '

' . (!empty($source) ? 'Source: ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


which lines of codes should i remove there
Title: Re: RSS Feeder
Post by: SlammedDime on October 17, 2009, 07:04:03 AM
That entire line that contains 'Source'
Title: Re: RSS Feeder
Post by: Afro on October 18, 2009, 11:03:04 AM
Quote from: SlammedDime on October 17, 2009, 07:04:03 AM
That entire line that contains 'Source'

well  i removed

' . (!empty($source) ? 'Source: ' . $source . '

but it is still there


Title: Re: RSS Feeder
Post by: SlammedDime on October 18, 2009, 03:09:47 PM
It won't remove it from existing posts, only future ones.
Title: Re: RSS Feeder
Post by: Afro on October 19, 2009, 06:16:22 AM
Ah, I see. Topic solved then

Meanwhile, is there a way to make it pull a little bit more from the article than just one or two lines. I know about the entire article <div id=  thingy. I tried it but it seems most websites don't use that kind of codes.

Is there a way to maybe pull out about hundred words or about a thousand letters from the whole article ?
Title: Re: RSS Feeder
Post by: Garou on October 19, 2009, 03:09:15 PM
You need to go to the site and have your browser look at the source code to see how they formulate their articles and find their common traits. You can then tell the mod to look for those traits. In the source most sites will use something like div, span, h1 or something like that once your looking at the HTML code used.
Title: Re: RSS Feeder
Post by: Afro on October 19, 2009, 04:04:52 PM
hmm, that sounds good. I will try.
Title: Re: RSS Feeder
Post by: Afro on October 19, 2009, 05:08:10 PM

' . (!empty($source) ? 'Source: ' . $source . '


after removing the line of code, and run the rss feed task on the schedule task, the page returns error page with unexpected string.
i wonder what is causing this



[/quote]
Title: Re: RSS Feeder
Post by: Garou on October 19, 2009, 05:51:20 PM
Whats the exact error?
Title: Re: RSS Feeder
Post by: Afro on October 20, 2009, 05:32:25 AM
Quote from: Garou on October 19, 2009, 05:51:20 PM
Whats the exact error?

Parse error: syntax error, unexpected ':' in /home/afrowall/public_html/headlines/Sources/ScheduledTasks.php on line 1753


thats the error report. after removing ' . (!empty($source) ? 'Source: ' . $source . '  and running scheduled task .

file below
Title: Re: RSS Feeder
Post by: kizko on October 20, 2009, 10:53:09 AM

1. http://forum.psp-fanatik.ro/index.php?action=admin;area=scheduledtasks 
RSS Feeder: http://feeds.gawker.com/kotaku/full (cURL error 6: name lookup timed out)



2.  http://forum.psp-fanatik.ro/index.php?scheduled=task;ts=1255966680 
Could not retrieve the file http://www.simplemachines.org/smf/current-version.js?version=SMF+2.0+RC1.2.

Title: Re: RSS Feeder
Post by: Garou on October 20, 2009, 01:35:48 PM
Hmm after testing I can confirm that it causes the error but unless I'm missing something it shouldn't. SD will have to look at it, Ive got nothing.

However looking at the line that is removed Id suggest to SD changing "Source:" to a language string to make translating into other languages easier. That of course isn't causing the error, just an observation I made while trying to figure it out.
Title: Re: RSS Feeder
Post by: SlammedDime on October 22, 2009, 11:17:51 PM
Afro, sorry, there was more to remove and I wasn't paying attention.

All of this would need to be removed...

Code (Find) Select
' . (!empty($source) ? '[b]Source:[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


Code (Replace) Select
' . (!empty($feed['footer']) ? $feed['footer'] : '');


Garou, the language string issue has been fixed a long time ago and will be reflected in the next version for 2.0 RC2.

Kizko - there's nothing I can do to help you.  If you're getting that error on the SMF file retrieval as well, I can tell with the utmost certainty that your host has incorrectly configured their DNS settings.  Nothing I can do to help, you'll have to take it up with your host.
Title: Re: RSS Feeder
Post by: Afro on October 23, 2009, 05:03:31 AM
ok, that works well now. Gracia.
only if i could pull more contents.
Title: Re: RSS Feeder
Post by: hartiberlin on October 26, 2009, 03:24:05 AM
Does this RSS Feeder already work with SMF2 RC2 ?

If not, will you soon support it ?


Does your Sitemap MOD display the contens of the imported RSS feeds ?

Does it have a Rewrite function to avoid duplicate content ?

Many thanks.

Regards, Stefan.
Title: Re: RSS Feeder
Post by: SlammedDime on October 26, 2009, 04:38:08 PM
The RSS Feeder will work for RC2, you'd just have to manually adjust the version in the package manager to make it install.  Once RC2 is released to the public, I will be posting an updated version of the mod.

Yes, the sitemap would display feeds imported as long as they are publicly viewable on your site.  As for a rewrite for duplicate content, no, that's beyond the scope of either mod.  This mod does attempt to prevent same titled feeds from being posted, but that's it.
Title: Re: RSS Feeder
Post by: slayer143 on October 27, 2009, 12:05:55 PM
I set the feed to 100 but everytime it reset to 25 feeds only. Anyway to download more tha 25 ?
Title: Re: RSS Feeder
Post by: SlammedDime on October 27, 2009, 05:54:24 PM
There is no limit on it... I'll have to check it out.
Title: Re: RSS Feeder
Post by: Jerry on October 28, 2009, 01:13:19 AM
Quote from: Underfunded on May 13, 2009, 12:10:30 AM
Quote from: Underfunded on May 12, 2009, 08:02:28 AM
When I place add_settings.php in the root of the forum and access it manually I am brought to admin>config>rss feeder and get the same error as before about the table not being created:

QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420

Any more thoughts Slammed?  Can you provide the raw SQL commands that I can paste into my SQL command prompt to create them, or a different way of making the tables?  I'd be more than happy to be your test subject on this as I have full server control and can easily modify anything you would like me to!  I have started playing with the info from the add_settings.php to make the tables manually but I am enough of a beginner that I haven't deciphered it all yet (plus it's late).  Any help is greatly appreciated!

P.S.  I have determined the ultimate issue is that the database table is not being created but I do not know why.
Quote from: SlammedDime on May 13, 2009, 05:56:27 AM
andy40 - if it's not installing through the package manager, then you may have to install manually..

Underfunded, can you PM me your email address and I'll email you an SQL file with the table structure?
I also appear to have a similar problem installing on RC2.
Table 'XXX.smf_rssfeeds' doesn't exist
File: /home/solarian/public_html/Sources/ManageSettings.php
Line: 2460
Can you point me to the table structure or e-mail it to me? Thanks!
Title: Re: RSS Feeder
Post by: SlammedDime on October 28, 2009, 01:16:27 AM
I forgot that I made a change to SMF 2.0 RC2 in the way the package manager installs database information from mods, so this mod is affected by that.   If you have access to the database via phpmyadmin, find the log_rssfeeds and rssfeeds tables, and rename them to have smf_ in front of them.  This has already been fixed for when RC2 is public.
Title: Re: RSS Feeder
Post by: Jerry on October 28, 2009, 02:08:26 AM
Thanks SlammedDime, works perfectly with RC2 :)
Title: Re: RSS Feeder
Post by: slayer143 on October 29, 2009, 08:06:03 AM
Quote from: SlammedDime on October 27, 2009, 05:54:24 PM
There is no limit on it... I'll have to check it out.

There is limitation
Whatever number you set
It reset back to only 25
So each time  it can d/l only 25 feeds


Title: Re: RSS Feeder
Post by: droidboards on November 01, 2009, 04:52:31 PM
Awesome mod is have it installed on my site droidboards.com and it works great!  I have a question about regular expressions and retrieving the entire article.  How is that done?  I'm not a programmer but a sample expression might help me figure it out.  I would love to import the entire articles to my boards.  Thanks
Title: Re: RSS Feeder
Post by: SlammedDime on November 01, 2009, 08:13:56 PM
There is a link in the first post to a post somewhere in this topic that gives a small tutorial on it.
Title: Re: RSS Feeder
Post by: paulmagno on November 05, 2009, 12:58:40 AM
Maybe a real dumb question, so please don't throw things at me...

but, can I use this mod with SMF version 1.1.10?

I'm a 74 year old retiree learning to work the computer, so please don't be too harsh  :D
Title: Re: RSS Feeder
Post by: Garou on November 05, 2009, 07:50:57 AM
paulmagno, if you go to the page to download this mod (http://custom.simplemachines.org/mods/index.php?mod=1590) it says "Compatible With:
    2.0 RC1" While its not always entirely accurate as some authors don't update that as often as they should but its a pretty good gauge to use. If it doesn't mention any of the 1.1.x versions so most likely not and in this particular case definitely not.

You might want to try the RSS Feed Poster (http://custom.simplemachines.org/mods/index.php?mod=624) its not as nice but can do the job on 1.1.x boards.
Title: Re: RSS Feeder
Post by: paulmagno on November 05, 2009, 02:49:26 PM
thanks
Title: Re: RSS Feeder
Post by: Yahmez on November 05, 2009, 09:03:16 PM
Thanks for this mod SlammedDime. It works beautifully!  :D
Title: Re: RSS Feeder
Post by: PalmBeachPreps on November 06, 2009, 01:06:53 PM
What would be the reason that some feeds are automatically disabled periodically?  Nothing major, I just want to know if I'm doing something incorrectly.  It doesn't happen all of the time, but it does occur enough that I have to check it to be sure every day.

BTW, great mod and thanks for your hard work in development AND support!
Title: Re: RSS Feeder
Post by: SlammedDime on November 06, 2009, 02:45:38 PM
Any feed that is disabled will throw an error in the error log, you'd have to look there for the reason why... typically it would be because the connection timed out while looking up the feed, or something went awry with your hosts DNS.
Title: Re: RSS Feeder
Post by: imrich on November 09, 2009, 03:06:00 PM
Quote from: SlammedDime on October 28, 2009, 01:16:27 AM
I forgot that I made a change to SMF 2.0 RC2 in the way the package manager installs database information from mods, so this mod is affected by that.   If you have access to the database via phpmyadmin, find the log_rssfeeds and rssfeeds tables, and rename them to have smf_ in front of them.  This has already been fixed for when RC2 is public.

I'm just going to RC2 from RC1.2

I'm a bit confused, do I have to do the steps mentioned in this quote to re-install for RC2 if I was using this with RC1.2?

Thanks for any help!
Title: Re: RSS Feeder
Post by: SlammedDime on November 09, 2009, 03:36:22 PM
Yes.  I will try to upload a new version to the Mod site in the next day or two.
Title: Re: RSS Feeder
Post by: imrich on November 09, 2009, 03:53:49 PM
Thanks for this info. I already appear to have smf_log_rssfeeds and smf_rssfeeds in my database, so that's why I'm confused.
Title: Re: RSS Feeder
Post by: imrich on November 12, 2009, 08:30:32 AM
I saw the new version for SMF RC2, thanks!

But there is a bug in your 1.1.3 install for me.


5. Execute Modification ./Sources/Subs-Editor.php Test failed
  1. Replace ./Sources/Subs-Editor.php Test failed


It looks like the function being searched for in Subs-Editor.php can't be found. It's searching for this:

function sort_array_length($a, $b)
{
return strlen($a) < strlen($b) ? 1 : -1;
}


But the code after an upgrade in Subs-Editor.php looks like this (notice the missing whitespace in front of the code


function sort_array_length($a, $b)
{
return strlen($a) < strlen($b) ? 1 : -1;
}


Title: Re: RSS Feeder
Post by: SlammedDime on November 12, 2009, 04:51:02 PM
Thanks, I'll fix that and upload a new package.
Title: Re: RSS Feeder
Post by: SlammedDime on November 12, 2009, 04:56:15 PM
I've updated the mod package - you can simply ignore that edit.
Title: Re: RSS Feeder
Post by: imrich on November 12, 2009, 05:05:52 PM
Thanks for the quick response!

I downloaded and installed your new package. It seems to be working and installed without an error on RC2.

Note: A cosmetic issue: your file name implies that this is version 1.1.4, but it still displays in the package manager as 1.1.3. ;)

Thanks again!


Title: Re: RSS Feeder
Post by: SlammedDime on November 12, 2009, 05:32:25 PM
hrm... I updated the package-info.xml file... Looks like I forgot to update it in the ZIP file... thanks :)
Title: Re: RSS Feeder
Post by: imrich on November 12, 2009, 05:54:01 PM
Quote from: SlammedDime on November 12, 2009, 05:32:25 PM
hrm... I updated the package-info.xml file... Looks like I forgot to update it in the ZIP file... thanks :)

I've done that myself! Thanks again!
Title: Re: RSS Feeder
Post by: lelkins on November 15, 2009, 05:18:39 PM
I have installed in on a fresh RC2 install and setup a feed but nothing seems to happen.
How do I get it to run?
Title: Re: RSS Feeder
Post by: SlammedDime on November 16, 2009, 01:47:52 AM
it runs automatically... you can edit the frequency in the Scheduled Tasks panel in your admin Panel.
Title: Re: RSS Feeder
Post by: whitehaint on November 16, 2009, 06:03:56 PM
Awesome mod and works great on RC2!
Title: Re: RSS Feeder
Post by: slayer143 on November 17, 2009, 01:21:06 AM
Images are not extracted from the external feeds
just text and links

Anyway to extract the images too ?
Title: Re: RSS Feeder
Post by: SlammedDime on November 17, 2009, 01:25:15 AM
Hrm... they should be... I'll have to investigate that a bit further.
Title: Re: RSS Feeder
Post by: slayer143 on November 17, 2009, 01:38:49 AM
nope
your older version was able
but the latest one for RC2 unable to extract the images ..
for example
try this
movies-comics-anime . blogspot . com

Title: Re: RSS Feeder
Post by: Jerry on November 17, 2009, 06:24:08 PM
Does seem a bit odd, mine is getting images just fine O.o http://www.solarianorder.org/smf/index.php?topic=22.0 for example. Maybe its the way the feed is coding it? idk
Title: Re: RSS Feeder
Post by: slayer143 on November 17, 2009, 09:47:12 PM
That's odd

What is your setting for the
RSS feed?
Did you use any expression?

I am using RC2 too and feeder ver 1.4
Title: Re: RSS Feeder
Post by: slayer143 on November 18, 2009, 11:36:02 PM
SlammedDime , Have you checked?
Jerry , which version of RSS feeder you are using? if this version , what are the expression you are using to parse the feeds to grab the <img> and image: tags from RSS ?
Title: Re: RSS Feeder
Post by: Jerry on November 18, 2009, 11:54:38 PM
@slayer143, I am using 1.1.4 which I think is the most current? I also have the settings to default.
Title: Re: RSS Feeder
Post by: slayer143 on November 19, 2009, 02:09:50 AM
Yes that is the current one Jerry
But i am not getting the images
I have another board which uses 10.0 and using the older feed poster and it grabs

and this board using both the latest is not grabbing the same feed

and in Vbulletin, needless to say, it grabs gr8


Can you try the above example feed and let me know if it grabs?

Title: Re: RSS Feeder
Post by: SlammedDime on November 19, 2009, 03:33:19 AM
I'll bet its because of the extensive markup in the <img /> tag that SMF's html_to_bbc parser doesn't like.  I don't like coding for special cases, I like to keep things more modular, but I'll look into combining some of the ideas of previous versions of this mod with the newest version.
Title: Re: RSS Feeder
Post by: slayer143 on November 19, 2009, 03:56:44 AM
It will be great is you use the same type like the previous version. It helps alot in grabbing lots of feeds
Title: Re: RSS Feeder
Post by: DirtRider on November 19, 2009, 04:02:10 AM
Here is my feed http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss (http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss) Have a look how it post it on my test forum.http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen (http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen) Not very neat with the different code in the post. Anything I can do about this
Title: Re: RSS Feeder
Post by: DirtRider on November 19, 2009, 07:46:13 AM
Quote from: DirtRider on November 19, 2009, 04:02:10 AM
Here is my feed http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss (http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss) Have a look how it post it on my test forum.http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen (http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen) Not very neat with the different code in the post. Anything I can do about this

Another thing I have just noticed is when you click on any of the links in the post you get the following page and message

The previous page is sending you to http://www.dnaindia.com/entertainment/report_marlon-brando-s-estate-administrators-lands-motorbike-gear-deal_1311226.

If you do not want to visit that page, you can return to the previous page.

Check out this topic posted by RSS http://rc2.triumphtalk.com/index.php?topic=52.0;topicseen (http://rc2.triumphtalk.com/index.php?topic=52.0;topicseen)
Title: Re: RSS Feeder
Post by: DirtRider on November 20, 2009, 12:48:16 AM
Quote from: DirtRider on November 19, 2009, 07:46:13 AM
Quote from: DirtRider on November 19, 2009, 04:02:10 AM
Here is my feed http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss (http://news.google.co.za/news?pz=1&cf=all&ned=en_za&hl=en&q=Triumph+Thunderbird+1600&cf=all&output=rss) Have a look how it post it on my test forum.http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen (http://rc2.triumphtalk.com/index.php?topic=34.0;topicseen) Not very neat with the different code in the post. Anything I can do about this

Another thing I have just noticed is when you click on any of the links in the post you get the following page and message

The previous page is sending you to http://www.dnaindia.com/entertainment/report_marlon-brando-s-estate-administrators-lands-motorbike-gear-deal_1311226.

If you do not want to visit that page, you can return to the previous page.

Check out this topic posted by RSS http://rc2.triumphtalk.com/index.php?topic=52.0;topicseen (http://rc2.triumphtalk.com/index.php?topic=52.0;topicseen)

I have now also tried using Feedburner  but still have the same problem. Here is my feedburner link http://feeds.feedburner.com/BritishMotorcycle-GoogleNews
Title: Re: RSS Feeder
Post by: SlammedDime on November 20, 2009, 06:31:18 AM
Sounds like SMF's html_to_bbc parser still has lots of bugs that need to be worked out, which is a small shame... I may have to either create my own or incorporate someone else's that has more testing.
Title: Re: RSS Feeder
Post by: DirtRider on November 20, 2009, 07:09:46 AM
I don't know if this helps at all but the feed that I asked you about some time back that would not work now works 100%. Check it out here http://rc2.triumphtalk.com/index.php?topic=2.0

The feed is this one http://feed43.com/7878018404721735.xml
Title: Re: RSS Feeder
Post by: darkhavoc on November 20, 2009, 02:56:20 PM
Is it possible to get a copy of the sql file?  For some reason it doesn't make the tables.

Also the one that is available for download is just for 2.0 RC2

I am trying to use it on 2.0 RC1.2

Thanks
Title: Re: RSS Feeder
Post by: PalmBeachPreps on November 23, 2009, 09:21:29 PM
I'm now getting this error message: The database value you're trying to insert does not exist: is_ratings  Everything was working well until I attempted to run Scheduled Tasks after I noticed that feeds were not being posted.

NM, uninstalled the problem mod.  Feeds are fine again!  ;D
Title: Re: RSS Feeder
Post by: UndergroundChic on November 24, 2009, 11:48:21 PM
How would I go about trying to get the version of this mod compatible with SMF 2.0 RC1.2? This is the version that I use and I don't want to update again until the final version. The last update I did messed up several mods and I finally have everything how I want it except this mod. I've looked all over for the previous version of this and haven't had any success. Can somebody please send me a link? I've spent all day on trying to get this or the other RSS mod to work on my forum but it has all been a dismal failure. I would be very grateful.
Title: Re: RSS Feeder
Post by: falken on November 25, 2009, 08:32:55 AM
I want to mark the RSS topic as read, i mean when you click on show new post since last visit i don't want to see the RSS new post, it's posible??

Thanks and sorry for my english!  :-[
Title: Re: RSS Feeder
Post by: c5Quad on November 27, 2009, 05:09:04 PM
Quick question about the keyword search.  What exactly does it search? Just the title of the article and/or the short description.  And if you are grabbing the entire article, does it search that?

Thanks in advance.
Title: Re: RSS Feeder
Post by: SlammedDime on November 27, 2009, 06:42:07 PM
it searches only the title and short description.  If you choose to retreive the full article, it will only grab it if the title or short description contain it.
Title: Re: RSS Feeder
Post by: SlammedDime on November 27, 2009, 06:43:31 PM
falken - unfortunately that is not possible to do.

Undergroundchic - You could modify the add_settings.php script and remove {db_prefix} anywhere in the file, then modify package-info.xml and change the 'install for' line to 2.0 RC1.2.  I would recommend upgrading SMF though.
Title: Re: RSS Feeder
Post by: c5Quad on November 27, 2009, 07:18:10 PM
Quote from: SlammedDime on November 27, 2009, 06:42:07 PM
it searches only the title and short description.  If you choose to retreive the full article, it will only grab it if the title or short description contain it.

Thanks, that's what I needed to know.  Its no big deal, but is there anyway you could code it to search the whole article?

Nice Mod, appreciate all your effort.
Title: Re: RSS Feeder
Post by: SlammedDime on November 27, 2009, 07:20:46 PM
That could possibly create a lot more processing time, and I purposely didn't do it for that reason.  It *is* possible to do, I just don't recommend it.
Title: Re: RSS Feeder
Post by: frymaster on November 28, 2009, 01:12:15 PM
any way to stop it importing old articles?
I want to start posting from a feed that currently has 50 entries, but I don't want those old entries to appear (it'd be a bit spammy)
i.e. I only want articles posted from now on
Title: Re: RSS Feeder
Post by: SlammedDime on November 28, 2009, 04:46:50 PM
sorry, currently no way to do that... easiest thing to do is to let it pull them all then delete what u don't need
Title: Re: RSS Feeder
Post by: hartiberlin on December 01, 2009, 08:25:18 PM
Hi,
what does this regex.php exactly do ?

I only get 2 form boxes one with:
Regex: 

and the other with:
Body: 

I thought this php file would
automatically extract the
regex code from a RSS feed webpage ?

Why is it all so complicated to extract a full article ?

Can somebody please explain it all again,
how to extract for instance
the text of a youtube video list :

http://gdata.youtube.com/feeds/base/videos?q=hho&client=ytapi-youtube-search&alt=rss&v=2


or of a single video of it ?

Also can I get also the video from it via AEVO Mod ?

So how can we extract easily the full article with this
regex.php thing ?

Please explain it in more detail.

P.S.Is it also possible to extract Flickr.com or other RSS gallery enabled websites pictures with caption
texts via this RSS Feeder and post it inside the forum automatically ?
Title: Re: RSS Feeder
Post by: SlammedDime on December 01, 2009, 08:37:21 PM
Did you read the small paragraph on the first post?  It explains what regex.php is for, as well as links to a tutorial...  Why is it so complicated?  Because not every website is the same... if it were, the internet would be pretty boring.

QuoteRegex Help
Attached to this post is a file named regex.php... you can upload this script to your web server to test out your regular expressions with a given input.  It's pretty self explanatory... the goal is end up with what you want in the [1] => part of the array returned.  For debugging purposes, the entire matches array is displayed.  See this post (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) of the topic as well.
:bolding mine:
Title: Re: RSS Feeder
Post by: hartiberlin on December 01, 2009, 08:44:46 PM
Yes, but what do I fill in into that ?

http://travelhotelscheap.com/regex.php

??

It is NOT  self explanatory..!

Do I have to manually look at the RSS Feed HTML Code and
extract things ?

What do I put into the body  form and what will the submit result ?
Title: Re: RSS Feeder
Post by: hartiberlin on December 01, 2009, 08:50:55 PM
Quote from: SlammedDime on December 01, 2009, 08:37:21 PM
See this post (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) of the topic as well.


Well, this does not explain,what must be put exactly into
the 2 forms of the regex.php

and what will be the output if you press submit..
Title: Re: RSS Feeder
Post by: hartiberlin on December 01, 2009, 08:54:14 PM
Is only the [1] => part of the array then displayed as the extracted article ?

What about the [0] => part of the array ?
In you example this was also the output of the regex.php !
Title: Re: RSS Feeder
Post by: hartiberlin on December 01, 2009, 09:01:42 PM
If I put for instance at:
http://www.travelhotelscheap.com/regex.php

~<div id="articlestory">(.*)<\/div>~siU
into the regex: form
what should I put into the
body: form ?

The whole body of the HTML page ?

So when I press then submit, what should it display ?

Only the extracted text of the webpage as the article or
still some HTML code with the array [1] statement around it ?

What about the array [0] statement that also is there and has parts
of the article I wish to extract ?
Title: Re: RSS Feeder
Post by: SlammedDime on December 01, 2009, 09:14:12 PM
You can't use the regex from my tutorial... that's why it's a tutorial, to show you how to create your own regex based on the HTML from your page.

Yes, the 'body' box gets the HTML, the regex box gets the regular expression.
Title: Re: RSS Feeder
Post by: UndergroundChic on December 02, 2009, 12:26:15 AM
Quote from: SlammedDime on November 27, 2009, 06:43:31 PM


Undergroundchic - You could modify the add_settings.php script and remove {db_prefix} anywhere in the file, then modify package-info.xml and change the 'install for' line to 2.0 RC1.2.  I would recommend upgrading SMF though.

Thank You SD  :P
Title: Re: RSS Feeder
Post by: hartiberlin on December 02, 2009, 12:25:47 PM
Quote from: SlammedDime on December 01, 2009, 09:14:12 PM
the regex box gets the regular expression.

What does this exactly mean ?

What is a " regular expression" in this case ?

Please can you show it exactly on an example from any
RSS feed page please ?

Many thanks in advance and thanks again for your hard work !
Title: Re: RSS Feeder
Post by: juliegreen on December 02, 2009, 06:15:22 PM
Post Feed As=
Enter who you would like this topic posted as.


what do i need to write for the field Post Feed As? i tried many thing but nothing works. could give an example to write?
Title: Re: RSS Feeder
Post by: SlammedDime on December 02, 2009, 06:24:06 PM
you have to use an existing user on your board, like your username, or create a new user named 'Bot', and type it's name in there.
Title: Re: RSS Feeder
Post by: juliegreen on December 02, 2009, 06:32:47 PM
thank you SlammedDime,

i was just confused the forums and tried the username which wasn't in the forum im using your mod.

thanks again.
Title: Re: RSS Feeder
Post by: juliegreen on December 03, 2009, 10:56:18 AM
there are two links in the feeds and i understand the source link but how can i remove the title link? and maybe place a nofollow attr. to source link?

thank you
Title: Re: RSS Feeder
Post by: hartiberlin on December 04, 2009, 04:42:45 PM
Are there no more comments to my last questions ?

Please how can we get this better done with the regex thing.
I need a good example, so I can understand this better.

Many thanks in advance.

Regards, Stefan.
Title: Re: RSS Feeder
Post by: GreenMotion on December 04, 2009, 05:57:00 PM
Quick Question here,

How does this tool determine whether or not a RSS feed item has already been posted or not?  What does it check for to make this determination?

Thank you,

   GM
Title: Re: RSS Feeder
Post by: SlammedDime on December 04, 2009, 07:35:33 PM
Stefan - can you point out exactly what from my tutorial you don't understand, then I might be able to better help you out.

GreenMotion - For every feed posted, it calculates an MD5 sum of the title of the item and stores it in the database for 30 days.  The log is pruned on a regular basis and items older than 30 days are discarded (to keep down on database size).
Title: Re: RSS Feeder
Post by: GreenMotion on December 04, 2009, 09:18:48 PM
Thanks SlammedDime.

I got confused for a bit because it wouldn't update the RSS posts but after some googling and looking through the code I noticed it is caching the RSS feeds for 2 hours which explains a lot.

It would be nice if these cache settings were configurable through the configuration screen.

    GM
Title: Re: RSS Feeder
Post by: hartiberlin on December 05, 2009, 05:48:15 AM
Hi SlammedDime,
how could I extract the FULL articles for instance from this RSS feed:

http://www.asiatraveltips.com/travelnews.xml

What must I set for the REGEX there and how would I find it ?

Many thanks in advance.

Regards,Stefan.

Title: Re: RSS Feeder
Post by: hartiberlin on December 05, 2009, 09:05:21 AM
Hi,
as there was no div tag
that started the articles in:

http://www.asiatraveltips.com/travelnews.xml

I used the following
regex code:

~<\/script><\/div>(.*)<br>~siU

Now it extracts the articles,
but as soon as inside the article there is an apostrophe like this for example
ship´s cabin

the RSS text does stop after the word
ship
and is no further extracted...

How could that be avoided ?

Many thanks.
Title: Re: RSS Feeder
Post by: hartiberlin on December 05, 2009, 10:42:06 AM
Another question.

How can I disable the link at the top of the imported posting to the
original article ?

Many thanks.
Title: Re: RSS Feeder
Post by: frymaster on December 05, 2009, 12:03:28 PM
Quote from: SlammedDime on December 04, 2009, 07:35:33 PM
Stefan - can you point out exactly what from my tutorial you don't understand, then I might be able to better help you out.

GreenMotion - For every feed posted, it calculates an MD5 sum of the title of the item and stores it in the database for 30 days.  The log is pruned on a regular basis and items older than 30 days are discarded (to keep down on database size).

does this mean that with the feed I have (which has every article ever posted since the blog was created) that after 30 days it will post old articles again?
Title: Re: RSS Feeder
Post by: hartiberlin on December 05, 2009, 12:17:18 PM
Also the character:

"
stops the import of the full text.

How could that be avoided ?

Many thanks.
Title: Re: RSS Feeder
Post by: SlammedDime on December 05, 2009, 12:25:49 PM
Stefan, I'm heading out the door now, but I'll take a look at your feed when I get back later this afternoon.  To answer your other questions: You'd have to open ScheduledTasks.php and scroll down to the bottom and find the bit that puts the whole post together and edit that.  In a future version of the mod, I'll create user editable templates for posting feeds.  As for the quote mark, I'll have to test it locally to see why that happens.

frymaster - yes.  Typically, RSS feeds would contain the latest and greatest items from a blog or site, rarely do they contain all items since inception.  You can change the length of time of pruning in the Pruning Options admin panel... just set the number of days to something high and it'll never be pruned... keep in mind though that if you have multiple feeds, none of them will ever be pruned and that log table can grow very large in size depending on how many items are posted.
Title: Re: RSS Feeder
Post by: hartiberlin on December 05, 2009, 12:40:01 PM
Hi.

I am trying to suppress the quote mark and apostrophe signs,
with:

~<\/script><\/div>(.*['"])<br>~siU

but that did not work...
What is the regex code  to supress these signs.. ?

Many thanks.
Title: Re: RSS Feeder
Post by: hartiberlin on December 07, 2009, 04:27:10 PM
Hmm,
it seems some RSS Feeds are just not very compatible or are wrong programmed, so
also RSS-Feeder can not retrieve it.

I found now another RSS Feed that works with the REGEX code I used.


2. How can I change the Header of the posting, so that the domain name
is not displayed, where the feed is pulled from ?

Also I would like to have an option to disable the
"Source:"
at  the bottom of the postings.

How could that be done ?

Must I hack the RSS-Feeder php files for this or will you soon
include an option to disable it ?

Many thanks.
Title: Re: RSS Feeder
Post by: hartiberlin on December 07, 2009, 04:47:23 PM
Hmm,
I found another issue:

If I delete manually some postings, that RSS-Feeder just retrieved, it does not
retrieve it again, if I start it manually in the Scheduled Task area.

How can I tell him to retrieve again the postings then ?

Do you have some kind of caching, so that it has to wait some time, before it retrieves
at all some postings again from the same feed , when started manually ?
Title: Re: RSS Feeder
Post by: kizko on December 09, 2009, 06:41:42 PM
I`ve installed it on my 2.0 RC2, install succesufull. BUT!
I can`t find it in my admin menu. It isn`t in Modification Settings or anywhere else.

If i try to unistall it:

An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.
Title: Re: RSS Feeder
Post by: SlammedDime on December 10, 2009, 05:50:29 AM
Sounds like you have some file issues going on Kizko... the mod installs and uninstalls perfectly fine for me.  If you have issues with others mods as well, then the problem is not here.

Stefan - once an item is imported, it is logged and won't be imported again, even if you delete the topic/post.  Only way around this is to clear the entry out of the log_rssfeeds table, which isn't easy as they are hashed md5 values.

As for the format bit, you have to edit ScheduledTasks.php in the rss feed function.  I'll be introducing a format option in the next version of the mod, but it won't be soon.
Title: Re: RSS Feeder
Post by: kizko on December 14, 2009, 08:38:31 AM
I`ve got some errors:

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=modsettings;sa=aeva
Apply Filter: Only show the errors with the same message
8: Undefined index: mods_cat_modifications_rssfeeds
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/Admin.php
Line: 210

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=modsettings;sa=aeva
Apply Filter: Only show the errors with the same message
8: Undefined index: rss_feeder_desc
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/ManageSettings.php
Line: 215

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=modsettings;sa=aeva;save
Apply Filter: Only show the errors with the same message
8: Undefined index: mods_cat_modifications_rssfeeds
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/Admin.php
Line: 210

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=modsettings;sa=aeva;save
Apply Filter: Only show the errors with the same message
8: Undefined index: rss_feeder_desc
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/ManageSettings.php
Line: 215

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=modsettings;sa=aeva
Apply Filter: Only show the errors with the same message
8: Undefined index: mods_cat_modifications_rssfeeds
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/Admin.php
Line: 210

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin
Apply Filter: Only show the errors with the same message
8: Undefined index: mods_cat_modifications_rssfeeds
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/Admin.php
Line: 210

Apply Filter: Only show the error messages of this URL  http://forum.psp-fanatik.ro/index.php?action=admin;area=logs;d1dd3abb=1e675b02bf641f3a8905c02ef3941bfe
Apply Filter: Only show the errors with the same message
8: Undefined index: mods_cat_modifications_rssfeeds
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/psp-fanatik.ro/subdomains/forum/httpdocs/Sources/Admin.php
Line: 210
Title: Re: RSS Feeder
Post by: SlammedDime on December 14, 2009, 06:24:07 PM
Your language file is missing the language strings.  Update every Modifications.language.php file with what is added to Modifications.english.php by this mod and clear your file cache.
Title: Re: RSS Feeder
Post by: navjotjsingh on December 16, 2009, 03:15:17 AM
If I uninstall RSS Feeder, it does not delete the scheduled task entry of rss_feeder. How to delete it?
Title: Re: RSS Feeder
Post by: kizko on December 17, 2009, 06:04:42 PM
Quote from: SlammedDime on December 14, 2009, 06:24:07 PM
Your language file is missing the language strings.  Update every Modifications.language.php file with what is added to Modifications.english.php by this mod and clear your file cache.

I have only Modifications.english.php
Title: Re: RSS Feeder
Post by: kizko on December 17, 2009, 06:10:51 PM
PS: It is installed on SMF 2.0 RC 1.2
Title: Re: RSS Feeder
Post by: kizko on December 21, 2009, 10:44:35 AM
How abot if I isntall it manually on 2.0 RC 1.2 ?
Title: Re: RSS Feeder
Post by: PURETRUCK.com on December 21, 2009, 01:50:42 PM
No matter what feed I enter into the Admin panel, they never connect. The Admin log shows for each feed that "(The data could not be converted to UTF-8)".

Any help would be greatly appreciated.
Title: Re: RSS Feeder
Post by: PURETRUCK.com on December 22, 2009, 10:53:36 AM
This is one of the feeds if that helps at all:

www.autoblog.com/category/trucks/rss.xml
Title: Re: RSS Feeder
Post by: darubillah on December 22, 2009, 11:51:41 AM

it is giving error on running the maintenance task

The database value you're trying to insert does not exist: is_ratings

Why??  & if i enter  ~<div class="topContent">(.*)<\/div>~siU  in Regular Expression field it still gives error
Title: Re: RSS Feeder
Post by: PURETRUCK.com on December 22, 2009, 03:19:58 PM
OK, there has to be something messed up in my install or configuration somewhere.

No matter what feed I add, it doesn't work.

I constantly get the error: (The data could not be converted to UTF-8)

Please, someone help me out.  :-\
Title: Re: RSS Feeder
Post by: SlammedDime on December 22, 2009, 03:32:53 PM
kizko, you should upgrade to 2.0 RC2, I don't have the time to walk you through trying to install it on 2.0RC1.

Puretruck.com - Posting multiple times in a row isn't going to get you help any faster... I have a full time job and I'm a full time dad during the day... I have very little time at the moment to visit this site.

As for your issue, i'll have to take a look at the code and see why it's trying to convert to UTF8 when you're not running a UTF8 character set on your board.  It's been a while since I've looked at the section of code that handles other languages so it may take some time for me to trace it all.
Title: Re: RSS Feeder
Post by: darubillah on December 23, 2009, 08:11:44 AM
Quote
it is giving error on running the maintenance task

The database value you're trying to insert does not exist: is_ratings

Why??  & if i enter  ~<div class="topContent">(.*)<\/div>~siU  in Regular Expression field it still gives error

please also look into my problem
Title: Re: RSS Feeder
Post by: SoLoGHoST on December 24, 2009, 11:02:20 PM
This is related to my Post Ratings Mod that you must have installed.  Please check out my post's related to this within the Post Ratings Discussion topic.  Hopefully the last few posts regarding this should be able to solve your problem.
Title: Re: RSS Feeder
Post by: falken on December 25, 2009, 09:46:37 PM
I can't see the pictures in the RSS post, the code is right but doesn't show the picture, anybody know what is happening??  :(
Title: Re: RSS Feeder
Post by: hartiberlin on December 26, 2009, 12:43:19 PM
Quote from: falken on December 25, 2009, 09:46:37 PM
I can't see the pictures in the RSS post, the code is right but doesn't show the picture, anybody know what is happening??  :(

Please post example URL where it is happening and what code
it puts out.
Many thanks.
Title: Re: RSS Feeder
Post by: falken on December 27, 2009, 07:21:50 PM
Quote from: hartiberlin on December 26, 2009, 12:43:19 PM
Quote from: falken on December 25, 2009, 09:46:37 PM
I can't see the pictures in the RSS post, the code is right but doesn't show the picture, anybody know what is happening??  :(

Please post example URL where it is happening and what code
it puts out.
Many thanks.

Ok, for example:

This image:
http://img.motorpasion.com/2009/12/aston-martin-one77-record.jpg

and the code is:
       Aston Martin One-77

If i enter in the url directly show the image wihtout problems, but I can't see it in the forum  :(
Title: Re: RSS Feeder
Post by: hartiberlin on December 27, 2009, 08:38:04 PM
Quote from: falken on December 27, 2009, 07:21:50 PM
Quote from: hartiberlin on December 26, 2009, 12:43:19 PM
Quote from: falken on December 25, 2009, 09:46:37 PM
I can't see the pictures in the RSS post, the code is right but doesn't show the picture, anybody know what is happening??  :(

Please post example URL where it is happening and what code
it puts out.
Many thanks.

Ok, for example:

This image:
http://img.motorpasion.com/2009/12/aston-martin-one77-record.jpg

and the code is:
       Aston Martin One-77

If i enter in the url directly show the image wihtout problems, but I can't see it in the forum  :(

My Firefox browser does not show a pictures at:
http://img.motorpasion.com/2009/12/aston-martin-one77-record.jpg

Please post the WEBPAGE, where you import the picture via the RSS Feeder,
so we can check the source code.
Many thanks.

Yes, I have seen it also, that the RSS Feeder does not import pictures,
but I have modified the code so it strips out some HTML Tags...etc..
Title: Re: RSS Feeder
Post by: jcastellese on December 28, 2009, 09:20:44 AM
I have a quick question. Our RSS feeds randomly time out and cause it to put them on the disabled list. This doesn't happen frequently, but we have about 50 different feeds (we has all of our bloggers posts pushed to the forums as well). One thing I'd really like to do is disable the ability of the Feed Reader to automatically disable our feeds. Is there a section of code I can easily comment out to prevent this from happening in the future?
Title: Re: RSS Feeder
Post by: GazOutEast on December 29, 2009, 11:09:51 AM
SD - when you're about

I'm still on RC1 and haven't touched (RSS Feeder 1.1.1 according toPackage Manager in the admin panel) since the first half of the year,except to reactivate feeds when they go inactive (I can live with thatuntil the feed providers get their acts together).

Suddenly this month, I've got a server error log (not inside SMF - but on the server) filling up with entries of -

PHP Fatal error:  Call to undefined function  db_query() in /home/druwa/public_html/board/Sources/Subs-RSS.php on line 145

The relevant code lines (143 - 150) are -



    // First get all the enabled bots
    $context['feeds'] = array();
    $request = db_query("
            SELECT
                ID_FEED, ID_BOARD, feedurl, title, postername, updatetime, enabled, html,
                ID_MEMBER, locked, articlelink, topicprefix, numbertoimport, importevery
            FROM {$db_prefix}feedbot
            WHERE enabled = 1", __FILE__, __LINE__);



$request = db_query("   is the offending line according to the errors

Any idea why this should suddenly kick up?
I only discovered it when my hosting got suspended earlier today, forserver abuse after hourly logs like this one on the hosting manager'sscreens -

Time: Mon Dec 28 09:06:21 2009 -0500Account: account-nameResource: Process TimeExceeded: 59012 > 1800 (seconds)Executable: /usr/bin/phpCommand Line: /usr/bin/php /home/account-name/public_html/board/index.phpPID: 8643Killed: No

Apparently each instance was running 24 hours+, and that's why they hit me with a suspension.

It really sucks because I've also found my users discussing the outage on the forums on other sites now.

Thanks in advance for any advice
Gaz[/]
Title: Re: RSS Feeder
Post by: SlammedDime on December 29, 2009, 01:38:28 PM
That code is from the RSS Feed Poster mod from vbgamer, not my mod.
Title: Re: RSS Feeder
Post by: GazOutEast on December 29, 2009, 01:53:39 PM
Hi Sd

Yes, so I've discovered - when I upgraded from v1.1.10 to 2.0 RC1, vbgamers mod didn't work - can't remember why but think it was an install error - so I deleted it.

However, checking the Sources folder, it has both Subs-RSS.php and Subs-Rss.php - the second one being yours.
As the Subs-RSS.php is the only file left standing from vbg's mod, it should not be running anything because nothing is calling it, including the scheduler.

Something seriously cranky is going on here, and I'm wondering if there's a case-desensitiser anywhere in SMF or your mod (or even in PHP) that might be causing the install to simultaneously, or alternatingly call the Rss and RSS versions of the file?

2am here now, but in the morning I'll dig out vbg's xml install file and do a manual purge of his system - hopefully without breaking yours in the process.

Sorry to have troubled you
Gaz
Title: Re: RSS Feeder
Post by: Rated on December 29, 2009, 02:34:15 PM
Hi everyone,

I have some issues with getting the feeder to make the posts.

He posted 1 time and then for hours straight nothing, while new feeds kept coming in.
I also read ppl doing a manual start but how do i do that?
The only options i have is add feed and for the rest noting, and where do i edit the time when he gets the feeds and what exact part do i need to edit?
Just new to SMF and creating forums and such.

Running on SMF RC2

Thanks
Title: Re: RSS Feeder
Post by: Spoogs on December 29, 2009, 02:42:35 PM
Admin>>Maintenance>>Scheduled Tasks 

or

yoursite.com/index.php?action=admin;area=scheduledtasks;sa=tasks
Title: Re: RSS Feeder
Post by: Rated on December 29, 2009, 03:04:46 PM
Quote from: Spoogs on December 29, 2009, 02:42:35 PM
Admin>>Maintenance>>Scheduled Tasks 

or

yoursite.com/index.php?action=admin;area=scheduledtasks;sa=tasks
Thanks have it all working now, repeat was set at 6 hours, changed it now :D
Title: Re: RSS Feeder
Post by: Spoogs on December 29, 2009, 03:06:26 PM
Ur welcome, glad u got it sorted
Title: Re: RSS Feeder
Post by: Rated on December 29, 2009, 03:38:22 PM
And im back with my second issue :P

I want the full article to be posted, ive checked the option and filled in the Regular Impression, let me give you my example here.

</script></div>
<div class="boxad"><!-- --></div>
</TD>
</TR>
<TR valign="top">
<TD height="90%" class="newsBody">
<div class="KonaBody">-- There is currently a major cable war going on between Fox and Time Warner Cable which has Fox demanding that Time Warner pay one dollar per month per customer in order to continue receiving their family of networks including Fox, FX and MyNetworkTV. Time Warner has refused their proposal and they are threatening to pull all Fox stations off the air this Friday. Hence, Time Warner Cable subscribers would be unable to watch Friday Night SmackDown!. Fox has taken out ads in several markets saying that Time Warner is trying to deprive its customers of shows such as House and American Idol. SmackDown! is listed in several ads, including a few spots with <a href="/news/wi/wwe/wwe_news.shtml">WWE</a> talent addressing the possible loss of the program.<P>
-- During a recent interview, the wrestler formerly known as Kizarny, Nick Cvjetkovich (now performing under the name Sinn Bodhi), gave his unique take on the backstage atmosphere in World Wrestling Entertainment. &quot;Working at WWE was also awful because there is so much politics and back stabbing you never know who your enemies are because they are all gutlessly and unaccountably hiding in the shadows,&quot; he said. &quot;I wasn't given a straight reason why I was released. One minute I was told how unique I was and how great of a work ethic I had. The next minute they had nothing for me. I have heard many different theories. I guess I just didn't fit their mold of cookie cutter. Not enough abs showing I guess even though in the ring I can run circles around every ex-NFL player or jacked up underwear model collecting a paycheck in the WWE developmental system. Vince and his billion dollar case of ADD wants Ken Dolls sports entertaining against other Ken Dolls at the moment. Me looking weird or different didn't compute with the tunnel vision that WWE sometimes has even though Rob Zombie, Marilyn Manson and Hot F*****g Topic retail stores are all the rage with kiddies.&quot; To read the interview in its entirety, visit Wrestling101.com. He gives his thoughts on TNA, his friendship with <a href="/wrestlers/edge.shtml">Edge</a> and Christian, his unique gimmick, speaking carny, and much more.<P>

-- RAW's newest tandem, Chris Masters and Eve, can be seen performing &quot;Pec the Halls&quot; in a special video on WWE.com. <P></div>
<IMG src="/images/rss.gif" width="36" height="17" align="left" border="0" vspace="0" hspace="5"> <strong>Use our headlines for your site or blog!</strong> For you website owners and bloggers, we syndicate our content so you can carry our headlines on your site or blog for free!  To get our headlines, you can use our RSS Feeds from our <a href="/rss/wi/index.shtml">RSS Feeds</a> page by clicking <a href="/rss/wi/index.shtml">here</a>.
<p align="right">
<!-- AddThis Bookmark Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"><img src="http://s9.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="AddThis Social Bookmark Button" /></a> <script type="text/javascript">var addthis_pub = 'winc';</script><script type="text/javascript" src="http://s9.addthis.com/js/widget.php?v=10"></script> 

<!-- AddThis Bookmark Button END --></div>
</TD>
</TR>


With the Regular Impression:
~<div class="KonaBody">(?:.*)<\/div>~siU

And Example 2:

<div class="itemBody"  id="itemBody">
<img src="http://images.fok.nl/fp/icons/icon_politie2.jpg" id="newsicon" vspace="3" hspace="3" border="1" align="left" alt="Nederland" /> <p>De politie heeft bevestigd dat een opgepakte man op de A6 bij Lelystad uit een politiebusje is ontsnapt. De politie heeft geen idee hoe het kon gebeuren dat de man uit een speciale arrestantenbus wist te springen.</p><p>De man was in Emmeloord opgepakt voor diefstal en hij werd overgebracht naar het cellencomplex in Lelystad. De politie zoekt met speurhonden naar de man, die na zijn ontsnapping vermoedelijk het bos is ingerend.</p><em>Met dank aan <strong>Shapeshift</strong> en <strong>bierspons</strong> voor de submit.</em>
<div class="clear"><br /></div>
<div class="bron" style="text-align:right;display:inline;">
<table><tr>


With RI:

~<div class="itemBody"  id="itemBody">(?:.*)<\/div>~siU

I checked the full article option above but he still displays a little part with a link to the post.

Can anyone tell me what im doing wrong?
And is the RI on the above 2 examples correct?
Title: Re: RSS Feeder
Post by: SlammedDime on December 29, 2009, 04:32:27 PM
(?:.*) should be (.*)

?: tells the match not to be logged in the match array.
Title: Re: RSS Feeder
Post by: Rated on December 29, 2009, 04:39:52 PM
Quote from: SlammedDime on December 29, 2009, 04:32:27 PM
(?:.*) should be (.*)

?: tells the match not to be logged in the match array.
And again it works :D
And again thanks :D

Love the quick support your giving on your product :)
Title: Re: RSS Feeder
Post by: GazOutEast on December 29, 2009, 11:46:27 PM
Hi SD and everyone

Just a quick note for those who previously had vbgamer's Feed Poster plug in installed, and have switched to SlammedDime's plugin ....

I discovered the error source that caused my hosting account to be suspended (twice) was remainder files after uninstalling vbgamers mod eight months earlier.

The files it left behind were /forumroot/cronrss.php and /forumroot/Sources/Subs-RSS.php - those need manually deleted from cpanel file manager or via FTP
Additionally, remember to delete any cpanel cron jobs you set up for vbgamer's mod - they will continue trying to trigger the cronrss.php file whether it is there or not - causes server resource abuse and will get your account suspended most likely.

Hope it helps someone
Gaz
Title: Re: RSS Feeder
Post by: SAFAD on January 01, 2010, 03:23:00 AM
Afro Can You Tell Us How You Get FIfa Working ?
Cuz I Coudn't
Even The Tut Didn't Help
I Tried With Many Regex
Title: Re: RSS Feeder
Post by: lush on January 01, 2010, 06:37:43 PM
hey guys, great mod.
was wondering if it would be possible to get it to post code tags properly?
eg  in origional post a link is between code tags and the link is not live


that post posted by the feed poster is a live link  with just the word code above it





Title: Re: RSS Feeder
Post by: SlammedDime on January 01, 2010, 10:52:32 PM
Unlikely... it would be near impossible to account for how everyone decides to implement 'code' tags on their site.
Title: Re: RSS Feeder
Post by: virtualxtc on January 03, 2010, 01:10:55 AM
If you have already pulled all the topics without the full article setup will it edit them if you set it up or does it only now apply to new post in the feed?
Title: Re: RSS Feeder
Post by: SlammedDime on January 03, 2010, 01:21:56 AM
It will only apply to new items from those feeds.
Title: Re: RSS Feeder
Post by: GazOutEast on January 03, 2010, 01:33:27 AM
Hi SD

Just wanted to give you a bit of praise - nice job on the upgraded package for 2.0 RC2 - flawless install and recapture of settings

Well done that man.
Title: Re: RSS Feeder
Post by: virtualxtc on January 03, 2010, 02:23:23 AM
Quote from: SlammedDime on January 03, 2010, 01:21:56 AM
It will only apply to new items from those feeds.
Thanks mate. Well done on this mod.
Title: Re: RSS Feeder
Post by: butchs on January 03, 2010, 10:15:16 AM
I have been getting errors with 1.1.4 on SMF 2 RC2.

When I delete topics via the moderator selection list:
Undefined variable: delete_own in RemoveTopic.php, Line: 613
if ($modSettings['postmod_active'] && !$row['approved'] && $row['id_member'] != $user_info['id'] && !$delete_own)

Less common via "index.php?action=admin;area=modsettings;sa=rssfeeds;feed=1":
Undefined variable: board in ManageSettings.php, Line: 2129
'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,

$delete_own and $board should be in the globals or defined somewhere?

Title: Re: RSS Feeder
Post by: SlammedDime on January 03, 2010, 11:40:47 AM
Neither error has anything to do with this mod, you should ask for support in the SMF 2 support board.
Title: Re: RSS Feeder
Post by: butchs on January 03, 2010, 11:48:35 AM
I tested it and I disagree.


I am editing this post a little because my reply should have been better"
For example if you look at the install.xml you will find"

global $context, $txt, $sourcedir, $scripturl, $smcFunc;

one of the errors may go away if you change it to:
global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;

;)
Title: Re: RSS Feeder
Post by: GazOutEast on January 03, 2010, 01:08:07 PM
Dunno if it's relevant, but the $board v $row global was a source of several error log pains with the View Only Boards mod (version 1.2 and the 2.0RC2 version) - it caused lots of "undefined errors" in the error log.

If you have View Only Boards installed, you might want to clear those first, then see if it's still happening with RSS Feeder (I doubt it will - I'm not getting them any more after fixing View Only Boards)

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on January 03, 2010, 02:46:04 PM
Sorry Butches, the second error is an error in the mod... the first however, is not.  I've corrected it in the install package locally and it will be fixed in the next version of the mod.
Title: Re: RSS Feeder
Post by: SocksHeaven on January 05, 2010, 11:05:35 AM
i have installed mod properly it dosn't given me any error in any where but it's still not feeding.

url from importing feeds is DataLife Engine URL Example: http://yoursite.com/rss.xml

please Help Me
Title: Re: RSS Feeder
Post by: SlammedDime on January 05, 2010, 12:16:20 PM
fake urls don't help... I need a real url that your using to try and import.

Did you manually run the scheduled task in your admin panel?
Title: Re: RSS Feeder
Post by: SAFAD on January 05, 2010, 01:32:38 PM
can anybody tell me how to retrieve articles from FIFA.com ?
Title: Re: RSS Feeder
Post by: SocksHeaven on January 06, 2010, 07:09:19 PM
Quotehttp://downtr.net/rss.xml

This is the rss link
Title: Re: RSS Feeder
Post by: SocksHeaven on January 07, 2010, 06:56:21 PM
How to remove the source link?
Title: Re: RSS Feeder
Post by: SocksHeaven on January 08, 2010, 06:17:07 AM
is there any buddy will reply me?  :( waiting for reply from 3 days please atleast tell me how to remove source link and the other top link
Title: Re: RSS Feeder
Post by: SocksHeaven on January 08, 2010, 07:14:33 PM
SlammedDime Dear Please Reply  :(
Title: Re: RSS Feeder
Post by: Garou on January 08, 2010, 11:20:13 PM
SocksHeaven, I believe that was covered before. Try this....

In ScheduledTasks.php
Quote from: SlammedDime on October 22, 2009, 11:17:51 PM
Code (Find) Select
' . (!empty($source) ? '[b]Source:[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


Code (Replace) Select
' . (!empty($feed['footer']) ? $feed['footer'] : '');
Title: Re: RSS Feeder
Post by: GohighVoltage on January 09, 2010, 12:32:40 PM
Question,   getting feeds from CNET,     this is the feed:   http://news.cnet.com/8300-13860_3-56.xml

I am getting duplicate posts on every one.      Please helP?
Title: Re: RSS Feeder
Post by: SlammedDime on January 09, 2010, 02:07:34 PM
Quote from: SocksHeaven on January 08, 2010, 07:14:33 PM
SlammedDime Dear Please Reply  :(
Quote from: Garou on January 08, 2010, 11:20:13 PM
SocksHeaven, I believe that was covered before. Try this....

In ScheduledTasks.php
Quote from: SlammedDime on October 22, 2009, 11:17:51 PM
Code (Find) Select
' . (!empty($source) ? '[b]Source:[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


Code (Replace) Select
' . (!empty($feed['footer']) ? $feed['footer'] : '');
This is correct.

GoHighVoltage - Each item is posting twice?  Only twice, or more than that?  I can only see that happening if you have the feed setup twice in the admin panel.
Title: Re: RSS Feeder
Post by: GazOutEast on January 10, 2010, 01:40:36 AM
Hi again SD

Getting a few errors kicking in in the error log in the format

Quote

Type of error: Undefined

http://www.domainname.com/board/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=15

8: Undefined variable: board

File: /home/hostingaccount/public_html/board/Sources/ManageSettings.php
Line: 2169


The relevant line of ManageSettings.php is -



2127:  /* RSS Feeder Settings */

2166:            if (!isset($context['categories'][$row['id_cat']]))
2167:                $context['categories'][$row['id_cat']] = array (
2168:                    'name' => strip_tags($row['cat_name']),
2169:                    'boards' => array(),
2170:                );



It seems to be getting caused when a feed has no new content at the time of polling the feed.  It also causes the feed to be deactivated in the RSS Feeder settings (red button instead of green).

I've checked the allocated boards and they are correct.
3 Feeds out of around 50 have been affected over the last four days, so it's not critical, but I'd like to clear it so I have a clean error log each morning.

Any advice?

Regards
Gaz
Title: Re: RSS Feeder
Post by: GohighVoltage on January 10, 2010, 06:29:10 AM
Weird,  I don't have it twice in admin.  Yesterday mod worked fine.   Today,  it isn't working,  on 4 different feeds.    I even tried it manually and no go.   What could be wrong?
Title: Re: RSS Feeder
Post by: SlammedDime on January 10, 2010, 01:19:59 PM
Gaz - that error and the line number don't match what is on that line... undefined variable means that I tried using it, but it doesn't exist... on that line, the the variable $board isn't even called.  And the only way in the code that a feed can become disabled (other than manually setting it) is if there is an error with the feed itself.  I tried reproducing by pulling a feed (all items), then pulling it again (no new entries) and it did not disable and I didn't get any errors in my error log.

Can you verify the time/date on that error and make sure you haven't added/removed any mods since the error occurred?

Gohighvoltage - are you sure you're using this mod, and not vbgamers?  Some people have had issue with his where it pulls once, but never again for that feed.
Title: Re: RSS Feeder
Post by: GazOutEast on January 11, 2010, 07:37:38 AM
SD - thanks for the reply - after I've grabbed something to eat (just back from burger flipping for the school kids) I'll recheck the error log and line number etc and report back.  I upgraded to RC2 on New Year's eve and have been slowly putting the mods back in and doing a very careful error log monitoring as my hosts are trigger happy with the account suspension button - I'm trying to squash all errors before adding too many extra mods, though i did put back two mods after the RSS Feeder, which I knew were not creating errors.  It may have affected the reported line numbers.

To do the upgrade, I essentially overwrote everything with the large package, deleted out all the mod files but left the database intact, and have been gradually reintroducing the mods (my members are a bit grumpy about that, but would be grumpier still if the hosting got suspended, eh?), so I'm not rushing anything - I expect this build to be stable for at least six months waiting for SMF 2.0 Gold release.

Keep forgetting to say - I really like this mod and just wish I could afford to donate something for the work you put into it, unfortunately current circumstances doesn't allow it (Mrs Gaz would have my nuts off with a rusty hacksaw if she thought I was giving money away right now).

Will report back later.

Gaz
Title: Re: RSS Feeder
Post by: GazOutEast on January 11, 2010, 10:10:22 AM
Hi SD

Back again with the last error (it appeared yesterday) from the error log, and is after the last plugin was added (the Sortable Packages plugin, and the one before that was Arantor's Tidy Boards plugin). 

It looks like these errors relate to editing the feed, rather than the feed operating and being posted.

Quote

Type of error: Undefined

http://www.domainname.com/board/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=15

8: Undefined variable: board

File: /home/hostingaccount/public_html/board/Sources/ManageSettings.php
Line: 2176


I've numbered line 2176 for you



2155: // Load the boards and categories for adding or editing a feed.

$context['categories'][$row['id_cat']]['boards'][] = array(
'id' => $row['id_board'],
'name' => strip_tags($row['name']),
'category' => strip_tags($row['cat_name']),
'child_level' => $row['child_level'],
2176: 'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,
);



Hope it makes more sense to you this time?

I've also got three feeds that are constantly timing out (one of them due to an invalid SSL (LOL - and that one is PayPal's UK Press Agency - ROFL) but those are issues with the feeds themselves, not the mod.

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2010, 11:59:45 AM
At the top of the function, if you add $board to the global list of variables, that error will go away.
Title: Re: RSS Feeder
Post by: GazOutEast on January 11, 2010, 12:48:53 PM
OK thanks - have done it

The topper now looks like this -



2127: /* RSS Feeder Settings */
function ModifyRSSFeedSettings()
{
global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;

loadTemplate('RSSFeeds');
$context['page_title'] = $txt['rss_feeder'];



Is that the location you meant?

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2010, 01:38:28 PM
Bingo
Title: Re: RSS Feeder
Post by: GohighVoltage on January 11, 2010, 02:22:21 PM
No, Definitely yours.   It seems like it pulls some new feeds but not all of them.   Trying to figure it out.
Title: Re: RSS Feeder
Post by: Satfreak on January 11, 2010, 02:30:19 PM
I have SMF 2.0 RC2 installed and RSS Feeder 1.1.4, everything is OK, put me with some feed and Image and the whole text, but also put a live link from the feed, and even Source: from the feed, although I have the same feed another forum which is vBulletin, but does not show the source (whence came the link), or live links, although I know that there can not adjust to go live outside links.
I'm interested in whether there is a script, or mode, or should not edit the php somewhere. to coding all the links to the forum, which means all incoming links to be scrambled.
Title: Re: RSS Feeder
Post by: SlammedDime on January 11, 2010, 04:58:49 PM
You'd have to edit ScheduledTasks.php, near the bottom of the function for the rss feeds.
Title: Re: RSS Feeder
Post by: Satfreak on January 11, 2010, 11:20:19 PM
Quote from: SlammedDime on January 11, 2010, 04:58:49 PM
You'd have to edit ScheduledTasks.php, near the bottom of the function for the rss feeds.

Tnx mate,but where is that ScheduledTask php,I cant find that,and what I need to edit inside that php,I cant find that Scheduled TaskS php.
Title: Re: RSS Feeder
Post by: Satfreak on January 11, 2010, 11:35:22 PM
Ok,I find that ScheduledTask php via ftp inside,but what line I must replace to make that,to have all codeed that links,that comes to me via feed,I cant find that lines to make that,please need help for that,Tnx.
Title: Re: RSS Feeder
Post by: SlammedDime on January 12, 2010, 06:13:13 PM
Nothing has been ignored, I just haven't had time to update the mod.  Thanks for the suggestions, I'll look into implementing them.
Title: Re: RSS Feeder
Post by: GazOutEast on January 14, 2010, 12:06:49 AM
SD - no pressures on this

When you do get some spare time, I'd love to see Spuds fixes in the mod to make life easier for grabbing full feeds, although I'll admit openly that, on my install, without setting any regex's or anything, I get full articles around half the time ... always from the same feeds. 

I've also noticed that, previewing the feeds at the source sites, those feeds that only appear in SMF as an excerpt, in fact only contain an excerpt within the feed file .... so could you (or anyone) please explain to this confused old dinosaur if all this regex stuff is supposed to drill past the excerpt in the feed and grab the full article from the site, or what it's all about.

Side note on the Source tag - SD, could I possibly request that at next upgrade, the source link display be switchable in admin?  Ideally, I'd like three switches -
1 - whether to display it at all, or not (as discussed above) instead of hacking the files.
2 - an admin field to change the link field-name displayed (e.g. Instead of "Source", change it to "Supplied by" and so on - saves hacking the language file and causing uninstall / upgrade headaches later on.
3 - an admin switch with a couple of position choices - e.g. right under the title link (see 2 above) as an alternative to bottom of post, or in front of date but on same line as date, and so on.

They're not key to the functioning of the mod, just prettifying and ... errr ... flexiblifying ( ;) ) so it's up to you, just a few suggestions for you.

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2010, 03:34:31 AM
The way the regex (full article) option works is that if the option is enabled for that feed, the mod navigates to the link supplied in the item from the feed, loads up the web page, then uses the regex to find what you're looking for.  The information spuds supplied will greatly help in reducing the need to use regexes and make it more 'dummy proof', so to speak.

Some feeds do contain the full article (not normal), so in that case, you'd get the whole article in SMF because that is what the feed itself contains.

As for the 'Source' bit... I'll be introducing a 'template' so to speak that can be customized for each feed on how it is displayed, which allows the admin full control over what is displayed for each feed, and how it is displayed.
Title: Re: RSS Feeder
Post by: Satfreak on January 14, 2010, 05:39:03 AM
Now is all ok for Feeds wich doesnt have source with external links,like some feeds only with Images,but if I use Feed for example for movies,wich comes with Images,links..
I get Feed for movies with all info,Images,but links wich comes with Feeds are not coming coded,they comes Live,also shows me Live link for Source from wich board comes that Feed,.
I won to that links for movies comes coded,and to not showing from wich source comes that Feeds,check my Picture's,

Tnx.
Title: Re: RSS Feeder
Post by: SlammedDime on January 14, 2010, 05:46:25 AM
What you're asking is quite custom and I do not have the time to modify the code for your needs.  Sorry.
Title: Re: RSS Feeder
Post by: GazOutEast on January 14, 2010, 07:40:35 AM
Quote from: SlammedDime on January 14, 2010, 03:34:31 AM
The way the regex (full article) option works is that if the option is enabled for that feed, the mod navigates to the link supplied in the item from the feed, loads up the web page, then uses the regex to find what you're looking for.  The information spuds supplied will greatly help in reducing the need to use regexes and make it more 'dummy proof', so to speak.

Some feeds do contain the full article (not normal), so in that case, you'd get the whole article in SMF because that is what the feed itself contains.

As for the 'Source' bit... I'll be introducing a 'template' so to speak that can be customized for each feed on how it is displayed, which allows the admin full control over what is displayed for each feed, and how it is displayed.

Ah-ha - thanks for explaining that - so does that mean ... going back to your tutorial on page 2 of this thread ... that when you talk about getting the <div id="blahblah" that it's the div on the source page from the link, rather than the div id in the actual feed source-code?

Here's just a thought by the way - I think it's Amazon and the Kindle service that has the terms of supply, that if you submit your blog feed (or other feed) for syndication through them, then the feed must only supply full articles, not truncated in any way, and must be advert-free.  If I'm right on who it is, then that could be a good hunting ground for full article feed sources for those who can't figure out the regex's etc.

Gaz
Title: Re: RSS Feeder
Post by: SAFAD on January 15, 2010, 07:20:35 AM
Hey Guys
I Can't Grab Full Article From FIFA
Title: Re: RSS Feeder
Post by: GazOutEast on January 15, 2010, 07:51:40 AM
Quote from: Spuds on January 14, 2010, 11:48:53 AM
of course there are times when you have to use both, like when a web page has horribly broken HTML code.

Such as when the site splits the story and puts, say an an advert div in the middle - an example being Forbes.com ?

Quote from: Spuds on January 14, 2010, 11:48:53 AM
Now once you have targeted and extracted the text of interest from the full feed there is a good chance that any links in are relative, ie intended to work from the site where you got the feed and not from another site.  So you need to try and fix links, oh and then there is all those character set encoding issues to make things fun as well ....

Yeah, I can understand the issue with relative feeds - took me a while to get to grips with those at the beginning - osCommerce was a good training ground for them though - but the language encoding could be cured with UTF-8 couldn't it?  Apart from that, unless deliberately hunting feeds in multiple languages, surely most web masters would be either pulling feeds in English only, or maybe in their own language plus in English?  I can't imagine anyone trying to pull the same feed in all available languages, even though I could see a few reasons someone might want to try it.

Does the solution you're suggesting mean that SD's regex tutorial would become redundant, and we'd all need to learn a new system, or would yours do it all for us?

(This is getting interesting - I like this discussion and where it could take us with the RSS Feeder mod)

Gaz
Title: Re: RSS Feeder
Post by: GazOutEast on January 15, 2010, 07:55:39 AM
Quote from: SAFAD on January 15, 2010, 07:20:35 AM
Hey Guys
I Can't Grab Full Article From FIFA

Beware - FIFA aggressively protects all it's copyrighted material - they WILL get your site shut down if you publish anything direct from their feeds other than official press releases marked for recirculation.  (They got one of my eBay IDs shut down for selling photos of UK Premier League stadiums that had been photographed by me - they claimed the buildings / structures were copyright property of their member clubs and only the member clubs and FIFA had the right to make money from photographs of them).

Just a friendly warning

Gaz

edit to fix typo
Title: Re: RSS Feeder
Post by: SAFAD on January 15, 2010, 08:32:18 AM
Thx Gaz
But As They Say At Their Website I May Copy The Content Only If I Link Back To Em
Title: Re: RSS Feeder
Post by: GazOutEast on January 15, 2010, 10:04:15 PM
Quote from: Spuds on January 15, 2010, 03:07:53 PM
QuoteDoes the solution you're suggesting mean that SD's regex tutorial would become redundant, and we'd all need to learn a new system, or would yours do it all for us?
The syntax is pretty much the same as is the concept, just that instead of passing the regex string to a preg_match it passes it to a dom parser.  In the example it was grabbing the text between the <div id="articlestory"> and </div> tags. 
The regex for that was ~<div id="articlestory">(.*)<\/div>~siU

For the dom parser it would be div[id="articlestory"]    which is simpler for most folks to understand.  To take it one step further if you put in div[id="articlestory"] p  ... it would return all of the paragraphs within that div and nothing else, or div[id="articlestory"] h3 would return all of the h3 tags from within that div ....

Lets also suppose that there was another div /div combo inside of the <div id="articlestory"> The dom parser would still return the entire <div id="articlestory"> section where as the basic regex above would return from the start of the <div id="articlestory'> to the first </div> it found which is not the closing div of the story.  I hope that makes sense ....

That sounds excellent and will remove a major headache for most people, as well as hopefully reducing heavily the requests for regex writing support in this thread.

I've come across a scenario though which I think may be the sources trying to prevent full article retrieval.  I've seen this on several multi-site domains now, but as an example let's use eBay.  On their sites, each site has an announcement board (use top right menu on home page - community - announcements) which details the localised news, promotions etc for that country.  On the announcement board they don't use divs, they use a plain old html table nesting system with ul and ol tags mixed up with paragraphs, td's and other stuff.  It's a mess and I can't for the life of me see how it'd be possible to extract the full announcement with either regex or dom parsing as there's no unique formatting id for any tr or td anywhere.  I'll play around with a few options to try it, but don't think it's going to work.

Re the image cache or hotlink - the WordPress plugin WP-o-matic has that - the plugin is old and appears abandoned by the author (it's GPL) and it might give you some clues - the caching works well, as does the feed collecting, but it has no keyword filtering, nor system to get full article as per this topic.

Gaz
Title: Re: RSS Feeder
Post by: GazOutEast on January 15, 2010, 10:17:42 PM
SD

Sorry if this is a painful question and asked before ...

I remember that in vbg's mod, the admin could set the collection frequency for each feed individually - so say that feed A was a high priority "must know about asap" feed, it could be set to 10 - 15 minute polling, but feed B only contained something once a week, then it could be set to a number of days between polling.  This helped reduced the load on the server (good for trigger-happy hosts).

Any chance something like that could be introduced?

Or maybe a way to batch-group the feeds, with each batch having different polling frequencies?  Even having say three groups would be useful (but would likely cause a lot of requests for more - LOL).

Gaz
Title: Re: RSS Feeder
Post by: SlammedDime on January 15, 2010, 10:57:22 PM
It's not possible at this point, but the feature is definitely doable.
Title: Re: RSS Feeder
Post by: GazOutEast on January 16, 2010, 01:11:14 AM
Many thanks - I'll not nag you about it ;) just ask that you ad it to your "round tooit" wish list

Gaz
Title: Re: RSS Feeder
Post by: SAFAD on January 16, 2010, 02:33:14 AM
Alright Guys I Will Really Appreciate Your Help
Title: Re: RSS Feeder
Post by: InfoStrides on January 25, 2010, 05:50:21 AM
Quote from: Spuds on January 12, 2010, 03:30:34 PM
@Satfreak
find:
// Format the post
         $message =
($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


replace with:

// Format the post
         $message =
$title . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' .  (!empty($feed['footer']) ? $feed['footer'] : '');


Hello,

How can edit the code to have it in the following format?

Body content

Source: news link (permalink)
Thanks.
Title: Re: RSS Feeder
Post by: dynaweb on January 25, 2010, 01:47:25 PM
I noticed that when using the "Retrieve Full Article" function, if the url of the article source has a question mark in it then it will not attempt to fetch the article text.  Anyone have any ideas how to fix that?
Title: Re: RSS Feeder Errors
Post by: InfoStrides on February 01, 2010, 01:22:16 AM
I got the following errors while using the mod: Please help!

[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs-Editor.php on line 164
[01-Feb-2010 05:00:19] PHP Notice:  Use of undefined constant WIRELESS - assumed 'WIRELESS' in /home/xxxxxxxx/public_html/Sources/Subs.php on line 873
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1191
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1206
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1207
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1445
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1447
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::absolutize_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15036
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_IRI::absolutize() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 9209
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::is_isegment_nz_nc() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 3836
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::array_unique() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 5670
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  server in /home/xxxxxxxx/public_html/Sources/Subs.php on line 3699
Title: Re: RSS Feeder
Post by: Buah on February 01, 2010, 07:06:28 AM
This feeder doesn't post.. I tried four different feeds and none of em works, so I think there's something wrong in this mod. No errors at error log.
Title: Re: RSS Feeder
Post by: Spuds on February 01, 2010, 11:14:29 AM
Quote from: infostrides on February 01, 2010, 01:22:16 AM
I got the following errors while using the mod: Please help!

[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::get_element() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15056
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs-Editor.php on line 164
[01-Feb-2010 05:00:19] PHP Notice:  Use of undefined constant WIRELESS - assumed 'WIRELESS' in /home/xxxxxxxx/public_html/Sources/Subs.php on line 873
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1191
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1206
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1207
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1445
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  browser in /home/xxxxxxxx/public_html/Sources/Subs.php on line 1447
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::absolutize_url() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 15036
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_IRI::absolutize() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 9209
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::is_isegment_nz_nc() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 3836
[01-Feb-2010 05:00:19] PHP Strict Standards:  Non-static method SimplePie_Misc::array_unique() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/Sources/Subs-Rss.php on line 5670
[01-Feb-2010 05:00:19] PHP Notice:  Undefined index:  server in /home/xxxxxxxx/public_html/Sources/Subs.php on line 3699

You really should turn off strict and notice warnings on a production site, as  those errors are really nothing to worry about.  If fact most don't have anything to do with the rss mod .. for example it does not even change Subs.php, so all those notices about subs.php are RC2 issues such as wireless, or perhaps issues from other mods you installed

The simplepie error logs are from the rss mod, those are strict errors which basically mean something like yeah that works as coded, but your not strictly following the language construct so in some future release of php it might break.  Its really intended to help developers see what might break in their code with future releases of the language.

my advice is unless you are developing programs turn off that level of error logging and move along, nothing to see here, keep moving
Title: Re: RSS Feeder
Post by: Spuds on February 01, 2010, 11:41:33 AM
Quote from: dynaweb on January 25, 2010, 01:47:25 PM
I noticed that when using the "Retrieve Full Article" function, if the url of the article source has a question mark in it then it will not attempt to fetch the article text.  Anyone have any ideas how to fix that?

Does it just get the short article or nothing at all?

I would think either that the url needs to be encoded so its not truncated somewhere (you could try just changing the ? to a %3F) or that the article you are pointing to does not have a permalink or that the permalink does not point at the full story.  The feeder basically trys to follow the link contained in an rss story to get at the full feed.
Title: Re: RSS Feeder
Post by: InfoStrides on February 02, 2010, 02:55:48 AM
QuoteYou really should turn off strict and notice warnings on a production site, as  those errors are really nothing to worry about.  If fact most don't have anything to do with the rss mod .. for example it does not even change Subs.php, so all those notices about subs.php are RC2 issues such as wireless, or perhaps issues from other mods you installed

The simplepie error logs are from the rss mod, those are strict errors which basically mean something like yeah that works as coded, but your not strictly following the language construct so in some future release of php it might break.  Its really intended to help developers see what might break in their code with future releases of the language.

my advice is unless you are developing programs turn off that level of error logging and move along, nothing to see here, keep moving

Thank you for your prompt response.

How can I turn off strict and notice warnings on a production site?

I only experienced this error whenever I enable RSS Feeder. Most especially during feed posting.

Regards,
Title: Re: RSS Feeder
Post by: SlammedDime on February 02, 2010, 05:46:27 AM
Your host will have to disable it for you, as it's set in the PHP.ini configuration file.
Title: Re: RSS Feeder
Post by: dynaweb on February 02, 2010, 12:42:42 PM
Anyone else experience the issue with the question mark in the URL?
Title: Re: RSS Feeder
Post by: tbk22 on February 07, 2010, 01:33:10 PM
I cant get this rss feed to work with the MOD

http://feeds.feedburner.com/SilkroadLatestNews (http://feeds.feedburner.com/SilkroadLatestNews)

What might be the problem?
Title: Re: RSS Feeder
Post by: SlammedDime on February 07, 2010, 01:54:08 PM
That's not an RSS feed... it's an HTML document.  You need an actual XML formatted RSS feed.
Title: Re: RSS Feeder
Post by: tbk22 on February 07, 2010, 01:56:40 PM
Quote from: SlammedDime on February 07, 2010, 01:54:08 PM
That's not an RSS feed... it's an HTML document.  You need an actual XML formatted RSS feed.

I know... But then what about this?

http://feeds.feedburner.com/SilkroadLatestNews?format=xml (http://feeds.feedburner.com/SilkroadLatestNews?format=xml)

Its on that page and its not working also with the mod
Title: Re: RSS Feeder
Post by: steve51184 on February 13, 2010, 03:54:27 AM
hey all i want to edit what is posted and i know the bit i need to edit is in ScheduledTasks.php but i'm not sure how to do it

// Format the post

$message =

($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '

' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]

' : '') . '

' . $body . '



' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '



' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


all i want is it to show to article and no links to the article or the date at the top etc

p.s. it's my blog s oi don't need to link back to it ;)
Title: Re: RSS Feeder
Post by: steve51184 on February 13, 2010, 04:33:14 AM
right i have it down to this but i can't get the date out without causing errors:

// Format the post
$message =
($item->get_date() !== null ? '' : '')
(. '' . $body . '' . )
(!empty($feed['footer']) ? $feed['footer'] : '');
Title: Re: RSS Feeder
Post by: InfoStrides on February 13, 2010, 08:52:07 AM
Quote from: ppbz on February 13, 2010, 04:33:14 AM
right i have it down to this but i can't get the date out without causing errors:

// Format the post
$message =
($item->get_date() !== null ? '' : '')
(. '' . $body . '' . )
(!empty($feed['footer']) ? $feed['footer'] : '');


Good! Please can I have it so that it shows the link to the feed after the post rather than at the begin?

For instance:

Date:
Post:
Source: link to the post instead of the website.

Thank you.

Regards,
Title: Re: RSS Feeder
Post by: Spuds on February 13, 2010, 11:43:03 AM
First the warning ... COMPLETELY UNTESTED

To hopefully help with all the questions of how to I format the message this way to that way I've munged the code to make it easier for folks unfamiliar with php to make changes as they see fit. 

What this does is break the message into sections that should be more obvious what they are, you can then combine in the order, and what sections you do or don't want to show.

Again this was just typed in and has not been tested, primarily because I'm not going to use it and also because I'm lazy.

So find:
// Format the post
         $message =
($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


replace with:

// Format the post
// title of the rss topic with a link back to this specific item in the feed if avaialble
$message_linked_title = ($item->get_permalink() !== null) ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title;

// just the rss topic as a title, no link
$message_unlinked_title = $title;

// Your own text with a link back to the topic
$message_linked_mytext = ($item->get_permalink() !== null) ? '[url=' . $item->get_permalink() . ']' . 'Read More ...' . '[/url]' : '';

// the date of the feed item
$message_date = ($item->get_date() !== null) ? '[b]' . $item->get_date() . '[/b]' : '';

// the story
$message_body = $body;

// the source of the feed with a link back to it if available
$message_linked_source = (!empty($source)) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '' : '';

// the source of the feed with no link
$message_unlinked_source = (!empty($feed_title)) ? $feed_title : '');

// any footer from the rss admin area
$message_footer = (!empty($feed['footer']) ? $feed['footer'] : '');

// put it all together however you like, use some, all or none .... use "\n" to add a newline between items,
// use your own conscience if you remove credit to other peoples work :o
// some examples to help
//
// default
// $message = $message_linked_title . $message_date . "\n" . $message_body . "\n\n" . $message_linked_source . "\n" . $message_footer;
//
// credit but no links
// $message = $message_unlinked_title . $message_date . "\n" . $message_body . "\n\n" . $message_unlinked_source . "\n" . $message_footer;
//
// just a title and body
// $message = $message_unlinked_title . "\n" . $message_body;
//
// adding in some of your own text
// $message = $message_unlinked_title . "\n" . $message_body . "\n\n" . $message_linked_mytext;
//
// all mixed up
// $message = $message_unlinked_source . "\n" . $message_body . "\n\n" . $message_date . "\n" . $message_footer . "\n" . message_linked_title;
//
// Our post as we see fit.
$message = $message_linked_title . $message_date . "\n" . $message_body . "\n\n" . $message_linked_source . "\n" . $message_footer;




Title: Re: RSS Feeder
Post by: steve51184 on February 13, 2010, 12:31:51 PM
wow amazing post but just so you know it's $message and not $message_body

i used just

Quote$message = $body . "\n";

that gives me just the good stuff :)
Title: Re: RSS Feeder
Post by: Spuds on February 13, 2010, 01:41:02 PM
Quote from: zx71 on February 13, 2010, 12:31:51 PM
wow amazing post but just so you know it's $message and not $message_body

i used just

Quote$message = $body . "\n";

that gives me just the good stuff :)
Glad it helped ....

The idea is to form the $message with the various building blocks defined, for your case you would change the last line to be:

$message = $message_body . "\n"; 

but what you did has the same effect for your case.
Title: Re: RSS Feeder
Post by: steve51184 on February 13, 2010, 01:45:15 PM
also is there anyway to filter out posts i don't want? like lets say anything with the word "something here" won't get posted?

not sure if it can be done with 'rss feeder' but any other mod etc?
Title: Re: RSS Feeder
Post by: steve51184 on February 16, 2010, 10:07:35 AM
Quote from: Spuds on February 13, 2010, 01:41:02 PM
Quote from: zx71 on February 13, 2010, 12:31:51 PM
wow amazing post but just so you know it's $message and not $message_body

i used just

Quote$message = $body . "\n";

that gives me just the good stuff :)
Glad it helped ....

The idea is to form the $message with the various building blocks defined, for your case you would change the last line to be:

$message = $message_body . "\n"; 

but what you did has the same effect for your case.

right i'm having a problem with formatting on some feeds

i've tried this:

$message = $message_body . "\n";
or
$message = $body . "\n"; 


but my feeds should looks like this

Quoteline one
line two
line three

but they look like this when being posted

Quoteline oneline twoline three

also it only does it on some feeds
Title: Re: RSS Feeder
Post by: steve51184 on February 20, 2010, 08:17:39 AM
any help with my above post?
Title: Re: RSS Feeder
Post by: SoLoGHoST on February 23, 2010, 12:11:39 PM
Ok, I didn't follow all of your threads on this, but perhaps try 1 of these methods instead:

$message = $message_body . "<br />";
or
$message = $body . "<br />";


OR
$message = "<p>" . $message_body . "</p>";
or
$message = "<p>" . $body . "</p>";


OR
$message = "<div>" . $message_body . "</div>";
or
$message = "<div>" . $body . "</div>";


Perhaps 1 of those methods will work.  Good Luck.
Title: Re: RSS Feeder
Post by: imrich on March 09, 2010, 01:00:47 PM
Any update in the works for RC3 or should we just use 'simulate'?
Title: Re: RSS Feeder
Post by: More-to-life on March 10, 2010, 11:59:05 AM
Straight forward install on to RC3 & works fine
Title: Re: RSS Feeder
Post by: GreenMotion on March 10, 2010, 12:41:34 PM
It installs just fine as long as you tell SMF to emulate RC2. Otherwise you'll get a message stating it is incompatible.
Title: Re: RSS Feeder
Post by: More-to-life on March 10, 2010, 04:58:43 PM
Quote from: GreenMotion on March 10, 2010, 12:41:34 PM
It installs just fine as long as you tell SMF to emulate RC2. Otherwise you'll get a message stating it is incompatible.
Thats strange as my install was straight forward ah well
Title: Re: RSS Feeder
Post by: hartiberlin on March 10, 2010, 05:12:25 PM
I also had to set emulate mode for RC2.
Only then it installed on a fresh new domain with SMF 2.0RC3 / PortaMX 0.980
Title: Re: RSS Feeder
Post by: SlammedDime on March 10, 2010, 06:56:59 PM
I haven't had time to actually make updates to the mod, but I will at least make the package compatible with RC3
Title: Re: RSS Feeder
Post by: TheListener on March 14, 2010, 03:00:05 AM
Hi SD

As someone whom aint got a clue about RSS as a guess would I be right in saying this mod will add feeds to anywhere in the forum?

Title: Re: RSS Feeder
Post by: Sabre™ on March 14, 2010, 04:26:31 AM
That is correct Brack.
The feed(s) will be added to which ever board(s) you select in the AP.

@ SlammedDime
Is it possible to cancel the links from the feeds, and make them just plain text?
The link back to the site is shown in the source: section anyway.
eg. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam SIMPLE MACHINES FORUM (http://www.simplemachines.org/community/) nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam era.

So the SIMPLE MACHINES FORUM link would be text instead of a link.
Thanks for your time mate :)
Title: Re: RSS Feeder
Post by: TheListener on March 17, 2010, 02:15:19 AM
Following on from the previous post made.

How do you do it?

Title: Re: RSS Feeder
Post by: Walgermo on March 17, 2010, 04:07:29 PM
Hi

I am getting a lot of errors every time RSS Feeder fetches feeds, but it still works..

The error i get is:
Quote8192: Assigning the return value of new by reference is deprecated
/httpd.www/Sources/Subs-Rss.php
Line: 15009

And when i click on that file (/httpd.www/Sources/Subs-Rss.php) i get this

QuoteFatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10914559 bytes) in /customers/styrkeboka.com/styrkeboka.com/httpd.www/Sources/Subs.php on line 2585

is this common? is there some fix for this?

*I have attached the files in the description.
Title: Re: RSS Feeder
Post by: SlammedDime on March 18, 2010, 11:57:53 PM
Quote from: Brack1 on March 17, 2010, 02:15:19 AM
Following on from the previous post made.

How do you do it?


Do what, exactly?  Once you install the mod, you go to the Modifications settings area in your admin panel and choose the RSS Feeder option.  Once in the options for the mod, you can add a new feed, which will present you with all of the options for that feed, which includes what board to post to, what username to use, etc.

Walgermo - The first error is showing because for some reason, Deprecated errors are being thrown into your error log.  The Subs-Rss.php file is not mine, it is the SimplePie library, I wouldn't even being to know where to begin on debugging it, I've never looked at the library in enough detail other than making it work with this mod.  The second error seems unrelated to this mod.  That error is happening in the highlight_php_code function which this mod doesn't call.  that function is normally called when 'code' and 'php' bbcode tags are in a post and parsed.
Title: Re: RSS Feeder
Post by: TheListener on March 19, 2010, 12:49:47 AM
I have the feeds on my computers bookmark.

It is just not kknowing how to get them from there onto the forum.

I have filled in the modification settings.
Title: Re: RSS Feeder
Post by: akbora on March 23, 2010, 09:14:13 AM
Is this mod transphere the topics to our forum's board from the others forum (legal) ?
Title: Re: RSS Feeder
Post by: GreenMotion on March 24, 2010, 01:27:36 PM
RSS Feeder seems to automatically disable certain feeds after getting timeout errors. Is there any way to disable this?
Title: Re: RSS Feeder
Post by: derby on March 24, 2010, 02:05:46 PM
This is the code i got for my feedburner

<p style="margin-top:10px; margin-bottom:0; padding-bottom:0; text-align:center; line-height:0"><a target="_blank" href="http://feeds.feedburner.com/~r/derbhotjobs/SlmQ/~6/1"><img src="http://feeds.feedburner.com/derbhotjobs/SlmQ.1.gif" alt="DerbHotJobs" style="border:0"></a></p><p style="margin-top:5px; padding-top:0; font-size:x-small; text-align:center"><a href="http://feedburner.google.com/fb/a/headlineanimator/install?id=qla3r3clcopnjtp1hs09gegfc8&amp;w=1" onclick="window.open(this.href, 'haHowto', 'width=520,height=600,toolbar=no,address=no,resizable=yes,scrollbars'); return false" target="_blank">&uarr; Grab this Headline Animator</a></p>

how do i make it to show on signature how do i edit it and where do i edit
Title: Re: RSS Feeder
Post by: steve51184 on March 24, 2010, 06:15:21 PM
Quote from: GreenMotion on March 24, 2010, 01:27:36 PM
RSS Feeder seems to automatically disable certain feeds after getting timeout errors. Is there any way to disable this?

i'd also like to know this :)
Title: Re: RSS Feeder
Post by: steve51184 on March 24, 2010, 07:49:57 PM
Quote from: Spuds on March 24, 2010, 07:35:49 PM
Quote from: zx71 on March 24, 2010, 06:15:21 PM
Quote from: GreenMotion on March 24, 2010, 01:27:36 PM
RSS Feeder seems to automatically disable certain feeds after getting timeout errors. Is there any way to disable this?

i'd also like to know this :)

What error is in the error log?  is it fsocket timed out ?

damn i cleared my logs will need to wait till it does it again :\
Title: Re: RSS Feeder
Post by: Spuds on March 24, 2010, 11:22:26 PM
When it does post the error .... its easy to stop the mod from disabling a feed, but there are legit reasons to do so on certain occasions so we just want to tweak it so it does not do it on a recoverable (ie timeout) error.
Title: Re: RSS Feeder
Post by: steve51184 on March 25, 2010, 10:56:57 AM
here's the error:

QuotecURL error 6: name lookup timed out
Title: Re: RSS Feeder
Post by: SlammedDime on March 25, 2010, 08:58:36 PM
curl error 6 (http://www.google.com/search?hl=en&safe=off&q=cURL+error+6&aq=f&aqi=g10&aql=&oq=&gs_rfai=)

In a nutshell, means that something is wrong with your hosts DNS lookup system causing cURL to fail.
Title: Re: RSS Feeder
Post by: steve51184 on March 25, 2010, 09:04:52 PM
Quote from: SlammedDime on March 25, 2010, 08:58:36 PM
curl error 6 (http://www.google.com/search?hl=en&safe=off&q=cURL+error+6&aq=f&aqi=g10&aql=&oq=&gs_rfai=)

In a nutshell, means that something is wrong with your hosts DNS lookup system causing cURL to fail.

so this is a problem with 'name-resolution-lookup' how do i fix this?

also i've just got a new error:

(cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received)

p.s. i think this might just be a problem with slow feeds as some of them can take 10+ seconds sometime... is there a way to change the time out?
Title: Re: RSS Feeder
Post by: GreenMotion on March 25, 2010, 10:49:27 PM
In my case, I am getting timeout errors. The site I am pulling feeds from isn't always the fastest.

These are the errors I occasionally get that in turn cause the feeds to disable themselves:


(cURL error 28: connect() timed out!)



(cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received)


Perhaps it'd be a good idea to implement some code that will only disable a feed if it encounters the same problem XX durations in a row. Where XX is configurable?

I.e. If the feed (that runs from a scheduled task say every 90 minutes) encounters the same problems on 4 consecutive iterations. Then have it disable itself. If it encounters the timeout on a couple consecutive iterations, but not yet hits the maximum configured number; and the next iteration is successful, then the counter would obviously reset itself.

  GM
Title: Re: RSS Feeder
Post by: steve51184 on March 25, 2010, 10:51:03 PM
tbh i think it's best NOT to have it disable them at all...
Title: Re: RSS Feeder
Post by: SlammedDime on March 25, 2010, 11:46:00 PM
If you don't want it to disable them at all, feel free to modify the code in ScheduledTasks.php to do that... I won't be removing that code or part.

As for increasing the timeouts, I'll have to research a bit on that to see what SimplePie's capabilities are.

GreenMotion - that idea should be doable without much extra code... just an extra database column and some extra checking to see how many failed attempts.
Title: Re: RSS Feeder
Post by: GazOutEast on March 26, 2010, 12:28:30 AM
zx71 - I'd guess the problem with that, is that if you have a lot of feeds timing out, with a high frequency attempt to call them, then you could find yourself in a position of using excessive resources on a shared server, and your hosting account gets suspended by the hosting company - they would then insist that you disable or remove the script or mod causing the resource abuse.

I view the disablement as being a safety feature that keeps my site online.  More than once it has also made me go look at the source of the feed, only to discover they have given it a new address (e.g. changing domain name or feed supply script etc) - from those standpoints alone it is worth retaining the feed cancellation function.  I'm with SD on this, keep the disabling, it's useful if you "listen" to the fact it's trying to help you keep your feed list clean.

Gaz
Title: Re: RSS Feeder
Post by: steve51184 on March 26, 2010, 12:34:20 AM
Quote from: GazOutEast on March 26, 2010, 12:28:30 AM
zx71 - I'd guess the problem with that, is that if you have a lot of feeds timing out, with a high frequency attempt to call them, then you could find yourself in a position of using excessive resources on a shared server, and your hosting account gets suspended by the hosting company - they would then insist that you disable or remove the script or mod causing the resource abuse.

i own the server so no problems there ;)

Quote from: GazOutEast on March 26, 2010, 12:28:30 AM
I view the disablement as being a safety feature that keeps my site online.  More than once it has also made me go look at the source of the feed, only to discover they have given it a new address (e.g. changing domain name or feed supply script etc) - from those standpoints alone it is worth retaining the feed cancellation function.  I'm with SD on this, keep the disabling, it's useful if you "listen" to the fact it's trying to help you keep your feed list clean.

good point i guess but it means checking my feed list every few hours to constantly re-enable them :\
Title: Re: RSS Feeder
Post by: GazOutEast on March 26, 2010, 01:57:13 AM
If you own the server (i.e. the physical server, not a VPS) then why not configure an alerter to show a pop-up when the feed gets disabled - create a routine to capture a state change on the feed's database entry and either cause a popup or send an email to an admin address.  Then you don't need to physically check for the disabled feeds.
Title: Re: RSS Feeder
Post by: steve51184 on March 26, 2010, 09:48:18 AM
Quote from: GazOutEast on March 26, 2010, 01:57:13 AM
If you own the server (i.e. the physical server, not a VPS) then why not configure an alerter to show a pop-up when the feed gets disabled - create a routine to capture a state change on the feed's database entry and either cause a popup or send an email to an admin address.  Then you don't need to physically check for the disabled feeds.

own as in a data centre in another country :P
Title: Re: RSS Feeder
Post by: Spuds on March 26, 2010, 09:49:12 AM
You can increase the timeout that simplepie uses with the set_timeout(seconds) construct, I think it defaults to something like 10 seconds so setting it to 30 seconds should be enough time to make a connection.  In ScheduledTasks.php find:

$rss_data = new RSS_Feeder();

add after

$rss_data->set_timeout(30); // 30 seconds

and if that helps with the curl 28 error .... 

Title: Re: RSS Feeder
Post by: Chas Large on March 28, 2010, 05:30:34 AM
I regret I cannot get this mod to work.

It installs OK. I can enter the data required but on the list of feeds, the Enabled column is blank, no matter whether the enabled checkbox is checked or not. I have it checked on two feeds (tested with simple portal RSS block so I know they can come into the forum) but using this mod, no posts appear in the boards specified.

Could it be that I have Simple portal installed?

[EDIT]
I discovered that you have to initially run the scheduled task to make the first batch of posts appear. Still nothing in the enabled column in the list of feeds. Should there be?

[EDIT 2]
All is well and feeds are being brought in manually via scheduled tasks or via the task itself. Thanks for a great mod.
Title: Re: RSS Feeder
Post by: aw06 on March 29, 2010, 12:48:11 PM
Great mod, love it .. have a few errors thou, please advise how to fix

I'm using SMF 2.0 Rc3

Also, i want to pull full articles, can somebody explain the whole PCRE format thing, i don't quite get it  :-\
Title: Re: RSS Feeder
Post by: SlammedDime on March 30, 2010, 02:23:00 AM
Quote from: Chas Large on March 28, 2010, 05:30:34 AM
I regret I cannot get this mod to work.

It installs OK. I can enter the data required but on the list of feeds, the Enabled column is blank, no matter whether the enabled checkbox is checked or not. I have it checked on two feeds (tested with simple portal RSS block so I know they can come into the forum) but using this mod, no posts appear in the boards specified.

Could it be that I have Simple portal installed?

[EDIT]
I discovered that you have to initially run the scheduled task to make the first batch of posts appear. Still nothing in the enabled column in the list of feeds. Should there be?

[EDIT 2]
All is well and feeds are being brought in manually via scheduled tasks or via the task itself. Thanks for a great mod.
My guess is that you are using a custom theme other than default and didn't select the option when the mod installed to move the images installed with the mod to your custom theme directory... that's all you need to fix the issue with nothing in the enabled column.
Title: Re: RSS Feeder
Post by: SlammedDime on March 30, 2010, 02:24:28 AM
Quote from: aw06 on March 29, 2010, 12:48:11 PM
Great mod, love it .. have a few errors thou, please advise how to fix

I'm using SMF 2.0 Rc3

Also, i want to pull full articles, can somebody explain the whole PCRE format thing, i don't quite get it  :-\
There was a post a page or two back that had the fix in it (can't check right now, limited time)... basically boils down to a missing global variable... as for the Regex thing... all I can really suggest is to follow my tutorial linked in the first post.
Title: Re: RSS Feeder
Post by: Chas Large on March 30, 2010, 02:37:25 AM
Quote from: SlammedDime on March 30, 2010, 02:23:00 AM
Quote from: Chas Large on March 28, 2010, 05:30:34 AM
I regret I cannot get this mod to work.

It installs OK. I can enter the data required but on the list of feeds, the Enabled column is blank, no matter whether the enabled checkbox is checked or not. I have it checked on two feeds (tested with simple portal RSS block so I know they can come into the forum) but using this mod, no posts appear in the boards specified.

Could it be that I have Simple portal installed?

[EDIT]
I discovered that you have to initially run the scheduled task to make the first batch of posts appear. Still nothing in the enabled column in the list of feeds. Should there be?

[EDIT 2]
All is well and feeds are being brought in manually via scheduled tasks or via the task itself. Thanks for a great mod.
My guess is that you are using a custom theme other than default and didn't select the option when the mod installed to move the images installed with the mod to your custom theme directory... that's all you need to fix the issue with nothing in the enabled column.
Yup, that was the answer. Thanks. :)
Title: Re: RSS Feeder
Post by: aw06 on March 30, 2010, 06:28:00 AM
Quote from: GazOutEast on January 11, 2010, 12:48:53 PM
OK thanks - have done it

The topper now looks like this -



2127: /* RSS Feeder Settings */
function ModifyRSSFeedSettings()
{
global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;

loadTemplate('RSSFeeds');
$context['page_title'] = $txt['rss_feeder'];



Is that the location you meant?

Gaz

OK, i made the change listed above, will watch and track if error is gone...
Title: Re: RSS Feeder
Post by: aw06 on March 30, 2010, 09:24:42 PM
Still getting the errors, only thing it move from line 2135 to line 2138 ... any more fix ?
Title: Re: RSS Feeder
Post by: SlammedDime on March 31, 2010, 12:00:23 AM
exactly the same error?  What is on that line and what is the exact error?
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 12:28:28 AM
Quote from: SlammedDime on March 31, 2010, 12:00:23 AM
exactly the same error?  What is on that line and what is the exact error?

Error
http://xxxxxxxxx.net/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=8
8: Undefined variable: board
File: /home/xxxxx/public_html/forum/Sources/ManageSettings.php
Line: 2138


Line
'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,
Title: Re: RSS Feeder
Post by: PURETRUCK.com on March 31, 2010, 12:52:53 PM
Sorry of this has been covered already, (I couldn't find it).

My feeds are coming in with no images - is there something I need to be doing to enable images?

Thanks
Title: Re: RSS Feeder
Post by: PURETRUCK.com on March 31, 2010, 02:36:19 PM
I noticed I wasn't getting any updates even though I set the scheduled task for every hour, so I tried to go in and do a run now.

I received this error:

Fatal error: scheduled_update_feedbots(): Failed opening required '/home/content/p/u/r/.../html/forums/Sources/Subs-RSS2.php' (include_path='.:/usr/local/lib/php') in /home/content/p/u/r/.../html/forums/Sources/ScheduledTasks.php  on line 1672
Title: Re: RSS Feeder
Post by: SlammedDime on March 31, 2010, 03:04:38 PM
This mod does not have that file or function... I think that is from vbgamer's RSS Feed Poster mod.
Title: Re: RSS Feeder
Post by: PURETRUCK.com on March 31, 2010, 03:14:12 PM
Crap. My appologies.
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 03:19:26 PM
Quote from: SlammedDime on March 31, 2010, 03:04:38 PM
This mod does not have that file or function... I think that is from vbgamer's RSS Feed Poster mod.

Any fix for my last issue ?
Title: Re: RSS Feeder
Post by: SlammedDime on March 31, 2010, 03:28:45 PM
aw06... can you post the ManageSettings.php file?  I can't see why that error is still coming up.
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 04:23:04 PM
attached
Title: Re: RSS Feeder
Post by: SlammedDime on March 31, 2010, 04:31:32 PM
The global line is incorrect...

   global $context, $txt, $sourcedir, $scripturl, $smcFunc; $board;

should be

   global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 04:47:30 PM
Wow.. any idea how that happened ?

Made changes, will update if the error is still present after feeds come in
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 05:12:39 PM
Error now on line 2186

::)
Code (Line 2189) Select
$context['icon_url'] = $settings[file_exists($settings['theme_dir'] . '/images/post/' . $context['icon'] . '.gif') ? 'images_url' : 'default_images_url'] . '/post/' . $context['icon'] . '.gif';
Title: Re: RSS Feeder
Post by: aw06 on March 31, 2010, 05:15:43 PM
Never mind, seems i removed a message icon i was point to ...
Title: Re: RSS Feeder
Post by: GohighVoltage on April 02, 2010, 01:26:18 PM
The file regex.php,  does this need to be installed?  Or is it already installed when you install the mod?
Title: Re: RSS Feeder
Post by: GohighVoltage on April 02, 2010, 01:36:58 PM
In the modifications settings screen,  none of the feeds are updating
"Posts".   My one feed has over 25 posts, and it still shows 10.

Any ideas?
Title: Re: RSS Feeder
Post by: SlammedDime on April 02, 2010, 05:01:20 PM
regex.php is nothing more than a standalone tool to test your regular expression vs content; nothing more.

As for the count not increasing... If it's posting, just not increasing the number, it's not too big of a worry... I have never had this issue myself however... it's always incremented the count for me.
Title: Re: RSS Feeder
Post by: madfitz on April 05, 2010, 09:26:34 AM
Apologies if this has been asked before (I couldn't find it in this topic). The mod seems to work perfectly but my error log is filling up with this:

[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::change_encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 15046
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9517
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9518


Is there a way to stop this?

Thanks.
Title: Re: RSS Feeder
Post by: RagingHippieHost on April 10, 2010, 11:21:19 AM
What's the regular expression?
Title: Re: RSS Feeder
Post by: nvcnvn on April 10, 2010, 10:24:49 PM
I,m sr but......how can I run this MOD!? How to let it start to post!?
When I run:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 393216   bytes)
################# IFxed this error by editing php.nin
But I don't know why after I run it by checking "Run now" in  Scheduled  Tasks, nothings happen! No new post
http://ads.hocvui.net/index.php SMF 2 RC 3
Title: Re: RSS Feeder
Post by: Spuds on April 11, 2010, 09:21:57 PM
Quote from: LeaveLies4Liars on April 10, 2010, 11:21:19 AM
What's the regular expression?

You need to use regular expressions, aka regex, aka pcre ... in a attempt to retrieve a full RSS story and not just the snippet that is typically in the feed. 

SD posted a short tutorial here (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) that is a good start.
Title: Re: RSS Feeder
Post by: Spuds on April 11, 2010, 09:22:34 PM
Quote from: nvcnvn on April 10, 2010, 10:24:49 PM
I,m sr but......how can I run this MOD!? How to let it start to post!?
When I run:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 393216   bytes)
################# IFxed this error by editing php.nin
But I don't know why after I run it by checking "Run now" in  Scheduled  Tasks, nothings happen! No new post
http://ads.hocvui.net/index.php SMF 2 RC 3

Anything in your admin error logs?
Title: Re: RSS Feeder
Post by: nvcnvn on April 12, 2010, 01:22:51 AM
Quote from: Spuds on April 11, 2010, 09:22:34 PM
Quote from: nvcnvn on April 10, 2010, 10:24:49 PM
I,m sr but......how can I run this MOD!? How to let it start to post!?
When I run:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 393216   bytes)
################# IFxed this error by editing php.nin
But I don't know why after I run it by checking "Run now" in  Scheduled  Tasks, nothings happen! No new post
http://ads.hocvui.net/index.php SMF 2 RC 3

Anything in your admin error logs?
Thanks you! I know what was happened! Your MOD is the best!
Title: Re: RSS Feeder
Post by: madfitz on April 12, 2010, 02:15:32 PM
Quote from: madfitz on April 05, 2010, 09:26:34 AM
Apologies if this has been asked before (I couldn't find it in this topic). The mod seems to work perfectly but my error log is filling up with this:

[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::change_encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 15046
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9517
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9518


Is there a way to stop this?

Thanks.

Bumpy bumpy.
Title: Re: RSS Feeder
Post by: Spuds on April 12, 2010, 07:30:18 PM
Quote from: madfitz on April 12, 2010, 02:15:32 PM
Quote from: madfitz on April 05, 2010, 09:26:34 AM
Apologies if this has been asked before (I couldn't find it in this topic). The mod seems to work perfectly but my error log is filling up with this:

[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::change_encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 15046
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9517
[05-Apr-2010 05:51:38] PHP Strict Standards:  Non-static method SimplePie_Misc::encoding() should not be called statically, assuming $this from incompatible context in /home/.../Sources/Subs-Rss.php on line 9518


Is there a way to stop this?

Thanks.

Bumpy bumpy.

The 'error' is caused by an open source RSS reader that the mod uses (SimplePie) in this case. 

I don't know anything about the specific error, however unless you are developing code you should not have strict error reporting enabled.  Strict errors are PHP's way of letting you know that a function or construct may not be ideal for future use and may not be supported in some future release of the interpreter and will as you indicated fill up your log.

Each provider tends to have their own way of doing this, but in your php.ini file you should have a line like
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT to stop reporting this level of error
Title: Re: RSS Feeder
Post by: madfitz on April 13, 2010, 12:59:19 PM
Quote from: Spuds on April 12, 2010, 07:30:18 PM
The 'error' is caused by an open source RSS reader that the mod uses (SimplePie) in this case. 

I don't know anything about the specific error, however unless you are developing code you should not have strict error reporting enabled.  Strict errors are PHP's way of letting you know that a function or construct may not be ideal for future use and may not be supported in some future release of the interpreter and will as you indicated fill up your log.

Each provider tends to have their own way of doing this, but in your php.ini file you should have a line like
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT to stop reporting this level of error

Ah. So I can't do anything to stop it in that case (I don't have access to the php.ini file). Thanks for your answer though  ;)
Title: Re: RSS Feeder
Post by: Spuds on April 13, 2010, 03:25:45 PM
Quote from: madfitz on April 13, 2010, 12:59:19 PM
Ah. So I can't do anything to stop it in that case (I don't have access to the php.ini file). Thanks for your answer though  ;)

If you don't have access to the base ini file, or an ini file that is just for your directories, then you can add

error_reporting(error_reporting()&~E_STRICT);

just after the global statement line in the function scheduled_rss_feeder() section in the ScheduledTasks.php file in your sources directory.  I'm not positive this will work with E_STRICT errors due to where/when they are generated, but its worth a try.
Title: Re: RSS Feeder
Post by: madfitz on April 14, 2010, 09:37:51 AM
Thanks. I'll try it and let you know if it doesn't work.
Title: Re: RSS Feeder
Post by: madfitz on April 16, 2010, 07:17:37 AM
Quote from: Spuds on April 13, 2010, 03:25:45 PM
Quote from: madfitz on April 13, 2010, 12:59:19 PM
Ah. So I can't do anything to stop it in that case (I don't have access to the php.ini file). Thanks for your answer though  ;)

If you don't have access to the base ini file, or an ini file that is just for your directories, then you can add

error_reporting(error_reporting()&~E_STRICT);

just after the global statement line in the function scheduled_rss_feeder() section in the ScheduledTasks.php file in your sources directory.  I'm not positive this will work with E_STRICT errors due to where/when they are generated, but its worth a try.


Thank you, that works just fine!
Title: Re: RSS Feeder
Post by: Abdel on April 19, 2010, 06:32:57 AM
I have SMF 2.0 RC3 installed with RSS Feeder. Cron is executing board script every 5 minutes and there is "planed task" in SMF for RSS feeder to update topics also every 5 minutes.

The board is not beeing updated regullary though and therefore some of the newses are lost.

board: http://forum.osi.org.pl/index.php?board=3.0
rss feed: http://www.gpwinfostrefa.pl/palio/html.run?_Instance=cms_gpw.pap.pl&_PageID=20&_OID=138&_CheckSum=-560905180



Title: Re: RSS Feeder
Post by: Abdel on April 19, 2010, 07:05:30 AM
It is quite strange. The board is being updated but the posts are added not immediately after runing the task. I can see new posts in feed, run script manualy but nothing happenes. But after some times bot add's some posts to board.
Title: Re: RSS Feeder
Post by: aw06 on April 20, 2010, 12:19:07 AM
Why does sometime the rss feeds deactivate themselves ?
Title: Re: RSS Feeder
Post by: aw06 on April 22, 2010, 07:33:42 PM
Quote from: aw06 on April 20, 2010, 12:19:07 AM
Why does sometime the rss feeds deactivate themselves ?

Bump, having this problem with a particular rss feed :-[
Title: Re: RSS Feeder
Post by: roomeat on April 30, 2010, 10:30:55 PM
Hey guys.
I have this mod installed and it seemed to work OK.. for the first attempt but..
Now it's not posting any newsfeeds at all.
From the scheduled tasks log it looks as if it has been processed.. but nothing posted.

I am running SMF2.0 RC3 with the following mods:
* SMF2.0 RC3
* Custom theme created by stikkki from http://www.eotsdzine.com/themefactory/
* SimplePortal 2.3.2
* Aeva Media (NO.. it's not Avea lol)
* PM to New Members 1.2
* SMF4iPhone-Mod 1.0 as well as the SMF4iPhone Theme
* Twitter and Facebook Publisher mod 2.4
* Hide Topic Replies 1.5
* Team Page 3.5
* RSS Feeder 1.1.4
* SMF Arcade 2.5 RC1

Anyone able to throw some light on this issue??
Title: Re: RSS Feeder
Post by: nvcnvn on May 02, 2010, 11:52:30 PM
Can you help me to move the link at the top of post to the bottom of post!? near the copyright!?
Title: Re: RSS Feeder
Post by: MATTEK on May 03, 2010, 12:03:32 AM
Does anyone have a website I can check out that has this mod going full force?

RC3 please. PM the site if you want
Title: Re: RSS Feeder
Post by: aw06 on May 03, 2010, 12:46:05 AM
Check my site...
http://photojamaica.net

Look for any post with an RSS icon
Title: Re: RSS Feeder
Post by: Liam. on May 06, 2010, 03:24:15 PM
Thanks to SlammedDime for handing this mod over to me, even though he may still reclaim it ;)

Quote from: MATTEK on May 03, 2010, 12:03:32 AM
Does anyone have a website I can check out that has this mod going full force?

RC3 please. PM the site if you want

CombatFPS Forums (http://forums.combatfps.com/) also use this modification, you could look there aswell as aw06's site.

Also, if anyone has any feature requests for this modification, please go ahead and request! I will be adding a new feature for the next release.
Title: Re: RSS Feeder
Post by: GazOutEast on May 07, 2010, 01:41:01 AM
Yes, Spuds has some excellent ideas and fixes - I've been watching them with interest for months.  There's many of them I'd love to see implemented as core to the mod - especially the simpler full post retrieval system.

Gaz
Title: Re: RSS Feeder
Post by: Liam. on May 07, 2010, 02:59:13 AM
I've read over all of your suggestions Spud, and they're excellent, really. I'll try to include some of them in the next version, but I have also sent you a PM...
Title: Re: RSS Feeder
Post by: pkeffect on May 20, 2010, 02:59:44 PM
Is there any way to stop the feeds from being listed in the Recent Posts section of the board index ?
Title: Re: RSS Feeder
Post by: Liam. on May 20, 2010, 03:33:59 PM
Quote from: pkeffect on May 20, 2010, 02:59:44 PM
Is there any way to stop the feeds from being listed in the Recent Posts section of the board index ?

As the whole point of this modification is to throw an RSS Feed in as a regular post - I don't think so, however I will look into it a little later, no promises though.




Also, for all who are wondering, Spuds kindly sent his custom version to me a few weeks ago, and I have went through it - there are one or two things to fix, then I'll officially update it ;)
Title: Re: RSS Feeder
Post by: pkeffect on May 20, 2010, 03:37:09 PM
Rockin Liam. Thanks for the speedy reply and update. :)
Title: Re: RSS Feeder
Post by: Liam. on May 20, 2010, 04:21:59 PM
M'eh, just timing I got here 30 minutes later ;) (and 40 minutes later now :P)
Title: Re: RSS Feeder
Post by: tbk22 on May 29, 2010, 12:30:10 PM
Why all my feeds deactivate alone??

They post about 3 or 4 posts and then just deactivate automatically

COuld you look into this Liam?

Thanks
Title: Re: RSS Feeder
Post by: Liam. on May 29, 2010, 01:15:39 PM
Well this was used on CombatFPS.com and it worked fine - and I've done it myself and it doesn't seem to deactivate automatically - maybe something to do with your host setup?
Title: Re: RSS Feeder
Post by: SlammedDime on May 29, 2010, 03:07:56 PM
Check the error log on your forum... any time a feed is disabled, an error is thrown in the error log to let you know why...
Title: Re: RSS Feeder
Post by: Liam. on May 29, 2010, 04:33:41 PM
Or what SlammedDime said ^_^

I guess I should've known that :/
Title: Re: RSS Feeder
Post by: KirkhamsEbooks on June 04, 2010, 01:32:38 PM
I'm new to feeds using the latest smf rc3

I've enabled the rss and set it to get a feed from Yahoo Answers, but I'm not getting any posts from the feed

Any suggestions?

Rick
Title: Re: RSS Feeder
Post by: Liam. on June 04, 2010, 04:23:54 PM
Which feed exactly? What other mods have you got installed, and have you got any custom coding done? Did any errors occur upon installation of the mod?
Title: Re: RSS Feeder
Post by: KirkhamsEbooks on June 05, 2010, 02:11:03 PM
No errors on install

Just installed the forum so no other mods

Yahoo answers spreadsheet

http://answers.yahoo.com/rss/searchq;_ylt=AsRGCxrT_BlX097q6Kk8XFojzKIX;_ylv=3?p=spreadsheet

Have it set to 100, perhaps too much? Does it wait until 100 is available?

Using a profile with regular user rights so all the posts don't say admin

Rick
Title: Re: RSS Feeder
Post by: KirkhamsEbooks on June 05, 2010, 02:17:35 PM
Okay that was wierd

To make sure I copied the rss feed okay I pasted it back into the feeder. Now I have 50 posts. Could a space at the end or anything had made a difference?

Rick
Title: Re: RSS Feeder
Post by: SlammedDime on June 05, 2010, 05:44:38 PM
The don't run immediately when saved... they run and import when the scheduled task runs on your board (or manually if you go to the scheduled tasks panel and run it there)
Title: Re: RSS Feeder
Post by: KirkhamsEbooks on June 07, 2010, 05:02:09 AM
Timing must have been just right then again

I had 0  posts last night, went into modify, saved, then had 52 posts (requested max of 100). I think I read the default was about 6 hours, but perhaps that is dependent on the load of the feeds themselves? Still an interesting coincidence

Rick

Rick
Title: Re: RSS Feeder -- how to create several shedules
Post by: chacha on June 08, 2010, 05:16:53 PM
First of all Liam - thanks for your mod - it's actualy great !

I have a question.

I would like to have several shedules, means some feeds posted at different timings and not all at same time
is this possible ?  or can I just install this MOD several times ?

thanks for your help
Title: Re: RSS Feeder
Post by: Liam. on June 08, 2010, 05:40:35 PM
Quote from: chacha on June 08, 2010, 05:16:53 PM
First of all Liam - thanks for your mod - it's actualy great !

I have a question.

I would like to have several shedules, means some feeds posted at different timings and not all at same time
is this possible ?  or can I just install this MOD several times ?

thanks for your help

I haven't publically released anything for this mod yet - SlammedDime did it all, the thanks goes to him ;)

You can't install the mod several times, it'd create several errors, and at the moment there's no way to have separate feeds post at different times - sorry...
Title: Re: RSS Feeder
Post by: Divaksh on June 10, 2010, 10:29:14 AM
plz help me.

<p class="first" style="margin-top:0">Melbourne, June 10 (ANI): A leading neuroscientist has said that youths addicted to social networking sites are struggling to relate.</p><p>The fact that they have hundreds of friends on such sites leads to one questioning the type of relationship they have.</p><p>Baroness Susan Greenfield says more research is needed to establish a possible link between Facebook and a lack of empathy among the young.</p><p>&quot;If you are not rehearsing looking someone in the eye in three dimensions, but instead you have 900 friends on Facebook ... one does question what kind of relationship they might be having,&quot; the Courier Mail quoted her as telling the National Press Club in Canberra.</p><p>&quot;We are being complacent in the extreme if you just dismiss me as a whingeing, middle-aged Luddite,&quot; she stated.</p><p>The Professor of Pharmacology at Oxford University was more positive about the virtues of an ageing brain.</p><p>Finding a way to delay the onset of dementia by five years could also save Australian taxpayers 67.5 billion dollars over the next three decades, she said.</p><p>When it came to the young, Baroness Greenfield said, more research was needed to see if Internet usage was linked to attention deficit disorder (ADD).</p><p>&quot;Perhaps it's mandating a shorter attention span. I'm not saying it is but I'm saying, 'Wouldn't it be worth exploring?',&quot; she questioned.</p><p>The three-fold increase in Ritalin prescriptions - medication for ADD and ADHD - during the past decade in Britain could be a possible sign of a changing environment.</p><p>She suggested more research should be dedicated towards exploring what made computer software programs so addictive.</p><p>&quot;No one has actually written the question: 'What do we do with that time?',&quot; she said.</p><p>&quot;Do we just play computer games? That is a really important issue to address,&quot; she added.</p><p>Baroness Greenfield is touring Australia on behalf of the Australian Society for Medical Research. (ANI)</p>

I need Regular Expression of above code.
Title: Re: RSS Feeder
Post by: Liam. on June 10, 2010, 02:01:22 PM
I presume that's what's being posted into your forum topics from a feed?
Title: Re: RSS Feeder
Post by: Divaksh on June 10, 2010, 02:35:38 PM
feed url 1 http://in.news.yahoo.com/myyahoo/rss/technology-ani.xml

I tried hard to understand but....

plz tell me how to create Regular Expression.
Title: Re: RSS Feeder
Post by: SlammedDime on June 10, 2010, 03:32:16 PM
That one will be a bit tough... you can try this though...

~<div style="clear:both"></div>(.*?)<script~si
Title: Re: RSS Feeder
Post by: Divaksh on June 10, 2010, 03:34:12 PM
thanks a lot but how to make it? ? ?
Title: Re: RSS Feeder
Post by: jay.clark on June 13, 2010, 10:36:36 AM
Quote from: PURETRUCK.com on March 31, 2010, 12:52:53 PM
Sorry of this has been covered already, (I couldn't find it). My feeds are coming in with no images - is there something I need to be doing to enable images? Thanks

I am having a similar problem, have done searches, and checked the distribution for notes without any luck.

The Mod installed without any problems, and I found the admin area under:
Modifications Settings>RSS Feeder

I was able to install a couple of feeds and they seem to be working pretty well so far, however no images.

It appears that images are supposed to be a feature since 1.10, and there is a reference in one of the posts about turning off hotposts in images.

But I cannot discover where to make any settings for images, and at this point I am not 100% convinced this mod is supposed to import images.

Any help appreciated, thanks in advance

jayr
Title: Re: RSS Feeder
Post by: MATTEK on June 13, 2010, 02:06:18 PM
Is there a demonstration of this mod that I could see please?
Title: Re: RSS Feeder
Post by: Liam. on June 13, 2010, 06:02:50 PM
MATTEK, there's no direct demonstration needed since all you'd see is random posted topics... However, look around the last couple of pages of the thread and there are some.

AFAIK, the feeds are being posted in BBCode, and most blog images are embedded in HTML; so it may not work... I'll look further into that and include a BBC or HTML option in the next version; if needed.
Title: Re: RSS Feeder
Post by: jimmy6154 on June 15, 2010, 02:55:04 PM
is there anyway to wrap the body of the message in
[html] [/html]



type bbc code and then not convert it?
Title: Re: RSS Feeder
Post by: jay.clark on June 15, 2010, 03:37:35 PM
Still wondering if this mod is supposed to import images from the RSS feed or text only

jayr
Title: Re: RSS Feeder
Post by: Liam. on June 16, 2010, 01:07:50 PM
Thanks for that Spuds ;)
Title: Re: RSS Feeder
Post by: jay.clark on June 16, 2010, 04:10:18 PM
Quote from: Spuds on June 15, 2010, 08:13:28 PM
Really today its an RSS feed poster, moving it to the next level is an RSS Feed Scraper which is quite a bit more complicated!

Ok, Text only works ok for my application, text and pics would be better but am content to wait.

I use a tool for creating my RSS feeds, and it uses pure HTML for adding pictures, I assume in line with the standard, however I can see the headaches writing and testing code for all the different ways that the standard might permit for image inserts

Thanks for letting me know what the situation is

jayr
Title: Re: RSS Feeder
Post by: Liam. on June 16, 2010, 05:00:12 PM
Well, I know of some blogs that embed a hell of alot of weird things in their posts. For example; a regular blog I read has some things in their main CSS file that's loaded every time, but only used in one or two articles. How would it go about embedding it in those articles?

However, I'll have a look at getting basic HTML tags (what SMF defines...) to work, I'll have a look at that tomorrow.
Title: Re: RSS Feeder
Post by: GazOutEast on June 16, 2010, 06:19:09 PM
Liam - a few research pointers for you against the requests of earlier   posters ....
 
  Multiple schedules - this is available in   WordPress's WP-o-Matic feed posting plug-in - it also captures images   but obviously doesn't have the issue of converting the tags to bbcode,   however a basic substitution routine should do the trick on switching   < img > to [ img ] and so on.  This one also offers the choice of   leaving the image at the source and linking to it, or downloading it and   storing it in a cache (either in the database or in a folder with a   link to the cache folder in the database).  It's GPL and hasn't been   updated for about 18 months, therefore you should be able to "borrow"   ideas if not code from it.
 
  The SMF Feed Posting competition to   your / SDs mod also had multiple schedules built in when I last used it   in ..... errrr .... 2007/8(?) - I know I have the packages from back   then on HDD - if you can't get a copy of the older version from anywhere   for "research" give me a shout and I'll email one across to you.
 
  Now   the "this'll drive Liam nuts and make him want to dangle upside down   from lamp posts" comment - are you ready?  I'd need to do some forum   archive trawling to confirm this, but - I'm pretty sure this mod already   does pull in images ... if the feed is set up properly. 
 
  I'm   pretty darn sure that most of last year, when importing one particular   feed from the "official" PayPal blog onto one of my boards, that the mod   was pulling in the goofy corporate mug shots of the PayPal bloggers.    It didn't work with eBay news feeds because they wrap everything into   <td> tags and put months worth into one table with each post   having the same wrapper tags around them (and their feeds suck as they   truncate at 100 characters after title, which is usually in the middle   of the url to the goofy corporate mug shot, rather than in a piece of   real text).
 
  Another feed-posting script that does pull in images   (but again is using html to html) is the auto-newsletter builder within phpLinks  phpLIST   newsletter mailing script.  Again it's GNU/GPL so you might be able to   get some pointers from their code.  I suspect the easiest routing would   be to build the engine as html in / html out, but then pass the html out   through a tag replacer routine that switches < img > to [ img ]   tags   (as I said earlier).
 
  Feeds disabling themselves -
  - I've been   using this mod (and before it, the other one) for a few years "in   earnest" with a heavy import loading on it.  One of the most common   causes of feed self-disabling that I've seen (on both mods) is when the   feed has not had new posts added for some time.  I'm not sure if there's   a clock/calendar countdown for dormancy of the source, or if there's   one for X number of polling attempts, but it is certainly a common   factor amongst the feeds that always seem to self-disable (no new posts   for a long time).  It's almost as if the mod gets the hump with not   being given new content from a dormant source, and cuts it off.
 
  Another,   though less common, common cause is when the source changes the feed   source URL - especially prevalent on financial sector blogs for some   reason.  Also if you're using RSS imports to post product catalogues as   one post per product, the feed source have a habit of switching domain   structures around and knocking out the original source feed.  The only   solution is to go back to their site and re-acquire the feed URL.
 
  On   feed posting mods on other scripts, which are not as well behaved as   SMF and its two main feed poster mods, dormant feeds failing to   self-disable are floating high in the "probable cause" list of reasons   why server resources have been hammered from time to time by some of my   sites (the ones not hammering don't do RSS feed posting at all). 
   
  < soapbox >This is something I'd like to collect more data on   from other users - if their account gets suspended by their hosts for   resource abuse - what triggered it, can the hosts pinpoint the subscript   or subroutine, which element of the server was it (database,   DB-connection, page loading, data inbound or outbound) and similar info   from error logs. 
    Hosts nowadays are getting way too trigger happy on shared account   suspensions due to RSS errors as a means to sell VPS accounts, without   providing the info needed for full and accurate debugging of the site to   prevent re-occurence and avoid the need for VPS expense. If there's any   evidence tying a resource-abuse suspension to failed feeds, or   self-disabled feeds due to dormancy, then I'd like to hear about it.    Some source sites seem to treat feed URLs in much the same way as most   people treat supermarket plastic carrier bags - some reuse them, most   just throw them away and get another one.< /soapbox >
 
  Gaz
Title: Re: RSS Feeder
Post by: distante on June 19, 2010, 10:35:43 AM
There is some way to allow feeds to embed videos from youtube or vimeeo? or another type of embeds?

I can't find the way to do this, I even put HTML rights to the poster :-\
Title: Re: RSS Feeder
Post by: Liam. on June 20, 2010, 07:52:35 AM
Quote from: distante on June 19, 2010, 10:35:43 AM
There is some way to allow feeds to embed videos from youtube or vimeeo? or another type of embeds?

I can't find the way to do this, I even put HTML rights to the poster :-\

How are the videos being embedded, or attempting to be embedded? Also, have you tried a combination with AEVA?
Title: Re: RSS Feeder
Post by: distante on June 20, 2010, 11:01:44 AM
I saw that the problem is not the RSSfeeder but the feed it self.

RSS feeds from blogger don't have video or audio info :(
Title: Re: RSS Feeder
Post by: jcastellese on June 25, 2010, 08:09:55 AM
We're having a problem with our RSS Feed. We have about 35 feeds that we feed into our forums, but we're having a problem with one of them. I've checked the feed on three different RSS validators and it always checks out.

The log says "A Feed could not be found at http://www.monroenews.com/apps/pbcs.dll/section?CATEGORY=NEWS_RSS&omniture=0&MIME=XML" but if you follow the link, you'll see that the feed is infact there.

Does anyone have any ideas as to what might be causing this error?

EDIT: I also want to include that we're using the latest version of the mod 1.1.4 and our forum is SMF 2.0 RC3. like i said, we haven't had any problems with any of our other feeds. but the feed in question does validate and has worked in the past, so I'm having a pretty hard time finding what's causing the problem.
Title: Re: RSS Feeder
Post by: diamondred123 on June 27, 2010, 04:38:45 AM
whats the set time to add them?

is it like 2 days because i had to wait that long
Title: Re: RSS Feeder
Post by: Liam. on June 27, 2010, 06:49:21 AM
Quote from: jcastellese on June 25, 2010, 08:09:55 AM
We're having a problem with our RSS Feed. We have about 35 feeds that we feed into our forums, but we're having a problem with one of them. I've checked the feed on three different RSS validators and it always checks out.

The log says "A Feed could not be found at http://www.monroenews.com/apps/pbcs.dll/section?CATEGORY=NEWS_RSS&omniture=0&MIME=XML" but if you follow the link, you'll see that the feed is infact there.

Does anyone have any ideas as to what might be causing this error?

EDIT: I also want to include that we're using the latest version of the mod 1.1.4 and our forum is SMF 2.0 RC3. like i said, we haven't had any problems with any of our other feeds. but the feed in question does validate and has worked in the past, so I'm having a pretty hard time finding what's causing the problem.

How strange, I've checked out the feed and it does indeed work and validate, very weird. Not sure where to go with that, but I'll definitely have a peek around at their other feeds myself and check if they work, but I have no direct idea where to go with this...
Title: Re: RSS Feeder
Post by: rd on June 27, 2010, 07:41:44 AM
Could it be that monroenews blocked the RSS bot or something?
Title: Re: RSS Feeder
Post by: jcastellese on June 28, 2010, 11:05:31 AM
thanks for the responses. yeah it's been giving us a pretty hard time for sure!

I hadn't even though about our host blocking RSS bots. I'm putting in a support request to see if they've made any changes that might have caused this.

To follow up, we have it checking about every 5 minutes. This is pretty frequent, but we have about 35 feeds coming into the site, and people want to see their stuff instantly coming up..

Also, here are the links to our other feeds from monroenews.com..
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=NEWS_RSS&omniture=0&MIME=XML
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=SPORTS_RSS&omniture=0&MIME=XML
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=OBITS_RSS&omniture=0&MIME=XML

If you guys do come up with any ideas still I'd love to hear them still in case it turns out to be something else.

If i find the problem any time soon, I'll be sure to post it up here too in case anyone else ever runs into this as well.
Title: Re: RSS Feeder
Post by: Liam. on June 30, 2010, 04:17:25 PM
I don't think it'd be the issue that Royalduke suggested; if other XML feeds from that site are working on your site, it wouldn't make sense for a single one to be broken. However, it's possible and you should ask the feed owners aswell as your host, to check if anything is wrong... Very odd though.
Title: Keyword question Re: RSS Feeder
Post by: KirkhamsEbooks on July 01, 2010, 02:08:40 AM
If I add several comma deliminated keyword phrases, does the feed look for all of them to be in the article or just one of they keywords and the article is posted?

Rick
Title: Re: RSS Feeder
Post by: Giulio92 on July 08, 2010, 05:11:26 AM
I was wondering if you could ensure that certain feeds were sent by mail to members of a particular user group.

Is this possible?
I wondered swe could not be set in the profile option to receive (via feed name) which feeds get and what not.

Thanks
Title: Re: RSS Feeder
Post by: Liam. on July 12, 2010, 11:23:19 AM
Quote from: Giulio92 on July 08, 2010, 05:11:26 AM
I was wondering if you could ensure that certain feeds were sent by mail to members of a particular user group.

Is this possible?
I wondered swe could not be set in the profile option to receive (via feed name) which feeds get and what not.

Thanks

That should just be done via the notification settings since the feeds are actually just posted. You would probably have to make another mod request to get something for one membergroup to get specific notices though...
Title: Re: RSS Feeder
Post by: arxh on July 21, 2010, 07:10:14 AM
HEY.
i thought this will make my forum look fuller.
i subscriped to rss from another forum.
but it posts only topics not replies.......... all my topics that this mod made have 0 replies.
and also all the topics will be posted by a single username
any solutions
Title: Re: RSS Feeder
Post by: SlammedDime on July 21, 2010, 06:27:46 PM
Quote from: arxh on July 21, 2010, 07:10:14 AM
...snip...
any solutions
Get some *real* content and members on your forum.
Title: Re: RSS Feeder
Post by: steve51184 on July 22, 2010, 11:15:36 AM
hi there i'm trying to use a feed but it's not working here's the feed/error in the error log:

QuoteRSS Feeder: http://www.sickipedia.org/feeds/?1262748024.xml (XML error: XML_ERR_NAME_REQUIRED at line 346, column 57)
Title: Re: RSS Feeder
Post by: Galaxy Computers on July 23, 2010, 04:21:37 PM
I am wondering this is a real feed from this site. Can someone tell me if it is or not:

http://www.symantec.com/xml/rss/listings.jsp?lid=latestthreats30days

Title: Re: RSS Feeder
Post by: oOo--STAR--oOo on August 02, 2010, 12:05:52 PM
Wow fantastic mod.. Installed and works straight out the box.. So simple.
I added a URL and it grabbed the FULL feed with Images..

Amazing.

Thanks for this very nice mod.
Title: Re: RSS Feeder
Post by: supercarp on August 14, 2010, 08:41:41 PM
hi there.

I cannot, for the life of me figure out why one of these feeds is posted fine by the mod and the other is seemingly ignored.  no errors, nothing.

The working feed: http://www.estiah.com/rss/guild/shoutbox/index/user/28961/cypher/613a19201c078b6653003909001edb72 (http://www.estiah.com/rss/guild/shoutbox/index/user/28961/cypher/613a19201c078b6653003909001edb72)
The not-so-working feed: http://www.estiah.com/rss/guild/log/recent/user/28961/cypher/613a19201c078b6653003909001edb72
(http://www.estiah.com/rss/guild/log/recent/user/28961/cypher/613a19201c078b6653003909001edb72)

Any ideas?
Title: Re: RSS Feeder
Post by: yakyakyak on August 15, 2010, 12:53:14 AM
An admin panel flag "mark all feed posts as read" would be nice

;)
Title: Re: RSS Feeder
Post by: SlammedDime on August 15, 2010, 01:53:46 AM
Any option like that is not easily feasible due to the way that SMF stores whether or not a user has read a post/topic.  You would literally need to insert one row for each member, per item, per feed, into the log_read table to accomplish the task.  The database overhead isn't worth it.  If you had 10,000 members, and 10 feeds are being imported each with 10 items, you'd be adding 1 million rows to the table, EACH time the mod ran... if you have it set to update every 2 hours on a lively feed, you would kill your database in a day.
Title: Re: RSS Feeder
Post by: supercarp on August 16, 2010, 10:11:49 AM
Quote from: supercarp on August 14, 2010, 08:41:41 PM
hi there.

I cannot, for the life of me figure out why one of these feeds is posted fine by the mod and the other is seemingly ignored.  no errors, nothing.

The working feed: http://www.estiah.com/rss/guild/shoutbox/index/user/28961/cypher/613a19201c078b6653003909001edb72 (http://www.estiah.com/rss/guild/shoutbox/index/user/28961/cypher/613a19201c078b6653003909001edb72)
The not-so-working feed: http://www.estiah.com/rss/guild/log/recent/user/28961/cypher/613a19201c078b6653003909001edb72
(http://www.estiah.com/rss/guild/log/recent/user/28961/cypher/613a19201c078b6653003909001edb72)

Any ideas?

Anyone able to provide any insight on this?

Thanks,
--sc
Title: Re: RSS Feeder
Post by: supercarp on August 17, 2010, 12:23:12 AM
So I've done some troubleshooting on my own - to no avail.  There's no errors returned when the feed is parsed (or is it even?).  I've even gone so far as to pipe the feed through feedburner and selected 'maximum compatibility' to eliminate any formatting errors in the feed.

Still, no dice.  Nothing is ever posted from the feed, and I'm showing a count of 0 posts in the admin config.

The feedburner link is:  feeds.feedburner.com/estiah-ahevents

Can anyone point me in the right direction with this?

Thanks,

--sc
Title: Re: RSS Feeder
Post by: wjhdiz on August 21, 2010, 11:28:35 AM
I have a new installation of SMF2.0 RC3. Installed this mod and configured RSS Feeder through:

configuration->modifications->RSS Feeder.

Nothing comes out. For example, this url: http://rss.sciam.com/ScientificAmerican-News

I get perfect feed through www.feed2js.org  (http://www.feed2js.org), but it does not work with RSS Feeder.

Any suggestions are greatly appreciated.

Thanks.
Title: Re: RSS Feeder
Post by: Satfreak on August 23, 2010, 02:42:58 AM
I have SMF 2.0 RC2 and in past I have installed RSS Feeder 1.1.3,and I wase delete that mod,

now I wish to install again that mod,but I cant find RSS Feeder 1.1.3,as new 1.1.4 is not compatibily

with 2.0RC2,and I need to stay on that version of SMF,I cant find that RSS Feeder 1.1.3 wich is

compatibily with 2.0RC2,please help me.
Title: Re: RSS Feeder
Post by: Satfreak on August 24, 2010, 10:56:55 AM
Please can anybody upload  that files, :-\

Tnx,.
Title: Re: RSS Feeder
Post by: supercarp on August 25, 2010, 09:57:13 PM
Wow. Seriously? Nobody is going to offer any input on this?

The mod is not doing what it's supposed to do on an error-free feed, and apparently I'm not the only one having this issue.
Title: Re: RSS Feeder
Post by: akbora on August 26, 2010, 06:04:37 AM
I installed perfectly but it didn't open topic or post? Where is the problem?
Title: Re: RSS Feeder
Post by: SlammedDime on August 26, 2010, 07:16:11 AM
Quote from: supercarp on August 25, 2010, 09:57:13 PM
Wow. Seriously? Nobody is going to offer any input on this?

The mod is not doing what it's supposed to do on an error-free feed, and apparently I'm not the only one having this issue.
It's been a while since I looked at my own code, but I'm willing to bet it's because your 'error-free' feed doesn't have any content in the 'description' tag, so the mod ignores it.  If there is no description or content, why post it?  In comparison, the other link you provided does have content in the description tag.
Title: Re: RSS Feeder
Post by: akbora on August 27, 2010, 07:40:05 PM
Quote from: akbora on August 26, 2010, 06:04:37 AM
I installed perfectly but it didn't open topic or post? Where is the problem?
I can't get the post or topic from rss.. Please help me... Thanks
Title: Re: RSS Feeder
Post by: SlammedDime on August 27, 2010, 07:46:29 PM
What RSS feed are you using?
Title: Re: RSS Feeder
Post by: akbora on August 27, 2010, 07:48:30 PM
Sorry rss link your are answering?
Title: Re: RSS Feeder
Post by: SlammedDime on August 27, 2010, 11:47:27 PM
What feed are you trying to use to create posts?  Do you understand the purpose of this modification?
Title: Re: RSS Feeder
Post by: supercarp on August 29, 2010, 08:29:20 PM
Quote from: SlammedDime on August 26, 2010, 07:16:11 AM
Quote from: supercarp on August 25, 2010, 09:57:13 PM
Wow. Seriously? Nobody is going to offer any input on this?

The mod is not doing what it's supposed to do on an error-free feed, and apparently I'm not the only one having this issue.
It's been a while since I looked at my own code, but I'm willing to bet it's because your 'error-free' feed doesn't have any content in the 'description' tag, so the mod ignores it.  If there is no description or content, why post it?  In comparison, the other link you provided does have content in the description tag.

There's enough info in the feed that I'd like to be able to have it posted, regardless of what's inside the description tag.

I will, however, see if I can't get the person who publishes the feed to populate the description tag so I don't have to try and succeed at breaking something.

Thanks again.
Title: Re: RSS Feeder
Post by: GazOutEast on August 29, 2010, 10:01:16 PM
Quote from: supercarp on August 29, 2010, 08:29:20 PM
Quote from: SlammedDime on August 26, 2010, 07:16:11 AM
Quote from: supercarp on August 25, 2010, 09:57:13 PM
Wow. Seriously? Nobody is going to offer any input on this?

The mod is not doing what it's supposed to do on an error-free feed, and apparently I'm not the only one having this issue.
It's been a while since I looked at my own code, but I'm willing to bet it's because your 'error-free' feed doesn't have any content in the 'description' tag, so the mod ignores it.  If there is no description or content, why post it?  In comparison, the other link you provided does have content in the description tag.

There's enough info in the feed that I'd like to be able to have it posted, regardless of what's inside the description tag.

I will, however, see if I can't get the person who publishes the feed to populate the description tag so I don't have to try and succeed at breaking something.

Thanks again.

SC

As SlammedDime said - but also, browse to the feed page and look at the source on that page.
All the description fields contain -

<description><![CDATA[]]></description>


That's it - just the dynamic data script starter / call - problem with that is that the script call has no source info for when it is run remotely (such as in a feed reader) therefore it doesn't know where to look to get the content.

Additionally - if you look at the source URL, it is a live feed for and from a MMORPG - my betting is that you actually have to view it from within the RPG itself to view the data from the script - this is likely to stop server leeching and programmed deliberately by the game's authors.

Looking at the titles of the feed contents, if that's all you want to post - be prepared for a heavy demotion in page rank by Search Engines - those titles are duplicate content slap magnets.

Your choice as webmaster of course, but I wouldn't even have tried to get the URL for a feed with that type of content.

Gaz
Title: Re: RSS Feeder
Post by: supercarp on August 30, 2010, 03:16:39 PM
yeah, the stuff from that feed is going into a very private, locked-down part of the forum, so it'd never be seen by a search engine.  It's purely informational.
Title: Re: RSS Feeder
Post by: atdev on August 31, 2010, 09:40:09 PM
I can't seem to install this mod. I placed the newest release  .ZIP in the "packages" folder through FTP, and it shows up, but without an "install" link.

   Mod Name   Version   
1.   RSS Feeder    1.1.4          [ List Files ] [ Delete ]

is all I see.


Any help would be greatly appreciated.
Title: Re: RSS Feeder
Post by: SlammedDime on August 31, 2010, 09:45:36 PM
Are you using 2.0 RC3?
Title: Re: RSS Feeder
Post by: atdev on August 31, 2010, 10:07:12 PM
Quote from: SlammedDime on August 31, 2010, 09:45:36 PM
Are you using 2.0 RC3?

No. SMF 1.1.10
Title: Re: RSS Feeder
Post by: Galaxy Computers on August 31, 2010, 10:19:43 PM
Can someone tell me if this is an actual feed from Symantec's Website?
If it is how can put it in the RSS feeder on the forum?


http://www.symantec.com/xml/rss/listings.jsp?lid=latestthreats30days
Title: Re: RSS Feeder
Post by: SlammedDime on September 01, 2010, 12:10:34 AM
Quote from: atdev on August 31, 2010, 10:07:12 PM
Quote from: SlammedDime on August 31, 2010, 09:45:36 PM
Are you using 2.0 RC3?

No. SMF 1.1.10
There-in lies the issue... this mod is for 2.0RC3 only.

Quote from: mtechama on August 31, 2010, 10:19:43 PM
Can someone tell me if this is an actual feed from Symantec's Website?
If it is how can put it in the RSS feeder on the forum?


http://www.symantec.com/xml/rss/listings.jsp?lid=latestthreats30days

Yes it is... you add it like you add any other.
Title: Re: RSS Feeder
Post by: atdev on September 01, 2010, 08:53:55 AM
Quote from: SlammedDime on September 01, 2010, 12:10:34 AM
Quote from: atdev on August 31, 2010, 10:07:12 PM
Quote from: SlammedDime on August 31, 2010, 09:45:36 PM
Are you using 2.0 RC3?

No. SMF 1.1.10
There-in lies the issue... this mod is for 2.0RC3 only.


Now I feel like a n00b... Thanks!  ;D

I installed 2.0 rc3 (very easy +1 to the devs)
and wonder of wonders I now have an install link! However, I get this error:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL:

The following error was encountered:

Zero Sized Reply

Squid did not receive any data for this request.

EDIT:
Turns out I can't install other MODs either. :(
Title: Re: RSS Feeder
Post by: akbora on September 01, 2010, 01:30:19 PM
How can I take full page? Retrieve Full Article

I don't understand PCRE? Is there anyoıne knows this as practical? Thanks
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 05, 2010, 09:17:28 AM
The mod works flawlessly on my test site, however, I found something interesting I hope you can fix.

Click This: http://feeds.feedburner.com/NaughtyDog?format=xml
Find This (2nd down as of posting): What we're up to at PAX Prime

Then Click This: http://www.eojmarket.com/sigtest/index.php?topic=25.0

Now compare the feed with the post of the feed on my site, what do you see, rather don't you see ?

The picture, it didn't copy / migrate the picture from any of the NaughtyDog feeds. I think it may be because that the NaughtyDogg feed is Atom based or so I was told by someone else.

That said, this mod is copying feeds just fine as far as I can tell, images included from the following (below) feed so I'm guessing that it has to do with what someone said about the other feed (NaughtyDog) being Atom based as to why it's not doing pictures or something. Anyway, is this something you can look into / fix please ?

http://feeds.feedburner.com/PSBlog?format=xml

Edit: Also, would it be possible to add in a Last Fed field on the admin page where you see the following...

Enabled  Feed Title Feed URL Board Posts Modify

I think it would be nice to see when the last feed was posted for those who don't normally check feed boards but want to make sure it's still feeding.

Oh, and it doesnt seem to be posting videos or their links, I don't much care about the video actually embedding because I use AEVA but in order for that to work this mod would atleast have to post the video link(s).

Edit 2: Here's something else all be it minor, it doesnt seem to be copying the articles over as is in that its forgetting simple line breaks and stuff that should be bold.

Case in point: http://feeds.feedburner.com/PSBlog?format=xml
And on my site: http://www.eojmarket.com/sigtest/index.php?topic=12.0

What should be...

PlayStation 3
Spider-Man: Shattered Dimensions (http://spidermandimensions.marvel.com/) Blending together the many alternate universes of the world-famous webslinger with four unique take on Spider-Man's history in comics. Spider-Man attempts to retrieve a piece of a tablet that's been scattered across multiple parallel dimensions, and in doing so he crosses over to storylines famous to comic book aficionados as variant tellings of the Spider-Man mythology.

In coming out on my site...

PlayStation 3 Spider-Man: Shattered Dimensions (http://spidermandimensions.marvel.com/) Blending together the many alternate universes of the world-famous webslinger with four unique take on Spider-Man's history in comics. Spider-Man attempts to retrieve a piece of a tablet that's been scattered across multiple parallel dimensions, and in doing so he crosses over to storylines famous to comic book aficionados as variant tellings of the Spider-Man mythology.

Like I said it's minor things that most people wouldnt catch or care about but I really would love it if the transferred data could keep all original formatting from line breaks to new paragraphs, Thx. For the most part the mod seems to work flawlessy all be it missing some line breaks and stuff as well as not bolding what should be bolded sometimes.

Edit 3: It's also missing simple line breaks for other stuff to...

Like if something looks like below...


1. text here

2. text here

3. text here

More text here

It comes out like this...

1. text here
2. text here
3. text here
More text here

Edit 4: Aside from copying the source HTML from within the <content:encoded></content:encoded> tags for non Atom based feeds and <content type="html"></content> for Atom based feeds I cant think of any other way to copy the article to display as it does on the blog pages which is what I really want as does alot of other people I'd imagine. Even so there would still be minor display errors with stuff like below...

What&#8217;s that you say?

It prints the &#8217; instead of making it look like this...

What's that you say?

This is a great mod but I would really love it if the article would display on my site as it does on the blog, I'm assuming whatever the reason it's not now has to do with all of the HTML to BBC conversions.

If anything, would you consider atleast adding a do no strip HTML option to this mod so the mod would post the unedited version it grabs ?

So basically when this option is ticked it would put the entire post inside of BBC HTML tags. The only thing to note would be to make sure the mod is posting as an admin or that in addition to this mod the site owner uses the following mod and provides the appropriate permissions for the use of the tag.

http://custom.simplemachines.org/mods/index.php?mod=411

As for stripping the videos, just make a note that all someone needs to do for thise to show is to use the AEVA mod.

Either way I would really love it if articles werent being butchured to have HTML stripped and replaced with BBC which is throwing off alot of text alignment / placement.

Also lets for a minute assume that Retrieve Full Article does just that, grabs the article and prints it to near perfect quality as seen on the blogs, it would be really cool if you dove a little deeper into that instead of attaching the following note which most people have no clue to even come close to understanding.

Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]).

Edit 5: I also just noticed that it grabs more data for some feeds than it does for others. This really is a great mod but parts of it just seem really flaky at times.

I'd have to say my biggest thing about all this is the stipping all of the HTML and converting it to BBC, if the reason for this is because of people having issues with the HTML tag thats easy enough to get around with the permissions mod I linked.

Lastly, as I understand them schedualed tasks only run when someones visiting the site as in theyre not automated. With that said, would it be possible to by pass schedualed tasks for this mod and run them as a cron job so regardless of wether or not someones visiting the site the feeds are always harvested and then posted ?
Title: Re: RSS Feeder
Post by: Akyhne on September 07, 2010, 12:54:45 PM
Suddently got this error message:

http://www.xxx.com/index.php?action=admin;area=scheduledtasks
RSS Feeder: http://uk.playstation.com/rss/news/en_GB/ (fsocket timed out)

Unfortunately, it disables the feed to http://uk.playstation.com. Pretty annoying.
Whenever I enable the feed again, it will be disabled on next attempt.
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 08, 2010, 07:26:20 PM
Almsot all hosts I've ever seen allow cURL, try using that and see if it keeps happening.
Title: Re: RSS Feeder
Post by: Akyhne on September 08, 2010, 07:32:09 PM
How?
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 08, 2010, 07:59:43 PM
Quote from: Akyhne on September 08, 2010, 07:32:09 PM
How?
Sorry, was thinking of another mod which allows you to switch gather methods...

and note to mod author... getting alot of stuff like this in an error_log file. 333 lines per hit which is every 30 mins since thats what my scheduals set for.

Also, don't forget to reaply my 3rd reply counting this as the first.

[07-Sep-2010 16:31:26] PHP Strict Standards:  Non-static method SimplePie_Misc::absolutize_url() should not be called statically, assuming $this from incompatible context in /home/.../public_html/sigtest/Sources/Subs-Rss.php on line 15074
[07-Sep-2010 16:31:26] PHP Strict Standards:  Non-static method SimplePie_IRI::absolutize() should not be called statically, assuming $this from incompatible context in /home/.../public_html/sigtest/Sources/Subs-Rss.php on line 9209
[07-Sep-2010 16:31:26] PHP Strict Standards:  Non-static method SimplePie_Misc::element_implode() should not be called statically, assuming $this from incompatible context in /home/.../public_html/sigtest/Sources/Subs-Rss.php on line 15075
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 10, 2010, 07:10:26 PM
Bumping for the errors and this (http://www.simplemachines.org/community/index.php?topic=285356.msg2774165#msg2774165).
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 15, 2010, 10:28:31 PM
Liam said he won't be supporting this mod any more because of time constraints or something, he also said he was gonna be contacting the original author about picking this back up. With that said I hope someone does something soon... but ya, just letting anyone who cares about this mod know whats up.
Title: Re: RSS Feeder
Post by: SlammedDime on September 16, 2010, 02:23:48 AM
You can disable the errors from showing up by altering the error_reporting line near the top of SMF's index.php to exclude E_STRICT messages (~E_STRICT).

As for about how the feed is parsed into a topic... the purpose of the mod was never to grab a fully detailed feed with images, links, videos or other types of rich content.  I originally designed the mod for use on simplistic RSS feeds that normally only contained simple descriptions and maybe a few images here and there with links to the full article, as that is what my needs were at the time.  Retrieving a full article will behave in the same manner, chopping out all of the gory mess.  I would never feed this as raw html into the database due to the numerous security risks in doing so (I know I could take the time to sanitize the data, but honestly, I don't have the time nor need to do it).  Converting to BBC is the safest and easiest thing to do at this point in time.

The 'Full Article' option is meant for people that know what they're doing... I have an example linked in the first post that covers the majority of feeds and situations...  I would love to implement a DOM based tool that perhaps used XPath to grab the data, but again, I don't have the time nor need.

For CRON and Scheduled Tasks... sure it's possible, a simple script could be written that includes SSI.php and then called using wget via a CRON job to run the script.  Would really only need to be a 4 line script...

Code (rssfeeder_cron.php) Select
<?php
require_once('SSI.php');
require_once(
$sourcedir '/ScheduledTasks.php');
scheduled_rss_feeder();


Then setup your cron to call wget http://mydomain.com/forum/rssfeeder_cron.php
Title: Re: RSS Feeder
Post by: MoreBloodWine on September 16, 2010, 11:00:43 AM
Well, least the cron thing seems to be out of the way with your solution because now the feeds should post regardless of wether or not anyone is visiting the site but does the task need to stay enabled for that 4 lie file to work or can it be disbled ? I'm guessing it needs to stay enabled since it "tags" the task file.

As for the errors, what would even be causing those anyway and woudlnt disabling that line affect other things when they decide to error ?

Oh, and as for using that code stuff to grab full article, I looked at it and maybe understoood 2% of it and even modifying your "example" to suit my needs didnt seem to work. I really like this mod but I would like it if certain things were looked at / address for people having issues / want proper text formatting and alignment.

Come to think of it, would you for arguments sake consider a paid gig to modify this mod to suit my personal needs, likes / dislikes since you don't seem to want to do anything to the free public version for lack of a better name for it ?
Title: Re: RSS Feeder
Post by: Spoogs on September 16, 2010, 11:29:55 AM
I'm also willing to contribute to a more advanced version of this mod.

Fact is when a mod is developed with features for those who know what they are doing those of us who dont get left out. I too barely understood 2% of how to get the full articles (sure its simple fr those who get it but i just dont)

I use this mod for the sole purpose of discussing certain things on my site. I use to go to the necessary sites and copy the articles then post them with a link to the original article and source. I was hoping this mod would have helped to eliminate doing that over an over. I dont want my users to have to leave my site to go else where to read the info then come back to discuss it (thats a bit redundant).
Title: Re: RSS Feeder
Post by: thatjustit on September 16, 2010, 05:44:07 PM
Hello,
this mod is really amazing, but I'd like to ask how to edit two things there. So, I have got posted topic, but there's date in English format, I want to remove that date from all next posts, how to do it? And two, there are two links to source website. First is to article and the second is to homepage. I'd like to change that second one to (for example): Source: http://www.website.com How can I make it?
Regards,
Title: Re: RSS Feeder
Post by: rhack382 on September 18, 2010, 12:11:20 PM
Quote from: jcastellese on June 28, 2010, 11:05:31 AM
thanks for the responses. yeah it's been giving us a pretty hard time for sure!

I hadn't even though about our host blocking RSS bots. I'm putting in a support request to see if they've made any changes that might have caused this.

To follow up, we have it checking about every 5 minutes. This is pretty frequent, but we have about 35 feeds coming into the site, and people want to see their stuff instantly coming up..

Also, here are the links to our other feeds from monroenews.com..
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=NEWS_RSS&omniture=0&MIME=XML
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=SPORTS_RSS&omniture=0&MIME=XML
http://monroenews.com/apps/pbcs.dll/section?CATEGORY=OBITS_RSS&omniture=0&MIME=XML

If you guys do come up with any ideas still I'd love to hear them still in case it turns out to be something else.

If i find the problem any time soon, I'll be sure to post it up here too in case anyone else ever runs into this as well.

Also having similar problem with:
http://www.autoweek.com/apps/pbcs.dll/section?category=rss01&mime=xml

pbcs.dll ??? is that the problem?
Title: Re: RSS Feeder
Post by: apashi on October 07, 2010, 12:39:28 PM
Hello,
I am using this mode: RSS Feeder 1.1.4 and the Cron Job doesn't work!
In order to work the post, I should delete the Feed and this the Job manually!
this is the RSS link:
http://www.astrodestin.ro/rss/zilnic.xml 

Am I doing something wrong?
Title: Problem with BBC error from Google News feed.
Post by: ehsizzup on October 15, 2010, 03:34:20 PM
Hello all,

I'm having trouble with correcting posting any feeds from Google News using RSS Feeder.......

The feed contains several spots with negative font sizes [size=-1] which causes BBC code to show up in the topic.  See below...

[url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHr4BR3LTjP4EGXNG5C1RtzH7EoyQ&url=http://www.wyattresearch.com/article/what-will-bernanke-do-to-gold-and-silver/22563]What will Bernanke do to gold and silver? - Wyatt Investment Research[/url]
[b]14 October 2010, 4:29 pm[/b]

[table][tr][td][center][url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNGMC_ZLr518-kN0cerUuGHsozl73w&url=http://www.theglobeandmail.com/globe-investor/investor-education/investor-clinic/ins-and-outs-of-qe2/article1754073/][img width=80 height=80]http://nt2.ggpht.com/news/tbn/EjJ4O18WH2wq8M/6.jpg[/img]

[size=-2]Globe and Mail[/size][/url][/center][/td][td]

[url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHr4BR3LTjP4EGXNG5C1RtzH7EoyQ&url=http://www.wyattresearch.com/article/what-will-bernanke-do-to-gold-and-silver/22563][b]What will Bernanke do to gold and silver?[/b][/url]

[size=-1][b][color=#6f6f6f]Wyatt Investment Research[/color][/b][/size]

[size=-1][b]...[/b] at a discount to today's [b]prices[/b], then it's great news. Here'swhat to do: wait until November 3 before making any huge purchases of gold or [b]silver[/b]. [b]...[/b][/size]

[size=-1][url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHiy5cVhdckGeMEmRtzGQQbf2-Ayw&url=http://www.minyanville.com/businessmarkets/articles/currency-devaluation-currency-war-currency-wars/10/13/2010/id/30542]Currency Devaluation War: When Will the Next Crisis Start?[/url][color=#6f6f6f]Minyanville.com[/color][/size]

[size=-1][url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHR1ObbsqAE5IQN3XSJOiMMmyrN-A&url=http://blogs.forbes.com/robertlenzner/2010/10/12/qe2-means-a-lower-dollar-and-higher-gold-price/?boxes=businesschannelsections]QE2 Means A Lower Dollar and Higher Gold [b]Price[/b][/url][color=#6f6f6f]Forbes (blog)[/color][/size]

[size=-1][url=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNGFegEVTGnMXKAPk5IA3lhcJ24LKw&url=http://tycoonreport.tycoonresearch.com/articles/956805383/investment-strategy-for-weak-dollar-gold-copper-treasuries-and-corn]Investment Strategy for 'Weak Dollar': Gold, Copper, Treasuries and Corn[/url][color=#6f6f6f]Tycoon Report[/color][/size]

[size=-1][b]all 39 news articles »[/b][/size][/td][/tr][/table]

[b]:[/b] [url=http://news.google.ca/news?pz=1&ned=ca&hl=en&q=silver+prices]silver prices - Google News[/url]



QuoteWhat will Bernanke do to gold and silver? - Wyatt Investment Research
14 October 2010, 4:29 pm

[size=-2]Globe and Mail[/size]
   
What will Bernanke do to gold and silver?

[size=-1]Wyatt Investment Research[/size]

[size=-1]... at a discount to today's prices, then it's great news. Here'swhat to do: wait until November 3 before making any huge purchases of gold or silver. ...[/size]

[size=-1]Currency Devaluation War: When Will the Next Crisis Start?Minyanville.com[/size]

[size=-1]QE2 Means A Lower Dollar and Higher Gold PriceForbes (blog)[/size]

[size=-1]Investment Strategy for 'Weak Dollar': Gold, Copper, Treasuries and CornTycoon Report[/size]

[size=-1]all 39 news articles »[/size]

What is the best way to fix or work around this problem?  Do we try to change RSS Feeder or tell SMF to ignore/strip/change the bad BBC?

Any advice and direction appreciated.

Thanks in advance.
Gerry.



UPDATE: Solved by using WORD CENSORING.  May the code gods forgive me.
Title: Re: RSS Feeder
Post by: Moodx on October 18, 2010, 11:32:05 AM
Hello everyone!

First of all I want to say I really love this mod, I use it for a lot of feeds.
I was wondering how to make some modifications to the php to remove the timestamp, my host an me are in a completely different timezone so I'd really love this timestamp to be removed. Further more I would like to have the source link removed and replaced with the article link (which is a source link as well)
What do I have to do to have these changes. I don't know anything about php.  :o
If you could help me this would be greatly appriciated!
I attached 2 pictures with the situation now and the situation I would like to have,..   ::)

Thanks very much, regards,
Robert
Title: Re: RSS Feeder
Post by: sodmanccc on October 21, 2010, 12:32:21 PM
Quote from: Moodx on October 18, 2010, 11:32:05 AM
Hello everyone!

First of all I want to say I really love this mod, I use it for a lot of feeds.
I was wondering how to make some modifications to the php to remove the timestamp, my host an me are in a completely different timezone so I'd really love this timestamp to be removed. Further more I would like to have the source link removed and replaced with the article link (which is a source link as well)
What do I have to do to have these changes. I don't know anything about php.  :o
If you could help me this would be greatly appriciated!
I attached 2 pictures with the situation now and the situation I would like to have,..   ::)

Thanks very much, regards,
Robert
hello
to get better answers and faster try to create your own topic for your problems in the future.

theres  a few way of going about this you can adjust your sever time zone which would be the easyiest fastest fix. You can remove the time stamp from being displayed but i suggest NOT to do that.

i understand the changes you want above with the post it self but i must warn you those link changes will effect the story in search engines. i strongly suggest you keep the URLs as they are where they are they are done that way for search engines. the email this and send to friend stuff are what make new sites grow really fast. the myspace effect as they call it. sure looks better with out it a little but if its a good story people will use those bookmarks and send to friends.

the maker of this mod makes many mods and support can take a while. i suggest if you want a little better support AND you like SMF then upgrade to charter membership it supports the site allows you to get better support and keeps the site kicking.
Title: Re: RSS Feeder
Post by: SlammedDime on October 21, 2010, 02:47:18 PM
Quotehello
to get better answers and faster try to create your own topic for your problems in the future.
No
We prefer users ask questions about mods in the mod topics, NOT by creating new topics on the board.

Moodx - What you're wanting to do for the most part is doable, but I simply don't have the time to adjust the code for you... you're welcome to look in Sources/ScheduledTask.php in the rss_feeder function and see if you can adjust it yourself...
Title: Re: RSS Feeder
Post by: Moodx on October 21, 2010, 03:05:59 PM
[quote ]
Moodx - What you're wanting to do for the most part is doable, but I simply don't have the time to adjust the code for you... you're welcome to look in Sources/ScheduledTask.php in the rss_feeder function and see if you can adjust it yourself...
[/quote]

SlammedDime thx for writing a great mod. I'll have a go at it, my quess is to start at function scheduled_rss_feeder()
I'll fiddle around with it, maybe I'll get some php knowhow in the process ;-)

Regards,..
Title: Re: RSS Feeder
Post by: Moodx on October 21, 2010, 05:49:29 PM
WOEHOE!! took me a little time but I did it!

In Souces/ScheduledTasks.php  find     // Format the post     and replace whats there with whats here!


                        // Format the post
                        $message =
'' . $body . '

' . ($item->get_permalink() !== null ? '' . $title . ' (http://'%20.%20$item->get_permalink()%20.%20')' : $title) . '

' . (!empty($feed['footer']) ? $feed['footer'] : '');

                        // Might have to update the subject for the single topic people
                           

Thanks for the hint SlammedDime,..
Regards,..
Title: Re: RSS Feeder
Post by: SlammedDime on November 01, 2010, 07:55:02 PM
Updated for 2.0 RC4...

Added a column for the last time the feed updated
Took out the column with the feed URL and wrapped the feed title in the URL.
Title: Re: RSS Feeder
Post by: DirtRider on November 02, 2010, 02:16:09 AM
What would be nice if you could add a feature where members could ignore certain feeds they have no interest in  ;D
Title: Re: RSS Feeder
Post by: SlammedDime on November 02, 2010, 02:21:54 AM
As a workaround for that, you could create a board for each feed, maybe inside of a parent board for 'Feeds'... and your members could ignore certain boards.
Title: Re: RSS Feeder
Post by: DirtRider on November 02, 2010, 02:28:58 AM
Yes this is how I am doing it now but think about the idea as it would be super cool to have this feature built in  ;D
Title: Re: RSS Feeder
Post by: ravendr on November 15, 2010, 04:12:27 AM
Hi there, I'm having a small problem with this mod, I'm importing an RSS Feed from google code into my forums and the formatting seems to be lost in the process;

I've added an example as attachment

Thanks :)
Title: Re: RSS Feeder
Post by: Robert. on November 21, 2010, 11:31:58 AM
The awesome thing of this mod is, it really works! :D I love this mod! :D Thanks, SlammedDime :D
Title: Re: RSS Feeder
Post by: imogen on November 22, 2010, 02:23:03 PM
I was wondering if I could use this mod to automatically post an application form to my forum.

I currently use Coffee Cup Web Form Builder to create an application form. I then have the form submitted to an email address such as http://dodgit.com/ which lets me turn the email into an RSS feed.

The first time I retrieve I get any emails in a post with a link ( i need to work out how to use regex to get the lot I think)

But whenever I send more emails to the address I cant retrieve anymore or get the feed to post anymore.

Can anyone offer any advice?

It might be that this mod just isnt suitable for what I am trying to do.

Cheers,

Imo.
Title: Re: RSS Feeder
Post by: LotusRS on November 25, 2010, 05:30:24 AM
Need to give me help.

How do I edit posts RSS Feeder to look like as shown in Figure 001 Another question is why rs feeder will not put all the pictures in the post.
and the third question is whether it is possible that the RSS feeder has a limited number of characters to display for example 255 characters.

Thanks for your reply
Title: Re: RSS Feeder
Post by: tHe-KiLlEr on December 11, 2010, 08:17:50 PM
What does the mod mean by "Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]). " i am also getting time evrytime i am trying to add a new rss
Title: Re: RSS Feeder
Post by: PatrickPriest on December 22, 2010, 06:39:29 PM
I'm having an issue with the time the article was posted.

It always comes up as "31 December 1969, 7:00 pm"

How can I correct that, or take out the date/time?
Title: Re: RSS Feeder
Post by: keith021773 on December 22, 2010, 09:01:26 PM
I have found out that if most feeds come from feedburner and sites like that.   Just put </div> in for the REGULAR EXPRESSION.  Works for me.
Title: Re: RSS Feeder
Post by: PatrickPriest on December 22, 2010, 09:15:52 PM
My feed is coming straight from my website.
Title: Re: RSS Feeder
Post by: LotusRS on December 23, 2010, 06:03:41 AM
whether it can automatically separate the image from the text by code <br /> <br />?
Title: Re: RSS Feeder
Post by: Surf3rDud3 on December 23, 2010, 11:39:42 PM
By any chance this mod work for 2.0 RC3?
Title: Re: RSS Feeder
Post by: timmytimmy on December 28, 2010, 04:47:22 PM
Quote from: Surf3rDud3 on December 23, 2010, 11:39:42 PM
By any chance this mod work for 2.0 RC3?

yes, does this still work with 2.0 RC3?

willing to donate if you can make this happen :)
Title: Re: RSS Feeder
Post by: ford1001 on December 31, 2010, 02:23:22 AM
how often are the feeds updated?
Title: Re: RSS Feeder
Post by: rakicko on January 01, 2011, 02:17:16 PM
what to write here :
regular Expression
Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]).

my forum
http://www.champions-side.com

and a rss

Quotehttp://www.balcanw.com/external.php?type=RSS2&forumids=11

Title: Re: RSS Feeder
Post by: rakicko on January 02, 2011, 03:27:23 PM
can anybody help me with this?maybe just how to remove a acctuall post link?
Title: Re: RSS Feeder
Post by: rakicko on January 03, 2011, 09:39:37 PM
few guys shows me ..how to do it..so for me ..dont worry :)
Title: Re: RSS Feeder
Post by: endomorph on January 07, 2011, 04:51:03 PM
Perfect Mod, much better than the other one.

Just one thing, how can I strip all the URL's from the article body ? Two of the feeds I am pulling in lace their article bodies with tag URL's
Title: Re: RSS Feeder
Post by: rakicko on January 07, 2011, 05:37:17 PM
i am getting this error ..when starting sculder task
Class 'Net_IPv6' not found in /Sources/Subs-Rss.php on line 12140
Title: Re: RSS Feeder
Post by: JBlaze on January 08, 2011, 02:53:37 AM
Dime, I'm getting a ******load of errors in my error log. Haven't had time to look at them, but I figured I'd post them for you anyways.

SMF 2.0 RC4
PHP 5.2.13
Apache 2.0.63 (Unix)
Title: Re: RSS Feeder
Post by: SlammedDime on January 08, 2011, 12:15:00 PM
There's a post a page or two back I think... need to adjust the error logging line in index.php to exclude Strict errors from being logged... just add '& ~E_STRICT' to the error_reporting call in index.php and that should clear it up.
Title: Re: RSS Feeder
Post by: JBlaze on January 08, 2011, 12:51:53 PM
Quote from: SlammedDime on January 08, 2011, 12:15:00 PM
There's a post a page or two back I think... need to adjust the error logging line in index.php to exclude Strict errors from being logged... just add '& ~E_STRICT' to the error_reporting call in index.php and that should clear it up.
Ah cool. Thanks.
Title: Re: RSS Feeder
Post by: Makar on January 09, 2011, 11:56:14 AM
SlammedDime 

few questions
I did as written in the message

Quote from: Spuds on January 12, 2010, 03:30:34 PM
@Satfreak
find:
// Format the post
$message =
($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


replace with:

// Format the post
$message =
$title . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' .  (!empty($feed['footer']) ? $feed['footer'] : '');


how to remove the time? (why would it ever be put there)
how to remove the link from the message body?
or make them inactive ........
Title: Re: RSS Feeder
Post by: Makar on January 09, 2011, 12:55:26 PM
Quote from: Makar on January 09, 2011, 11:56:14 AM

replace with:

// Format the post
         $message =
$title . '
' . ($item->get_date() !== null ? '' . $item->get_date() . '
' : '') . '
  dell
' . $body . '

' .  (!empty($feed['footer']) ? $feed['footer'] : '');


how to remove the time? (why would it ever be put there) found and made himself
how to remove the link from the message body?   -------- it is still relevant
or make them inactive ........



I understand we must add a rule here?

// 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
// We're gonna try and maintain as much HTML as possible
$body = striphtml(html_to_bbc(preg_replace(array('~^\s+~', '~\s+$~'), '', $body)));
$title = striphtml($item->get_title());
$feed_title = $rss_data->get_title() !== null ? striphtml($rss_data->get_title()) : '';


$body = striphtml(html_to_bbc(preg_replace(array('~^\s+~', '~\s+$~'), '', $body)));

what replace it?
tell me please

Title: Re: RSS Feeder
Post by: tbombaci on January 12, 2011, 05:23:43 PM
I have read through most of the thread for an answer but only found the same question asked back in 2009.

Any feed I add to the system yields this error upon execution:

Quote(The data could not be converted to UTF-8)

Any help is appreciated.

Tom
Title: Re: RSS Feeder
Post by: Stigmartyr on January 15, 2011, 02:38:07 PM
Quote from: tHe-KiLlEr on December 11, 2010, 08:17:50 PM
What does the mod mean by "Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]). "


Can anyone kindly explain how this feature works?  I'd like to use it but I have no idea the parameters or how it works or what regular expression means :P
Title: Re: RSS Feeder
Post by: SlammedDime on January 15, 2011, 10:31:24 PM
See the very first post of the topic... there is a link to a post later in the topic that explains how to create a regex.
Title: Re: RSS Feeder
Post by: fukdup on January 19, 2011, 01:46:31 AM
Quote from: Walgermo on March 17, 2010, 04:07:29 PM
Hi

I am getting a lot of errors every time RSS Feeder fetches feeds, but it still works..

The error i get is:
Quote8192: Assigning the return value of new by reference is deprecated
/httpd.www/Sources/Subs-Rss.php
Line: 15009

And when i click on that file (/httpd.www/Sources/Subs-Rss.php) i get this

QuoteFatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10914559 bytes) in /customers/styrkeboka.com/styrkeboka.com/httpd.www/Sources/Subs.php on line 2585

is this common? is there some fix for this?

*I have attached the files in the description.

well i managed to find how to fix it without adjusting the error reporting.go to the sources folder and open rss-subs.php.i use crimson editor cause it's free and has a search and replace function.

search for "=& new" and replace every occurence with "= new"

worked a treat.i think there were like 93 occurences, so get a program thatwill do it for u.....

no error when it's ran even if i run it manually for me now using default error reporting
Title: Re: RSS Feeder
Post by: SlammedDime on January 19, 2011, 02:12:48 PM
I recommend changing the error reporting, rather than changing the source code in Subs-RSS.  STRICT and DEPRECATED errors should never be reported in a production environment, but as SMF is designed to work on PHP4 (which doesn't have STRICT and DEPRECATED constants), these aren't in a default install of SMF.
Title: Re: RSS Feeder
Post by: fukdup on January 20, 2011, 05:20:12 AM
i would have thought that would be easier, but for some reason it always kept showing the error after i tried all the different values.i don't know what i am doing with this stuff, but what i tried worked. but if you advise against it i guess ill try again. thanks for the info.
Title: Re: RSS Feeder
Post by: endomorph on January 21, 2011, 03:38:01 PM
The feed poster at the moment only posts the base URL.

Is it easy to change this to post the feed item link instead ?
Title: Re: RSS Feeder
Post by: Mick. on January 21, 2011, 04:02:07 PM
Cool mod SD.  Nothing like good ole scraping.

I noticed it grabs the original size of the image from the feed server.(big).  It would be cool if it grabs the size posted (smaller) from the feed website.

Is there a way we can resize the images grabbed in our end?
Title: Re: RSS Feeder
Post by: SlammedDime on January 21, 2011, 04:25:46 PM
Not really... not easily anyway (anything is possible)
Title: Re: RSS Feeder
Post by: Mick. on January 21, 2011, 04:59:48 PM
Quote from: SlammedDime on January 21, 2011, 04:25:46 PM
Not really... not easily anyway (anything is possible)

That;s what i thought.  Great mod. I dig it. ;)
Title: Re: RSS Feeder
Post by: NHWD on January 21, 2011, 06:58:58 PM
whoa.. this mod messed with something in my server because after installing it i get a 500 Internal Server Error

I checked the error logs (server and forum).. nothing shows
and the permissions are all correct
Title: Re: RSS Feeder
Post by: NHWD on January 21, 2011, 08:31:31 PM
^^ can anybody help? i cant find the cause of the problem
Title: Re: RSS Feeder
Post by: SlammedDime on January 21, 2011, 11:03:44 PM
No idea why this would cause a 500 error... how were you able to check the forum error log if it's throwing 500 errors?  If 500 errors aren't showing up in your hosting error log, you may want to ask your host what's up.
Title: Re: RSS Feeder
Post by: NHWD on January 22, 2011, 12:17:33 AM
i checked it thru ftp
i gave it ftp access to chmod some files that needed to be chmodded.. but idk which files they were
Title: Re: RSS Feeder
Post by: endomorph on January 22, 2011, 02:12:20 AM
@SD

The feed poster at the moment only posts the base URL.

Is it easy to change this to post the feed item link instead ?
Title: Re: RSS Feeder
Post by: SlammedDime on January 22, 2011, 10:22:39 AM
What's the feed?  The mod is supposed to pull the link from each individual item if it has one.  If it doesn't, it defaults to the main.
Title: Re: RSS Feeder
Post by: endomorph on January 22, 2011, 12:15:32 PM
http://ownersperspective.com/feed/

http://perspectivemagazine.com/feed/

Are the two main ones
Title: Re: RSS Feeder
Post by: Stigmartyr on February 02, 2011, 04:57:22 PM
Question:

I recently had a server crash and successfully restored my site, but now when I look at my boards and see the notification of pending posts for approval: (!) it will not go away after all posts have been approved or deleted.

I was curious if perhaps there is some log file or table that this depends on?  I would like it to work as it should :)
Title: Re: RSS Feeder
Post by: Stigmartyr on February 06, 2011, 03:56:03 AM
Quote from: Stigmartyr on February 02, 2011, 04:57:22 PM
Question:

I recently had a server crash and successfully restored my site, but now when I look at my boards and see the notification of pending posts for approval: (!) it will not go away after all posts have been approved or deleted.

I was curious if perhaps there is some log file or table that this depends on?  I would like it to work as it should :)

Any insight?
Title: Re: RSS Feeder
Post by: Owdy on February 06, 2011, 07:09:03 AM
This mod posts whole article. I havent choosed that option, bug?

Feed: http://news.opensuse.org/feed/

edit: i try another rss mod...
Title: Re: RSS Feeder
Post by: SlammedDime on February 06, 2011, 10:27:59 AM
Your feed contains the whole article in the 'content' tags... no bug.  Don't blame the mod, blame the feed.
Title: Re: RSS Feeder
Post by: Owdy on February 06, 2011, 10:29:33 AM
Well vbgamers mod shows it like it shows in feed: http://news.opensuse.org/feed/ , not whole post.

http://opensuse.fi/keskustelu/index.php?board=25.0
Title: Re: RSS Feeder
Post by: SlammedDime on February 06, 2011, 10:33:04 AM
Probably because his mod pulls the 'description' tag, not the 'content' tag... the 'content' tag of a RSS feed is meant to be the meat of an item, thus this mod pulls it first, and if no content exists, it pulls description.  (when I coded this, I needed the content item for most of the feeds that I was pulling, so thats what I pulled first)
Title: Re: RSS Feeder
Post by: Owdy on February 06, 2011, 10:38:54 AM
Hmm, okay. You should make this an option? :)
Title: Re: RSS Feeder
Post by: Owdy on February 07, 2011, 06:57:22 AM
I uninstalled this, but it left "rss_feeder" task. How do i remove it?
Title: Re: RSS Feeder
Post by: JBlaze on February 07, 2011, 06:59:37 AM
Quote from: Owdy ツ on February 07, 2011, 06:57:22 AM
I uninstalled this, but it left "rss_feeder" task. How do i remove it?
Remove it from smf_scheduled_tasks in the database.

DELETE FROM smf_scheduled_tasks WHERE task = 'rss_feeder'
Title: Re: RSS Feeder
Post by: Owdy on February 07, 2011, 07:06:19 AM
Ok, thanks. That uninstaller should do that.
Title: Re: RSS Feeder
Post by: JBlaze on February 07, 2011, 07:07:06 AM
Quote from: Owdy ツ on February 07, 2011, 07:06:19 AM
Ok, thanks. That uninstaller should do that.
It should, but it doesn't. Oh well.
Title: Re: RSS Feeder
Post by: Owdy on February 07, 2011, 07:07:16 AM
LOL. BUGHHH!
Title: Re: RSS Feeder
Post by: Owdy on February 07, 2011, 07:23:53 AM
I guess smf_rssfeeds table is from this mod too?
Title: Re: RSS Feeder
Post by: JBlaze on February 07, 2011, 07:27:07 AM
Quote from: Owdy ツ on February 07, 2011, 07:23:53 AM
I guess smf_rssfeeds table is from this mod too?
Yes. But that remains should you wish to re-install or update the mod without having to re-enter all the information.

Suggestion would be to use the <database> element on install so that the admin has the choice to remove the data or not (don't know if it does already, just taking a wild guess).
Title: Re: RSS Feeder
Post by: Owdy on February 07, 2011, 07:30:18 AM
Quote from: JBlaze on February 07, 2011, 07:27:07 AM
Quote from: Owdy ツ on February 07, 2011, 07:23:53 AM
I guess smf_rssfeeds table is from this mod too?
Yes. But that remains should you wish to re-install or update the mod without having to re-enter all the information.
Nah, i use vbgamers mod so i wanna remove all leftovers from this mod.
Title: Re: RSS Feeder
Post by: Stigmartyr on February 07, 2011, 11:26:30 AM
Question:

I recently had a server crash and successfully restored my site, but now when I look at my boards and see the notification of pending posts for approval: (!) it will not go away after all posts have been approved or deleted.

I was curious if perhaps there is some log file or table that this depends on?  I would like it to work as it should :)
Title: Re: RSS Feeder
Post by: SlammedDime on February 07, 2011, 11:29:13 AM
You can try looking at the various maintenance options in the admin panel and run the recount totals and statistics option.
Title: Re: RSS Feeder
Post by: Stigmartyr on February 08, 2011, 11:03:39 PM
Quote from: SlammedDime on February 07, 2011, 11:29:13 AM
You can try looking at the various maintenance options in the admin panel and run the recount totals and statistics option.

Eureka!  That did it :P


ty
Title: Re: RSS Feeder
Post by: Truts2 on February 14, 2011, 01:22:13 PM
Hi, which file I must to edit to change name of this ("Source"):
Title: Re: RSS Feeder
Post by: Garou on February 17, 2011, 08:26:03 AM
Unless SD hard coded it I'd look for "source" in the Modifications.english.php
Title: Re: RSS Feeder
Post by: Truts2 on February 19, 2011, 05:53:44 AM
Quote from: Garou on February 17, 2011, 08:26:03 AM
Unless SD hard coded it I'd look for "source" in the Modifications.english.php
Yep, thank you :)
Title: Re: RSS Feeder
Post by: FlipPro on February 24, 2011, 04:57:51 PM
Hey guys I have a RSS Article Conversion engine that can convert any rss signal into a full text article with HTML. The links are permanent, and I charge low prices for unlimited hosting. PM me if anyone is interested. 
Title: Re: RSS Feeder
Post by: Kindred on February 25, 2011, 11:37:25 AM
strange....   The "import full article" worked for one article, but every other article is just the stub from the RSS feed



~<div class="msgarea entry-content">(.*)<\/div>~siU
pulling from
http://rss.groups.yahoo.com/group/LegionsOfSteel/rss


or
~<!-- Generated by XStandard version 2.0.6.0 on 2011-02-18T16:56:07 --><p>(.*)<!-- Start of articleButtonNav.jsp -->~siu
pulling from
http://feeds.games-workshop.com/Astronomican
Title: Re: RSS Feeder
Post by: kacperex on February 27, 2011, 10:49:36 AM
Hi,

I want use this modyfication but always when i add news rss i got this massage  ---A feed title is required.---
I input feeed title always :/ This is rss i want import to forums xboxinfo.pl/feed/
Help.
Sorry for my pure English.
Title: Re: RSS Feeder
Post by: SMURF6060 on March 24, 2011, 04:21:33 AM
Uhm...where do i edit the schedualed run time?  the deafult run time is 6 hours....where can i change that figure? i would like it to run every minute
Title: Re: RSS Feeder
Post by: Kindred on March 24, 2011, 07:27:47 AM
Every minute??

1 that will kill your server
2 that is pointless, since the rss feed that you are importing is not going to be updated every minute. Typically, rss feeds are set to a minimum of 30 mins, but 1-2 hours is probably the lowest setting you would need
Title: Re: RSS Feeder
Post by: SMURF6060 on March 24, 2011, 09:31:07 AM
Quote from: Kindred on March 24, 2011, 07:27:47 AM
Every minute??

1 that will kill your server
2 that is pointless, since the rss feed that you are importing is not going to be updated every minute. Typically, rss feeds are set to a minimum of 30 mins, but 1-2 hours is probably the lowest setting you would need


Yes very true...but:

The rss is only a one liner, ( my own feed )  it would be no different than having an active forum.

a minute or even an hour,  What file and variables do I edit?
Title: Re: RSS Feeder
Post by: Kindred on March 24, 2011, 09:49:48 AM
no file or variable.   go to admin > maintenance > Scheduled Tasks

As for "no different than having an active forum". You're incorrect, especially if you are drawing from your own feed on your own server...   feedback loop?
Title: Re: RSS Feeder
Post by: SlammedDime on March 24, 2011, 02:24:22 PM
Quote from: Kindred on February 25, 2011, 11:37:25 AM
strange....   The "import full article" worked for one article, but every other article is just the stub from the RSS feed



~<div class="msgarea entry-content">(.*)<\/div>~siU
pulling from
http://rss.groups.yahoo.com/group/LegionsOfSteel/rss


or
~<!-- Generated by XStandard version 2.0.6.0 on 2011-02-18T16:56:07 --><p>(.*)<!-- Start of articleButtonNav.jsp -->~siu
pulling from
http://feeds.games-workshop.com/Astronomican

I'm not sure on the first one, will have to test later... for the second one... there is an intermediate page between the feed and article, which asks for locale.  That is what is likely stopping it from working properly.  The second one isn't an actual feed though, it's an HTML page... you'd want to use http://feeds.games-workshop.com/Astronomican?format=xml instead.  But that still results in the same issue, with the intermediate page.
Title: Re: RSS Feeder
Post by: f_aston on March 28, 2011, 09:32:32 PM


I modified the .xml file to install this Mod on 2.0 RC 5 and it appears to have worked fine.


Great mod!  We're impressed already! 
Title: Re: RSS Feeder
Post by: SlammedDime on March 28, 2011, 11:23:14 PM
Would have been easier to use the 'Advanced' version emulate in the bottom of the Browse Packages screen... but glad it worked for you! :)
Title: Re: RSS Feeder
Post by: ford1001 on March 30, 2011, 03:05:50 AM
Please upgrade this mod, i find it better than the other one, but now i can't use it because it isn't updated to RC5
Title: Re: RSS Feeder
Post by: Kindred on March 30, 2011, 07:28:51 AM
It works fine on rc5
Title: Re: RSS Feeder
Post by: ford1001 on March 31, 2011, 02:04:00 AM
it comes up for me that the package is either corrupt or cannot work on this software
Title: Re: RSS Feeder
Post by: Kindred on March 31, 2011, 07:20:36 AM
Use the emulate version feature... Under advanced
Title: Re: RSS Feeder
Post by: Angelina Belle on April 05, 2011, 05:03:53 PM
I think I'm liking this mod, SlammedDime. Nice work. Thanks for sharing and supporting it.

I was looking for an easy (for me) way to create a non-HTTP way to make SMF posts.
This is for users who will be temporarily out of HTTP range, but will have a text-only email tunnel (via HF radio digital modes) to the internet, to enable them to post some on-the-scene updates from their remote location.

And I think I've found it. Email the plain-text (can even attach a pic if conditions/bandwidth is good enough) to google blogger and, an hour later, there it is.

Your code is easy enough to follow, and I figured out the answer to my question about caching. I see exactly how I could have shortened the time-to-cache-refresh during testing.

I have one questions.

Would you consider changing the way the mod handles an RSS post with no title? Currently, the results are ugly for a blogspot blog. If you want me to create you an example, I'll do it. I don't have one at the minute (I fixed the blog).
   * I fixed the blogspot blog (added missing blog post titles)
   * I deleted the imported posts from my forum -- all of them
   * I deleted the RSS Feeder feed
   * I added the RSS Feeder feed back[/s]
   * But I'm still getting at least one post with a blank title.  In fact, I think I've got it twice now -- once with and once without the title. Only , it is hard to tell, because the URL for the no-title post is bad (http://www.rockhallsailingclub.org/smf2test/data:post.url) for the no-title post.

2) What about caching of the feed? How often is that updated?
Title: Problem handling " in regexp, if I leave any info off RSSfeeds
Post by: Angelina Belle on April 06, 2011, 10:24:45 AM
This is a pretty minor "why would anyone want to do that" kind of things that you might call a bug.
When there are errors in the Add Feed form and you send it back to the user to fix, you don't do all the necessary specialchars stuff.
So that, if the regex contains ", it breaks the form.

Here's what I did:
Title: Re: RSS Feeder
Post by: SlammedDime on April 06, 2011, 10:53:05 AM
Thanks for that... I'll have to fix that real soon, as that could be a security vulnerability...
Title: Re: RSS Feeder
Post by: Angelina Belle on April 06, 2011, 10:58:49 AM
Quote from: AngelinaBelle on April 05, 2011, 05:03:53 PM
Would you consider changing the way the mod handles an RSS post with no title? Currently, the results are ugly for a blogspot blog posting with a blank title

Glad to find it. How about the problem of a post with no title? Google Blogger allows that.
Title: Re: RSS Feeder
Post by: Moodx on April 19, 2011, 10:47:25 AM
Hi all fellow smfu's ;)

I noticed when my vps was down because of a problem at the datacentre that feeds were not being fetched, wow pretty obvious.
I also noticed that when, for whatever reason, a feed can't get fetched it is set to disabled. My question is quite simple; Is there a way to keep feeds enabled even when they can't be fetched?
Like, can I change anything in the code so feeds won't get disabled anymore?

Thanks very much! :-D

Regards,
Robert
Title: Re: RSS Feeder
Post by: MrMorph on May 13, 2011, 01:26:48 PM
Hi SlammedDime, what a great mod this is :)

I'm planning to use it on one of my sites and will send you a donation for all your efforts.

One thing I need help on though.  One feed I have doesn't show the images quite right, see screen shot.

I searched through the thread but found no solution.  How could I get a couple of line breaks in there after the image ?

I'm only using this one feed on my site and all their images are doing that.

Would really appreciate your assistance :)

Thanks !
Title: Re: RSS Feeder
Post by: MrMorph on May 19, 2011, 03:29:16 PM
OK so not much in the way of support then ?

Another problem though, for some reason it keeps disabling itself.  Is that a 'feature' ?
Title: Re: RSS Feeder
Post by: SlammedDime on May 19, 2011, 04:17:58 PM
The 'find/replace' search would have to be modified to add some line breaks.  The reason the feed keeps disabling itself is because it is encountering errors (which can be seen in the error log) preventing the script from retrieving the feed.  It's a feature to prevent continuous hits to a non-working RSS feed that could consume unneeded resources.

In Subs-Rss.php, you can try editing the following on line 68:
Code (Find) Select
"[img]\\1[/img]",

to
Code (Replace) Select
"[img]\\1[/img]\n\n",
Title: Re: RSS Feeder
Post by: MrMorph on May 19, 2011, 04:45:27 PM
Ah great, thanks for your reply and please forgive my impatience  ::)

I'll try the image edit out.  I thought the disable feature might be something like that, very smart idea.  I think my source rss is up the creek then.  Bah.  Maybe I can get them to fix the errors in their feed.

Many thanks for your assistance :)
Title: Re: RSS Feeder
Post by: FlipPro on May 24, 2011, 06:21:15 PM
Has anyone been able to make this work on 1.1.13 yet? I understand that this mod relys heavily on the scheduled tasks function of SMF2.0. But what if we took out the scheduled tasks and setup our own cron job to check for feeds? I only ask this because this mod WORKS. It worked great on mmf when i ran RC2 but now I am running the original version, and I have been fighting with vbs mod for the past 3 days trying to get it to post right. I already have an engine which converts all feeds into full feeds, and your mod worked great when posting it. Is there some type of limitation in 1.1.13 that is prevents us from posting in HTML so that div tags and <p> tags are properly converted? I need to understand all this more because its crucial to the new site I'm opening up.
Title: Re: RSS Feeder
Post by: InfoStrides on June 09, 2011, 04:13:01 AM
Hello,

Is it possible to have the source with website name? Such as below:

Source: The InfoStrides
Source: BBC UK
Title: Re: RSS Feeder
Post by: Angelina Belle on June 09, 2011, 07:13:15 AM
Here's a tiny little display problem:
When the html is re-cast as BBC, you can wind up with BBC like [size=85%], which is not valid bbc, circa SMF 2.0.
Title: Re: RSS Feeder
Post by: Markco on June 13, 2011, 03:42:48 AM
Please I would like to date in French and in 24 hours

(http://www.hostingpics.net/viewer.php?id=523337ecr0170.jpg)

Gif not appear
(http://www.hostingpics.net/viewer.php?id=962262ecr0171.jpg)

Resolve that

Thank's

---
Sorry i use a online translator French / English
Title: Re: RSS Feeder
Post by: nsno on June 15, 2011, 07:09:07 AM
anyone got this working with 2.0 Gold yet?
Title: Re: RSS Feeder
Post by: Angelina Belle on June 15, 2011, 08:40:07 AM
Did you try to install, using emulation? What happened?
Title: Re: RSS Feeder
Post by: nsno on June 15, 2011, 08:57:10 AM
yeah tried and got same results

says it's not compatible with my version of SMF
Title: Re: RSS Feeder
Post by: Spoogs on June 15, 2011, 09:05:17 AM
clear your browser cache and try again
Title: Re: RSS Feeder
Post by: nsno on June 15, 2011, 10:32:32 AM
still not having it
Title: Re: RSS Feeder
Post by: Saftek on July 08, 2011, 06:43:42 PM
Same here... getting "The package you are trying to download or install is either corrupt or not compatible with this version of SMF."  After hitting the install mod button. It is uploaded onto the server.
Title: Re: RSS Feeder
Post by: hesaab on July 20, 2011, 10:15:18 AM
SlammedDime
Hi
Thanks for this mod
when i have 2 rss, i want to update these rss seperately and automatically.
for example, rss1 update every 6 hours and rss2 update every 10 hours. could u help me?
Thanks
Title: Re: RSS Feeder
Post by: SlammedDime on July 20, 2011, 11:23:00 AM
It's currently not possible to do.
Title: Re: RSS Feeder
Post by: hesaab on July 20, 2011, 05:07:13 PM
Quote from: SlammedDime on July 20, 2011, 11:23:00 AM
It's currently not possible to do.

is it possible update the mode for doing that feature?
like this mod: http://custom.simplemachines.org/mods/index.php?mod=624 (http://custom.simplemachines.org/mods/index.php?mod=624)
thnx
Title: Re: RSS Feeder
Post by: Galaxy Computers on July 20, 2011, 05:10:01 PM
when you install the modification did you change the eleminate the forum an older version?
Title: Re: RSS Feeder
Post by: CR Forum on August 03, 2011, 04:48:58 AM
Quote from: Spuds on February 13, 2010, 11:43:03 AM
First the warning ... COMPLETELY UNTESTED

To hopefully help with all the questions of how to I format the message this way to that way I've munged the code to make it easier for folks unfamiliar with php to make changes as they see fit. 

What this does is break the message into sections that should be more obvious what they are, you can then combine in the order, and what sections you do or don't want to show.

Again this was just typed in and has not been tested, primarily because I'm not going to use it and also because I'm lazy.

So find:
// Format the post
         $message =
($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '

' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');


replace with:

// Format the post
// title of the rss topic with a link back to this specific item in the feed if avaialble
$message_linked_title = ($item->get_permalink() !== null) ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title;

// just the rss topic as a title, no link
$message_unlinked_title = $title;

// Your own text with a link back to the topic
$message_linked_mytext = ($item->get_permalink() !== null) ? '[url=' . $item->get_permalink() . ']' . 'Read More ...' . '[/url]' : '';

// the date of the feed item
$message_date = ($item->get_date() !== null) ? '[b]' . $item->get_date() . '[/b]' : '';

// the story
$message_body = $body;

// the source of the feed with a link back to it if available
$message_linked_source = (!empty($source)) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '' : '';

// the source of the feed with no link
$message_unlinked_source = (!empty($feed_title)) ? $feed_title : '');

// any footer from the rss admin area
$message_footer = (!empty($feed['footer']) ? $feed['footer'] : '');

// put it all together however you like, use some, all or none .... use "\n" to add a newline between items,
// use your own conscience if you remove credit to other peoples work :o
// some examples to help
//
// default
// $message = $message_linked_title . $message_date . "\n" . $message_body . "\n\n" . $message_linked_source . "\n" . $message_footer;
//
// credit but no links
// $message = $message_unlinked_title . $message_date . "\n" . $message_body . "\n\n" . $message_unlinked_source . "\n" . $message_footer;
//
// just a title and body
// $message = $message_unlinked_title . "\n" . $message_body;
//
// adding in some of your own text
// $message = $message_unlinked_title . "\n" . $message_body . "\n\n" . $message_linked_mytext;
//
// all mixed up
// $message = $message_unlinked_source . "\n" . $message_body . "\n\n" . $message_date . "\n" . $message_footer . "\n" . message_linked_title;
//
// Our post as we see fit.
$message = $message_linked_title . $message_date . "\n" . $message_body . "\n\n" . $message_linked_source . "\n" . $message_footer;






I am trying to make this happen but every time I make the changes, and add a new rss feed, it gives an error on running  ScheduleTask.php that "The database value you're trying to insert does not exist". Reverting to the original code makes the task completed with resultant posts getting posted. What could be happening.
This error appears in the log
Quotehttp://www.indiaeduforum.com/index.php?pretty;action=admin&amp;area=scheduledtasksThe database value you're trying to insert does not exist: body
Function: createPostFile: /home/indiaedu/public_html/Sources/Subs-Post.php
Line: 1848
Thanks
Sam
Title: Re: RSS Feeder
Post by: imrich on August 04, 2011, 02:18:03 PM
I don't know if my web server updated it's PHP, but in the past month or two my error_log is filling up everytime my RSS feeds are scheduled.

I'm seeing all sorts of errors:

[04-Aug-2011 09:00:23] PHP Strict Standards:  Assigning the return value of new by reference is deprecated in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 14375
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::fix_protocol() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 939
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::normalize_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 9393
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::parse_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 9394
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::parse_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1648
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  is_a(): Deprecated. Please use the instanceof operator in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1742
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::get_curl_version() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 7781

I already have this set in my php.ini:
error_reporting = E_ALL & ~E_NOTICE

Perhaps it's time to update this with the new php standards or is there another error I can turn off?
Title: Re: RSS Feeder
Post by: tinoest on August 04, 2011, 02:20:07 PM
Quote from: imrich on August 04, 2011, 02:18:03 PM
I don't know if my web server updated it's PHP, but in the past month or two my error_log is filling up everytime my RSS feeds are scheduled.

I'm seeing all sorts of errors:

[04-Aug-2011 09:00:23] PHP Strict Standards:  Assigning the return value of new by reference is deprecated in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 14375
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::fix_protocol() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 939
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::normalize_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 9393
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::parse_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 9394
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::parse_url() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1648
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Cache::create() cannot be called statically in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1652
[04-Aug-2011 09:00:23] PHP Strict Standards:  is_a(): Deprecated. Please use the instanceof operator in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 1742
[04-Aug-2011 09:00:23] PHP Strict Standards:  Non-static method SimplePie_Misc::get_curl_version() should not be called statically, assuming $this from incompatible context in /home/user/public_html/discuss/Sources/Subs-Rss.php on line 7781

I already have this set in my php.ini:
error_reporting = E_ALL & ~E_NOTICE


I know this is not my modification , but are you running PHP 5.2.x or 5.3.x ? As the is_a is no longer depreciated in the latest version 5.3.x of PHP.

Title: Re: RSS Feeder
Post by: imrich on August 04, 2011, 04:01:40 PM
It looks like I'm running php 5.2.17

I'll have to look but how can they depreciate it in one version and then not in a later version? LOL
Title: Re: RSS Feeder
Post by: Yngwiedis on August 05, 2011, 03:49:24 AM
Hello...

Can somebody please help me with the regex command ?

This is the HTML section of the articles in the site i use as my rss source:

<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>

        <td align="left" style="padding-left:5px;padding-top:7px;">
            <div id="_ctl15__ctl0_Article" style="width:550px;"><div id='mytxt' style='width:650px;'><div style='width:240px;float:left;'><table cellspacing='2' cellpadding='0' border='0'><tr><td><a href='http://www.real.gr//Files/Articles/Photo/84376.jpg' class='lightbox4' title=''><img align='left' src='Files/Articles/Photo/84376.jpg'   
                        width='225' height='128' style='border:1px solid #8f9da8;margin-top:0px;margin-right:10px;' alt='' /></a>
                        </td></tr><tr><td class='article_source_text'></td></tr><tr><td>
                    <table cellspacing='0' cellpadding='0'
                    ><tr><td><a href='http://www.real.gr//Files/Articles/Photo/84376.jpg' class='lightbox' ><img src='img/article/photo_magnifier.jpg' border='0'/></a></td>
                    <td class='article_source_text'>&nbsp;
                    <a href='http://www.real.gr//Files/Articles/Photo/84376.jpg' class='lightbox3' >Πατήστε για μεγέθυνση</a></td></tr></table></td></tr></table></div><div class='article_pure_text'>Να αποσύρουν τις σκηνές από την πλατεία του Λευκού Πύργου αποφάσισαν οι &laquo;Αγανακτισμένοι&raquo; της Θεσσαλονίκης. Ωστόσο, προγραμματίζουν λαϊκή συνέλευση στις 25 Αυγούστου εν όψει και των εγκαινίων της ΔΕΘ.<br />

<br />
Σε ανακοίνωση που ανάρτησαν στην ιστοσελίδα τους, οι &laquo;Αγανακτισμένοι&raquo; της Θεσσαλονίκης, αναφέρουν &laquo;αν δήθεν το πρόβλημα είναι οι σκηνές τότε τις αποσύρουμε κρατώντας την υποδομή (γραμματεία, πρώτες βοήθειες και υλικοτεχνική υποστήριξη). Διατηρούμε αδιαπραγμάτευτα τον πολιτικό χαρακτήρα του κινήματός μας. Δεν θα σας δώσουμε καμία ευκαιρία να συκοφαντήσετε το κίνημά μας.&raquo;<br />
<br />
Είχε προηγηθεί η δήλωση του δημάρχου Θεσσαλονίκης, Γιάννη Μπουτάρη στην ΕΤ-3 που ανέφερε πως επικοινώνησε με τις εισαγγελικές αρχές για να δουν πώς θα χειριστούν το θέμα με τους &laquo;Αγανακτισμένους&raquo; και εάν θα απομακρύνουν τις σκηνές από την πλατεία του Λευκού Πύργου.<br />
<br />
Οι ίδιοι καλούν τους πολίτες σε λαϊκή συνέλευση στις 25 Αυγούστου στο Λευκό Πύργο για να &laquo;προετοιμάσουν&raquo;, όπως χαρακτηριστικά αναφέρουν στην ανακοίνωση τους, &laquo;υποδοχή στον πρωθυπουργό και σε όλους τους πολιτικούς αρχηγούς στην πόλη στην ΔΕΘ&raquo;.<br /></div></div></div>

        </td></tr>
    </table>


I try that: ~<div id="_ctl15__ctl0_Article" style="width:550px;">(.*)<\/div>~siU
Is not working.

I try that: ~<div id="_ctl15__ctl0_Article" style="width:550px;">(.*)<\/div><\/div><\/div>~siU
Is not working again.

I try that: ~<div id="_ctl15__ctl0_Article" style="width:550px;">(.*)<\/div><\/td>~siU
And again not working :(

I really need some help.

Thank you very very much.
Title: Re: RSS Feeder
Post by: Yngwiedis on August 06, 2011, 01:46:53 PM
Someone please ?
Title: Re: RSS Feeder
Post by: Yngwiedis on August 07, 2011, 11:49:39 AM
Up...
Title: Re: RSS Feeder
Post by: Yngwiedis on August 08, 2011, 11:08:43 PM
Up again...
Title: Re: RSS Feeder
Post by: frytec on August 10, 2011, 05:39:24 PM
this mod works on Rc3?

im trying to install but getting error "corrupted or incompatible version"

Title: Re: RSS Feeder
Post by: Yngwiedis on August 12, 2011, 08:20:36 PM
Can someone help please ?
Title: Re: RSS Feeder
Post by: Spuds on August 12, 2011, 10:39:12 PM
try
~<div class=\'article_pure_text\'>(.*)<\/div>~isU
Title: Re: RSS Feeder
Post by: Yngwiedis on August 12, 2011, 10:53:34 PM
With this i get only the text of the article without images...
Title: Re: RSS Feeder
Post by: Yngwiedis on August 14, 2011, 06:23:59 AM
Hello again...

I dont get the ful article with this one.
I get only the RSS feed...

I just want to post articles from a greek news site to my forum, but i cant make any of them to display the full article.
Can i give you more HTML examples ?

Thank you very very much.
Title: Re: RSS Feeder
Post by: Kindred on August 14, 2011, 11:10:38 AM
I have not ever gotten it to pull the feed itself, not the full article.

Which is fine, actually, because the idea is that you are "borrowing" the info from another source, so you should be pointing people to the actual source.
Title: Re: RSS Feeder
Post by: Yngwiedis on August 16, 2011, 09:24:26 AM
I will point people to the actual source with the article link.
Is not enough ?
Title: Re: RSS Feeder
Post by: Kindred on August 16, 2011, 09:27:25 AM
as I said, I take the contents of the RSS feed, since that is what the sites have made available.  Taking the whole article is "iffy"
Title: Re: RSS Feeder
Post by: Yngwiedis on August 16, 2011, 09:33:33 AM
Taking just one line from the RSS feed is not useful for my needs...
Title: Re: RSS Feeder
Post by: luuuciano on August 27, 2011, 02:04:28 PM
Wow, there is no way to use extended characters in some important fields like Title, Prefix, Footer?
If we use them the texts gets trimmed

btw, there is no way to post as a non existing member?
we will have to create bot members just to be able to post feeds?
Title: Re: RSS Feeder
Post by: luuuciano on August 28, 2011, 11:22:57 PM
Quote from: SlammedDime on September 16, 2010, 02:23:48 AM
You can disable the errors from showing up by altering the error_reporting line near the top of SMF's index.php to exclude E_STRICT messages (~E_STRICT).

It should be like this?

error_reporting(defined('E_STRICT') ? E_ALL | ~E_STRICT : E_ALL);
Title: Re: RSS Feeder
Post by: Willi Winzig on September 03, 2011, 03:10:45 PM
great mod thx
But one question  :)
is it possible, that maybe 5 feeds post in one topic (or all my feeds)?
Title: Re: RSS Feeder
Post by: Willi Winzig on September 15, 2011, 08:17:29 PM
Quote from: Willi Winzig on September 03, 2011, 03:10:45 PM
great mod thx
But one question  :)
is it possible, that maybe 5 feeds post in one topic (or all my feeds)?
push
Title: Re: RSS Feeder
Post by: oOo--STAR--oOo on October 06, 2011, 12:40:07 AM
Hey,

I am having a current issue.. Most of the feeds I get now have video previews of the games..
I was wondering how I would possible get this to strip the video link?
I have AEVA installed so all I would need todo is get the video link from a piece of code that looks like this..


<object width="560" height="315">
<param name="movie" value="http://www.youtube.com/v/ZjrsBq89VcQ?version=3&amp;hl=en_US&amp;rel=0">
<param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/ZjrsBq89VcQ?version=3&amp;hl=en_US&amp;rel=0"
type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true">
</object>


All I want it to do is grab one of the YouYube links from here..
How would I do this?

Quotehttp://www.youtube.com/v/ZjrsBq89VcQ?version=3&amp;hl=en_US&amp;rel=0

Some help with this would be great.
Title: Re: RSS Feeder
Post by: bwakino on October 06, 2011, 02:52:49 PM
Could someone help.... I unchecked HTML Enabled when editing a feed in Feed Poster Configuration.  Now the edit ability of that feed is completely locked out.... i can no longer edit that feed... delete that feed... or ad a new feed...   I tried and uninstall reinstall... but the Feed Configuration remains the same.  Can someone get me back to where i was?
Title: RSS Feeder - couple of questions
Post by: MrMike on October 12, 2011, 12:28:20 AM
I apologize if these have already been asked a million billion times...

1) Can I install RSS Feeder alongside RSS Feed Poster (http://custom.simplemachines.org/mods/index.php?mod=624)? Will it cause any conflicts?

2) How gracefully does RSS Feeder handle HTML? I'm getting a lot of feeds with gobs of HTML in them (tables, line breaks, paragraphs, italics, links, etc). How well does RSS Feeder handle these kinds of feeds?
Title: Re: RSS Feeder
Post by: jay.clark on October 12, 2011, 11:14:01 AM
I wonder if enough of us got together and each donated 50 bucks we could entice the author to start working on Feed Poster again.

I like the package, but its in-ablity to process graphics and habbit of putting HTML codes into the post make it difficult to use

jayc
Title: Re: RSS Feeder
Post by: MrMike on October 12, 2011, 06:17:05 PM
I'd put in some cash.


Quote from: jay.clark on October 12, 2011, 11:14:01 AM
I wonder if enough of us got together and each donated 50 bucks we could entice the author to start working on Feed Poster again.

I like the package, but its in-ablity to process graphics and habbit of putting HTML codes into the post make it difficult to use

jayc
Title: HA! :)
Post by: MrMike on October 12, 2011, 08:23:12 PM
With a little fiddling around I got RSS Feeder to work very well in my forums.  :D

I modified some of the code to help clean up the incoming RSS with respect to HTML/BBCode, and now it's looking pretty good- it renders the images, HTML, videos, everything.

RSS Feeder also has one interesting feature I haven't had time to play with yet, and that's the option to retrieve the entire article. I plan to try that out and see how it goes.

If you want to take a look you can see the RSS poster in action here:
http://www.atheistroundtable.com/forum/ (http://www.atheistroundtable.com/forum/)

Currently it's posting to two different boards, "Atheist News Feeds (http://www.atheistroundtable.com/forum/index.php?board=8.0)" and "General Atheist Discussion (http://www.atheistroundtable.com/forum/index.php?board=1.0)".

Title: Re: RSS Feeder
Post by: awolexpat on October 12, 2011, 09:40:15 PM
MrMike,
Any chance you could post the edits made on here? I would like to try this out but am not able enough to work out what code needs altering. Thanks in advance.
Title: Re: RSS Feeder
Post by: MrMike on October 13, 2011, 12:06:13 AM
Quote from: awolexpat on October 12, 2011, 09:40:15 PMAny chance you could post the edits made on here? I would like to try this out but am not able enough to work out what code needs altering. Thanks in advance.

Sure, here you go. I'm not 100% positive that both of these edits are required, I'm still doing testing but it seems to be working for me. Let me know how it goes.

In "Sources/Subs-Editor.php", find this code:
// The harder one - wysiwyg to BBC!
function html_to_bbc($text)
{
    global $modSettings, $smcFunc, $sourcedir, $scripturl, $context;


Change it to this:
// The harder one - wysiwyg to BBC!
function html_to_bbc($text)
{
    global $modSettings, $smcFunc, $sourcedir, $scripturl, $context;

    // Replace any '[size=-x]' instances with with '[/size][size=x]' 
    $text = str_replace('[/size][size=-1]', '[/size]', $text);




In "Sources/Subs-Rss.php", find this code:
function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n"), $document);



Change it to this:
function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>', '', '[size=-2]'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n", "", ""), $document);



Title: Re: RSS Feeder
Post by: frytec on October 17, 2011, 12:26:39 PM
nice job MrMike...
you getting there.
Title: Re: RSS Feeder
Post by: MrMike on October 17, 2011, 12:30:34 PM
Quote from: frytec on October 17, 2011, 12:26:39 PM
nice job MrMike...
you getting there.

As near as I can tell it's working properly: http://atheistroundtable.com/forum/ (http://atheistroundtable.com/forum/)
Title: Re: RSS Feeder
Post by: jwrona0001 on October 29, 2011, 01:21:56 PM
I would like to modify my rss feed so that it only feeds new topics and not the replies to the topics.  Does this mod do that?
Also I'm running 2.0.1 and Im curious why this mod doesnt have a download link in the package manager?
Title: Re: RSS Feeder
Post by: MrMike on October 29, 2011, 01:40:12 PM
Quote from: jwrona0001 on October 29, 2011, 01:21:56 PMAlso I'm running 2.0.1 and Im curious why this mod doesnt have a download link in the package manager?

You may need to go into SMF's "emulation mode" to get the install link to appear.
Title: Re: RSS Feeder
Post by: luuuciano on October 30, 2011, 02:10:46 PM
Quote from: jwrona0001 on October 29, 2011, 01:21:56 PM
I would like to modify my rss feed so that it only feeds new topics and not the replies to the topics.  Does this mod do that?

No
http://www.simplemachines.org/community/index.php?topic=25009.0
Title: Re: RSS Feeder
Post by: Nola5712 on December 30, 2011, 09:40:32 PM
My apologies if this has been answered already, but i've read through pages and pages of this thread and can't find an answer.

what i would like to do is put a module on my front page (sports forum) that will show tweets as they are tweeted by players, coaches, teams, league, etc...

i realize i'd probably have to create a twitter account for my forum and start following a thousand people, but i think it'd be a really cool idea, and my members would probably love it.

will this mod do that?  if not, can someone point me in the right direction of something that would?

thank you in advance and again, i'm sorry if this has been answered :)
Title: Re: RSS Feeder
Post by: Kindred on December 30, 2011, 10:25:58 PM
This mod imports rss feeds as messages in the forum.
It does not cover real time tweet updates and does not list me in a module of the front page... It imports the rss items as message threads...  Plus, I don't think twitter uses standard rss feeds...


So, basically, no... This mod is not what you are looking for.
Title: Re: RSS Feeder
Post by: luuuciano on December 30, 2011, 11:07:00 PM
identi.ca have rss
Anyway, try looking http://www.google.com/search?q=twitter+rss you will find interesting things
Title: Re: RSS Feeder
Post by: Nola5712 on December 31, 2011, 12:01:39 PM
thanks kindred and luuuciano for the info, i appreciate the responses :)

thanks for that google search luuuciano, i didn't even know what to search for (i was searching twitter module/widget for smf hah) so that helps more than you may think.  i'll see what i can dig up!

thanks again
Title: Re: RSS Feeder
Post by: Biology Forums on January 03, 2012, 01:56:15 AM
Available for 1.x?
Title: Re: RSS Feeder
Post by: thecoo1est on February 10, 2012, 03:45:11 PM
Is there a way we can assign avatars to the different "user" s
Title: Re: RSS Feeder
Post by: Dickstar on February 12, 2012, 07:51:27 PM
Quote from: MrMike on October 13, 2011, 12:06:13 AM
Quote from: awolexpat on October 12, 2011, 09:40:15 PMAny chance you could post the edits made on here? I would like to try this out but am not able enough to work out what code needs altering. Thanks in advance.

Sure, here you go. I'm not 100% positive that both of these edits are required, I'm still doing testing but it seems to be working for me. Let me know how it goes.

In "Sources/Subs-Editor.php", find this code:
// The harder one - wysiwyg to BBC!
function html_to_bbc($text)
{
    global $modSettings, $smcFunc, $sourcedir, $scripturl, $context;


Change it to this:
// The harder one - wysiwyg to BBC!
function html_to_bbc($text)
{
    global $modSettings, $smcFunc, $sourcedir, $scripturl, $context;

    // Replace any '[size=-x]' instances with with '[/size][size=x]' 
    $text = str_replace('[/size][size=-1]', '[/size]', $text);




In "Sources/Subs-Rss.php", find this code:
function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n"), $document);



Change it to this:
function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>', '', '[size=-2]'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n", "", ""), $document);


I tried this and it looks like a great idea, but for some mysterious reason it doesn't help for me. I still get the [size=-1] thing everywhere.
Title: Re: RSS Feeder
Post by: Dickstar on February 13, 2012, 11:29:31 AM
The "Sources/Subs-Rss.php" edit was wrong. It should be like this. The posts look fine now.  ;D

In "Sources/Subs-Rss.php", find this code:

function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n"), $document);


And change it to this:

function striphtml($document)
{
    // Just in case there aren't breaks after a </p>...
    $document = str_replace(array('</p>', '<br />', '<br>',  '</div>', '', '[size=-1]'), array("</p>\r\n", "<br />\r\n", "<br>\r\n", "</div>\r\n", "", ""), $document);
Title: Re: RSS Feeder
Post by: medstorez on February 16, 2012, 01:46:08 PM
Hi,

I have installed this in my smf 2 beta, after i install it and it tries to redirect, i get this error:

Fatal error: Cannot redeclare modifyrssfeedsettings() (previously declared in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php:1982) in /home/my2008/public_html/mytestforum/forum/Sources/ManageSettings.php on line 2700

Any ideas would be greatly appreciated.
Title: youtube regular expression
Post by: SMURF6060 on July 13, 2012, 05:03:30 PM
I clearly  understand the fact the you need to edit the regex file so y our able to pull what ever data you need from the rss feed.
thats something i cant get my mind to understand on how to do it.


so far i have been successful with pulling full articles simply by finding the div and putting it into the expression

ie: ~<div class="article_content">(.*)<\/div>~siU

how can i incorporate this tag:  <meta property="og:url" content="http://www.youtube.com/watch?v=kttooVrewF8">

ive tried : ~<meta property="og:url" content="">(.*)<\/div>~siU  and that is not correct.

anyone have a fix?



Title: Re: RSS Feeder
Post by: OzzyMozzy on September 20, 2012, 06:04:24 PM
Sorry if this has already been asked before....

I have 4 different RSS feeds working and a couple of them stop working for no reason. I go into the control panel and find that they disable them selves, anyone know why this happens?
Title: Re: RSS Feeder
Post by: Kindred on September 20, 2012, 08:58:06 PM
I think that it auto disables the feed input if it receives some number of failures in a row...
Title: Re: RSS Feeder
Post by: Topboyz on October 06, 2012, 05:05:39 PM
Please can you give me a correct regex to use for my forum. I want to pull feeds from news.naij.com/rss/pda/all.rss
Title: Re: RSS Feeder
Post by: OzzyMozzy on October 17, 2012, 09:22:14 PM
Quote from: Kindred on September 20, 2012, 08:58:06 PM
I think that it auto disables the feed input if it receives some number of failures in a row...

Is there anything i can do to stop the failures?
Title: Re: RSS Feeder
Post by: Kindred on October 18, 2012, 12:27:36 AM
no
the failures are due to a problem with the feed itself
Title: Re: RSS Feeder
Post by: lolicute on November 26, 2012, 06:40:02 PM
works on 2.0.2? how can i install this mod on 2.0.2?
Title: Re: RSS Feeder
Post by: Kindred on November 26, 2012, 07:34:48 PM
yes, it works fine on 2.0.2.
you may have to use version emulate (look it up in the wiki)
Title: Re: RSS Feeder
Post by: lolicute on November 26, 2012, 07:46:37 PM
Thanks, i can install this mod, hmm now another question...

this mod can make post full RSS? i have this link: http://na.leagueoflegends.com/board/external.php?forumids=9&type=RSS2 but have brief description
Title: Re: RSS Feeder
Post by: Kindred on November 26, 2012, 07:56:33 PM
the mod only pulls the content of the RSS feed...  if the feed has the full article, then it can pull that. If the feed only has a summary, then that is all it will pull.
Title: Re: RSS Feeder
Post by: lolicute on November 27, 2012, 01:05:49 PM
Quote from: Kindred on November 26, 2012, 07:56:33 PM
the mod only pulls the content of the RSS feed...  if the feed has the full article, then it can pull that. If the feed only has a summary, then that is all it will pull.

Ok works!

how do I post pictures?



I have this Regular Expression:

~<div id="articlestory">(.*)<\/div>~siU
Title: Re: RSS Feeder
Post by: lolicute on November 27, 2012, 04:48:33 PM
How do I replace to make them look the pictures? (Subs-Rss.php)
Example:


<img style="border: 2px solid #cd8e2f; padding: 1px; margin: 0px 5px 0px 5px;" src="http://riot-web-static.s3.amazonaws.com/images/news/Skins/Shen_Warlord_Splash_thumb.jpg" alt="" />


Images are not displayed in full article...

sry 4 my bad english
Title: Re: RSS Feeder
Post by: lolicute on November 27, 2012, 11:22:17 PM
someone can help me?
Title: Re: RSS Feeder
Post by: mamadmankan on December 10, 2012, 01:47:27 PM
ok im having major problems

its not posting my RSS feeds and i do not know how to set up the CRON job section

please help
Title: Re: RSS Feeder
Post by: Kindred on December 10, 2012, 01:50:02 PM
You may be asking for help with the OTHER RSS Feeder mod....   because this one uses the SMF scheduled tasks list to handle the feed "get".  IIRC, the other one, by vbgamer is the one that needs a cron job.
Title: Re: RSS Feeder
Post by: mamadmankan on December 10, 2012, 01:59:31 PM
Quote from: Kindred on December 10, 2012, 01:50:02 PM
You may be asking for help with the OTHER RSS Feeder mod....   because this one uses the SMF scheduled tasks list to handle the feed "get".  IIRC, the other one, by vbgamer is the one that needs a cron job.

i cant find the other post from vbgamer for his MOD


im getting this error

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435

Warning: fsockopen() [function.fsockopen]: unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435

Warning: fsockopen() [function.fsockopen]: unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435

Warning: fsockopen() [function.fsockopen]: unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/content/82/10158482/html/Sources/Subs-RSS2.php on line 435
Feed Poster Configuration
Title: Re: RSS Feeder
Post by: Kindred on December 10, 2012, 02:18:19 PM
mamadmankan,

before you go any further - please confirm WHICH mod you are ACTUALLY using. That Subs-RSS2 looks like one of vbgamer's mods...

the support thread for each mod is linked to from the download page for that mod in the mod/customization site.
Title: Re: RSS Feeder
Post by: mamadmankan on December 10, 2012, 02:33:46 PM
Quote from: Kindred on December 10, 2012, 02:18:19 PM
mamadmankan,

before you go any further - please confirm WHICH mod you are ACTUALLY using. That Subs-RSS2 looks like one of vbgamer's mods...

the support thread for each mod is linked to from the download page for that mod in the mod/customization site.

ive looked around he hasnt posted up suppor on that MOD ................... like ive been looking for support, and i keep getting directed into a circle

can i get support on that issue please
Title: Re: RSS Feeder
Post by: Kindred on December 10, 2012, 02:41:25 PM
mamadmankan - you need to ask for support in the support thread for the specific mod that you are actually using.  THIS thread is for support of the mod by SlammedDime and will not provide support for some other mod.


So...  please confirm WHICH mod you are specifically using.
RSS Feeder (http://custom.simplemachines.org/mods/index.php?mod=1590)
or
RSS Feed Poster (http://custom.simplemachines.org/mods/index.php?mod=624)
if it is the second one, then you need to go to this thread (http://www.simplemachines.org/community/index.php?topic=141776.0)
Title: Re: RSS Feeder
Post by: punchy on January 02, 2013, 05:50:21 PM
Hi all,

I'm using this feed Poster in my smf 2.0.3 and its working fine, I use it to import certain jobs onto our job boards, However, even with the keywords in place i'm still getting the odd wrong job being posted, some days it could be 10 other days it could be 100, which is a lot of editing for me when i get home after work.

Howverer, i've set up post Moderation on this usergroup and that seems to work well if i post a post, ie type  a demo post, the (!) mark comes up ready to moderate.

However for RSS feeds, This seems to bypass the post moderation rules and i'm still getting the wrong rss feeds posting. I need to be able to check these prior to posting live on the forums.

Anyone have any ideas how i could do this??

Thanks in advance, Happy New Year  ;)

Title: Re: RSS Feeder
Post by: punchy on January 02, 2013, 06:30:01 PM
Just found out how to do it, Once the post moderation is set up you can tick the "Approve post" box in each feed set up  ;D ;D

Excellent, just what i wanted
Title: Re: RSS Feeder
Post by: RaidersRNA on February 04, 2013, 02:27:16 AM
I'm having a problem where all RSS feeds I try to import from Facebook are getting formatted really badly. Whenever there is a link in the body of the rss item it removes all white space and line breaks from around the link. This also stuffs up most images when the image tag is inclosed in a url tag which is common for images in facebook rss feeds.

Original example facebook feed: https://www.facebook.com/feeds/page.php?id=244414162289350&format=rss20

How the body of the post should look:

QuoteSaturday, 2 February 2013 4:30 PM
Mounties lads getting ready for the 1/4 final. Go hard boys #Cabra9s #meanmachine http://t.co/1UjZzlmr



MountiesRLFC (@MountiesRLFC) posted a photo on Twitter (http://www.facebook.com/l.php?u=http%3A%2F%2Ftwitter.com%2FMountiesRLFC%2Fstatus%2F297577675684458496%2Fphoto%2F1%2Flarge%3Futm_source%3Dfb%26utm_medium%3Dfb%26utm_campaign%3DMountiesRLFC%26utm_content%3D297577675684458496&h=lAQFgIvJf&s=1)
pic.twitter.com
Get the whole picture - and other photos from MountiesRLFC

Source: http://blahblah...

How it ends up looking with horrible formatting when it gets posted on the smf forum by rss feeder:

QuoteMounties lads getting ready for the 1/4 final. Go hard boys #Cabra9s #meanmachine MountiesRLFC (@MountiesRLFC) posted a photo on Twitter (http://www.facebook.com/l.php?u=http%3A%2F%2Ftwitter.com%2FMountiesRLFC%2Fstatus%2F297577675684458496%2Fphoto%2F1%2Flarge%3Futm_source%3Dfb%26utm_medium%3Dfb%26utm_campaign%3DMountiesRLFC%26utm_content%3D297577675684458496&h=lAQFgIvJf&s=1)pic.twitter.comGet the whole picture - and other photos from MountiesRLFC

Source: http://blah...

Sometimes it misses posting the picture entirely, sometimes it does. The main thing I want to do is clean it up so it is forced to put a white space before and after all links and to format the way it does in the rss feed with line breaks kept intact. Feed items without links or images are working perfectly but as soon as one of those comes in it breaks the formatting. It seems to be a problem with how it is converting the link tags and stripping white space?

Can anyone point me in the right direction? I have been looking round in subs-rss.php and have tried a few different things but nothing has worked.
Title: Re: RSS Feeder
Post by: imrich on March 23, 2013, 03:08:09 PM
This feeder has been working almost perfectly for me for a while now, thanks!

However I do notice that when a feed item comes in that has an ampersand '&' in the title, that it breaks the RSS feed of my forum with a report of an illegal character.

If I edit the & out of the post from the feed, then it works again.

Does anyone have a clue as to a fix for this?

I'm using version 1.1.5 of the RSS feeder.

Thanks for any help.
Title: Re: RSS Feeder
Post by: imrich on April 09, 2013, 05:08:04 PM
Quote from: imrich on March 23, 2013, 03:08:09 PM
This feeder has been working almost perfectly for me for a while now, thanks!

However I do notice that when a feed item comes in that has an ampersand '&' in the title, that it breaks the RSS feed of my forum with a report of an illegal character.

If I edit the & out of the post from the feed, then it works again.

Does anyone have a clue as to a fix for this?

I'm using version 1.1.5 of the RSS feeder.

Thanks for any help.


Bump please!
Title: Re: RSS Feeder
Post by: RaidersRNA on May 15, 2013, 01:35:29 AM
You need to change the ampersand & symbol to the just the word and in one of the rss reader files. Can't remember which file it was exactly but it worked for me when I changed it. I'll look it up next time I log into my server and post the fix here when I find it.
Title: Re: RSS Feeder
Post by: imrich on May 15, 2013, 07:21:23 AM
Quote from: RaidersRNA on May 15, 2013, 01:35:29 AM
You need to change the ampersand & symbol to the just the word and in one of the rss reader files. Can't remember which file it was exactly but it worked for me when I changed it. I'll look it up next time I log into my server and post the fix here when I find it.

I'd appreciate it if you can find it and either post it here or send it to me.

Thanks!
Title: Re: RSS Feeder
Post by: RaidersRNA on May 21, 2013, 11:30:15 AM
Open subs-rss.php in the sources folder and find the following part (its quite close to the top):


$replace = array( "",
"",
"\n[br][img]\\1[/img][br][br]\n",
"\n",
"\\1",
"\"",
"and",
"(",
")",
" ",


You will see the & symbol in there instead of the word and, simply replace the & with the word and like I have and it will work perfectly. It was driving me crazy for awhile before I found this part of the file and fixed it. It's a bit of a bug with this mod because the & symbol is used for XML (RSS) syntax so the mod doesn't see it as text, therefore it will cut off everything after an ampersand is found in a RSS feed when it tries to import it. Luckily the & symbol can be easily changed to the word and, and still have the same meaning.

Oh and there is a second part to the fix which I just remembered. You need to use your forums censored words filter to clean up the fixed ands. Go into your censored words list and add the following to it:

andamp;
&#38;
&
&amp;

Set all of them to be replaced with just the word and. Now anytime your forum encounters an ampersand it will be converted to the word and. With the fix to the subs-rss file, it will normally output ampersands as andamp; so you use the censor filter to clean it up so it just comes out as and. It's a bit of a bandaid workaround, but it works flawlessly for me and I haven't had the problem since I did it.
Title: Re: RSS Feeder
Post by: imrich on May 21, 2013, 02:34:41 PM
Thanks for this idea.

However it does seems strange to me to:

1) convert '&' character to the string 'andamp' in the incoming RSS
2) then reconvert 'andamp' to the '&' again using the censored word filter

Why not just delete the & from the search string to begin with so as not to convert it. Do you think this would be cleaner?

To see if this will work perhaps just comment out (add a // to the begining of) this line in the $search array:

"'&(amp|#38|#038|#x26);'i", // added hexadecimal values

and the same to this line in the $replace array:

"&",


Then this will leave the original &amp; alone and not convert it to &

I'll try to get some time to test this and let you know if I find anything.

Or maybe someone smarter than me can come up with a better fix? ;)

Title: Re: RSS Feeder
Post by: RaidersRNA on May 22, 2013, 09:56:51 AM
You're welcome, hope it helps.

1) When the RSS feed is read by the mod it is getting stuck when it finds an &amp; which is the html/xml code for an ampersand. The mod doesn't read the xml code as &amp; but instead gets stuck on just the & bit and cuts everything off after it, ie the amp; part is not the problem. Converting the & to the word 'and' allows the mod to continue reading the RSS feed without getting stuck on the & because it no longer exists after the conversion.

2) You don't want to convert the andamp; back to an & with the censorship filter, instead you want to convert andamp; to just and. The idea is to completely remove all ampersands and replace them with the word and instead.

I tried to remove the & from the search but it was still breaking for me as the & still remains in the RSS feed unless it gets converted. & in XML (RSS) is a special character, so when the reader sees them I don't think it knows what to do with it and simply cuts everything off after it.

I use a lot of RSS feeds from twitter in my forum so was getting this problem all the time, since people use ampersands in tweets a lot (& uses 2 less characters than the word and which is useful when you only have 140 characters available in a tweet).

As a side note, I'v also discovered that the reader has the same problem with the degrees ° symbol, which is something I haven't been able to fix as yet. I think it comes back to our old friend the ampersand, since the html/xml code for the ° symbol is &deg; which contains the dreaded &.
Title: Re: RSS Feeder
Post by: Kindred on May 22, 2013, 10:17:20 AM
have not tried it myself...   but what about forcing an escaped character... like \\&
Title: Re: RSS Feeder
Post by: imrich on May 22, 2013, 10:22:07 AM
Kindred,

I didn't even think of that, it sounds even simpler.

In the $replace array change:


"&",


with this:


"\\&",


I'll give it a try soon!
Title: Re: RSS Feeder
Post by: sonficyus on June 20, 2013, 04:18:11 AM
I set up this modification and added 10 rss feeds. But i am still waiting for being posted...

Why it didn't work?

Is there a link that will make rss feeds posted? So, i can use this link and post rss feeds when i want...

Thanks in advance...

My site: http://cevherhazirlama.com/forum/
Title: Re: RSS Feeder
Post by: imrich on July 15, 2013, 04:41:31 PM
Quote from: imrich on May 22, 2013, 10:22:07 AM
Kindred,

I didn't even think of that, it sounds even simpler.

In the $replace array change:


"&",


with this:


"\\&",


I'll give it a try soon!

Actually, this almost worked, but not quite!

I did this:

"\\&",


and ended up with "\&". LOL Which seemed to break things again

So I just did this and will now test it:


"&",


So the output should hopefully just display the ampersand.
Title: Re: RSS Feeder
Post by: sonficyus on September 11, 2013, 02:18:46 AM
Quote from: sonficyus on June 20, 2013, 04:18:11 AM
I set up this modification and added 10 rss feeds. But i am still waiting for being posted...

Why it didn't work?

Is there a link that will make rss feeds posted? So, i can use this link and post rss feeds when i want...

Thanks in advance...

My site: http://cevherhazirlama.com/forum/

i want to post these when i want...
Title: Re: RSS Feeder
Post by: Alpay on October 17, 2013, 03:40:23 AM
Very Very good mod.. ^^

Thank you very much.
Title: Re: RSS Feeder
Post by: luuuciano on October 18, 2013, 01:37:51 PM
My books are burned... help!

I am testing two feeds...
The first one is the one I want to really use:
http://pipes.yahoo.com/pipes/pipe.run?_id=33af87832810ef8e84c2e2b0556dbc29&_render=rss
As it shows a wheater forecast in 1 phrase...
BUT... RSS Feeder do not import anything... and I have no idea what is wrong... the feed looks well formed, etc...

And here the 2nd feed, just used to test...
http://pipes.yahoo.com/pipes/pipe.run?_id=a11a9e4d9b94a92e3ece850c67055f3f&_render=rss
This worked ok... imported 5 items...

Any idea? what can be wrong?
BTW, I just used it today... tomorrow it will import the new forecast?? RSS feeder do not work with this kind of feeds?



In the other hand...
Someone tried to update the simplepie class used in this mod?
It looks like the latest version of simplepie is modular? (a lot of separated files)

I was thinking about doing it, to not have all the deprecated errors... because I tried using
error_reporting = E_ALL & ~E_NOTICE | ~E_DEPRECATED | ~E_USER_DEPRECATED
at the php.ini... and it cotinues showing a TON of deprecated errors on the smf log...
Title: Re: RSS Feeder
Post by: luuuciano on October 21, 2013, 10:50:46 AM
Quote from: luuuciano on October 18, 2013, 01:37:51 PM
In the other hand...
Someone tried to update the simplepie class used in this mod?
It looks like the latest version of simplepie is modular? (a lot of separated files)

Well.... Here found the single file version http://simplepie.org/downloads/simplepie_1.3.1.compiled.php
Used it on the Subs-Rss.php file... and replacing the call to

// Custom class for sorting...
class RSS_Feeder extends SimplePie
{

public static function sort_items($a, $b)
{
return $a->get_date('U') >= $b->get_date('U');
}
}


There is no more "deprecated" errors, and it looks to work ok...

But it logs 3 errors:

http://domain.com/index.php?action=admin;area=scheduledtasks
2: preg_match(): Compilation failed: nothing to repeat at offset 497
File: /home/username/public_html/Sources/Subs-Rss.php
Line: 15700

http://domain.com/index.php?action=admin;area=scheduledtasks
2: preg_match(): Compilation failed: nothing to repeat at offset 497
File: /home/username/public_html/Sources/Subs-Rss.php
Line: 15634

http://domain.com/index.php?action=admin;area=scheduledtasks
2: preg_match(): Compilation failed: nothing to repeat at offset 551
File: /home/username/public_html/Sources/Subs-Rss.php
Line: 15546


Anyway... I can not import the weather feed... :(
Title: Re: RSS Feeder
Post by: Suki on October 22, 2013, 03:00:32 PM
I managed to do it but wasn't that simple and since I was already using composer, I added simplepie as a library using composer and its autoloading feature.

Once I got the library, I completely delete the old class inside Subs-RSS.php and did some changes on the scheduled task:


                 $rss_data = new SimplePie();
$rss_data->set_feed_url($feed['url']);
$rss_data->set_cache_duration(60*60*2);
$rss_data->init();
$rss_data->handle_content_type();

// If we don't get a valid chunk of data back, disable the feed
if ($rss_data->error())
{
$smcFunc['db_query']('', '
UPDATE {db_prefix}rssfeeds
SET enabled = 0
WHERE id_feed = {int:feed}',
array(
'feed' => $id,
)
);

// Log an error about the issue, just so the user can see why their feed was disabled...
log_error($txt['rss_feeder'] . ': ' . $feed['url'] . ' (' . $rss_data->error() . ')');
continue;
}

// Set the right order, olders first...
$get_items = array_reverse($rss_data->get_items());


But I must say, I still get some encoding issues, mostly due to bad rss feeds or some weird and strange symbols
Title: Re: RSS Feeder
Post by: Chaoticone on December 15, 2013, 01:27:04 PM
Is anyone using this with SMF 2.0.6? I'm really hoping to avoid errors and other issues. My Forum seems to be very stable and solid right now and I hate to break it. I have been trying to use the RSS Feed Poster and I do have it working as well as it can but if it can't get the latest news it's of no use to me.

Any advise would be much appreciated.

SMF 2.0.6
RSS Feed Poster
Ad Seller Pro
Adk Rules Posts
Like Posts
Welcome Topic Mod
Yandex.Speller for SMF
Tagging System
Youtube Integration Mod (0.1)
SMF Links
Event Registration Mod for SMF2
Title: Re: RSS Feeder
Post by: luuuciano on March 07, 2014, 09:15:37 PM
Someone knows how many times RSS Feeder tries to fetch an RSS until it disabled it?

I have a source (in fact, I have just one!) that I need to check every week, because it gets disabled too often...

My idea is to try to increase that value... or something, and adding a pause on each try (or it just try ONE time??)

I have setup the rss feeder task to run every 8 hours... so, just 3 times a day... it is really bad luck that too often the source do not respond
Title: Re: RSS Feeder
Post by: mj. on September 01, 2014, 02:04:27 PM
Well, kafooey, I like this mod, but when I try to use a google news search feed my links don't resolve at all.  My posting user is an admin and I have html enabled.  It's this feed: https://www.google.com/alerts/feeds/07378569770343342231/4632544986743109160

When I inspect the page I see this:
<a href="http://" class="bbc_link" target="_blank"><b>E-cig</b> uptake linked to official drop in quitters</a>

When I look at the raw XML from the feed I see this should be the link:

https://www.google.com/url?rct=j&sa=t&url=http://www.nursinginpractice.com/article/e-cig-uptake-linked-official-drop-quitters&ct=ga&cd=CAIyGjZhNzZjNTdjMzZjNzU5YWI6Y29tOmVuOlVT&usg=AFQjCNH76Y-c6Kcp3wENZr2GetfoBcyeZA

Any help please?
Title: Re: RSS Feeder
Post by: lomaalta on December 10, 2014, 01:01:16 PM
Ok, at the risk of being labeled lazy - can you tell me the purpose (not the how) of using regular expressions?

Do I need to look at the individual feeds to determine the regexes?

...  and btw - had installed another rss feed mod - but images weren't appearing, weird characters etc.  This looks SO much better in so many ways - THANKS!
Title: Re: RSS Feeder
Post by: Arantor on December 10, 2014, 01:04:04 PM
The purpose of using regular expressions is because there's no single definitive way to get the data you want - it's not the same page layout everywhere on the web. Regular expressions are a way of being able to explain what information you want to match inside a page.

And you look at the page the feed points to, rather than the feed itself. Since that's what the regular expression will be applied to.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 07:32:22 AM
I'm having trouble with pulling the parts of the article I'd like from the source at:
www.thedailychronic.net/2014/37930/marijuana-business-class-returns-to-new-york-city

I believe its the "div class="post-column pull-left" part I'm trying to pull.

I've tried using:

~<div class="post-column pull-left">(.*)<\/div>~siU
but it doesn't grab the text part.

whilst ~<div class="post-column pull-left">(.*)<\/div>~s
grabs parts after the article I'm not looking to include :(

could someone help get it to just grab the picture, title and article itself.

Much appreciated
Thank you
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 09:10:16 AM
The first regex should work just fine, if the page has a responsive design then make sure the "post-column pull-left" actually exists on the page that is been sent to, sometimes the page you are seeing with the browser isn't the same as the one the mod will grab.

Anyway I updated this mod for 2.1 and updated the SimplePie class too, might be worth to replace the regex feature with DOMDocument class. Too bad the license of this mod doesn't allow redistribution.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 09:21:13 AM
Quote from: Suki on February 08, 2015, 09:10:16 AM
The first regex should work just fine, if the page has a responsive design then make sure the "post-column pull-left" actually exists on the page that is been sent to, sometimes the page you are seeing with the browser isn't the same as the one the mod will grab.

Anyway I updated this mod for 2.1 and updated the SimplePie class too, might be worth to replace the regex feature with DOMDocument class. Too bad the license of this mod doesn't allow redistribution.

:( unfortunately not.

I've checked the feed page of the site and found "post-column pull-left" doesn't exist..

although I can't see what I would use from the feed page in the regex instead.

http://www.thedailychronic.net/feed/

examples of how it's grabbing:
http://www.420connect.info/forum/index.php?topic=441
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 09:30:19 AM
Well, it appears that particular feed doesn't add any HTML so you don't actually need to do any regex work

¿How exactly do you want to show that info?  The example on your site is full of "You are not allowed to view links. Register or Login".
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 09:42:00 AM
Sorry, I forget what it looks like to guests as I'm usually logged in.

a: smftest
pw: smftest

if you'd like to log in.

& I'm looking for it to grab the title, picture and article text.

something like..
[picture]

[title]

[article]

no related articles / comments etc.
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 10:24:35 AM
Looks like the full article contains comments and links to other articles, you might need to change the code a little bit but that means you won't be able to set multiple feeds.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 10:30:50 AM
Multiple feeds as in from multiple sources?
I'm fine with that if I can get this one functioning as I'd like.

& Do you mean change the code of the Feeder mod?


I'd be very grateful if you can tell me which edits to make!
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 10:49:44 AM
Yes, multiple feeds from multiple sites.

The first thing to do is setting up a test enviroment to test the changes, so create a test.php file in the root of your forum where SSI.php is with the following:


<?php

include 'SSI.php';

require 
$sourcedir'/Subs-Rss.php';

$rss_data = new RSS_Feeder();
$rss_data->enable_cache(true);
$rss_data->enable_order_by_date(true);
$rss_data->set_cache_location($cachedir);
$rss_data->set_cache_duration(60*60*2); // 2 hours
$rss_data->set_output_encoding($context['character_set']);
$rss_data->strip_htmltags(false); // Gonna do my own stripping ;-)
$rss_data->set_useragent('SMF RSSFeeder v1.1 (Feed Parser; http://simplepie.org; Allow like Gecko)');
$rss_data->set_autodiscovery_level(SIMPLEPIE_LOCATOR_NONE);

foreach (
$rss_data->get_items() as $item)
{
print_r($item->get_title());echo '<br>';
print_r($rss_data->get_image_url());echo '<br>';
print_r($item->get_description());echo '<br>';
die;
}



Now use your browser to go yourforum.com/forum/test.php changing the yourforum with the url where your forum resides, in theory you should see 1 title, image link and description.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 11:01:11 AM
Hmm, I followed your instructions but my test.php page appears as a blank white page
I'm not sure if adding that file should have done anything to the RSS posts or to that file, but they still seem formatted as they were before..  :o

Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 11:11:01 AM
Oh, I forgot to set the feed url

After this part:

$rss_data->set_autodiscovery_level(SIMPLEPIE_LOCATOR_NONE);

Add this:


$rss_data->set_feed_url('http://www.thedailychronic.net/feed/');
$rss_data->init();


Your already existing posts won't be altered in any way, this is just to check what the feed actually returns, any change that you made to the rss feed will only be aplicable to newly created posts, already created post won't be altered.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 11:20:25 AM
Sorry for being a pain  :-[

I've added in the exta bit and tested the test.php page,
that page now shows:

Quote from: http://420connect.info/forum/test.phpMarijuana Business Class Returns to New York City

NEW YORK, NY — On Saturday November 1, 2014 at the Crown Plaza JFK Air Port 138-10 135th Ave Jamaica, New York 11436 Cannabis Career Institute will be offering a class focusing on how to open a medical marijuana dispensary, grow operation, edibles company or marijuana delivery service for the State of New York. The [...]

as you can see, it adds"[...]" cutting off the full text and no theres sign of an image?

also, the most recent "feed grabs" haven't changed:
http://www.420connect.info/forum/index.php?topic=441.msg3651;topicseen#new


:P I always seem to want to do tricky things >.<
Thank you for your patience and I'm very appreciative of the help!
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 11:28:48 AM
Then I'm afraid there is no real way to only get the full content without comments or links to other articles.

the get_description() method will only show a summary and the get_content() method will show the full content but since there is no HTML or any other tags you can't use regex to extract the bits you want.

Quote
also, the most recent "feed grabs" haven't changed

And they won't change, what was already posted will remain as it is, also, this is only a test environment, you haven't actually changed anything in the mod.

OK, one last attempt, lest see what get_content() actually returns, if it returns some HTML code then it would be possible to use regex on it. Change this:

print_r($item->get_description());echo '<br>';

to this:

var_dump($item->get_content());echo '<br>';
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 11:38:18 AM
Using that latest edit, test.php returns:

QuoteMarijuana Business Class Returns to New York City

string(326) "NEW YORK, NY — On Saturday November 1, 2014 at the Crown Plaza JFK Air Port 138-10 135th Ave Jamaica, New York 11436 Cannabis Career Institute will be offering a class focusing on how to open a medical marijuana dispensary, grow operation, edibles company or marijuana delivery service for the State of New York. The [...]"


I'm on the same page now, thanks for explaining that lol :)

This link is an example of when it grabs "too much"
http://www.420connect.info/forum/index.php?topic=441.msg3572#msg3572

Would it be possible to remove any of the extra parts? or even format it to be ..presentable?

Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 11:41:10 AM
OK, I forgot var_dump() likes to cut off stuff if its too long, just one last attempt, change the var_dump word with print_r

If the comments have some HTML, most likely an ul tag then it will be possible to remove those via regex.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 11:49:03 AM
Sadly, nope - still the [...] version.


& Luckily, there are loads of <ul tag occurrences in the source for their site!

*crosses fingers*

;D
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 11:57:19 AM
I've been reading the mod's code, do you have the "retrieve full article" option enable for this feed? the code indicates there is a way to get the full raw content via another class.

Yet one last attempt :P

Change this:


print_r($item->get_title());echo '<br>';
print_r($rss_data->get_image_url());echo '<br>';
print_r($item->get_description());echo '<br>';
die;


Or whatever code you might have now with this:

$full_article = new SimplePie_File($item->get_permalink(), 10, 5, $rss_data->useragent);
echo '<pre>';print_r($full_article);die;

It seems that var should contain raw HTML or at lease something to work with.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 12:01:06 PM
(Yep have full article checked)

Oooh, nice one Suki!
:-*

It appears we're a step closer!
check out test.php now >> http://420connect.info/forum/test.php

edit:
(I just scrolled down, - never realised how long this page is now too!)
Title: Re: RSS Feeder
Post by: Suki on February 08, 2015, 12:15:47 PM
Actually your regex was just fine and did grab exactly what you told it to :P  its just that the "post-column pull-left" div also contains a lot of stuff besides the main article.  Let me install that mod on local and do some test.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 12:20:31 PM
Ahh, sure I'm with you - that makes sense..  ;)

I look forward to your update!

& Thank you again for your patience and cooperation!
You're a legend   ;D

also, would it be possible to "escape" the new code to allow me to add additional normal feeds if I were to find another feed that had an easier to use feed code..
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 08, 2015, 05:16:23 PM
Hey,

one more thing I thought of, I'm hoping is possible..

If you manage to get that site's feed working,
I plan to use the MOD to create separate topics for each feed item rather than each item in the same post, but currently it was naming the 'subject' as "The Daily Chronic" every time.

Would it be possible to use the name of the article as the 'subject' ?

Many thanks again!  :-*
Title: Re: RSS Feeder
Post by: Suki on February 09, 2015, 12:32:33 PM
OK, try this regex, no need to do any change in the code:


~<div class=\"post_meta\">(?:.*)<\/div>(.*)<div class=\"post-author\">~siU


This is a pretty simple approach, it grabs anything after and before certain divs which hopefully exists on every article, the downside of this is that there is no image as the image is displayed before the div used by the regex, getting it may be complicated and will require code edits since the mod only expect 1 single match.

Quote from: 420connect.info on February 08, 2015, 05:16:23 PM
Hey,

one more thing I thought of, I'm hoping is possible..

If you manage to get that site's feed working,
I plan to use the MOD to create separate topics for each feed item rather than each item in the same post, but currently it was naming the 'subject' as "The Daily Chronic" every time.

Would it be possible to use the name of the article as the 'subject' ?

Many thanks again!  :-*

Theres an option for it already, if there is a separate topic for each feed the topic title gets renamed to the feed title.
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 09, 2015, 01:51:54 PM
Ooooh! thank you so much!  ;D  O:)

This grabs as you said, the article with no image.

Theres a few characters that come out strange:



but apart from them it's awesome!  :-*

I would prefer to be able to grab the image too but can't decide if I want to lose the ability to add additional feeds.. hmm!   :-\
I don't suppose it would be possible to set it up to work for both?


& Thanks for the pointer on the 'subject' ! - I hadn't tested the separate board feature yet!
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 11, 2015, 07:20:00 AM
I've had a dig around for what I am find online and think this might be what I'm looking for although I'm probably failing to add it into the statement correctly..

if anyone who can wrap their head round regex can help add these together, that would be awesomeee!  8)  O:)

"(ness)?$|(n't)?$|('re)?$|('s)?$|(s)?$|(ty)?$|('ve)?$"
(found here (https://social.msdn.microsoft.com/Forums/en-US/497ba906-0ff7-46ac-a378-0e7b9274e731/how-to-protect-apostrophe-in-regex?forum=regexp))

getting the above to work with the below:

~<div class=\"post_meta\">(?:.*)<\/div>(.*)<div class=\"post-author\">~siU

Thanks in advance!
;D






I seen a previous post in this thread about using the 'censored words' feature to help clean up feeds.
so at the moment I've not got occurrences of things like "’" to be replaced with a space or apostrophe - this seems to be an okay workaround for now anyway :)

I'd still prefer to be able to grab the image too & have it formatted nicely but this seems to be the closest thing so far! :)
Title: Re: RSS Feeder
Post by: Kindred on February 11, 2015, 08:05:55 AM
Thing is -- those are generally UTF-8 characters which have not been translated correctly
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 11, 2015, 08:13:18 AM
Would you happen to know if it's possible to "tell it to" translate them as it should be? and would this be file edits/regex to achieve this?
Title: Re: RSS Feeder
Post by: Low on July 02, 2015, 10:00:33 AM
Can this work for 2.0.10?
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on July 08, 2015, 11:24:11 AM
I have this set up and running at the moment on a 2.0.10 Installation..

I found it kept switching off by itself every so often though, so find a 'sweet spot' for how often to grab feeds! :)
Title: Re: RSS Feeder
Post by: lomaalta on October 11, 2015, 01:56:40 PM
I am looking at the code within ScheduledTasks.php in an effort better format the incoming feeds.

right around here....


// Format the post
$message =
($item->get_permalink() !== null ? '[url=' . $item->get_permalink() . ']' . $title . '[/url]' : $title) . '
' . ($item->get_date() !== null ? '[b]' . $item->get_date() . '[/b]
' : '') . '
' . $body . '

' . (!empty($source) ? '[b]' . $txt['rss_feed_source'] . ':[/b] ' . $source . '



...  and am wondering if I can throw a few double quotes in that code, so I can say <span class="permalink"> instead of only using bbc code.

Thanks in advance.
Title: Re: RSS Feeder
Post by: Siirist on February 03, 2016, 12:24:30 PM
Hi,

Just a quick question.

I have a board for each RSS feed.
If I check the box for "Post Items In Single Topic" that means that the MOD will NOT create a New Topic for each feed that comes from that site?

Thanks,
Siirist
Title: Re: RSS Feeder
Post by: 420Connect.co.uk on February 03, 2016, 01:40:02 PM
Yup..
Title: Re: RSS Feeder
Post by: Siirist on February 03, 2016, 06:15:30 PM
Quote from: 420Connect.co.uk on February 03, 2016, 01:40:02 PM
Yup..

Thanks

Siirist
Title: Re: RSS Feeder
Post by: lomaalta on March 26, 2016, 09:01:11 AM
Been running this for awhile and been very very happy.  Well, I recently changed host, that may have a later version of php? And now when posting, I am getting a lot of funky characters in the posts. Suspecting php, or character issue in the db, or the stripping function in Subs-rss.php.  Any ideas would be greatly appreciated.  Thanks.

Title: Re: RSS Feeder
Post by: 420Connect.co.uk on March 26, 2016, 02:34:04 PM
Quote from: lomaalta on March 26, 2016, 09:01:11 AM
Been running this for awhile and been very very happy.  Well, I recently changed host, that may have a later version of php? And now when posting, I am getting a lot of funky characters in the posts. Suspecting php, or character issue in the db, or the stripping function in Subs-rss.php.  Any ideas would be greatly appreciated.  Thanks.

I also had this issue.. My workaround is using the smf censored words tool to replace the strange characters to their true punctuation mark or space etc. But if any can help in a coding sort of way that would be cool! 
Title: Re: RSS Feeder
Post by: cuongvttt on September 26, 2017, 06:00:42 AM
Hi guys,

I'm using SMF 2.0.14, and now i want to use this mod RSS Feeder but now it seems it's only compatible with: 2.0 RC4
Can you guys tell me is there a mod that has the same features of this mod.

Thank you guys so much.
Title: Re: RSS Feeder
Post by: Gryzor on January 04, 2018, 04:25:21 AM
Hello!

I know this hasn't been updated in ages, but it was working just fine with my 2.0.15 installation.

However, over the past few days, it decided to start fetching items multiple times (the feeds are correct, btw) and ignoring posts in other feeds! Any help?

Thanks - and, oh! have a great 2018 everyone!

T