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 :(
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.
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 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.
<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>
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.
Nao:Just so you know -- / isn't part of the preg_quote list either.
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.I just think it's good practice to learn what the extra "?" is all about, asap.
Unknown column 'f.id_feed' in 'field list'
File: /home/secsport/public_html/forum/Sources/ManageSettings.php
Line: 2577
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.
Any errors in the error log? Make sure you have the log_rssfeeds table in your database.
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.
This makes no theme edits, it is theme independent, works across any and all.
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
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:The above fixed your problem as well.
http://www.20minutos.es/rss (http://www.20minutos.es/rss)
Ah,the problem is not only with "´",the same thing happen with "ñ".
Thanks!.
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?
digger - I'll entertain that thought... however answer me these questions:Each feed would have it's own topic.
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?
is it as simple as typing:
http://www.youtube.com/myvideolinkhere
And AEVA parses it and displays the video?
<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul> <img>
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.
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.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?
Thank you. I'm waiting for the new release.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...
I'm not sure where you came up with those regex's.... For your first one... that has a lot of video feeds... so to extract the text from the video feeds, you'd want to use
~<div id="videoText">.*<\/div>(.*)<\/div>~siU (untested, but should work)
And for the second one
~<p><font class="sb13">(.*)<\/font><\/p>~siU (again, untested, but should work)
SlammedDime, I've encountered the same error... including errors on Subs-Rss.php and subs-post.phpThese 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?
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 1272These are not caused by this mod... the function that those error fall in is not called by this mod
[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 2040The 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.
[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
1731 $matches = array();
1732 preg_match($feed['regex'], $browser->results, $matches);
1733 $body = $matches[1];
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.
ScheduledTasks.phpThanks for posting that code, I've corrected the code so an error will no longer be thrown in the first case above.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...
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.phpThanks for posting that code, I've corrected the code so an error will no longer be thrown in the first case above.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...
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.
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 usingOhhhh...... Fun memories! lol
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.
LOLIf 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 usingOhhhh...... Fun memories! 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:That means the mod was installed twice... you'll need to go through and remove the duplicate code by hand.
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.
Mainly because it's a crucial part of my new site I'm launching... lol.
An Error Has Occurred!
The database value you're trying to insert does not exist: hash
Unknown column 'f.icon' in 'field list'
File: /home/content/b/u/d/budaadmin/html/sites/pickaline/Sources/ScheduledTasks.php
Line: 1611
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.
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.
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.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.
"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.
Another problem.Does the actual post have ? in it? Can you link me to a specific article this happens with?
Posts looks good when i start update task manually.
When it starts automatically Cyrillic characters looks like ?????????
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.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.
http://www.bt.com.bn/en/front/feed
~<h1 class="title">(.*)printer friendly version~siU
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
[img]/en/files/images/photos/2009-01-14/13_envir.jpg[/img]
<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...
Another problem.Does the actual post have ? in it? Can you link me to a specific article this happens with?
Posts looks good when i start update task manually.
When it starts automatically Cyrillic characters looks like ?????????
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
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
// 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()
);
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.
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:)
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.
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?
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.
<option value="11" selected="selected">Poker Blogs</option>
By default it runs ever 6 hours... unless you edit the scheduled task to run in shorter increments.
HiAwesome... I didn't realize that the 'hash' function was only available on PHP 5.1.2+, so I'll have to fix that...
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?
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...
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.
[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
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.
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....
might want to run that url, www.tcof.nl/rssn.phpDoes feedburner also update my feed automatic like my script does?
thru http://www.feedburner.com that will set up the rss thread correct for your site.. ;)
You didn't properly close your cdata section...
All you have is ]]. It needs to be ]]>
might want to run that url, www.tcof.nl/rssn.phpDoes feedburner also update my feed automatic like my script does?
thru http://www.feedburner.com that will set up the rss thread correct for your site.. ;)
@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.phpDoes feedburner also update my feed automatic like my script does?
thru http://www.feedburner.com that will set up the rss thread correct for your site.. ;)
@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.
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.
"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.
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
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 = striphtml($item->get_title());
$title = $item->get_id();
// 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()) : '';
// 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() : '';
~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU
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 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.
ex:
http://www.gotfrag.com/cs/story/43829/
http://www.gotfrag.com/cs/story/43826/
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
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
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
list($numFeeds) = $smcFunc['db_fetch_row'];
list($numFeeds) = $smcFunc['db_fetch_row']($request);
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.phpCode: (Find) [Select]list($numFeeds) = $smcFunc['db_fetch_row'];
Code: (Replace) [Select]list($numFeeds) = $smcFunc['db_fetch_row']($request);
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.phpCode: (Find) [Select]list($numFeeds) = $smcFunc['db_fetch_row'];
Code: (Replace) [Select]list($numFeeds) = $smcFunc['db_fetch_row']($request);
thanks. great mod by the way
@poster pls how do i add it to my forum smf 1.1.8 step by step manual plsUpgrade to SMF 2.0.
// 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'],
);
just wondering but why not?@poster pls how do i add it to my forum smf 1.1.8 step by step manual plsUpgrade to SMF 2.0.
This does not support 1.1.8, nor will it ever. Sorry.
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.just wondering but why not?@poster pls how do i add it to my forum smf 1.1.8 step by step manual plsUpgrade to SMF 2.0.
This does not support 1.1.8, nor will it ever. Sorry.
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);
and add this AFTER that.because that line was above it.
$rss_data->enable_cache(false);
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)
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.
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 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 ?
I guess is working now. i forgot the schedule :-Xit 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.
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 ?
Hi,Just put add_settings.php into your main SMF directory and run it.
can i have the SQL create table scrip for RSS Feeder? i'm having problem installing this mod.
Thanks.
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 :-\You'll have to edit that in ScheduledTasks.php
thank you SlammedDime. hope to do it someday (make clickable)
How to remove - Source: ... ?
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.
Hi,Just put add_settings.php into your main SMF directory and run it.
can i have the SQL create table scrip for RSS Feeder? i'm having problem installing this mod.
Thanks.
Hi i got this error when i executed the add_settings.phpCode: [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
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 */
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.phpCode: (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.
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.
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?
/* 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
/* 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 \'<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 />
Open up the ManageSettings.php and move ?> to the very end of the file.
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.
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!
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
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.
Anything is possible... It can be removed in ScheduledTasks.php. Just do a search for 'Source:' in that file and remove that line.
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.
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.
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?
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 :)
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
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 that worked - now just one question - any way to get the main pic as well as the text?
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 pageQuoteThanks 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.
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
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.
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) |
HiIt 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 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.
@ Verso in Sources/ModSettings.php you need to put this ?> at the very bottom of the file.
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.
Try Sources/ManageSettings.php
?>
?>
/* 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 */
Regular ExpressionWhat is that and where do i get that? Feed what im using is
Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1]).
I have it running here and it works great, thanks SlammedDime.That looks perfect. How do you have removed that Source part?
http://forum.pctweakr.com/index.php/board,3.0.html (http://forum.pctweakr.com/index.php/board,3.0.html)
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
Any idea why this isnt working urls like this?Any errors in the error log?
http://www.helistin.fi/rss/
http://www.tohtori.fi/rss/
I have two smf forums of same 2.0. RC1 version.I'm afraid there is no easy way to do that that I can think of.
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.
None.Any idea why this isnt working urls like this?Any errors in the error log?
http://www.helistin.fi/rss/
http://www.tohtori.fi/rss/
I'm afraid there is no easy way to do that that I can think of.
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
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.
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.
Table 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420
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? ThanksNo one? :(
Table 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420
hi i have this installed but where in admin do find it and how do i check its working ok ?
hi its says installed but it cant as i cant find that in admin :(
When I place add_settings.php in the root of the forum and access it manually I am brought to admin>config>rss feeder and get the same error as before about the table not being created:QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420
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?
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?
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
Hi There. I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".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.
Any idea why this is happening? Its quite annoying...
Hello,Sure :)
Can I translate to turkish this modification
Hi There. I have RSS Feeder running on my forum, however every day or two, my RSS feeds go from "Enabled" to "Disabled".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.
Any idea why this is happening? Its quite annoying...
Source:
Kaynak:
?>
/* 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 */
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...
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? ThanksHelp ::)
Link?
I am sorry, I've just read the footer :)1) It's in ScheduledTasks.php. I forgot to put the language string in the language file.
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.
I thought I already replied to this.... it's not possible with the mod, and I probably won't be building that in.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? ThanksHelp ::)
No, I mean, I need a link to your board with an example.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)
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 ''
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
Suggestion: additional checkbox "Mark as read for everybody" in options.Unfortunately it's not easily possible, I've already tried and considered it in the very first release of the mod.
Is is possible or maybe even consider?
Best regards
$smcFunc['db_query']('', '
UPDATE {db_prefix}rssfeeds
SET enabled = 0
WHERE id_feed = {int:feed}',
array(
'feed' => $id,
)
/*$smcFunc['db_query']('', '
UPDATE {db_prefix}rssfeeds
SET enabled = 0
WHERE id_feed = {int:feed}',
array(
'feed' => $id,
)*/
/* 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;
}*/
What HTML problem?
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);'",
"'ß'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;
}
<?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($fp2, 8192);
}
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, $errstr, 30);
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($fp, 128);
}
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($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// 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) ? 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($fp2, 8192);
}
fclose($fp2);
return $contents;
}
}
if ($modSettings['rss_feedmethod'] == 'All' || $modSettings['rss_feedmethod'] == 'fsockopen')
{
$fp = fsockopen($url_array['host'], 80, $errno, $errstr, 30);
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($fp, 128);
}
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($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// 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;
}
}
}
?>
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?
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
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.
Screen shot of run now...
(http://clip2net.com/clip/m18043/1244087873-clip-14kb.png)
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.
I never said you had to download anything...
In your package manager in your admin panel...
(http://clip2net.com/clip/m18043/1244843470-clip-10kb.png)
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 :)
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.
It's a bit complicated, and it may not yield perfect results, but you can try this: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.
please help for this http://metalfrm.com/index.php/topic,28057.msg37862/boardseen.html#new..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.
the mod is working but it is not showing the links.. look like this download links..
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.
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...
(http://clip2net.com/clip/m18043/1244843470-clip-10kb.png)
:)
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.
Any errors in the error log? Is the feed still enabled? Has the feed actually updated since you last ran it?
any errors in the forum error log?
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?
~<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?~<div id="articlestory">(.*)<\/div>~siU
and still none grab the full story.
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?
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 itsQuoteIf 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?
Thanks for the great mod! Works fine on 2.0 RC1-1 :DNot 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.
But I got a question.. Is there a way to prevent rss feeder posts to appear in the "recent posts" list?
Thanks! My feeds are going into one board only, so I'll have to check that recent posts code.Thanks for the great mod! Works fine on 2.0 RC1-1 :DNot 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.
But I got a question.. Is there a way to prevent rss feeder posts to appear in the "recent posts" list?
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?
On my SMF 2.0RC1.2 work it ;)
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
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.
// 'shout' => array($txt['shout']),
'rssfeeds' => array($txt['mods_cat_modifications_rssfeeds']),
// 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'],
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.
It'll be in Sources/ScheduledTasks.php, near the bottom.
/* 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
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.
......
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
Sorry, this won't be made for 1.1.x. It uses too many SMF 2.0 specific functions.
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
It does, you just need to change the version number in the 'Advanced' box on the Browse Packages screen.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?
Just thought I would ask again and find out if anybody knows of a mod or a way to do this?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.QuoteJust curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss
It does, you just need to change the version number in the 'Advanced' box on the Browse Packages screen.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?Just thought I would ask again and find out if anybody knows of a mod or a way to do this?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.QuoteJust curious if this can be modified or already is possible to have RSS feed into the ultimate profile for SMF 2.0 rc1.2. Would like to be able to have members post to their profile using rss
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
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
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)
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.
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
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
list($numFeeds) = $smcFunc['db_fetch_row'];
andlist($numFeeds) = $smcFunc['db_fetch_row']($request);
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?
// 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- // If this item doesn't have a link or title, let's skip it
if ($item->get_title() === null)
continue;
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
Can you post your copy of Packages.template.php?
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.
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
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.phpCode: (Find) [Select]// If this item doesn't have a link or title, let's skip it
-and-
if ($item->get_permalink() === null || $item->get_title() === null)
continue;Code: (Replace) [Select]// If this item doesn't have a link or title, let's skip it
if ($item->get_title() === null)
continue;
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.
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.
(http://clip2net.com/clip/m18043/1250636417-clip-18kb.png)
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.
Any errors in your error log? What feed are you using?
0 Modify (http://311entertainment.co.cc/forum/index.php?action=admin;area=modsettings;sa=rssfeeds;feed=1) [/t]
|
all the feeds show enabled? I tested a few and they work okay for me.Yes they are all enabled.
|
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.
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.
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.
'm sorry only had one minute to do the message :-[
but more or less when the next version will be ready ?
Hi, I'm very new to RC 1.2the only html tags that are not stripped are <img> tags... I'll be adding html support in the next version.
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???
Hi, I'm very new to RC 1.2How did you get it to work with 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???
By chance, is the RSS feeder work off and on for some?I have a similar problem,but I have to go reenable them.
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 would like to use this mod to grab rss feeds from wordpress to post onto my forum1) Each feed can only post as one SMF member
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?
I don't seem to be getting anything from this RSS feed: http://steamcommunity.com/groups/npcguild/rss?type=eventsThat feed is empty... there's nothing to pull from it.
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.
okay one more questionI would like to use this mod to grab rss feeds from wordpress to post onto my forum1) Each feed can only post as one SMF member
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?
2) You will lose all mods and will have to reinstall all of them.
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
Keith99 - You'll have to look at the manual parse instructions for the mod and add any missing parts to your install manually.
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.
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.
Contact your host and show them the error.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?
$this->force_feed = true;
before if (!$this->force_feed)
{
magically removed that problem =)
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
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.
Yes
http://www.fifa.com/rss/index.xml (http://www.fifa.com/rss/index.xml)Look on the first post to understand how to do this. Slammed Dime explained it there =].
what is the regular expression of the link above ?
In ScheduledTasks.php, just search for Source:
That entire line that contains 'Source'
Whats the exact error?
' . (!empty($source) ? '[b]Source:[/b] ' . $source . '
' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');
' . (!empty($feed['footer']) ? $feed['footer'] : '');
When I place add_settings.php in the root of the forum and access it manually I am brought to admin>config>rss feeder and get the same error as before about the table not being created:QuoteTable 'smf2.smf_rssfeeds' doesn't exist
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf2\Sources\ManageSettings.php
Line: 2420
Any more thoughts Slammed? Can you provide the raw SQL commands that I can paste into my SQL command prompt to create them, or a different way of making the tables? I'd be more than happy to be your test subject on this as I have full server control and can easily modify anything you would like me to! I have started playing with the info from the add_settings.php to make the tables manually but I am enough of a beginner that I haven't deciphered it all yet (plus it's late). Any help is greatly appreciated!
P.S. I have determined the ultimate issue is that the database table is not being created but I do not know why.
andy40 - if it's not installing through the package manager, then you may have to install manually..I also appear to have a similar problem installing on RC2.
Underfunded, can you PM me your email address and I'll email you an SQL file with the table structure?
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!
There is no limit on it... I'll have to check it out.
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.
function sort_array_length($a, $b)
{
return strlen($a) < strlen($b) ? 1 : -1;
}
function sort_array_length($a, $b)
{
return strlen($a) < strlen($b) ? 1 : -1;
}
hrm... I updated the package-info.xml file... Looks like I forgot to update it in the ZIP file... thanks :)
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
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)
The database value you're trying to insert does not exist: is_ratings
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.
Regex Help:bolding mine:
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.
See this post (http://www.simplemachines.org/community/index.php?topic=285356.msg1875490#msg1875490) of the topic as well.
[0] => part of the array
?~<div id="articlestory">(.*)<\/div>~siU
into the regex: formarray [0] statement
that also is there and has parts
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.
the regex box gets the regular expression.
~<\/script><\/div>(.*)<br>~siU
ship´s cabin
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).
“
stops the import of the full text.~<\/script><\/div>(.*['"])<br>~siU
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.
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
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?? :(
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.
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:
(http://secure-uk.imrworldwide.com/cgi-bin/m?ci=es-rssweblogs&cg=0&si=http://www.motorpasion.com/index.xml) (http://img.motorpasion.com/2009/12/aston-martin-one77-record.jpg)
If i enter in the url directly show the image wihtout problems, but I can't see it in the forum :(
// 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__);
Admin>>Maintenance>>Scheduled TasksThanks have it all working now, repeat was set at 6 hours, changed it now :D
or
yoursite.com/index.php?action=admin;area=scheduledtasks;sa=tasks
</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. "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," he said. "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." 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 "Pec the Halls" 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>
~<div class="KonaBody">(?:.*)<\/div>~siU
<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>
~<div class="itemBody" id="itemBody">(?:.*)<\/div>~siU
(?:.*) should be (.*)And again it works :D
?: tells the match not to be logged in the match array.
It will only apply to new items from those feeds.Thanks mate. Well done on this mod.
if ($modSettings['postmod_active'] && !$row['approved'] && $row['id_member'] != $user_info['id'] && !$delete_own)
'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,
global $context, $txt, $sourcedir, $scripturl, $smcFunc;
global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;
http://downtr.net/rss.xml
Code: (Find) [Select]' . (!empty($source) ? '[b]Source:[/b] ' . $source . '
' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');Code: (Replace) [Select]' . (!empty($feed['footer']) ? $feed['footer'] : '');
SlammedDime Dear Please Reply :(
SocksHeaven, I believe that was covered before. Try this....This is correct.
In ScheduledTasks.phpCode: (Find) [Select]' . (!empty($source) ? '[b]Source:[/b] ' . $source . '
' : '') . (!empty($feed['footer']) ? $feed['footer'] : '');Code: (Replace) [Select]' . (!empty($feed['footer']) ? $feed['footer'] : '');
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
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: );
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
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,
);
2127: /* RSS Feeder Settings */
function ModifyRSSFeedSettings()
{
global $context, $txt, $sourcedir, $scripturl, $smcFunc, $board;
loadTemplate('RSSFeeds');
$context['page_title'] = $txt['rss_feeder'];
You'd have to edit ScheduledTasks.php, near the bottom of the function for the rss feeds.
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.
of course there are times when you have to use both, like when a web page has horribly broken HTML code.
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 ....
Hey Guys
I Can't Grab Full Article From FIFA
QuoteDoes the solution you're suggesting mean that SD's regex tutorial would become redundant, and we'd all need to learn a new system, or would yours do it all for us?The syntax is pretty much the same as is the concept, just that instead of passing the regex string to a preg_match it passes it to a dom parser. In the example it was grabbing the text between the <div id="articlestory"> and </div> tags.
The regex for that was ~<div id="articlestory">(.*)<\/div>~siU
For the dom parser it would be div[id="articlestory"] which is simpler for most folks to understand. To take it one step further if you put in div[id="articlestory"] p ... it would return all of the paragraphs within that div and nothing else, or div[id="articlestory"] h3 would return all of the h3 tags from within that div ....
Lets also suppose that there was another div /div combo inside of the <div id="articlestory"> The dom parser would still return the entire <div id="articlestory"> section where as the basic regex above would return from the start of the <div id="articlestory'> to the first </div> it found which is not the closing div of the story. I hope that makes sense ....
@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'] : '');
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
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?
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
That's not an RSS feed... it's an HTML document. You need an actual XML formatted RSS feed.
// 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'] : '');
// Format the post
$message =
($item->get_date() !== null ? '' : '')
(. '' . $body . '' . )
(!empty($feed['footer']) ? $feed['footer'] : '');
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'] : '');
// 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'] : '');
// 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;
$message = $body . "\n";
wow amazing post but just so you know it's $message and not $message_bodyGlad it helped ....
i used justQuote$message = $body . "\n";
that gives me just the good stuff :)
wow amazing post but just so you know it's $message and not $message_bodyGlad it helped ....
i used justQuote$message = $body . "\n";
that gives me just the good stuff :)
The idea is to form the $message with the various building blocks defined, for your case you would change the last line to be:
$message = $message_body . "\n";
but what you did has the same effect for your case.