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
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
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
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
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...
Code: [Select]
<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
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
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.

Quote
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.
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"

Code: [Select]
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
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
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
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
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


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
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...
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
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
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
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...

Code: [Select]
<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
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
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
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
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
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?
[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
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

Code: [Select]
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
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.

ScheduledTasks.php

Code: [Select]
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
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.

ScheduledTasks.php

Code: [Select]
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
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
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
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

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
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
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:

Quote
An 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
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
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
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.

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.

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?

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:
Code: [Select]
http://www.bt.com.bn/en/front/feed
Regular Expression:
Code: [Select]
~<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
Feed URL:
Code: [Select]
http://www.bt.com.bn/en/front/feed
Regular Expression:
Code: [Select]
~<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
Code: [Select]
[img]/en/files/images/photos/2009-01-14/13_envir.jpg[/img]
original from the website
Code: [Select]
<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
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
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:

Quote
Author : Bryan (IP: 67.177.216.184 , c-67-177-216-184.hsd1.co.comcast.net)
E-mail : bryan@grandmasterb.com
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
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
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
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
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
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.

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.

Code: [Select]
<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
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
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
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

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.   

Code: [Select]
[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
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.

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
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.

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
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.
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..  ;)

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...

"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.

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.

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.

Code: [Select]
<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.

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.
Code: [Select]
$title = striphtml($item->get_title());
Code: [Select]
$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:

Code: [Select]
~<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
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
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

Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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
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:

Code: [Select]
~<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

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

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
@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.

Code: [Select]


// 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
@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
@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
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
Quote
and 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
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
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

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
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
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
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.

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
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
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

Code: [Select]
/* 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
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
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
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
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
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

Code: [Select]
/* 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 :)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fhost2k9.info%2F%2Fimage%2Fdirect%2FpLO0IxT9LH%2Fmyrssfeed.png&hash=a873ae548d8b5084dcf908c09ff5dc9e)
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 :)

Code: [Select]
/* 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
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
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
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
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
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
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:
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
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
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
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...

Code: [Select]
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
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
Quote
Thanks 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
Thanks 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
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:

Code: [Select]
~<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
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
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
Quote
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.

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
@ 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
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
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
Code: [Select]
?>
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: mtechama 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:
Code: [Select]
?>
Add before:
Code: [Select]
/* 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
Quote
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]).
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?

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
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?

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
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
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
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
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
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
Quote
Table '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
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:

Quote
Table '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
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
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
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:

Quote
Table '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
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
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
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
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
Hello,
Can I translate to turkish this  modification
Sure :)

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
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
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
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
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 ''

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.

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
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 ''

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
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
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
Code: [Select]
$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.
 
Code: [Select]

   /*$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?
 
Code: [Select]

  /* 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
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...

Code: [Select]
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
Code: [Select]
<?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: mtechama 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: mtechama 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: mtechama 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
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: mtechama 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: mtechama on June 03, 2009, 10:42:58 PM
What do mean manually? How do you do that?
Title: Re: RSS Feeder
Post by: mtechama 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...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1244087873-clip-14kb.png&hash=b4ea0017e85296676895a09346ba806f)
Title: Re: RSS Feeder
Post by: mtechama on June 04, 2009, 12:03:07 AM
I have done that but still no changes.
Title: Re: RSS Feeder
Post by: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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

Code: [Select]
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: mtechama 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: 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?
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: mtechama 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: mtechama 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
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...
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: mtechama 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: mtechama 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: mtechama 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
Screen shot of run now...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1244087873-clip-14kb.png&hash=b4ea0017e85296676895a09346ba806f)

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: mtechama 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: mtechama 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...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1244843470-clip-10kb.png&hash=930d1c0c9a46bb4a051cdfa09f8b1c09)
Title: Re: RSS Feeder
Post by: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama 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: mtechama on June 16, 2009, 05:46:25 PM
SlammedDime,  how can I found out on the server configuration?
Title: Re: RSS Feeder
Post by: mtechama on June 16, 2009, 07:32:27 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...

I never said you had to download anything...

In your package manager in your admin panel...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1244843470-clip-10kb.png&hash=930d1c0c9a46bb4a051cdfa09f8b1c09)

:)
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: 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?
Title: Re: RSS Feeder
Post by: zorro18 on June 18, 2009, 12:42:16 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
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.

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

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: mtechama 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.

Quote
Install 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...
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...

I never said you had to download anything...

In your package manager in your admin panel...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1244843470-clip-10kb.png&hash=930d1c0c9a46bb4a051cdfa09f8b1c09)

:)
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.

Quote
Install 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: mtechama 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.

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
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: mtechama 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: mtechama 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
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: mtechama 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: mtechama 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
Code: [Select]
~<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
Code: [Select]
~<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
Quote
If 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
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
Quote
If 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
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
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
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?
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
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
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...

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
Code: [Select]
// 'shout' => array($txt['shout']),
'rssfeeds' => array($txt['mods_cat_modifications_rssfeeds']), 


8: Undefined index: rss_feeder_desc
File: ~/Sources/ManageSettings.php
Line: 219
Code: [Select]
// 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
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
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: mtechama 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: mtechama 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: mtechama 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

Code: [Select]
/* 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:
Code: [Select]
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
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: NBK*Twitch 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: NBK*Twitch on August 14, 2009, 06:27:23 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?

Quote
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: SlammedDime on August 14, 2009, 08:30: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.

Just thought I would ask again and find out if anybody knows of a mod or a way to do this?

Quote
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
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: NBK*Twitch on August 14, 2009, 10:12:44 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.

Just thought I would ask again and find out if anybody knows of a mod or a way to do this?

Quote
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
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
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: NBK*Twitch on August 14, 2009, 10:50:28 PM
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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1250305154-clip-4kb.png&hash=4ac9b162e8950c67164ff453a2dc76e0)
Title: Re: RSS Feeder
Post by: NBK*Twitch on August 15, 2009, 02:22:15 AM
Here is a print screen of mine -

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi28.tinypic.com%2F246s9bl.jpg&hash=b430504baf00a25a2968c1c5110ba89b)
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: NBK*Twitch on August 15, 2009, 05:17:57 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: NBK*Twitch 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: NBK*Twitch on August 16, 2009, 10:27:43 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
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
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
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: NBK*Twitch 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: NBK*Twitch on August 17, 2009, 07:09:32 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: NBK*Twitch on August 17, 2009, 08:53:12 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: NBK*Twitch on August 17, 2009, 09:21:15 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: NBK*Twitch on August 17, 2009, 10:18:36 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
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: NBK*Twitch 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: NBK*Twitch on August 18, 2009, 06:55:54 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.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1250636417-clip-18kb.png&hash=f0a87e06d3e2a835b087c0853d4b78b3)
Title: Re: RSS Feeder
Post by: NBK*Twitch on August 18, 2009, 07:08:57 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.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fclip2net.com%2Fclip%2Fm18043%2F1250636417-clip-18kb.png&hash=f0a87e06d3e2a835b087c0853d4b78b3)

Well this would be easy,but I do not see that button... Even on the default theme..

Here is what mine looks like -

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi31.tinypic.com%2F34nrwap.png&hash=a85ed5a444c9515c9913b0a0e8166f37)
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: NBK*Twitch on August 18, 2009, 09:57:54 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: NBK*Twitch 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: NBK*Twitch 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: NBK*Twitch on August 20, 2009, 03:24:00 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]          
            
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2F311entertainment.co.cc%2Fforum%2FThemes%2Fextreme6_20_RC1%2Fimages%2Frss_disabled.gif&hash=ac5c14baa794fd85be15b4ca74ddf492) (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)
                      
            
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2F311entertainment.co.cc%2Fforum%2FThemes%2Fextreme6_20_RC1%2Fimages%2Frss_disabled.gif&hash=ac5c14baa794fd85be15b4ca74ddf492) (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)
                      
            
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2F311entertainment.co.cc%2Fforum%2FThemes%2Fextreme6_20_RC1%2Fimages%2Frss_enabled.gif&hash=ade7ee08aba153c626717453dc09f57d) (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)
                      
            
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2F311entertainment.co.cc%2Fforum%2FThemes%2Fextreme6_20_RC1%2Fimages%2Frss_enabled.gif&hash=ade7ee08aba153c626717453dc09f57d) (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: NBK*Twitch on August 20, 2009, 03:56:18 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: NBK*Twitch on August 20, 2009, 07:33:53 PM
Sorry for the bump,but it seems I am getting and error with the rss feeder.

                           (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2F311entertainment.co.cc%2Fforum%2FThemes%2Fextreme6_20_RC1%2Fimages%2Ffilter.gif&hash=934eefbc572ab8ac88f555431cb84da0) (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: NBK*Twitch on August 20, 2009, 08:10:08 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: NBK*Twitch 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: NBK*Twitch on August 20, 2009, 10:35:55 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
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: NBK*Twitch 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: NBK*Twitch on August 21, 2009, 11:52:52 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
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
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: NBK*Twitch on August 26, 2009, 01:52:33 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
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.

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
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: NBK*Twitch 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
Quote
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: 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
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
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
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: NBK*Twitch on October 10, 2009, 01:57:27 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
Code: [Select]
$this->force_feed = true;before
Code: [Select]
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:
Code: [Select]
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
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
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: NBK*Twitch on October 14, 2009, 01:32:12 PM
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
In ScheduledTasks.php, just search for Source:

// Format the post
         $message =
'' . $title . ' (http://' . $item->get_permalink() . ')
' . ($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
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
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
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:

Quote
Table '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.
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.
Code: [Select]
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
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
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:
Code: [Select]
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

Code: [Select]
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
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
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
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:
Code: [Select]
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
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.

Quote
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.
: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
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
Code: [Select]
[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

Code: [Select]
~<div id="articlestory">(.*)<\/div>~siUinto 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
Code: [Select]
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


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
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:

Code: [Select]
~<\/script><\/div>(.*)<br>~siU
Now it extracts the articles,
but as soon as inside the article there is an apostrophe like this for example
Code: [Select]
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
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:

Code: [Select]
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:

Code: [Select]
~<\/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
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
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
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:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsecure-uk.imrworldwide.com%2Fcgi-bin%2Fm%3Fci%3Des-rssweblogs%26amp%3Bcg%3D0%26amp%3Bsi%3Dhttp%3A%2F%2Fwww.motorpasion.com%2Findex.xml&hash=28201e4e874ecb9a9cbe626c5b3ec345)       (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg.motorpasion.com%2F2009%2F12%2Faston-martin-one77-record.jpg&hash=11d0233912fee02f9a9ae35a63d9fce5)

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
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:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsecure-uk.imrworldwide.com%2Fcgi-bin%2Fm%3Fci%3Des-rssweblogs%26amp%3Bcg%3D0%26amp%3Bsi%3Dhttp%3A%2F%2Fwww.motorpasion.com%2Findex.xml&hash=28201e4e874ecb9a9cbe626c5b3ec345)       (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg.motorpasion.com%2F2009%2F12%2Faston-martin-one77-record.jpg&hash=11d0233912fee02f9a9ae35a63d9fce5)

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 -

Code: [Select]

    // 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
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.

Code: [Select]
</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:
Code: [Select]
~<div class="KonaBody">(?:.*)<\/div>~siU
And Example 2:

Code: [Select]
<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:

Code: [Select]
~<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
(?:.*) 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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.img4.earthcreations.org%2Fimages%2F28720555163071095096.png&hash=99ba758ba086b03c2a9ac2c65b48b97a)

that post posted by the feed poster is a live link  with just the word code above it

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.img4.earthcreations.org%2Fimages%2F53604499734460397067.png&hash=c9302aed816e9be65153816c420a8303)



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
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
Code: [Select]
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
Code: [Select]
'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"

Code: [Select]
global $context, $txt, $sourcedir, $scripturl, $smcFunc;
one of the errors may go away if you change it to:
Code: [Select]
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
Quote
http://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
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
SlammedDime Dear Please Reply  :(
SocksHeaven, I believe that was covered before. Try this....

In ScheduledTasks.php
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 -

Code: [Select]

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

Code: [Select]

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 -

Code: [Select]

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
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
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
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 ?

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
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
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?
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
@Satfreak
find:
Code: [Select]
// 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:

Code: [Select]
// 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
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
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
Quote
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

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
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

Code: [Select]
// 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:

Code: [Select]
// 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
right i have it down to this but i can't get the date out without causing errors:

Code: [Select]
// 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:
Code: [Select]
// 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:
Code: [Select]
// 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
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 .