News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

RSS Feeder

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

Previous topic - Next topic

jcastellese

I have a quick question. Our RSS feeds randomly time out and cause it to put them on the disabled list. This doesn't happen frequently, but we have about 50 different feeds (we has all of our bloggers posts pushed to the forums as well). One thing I'd really like to do is disable the ability of the Feed Reader to automatically disable our feeds. Is there a section of code I can easily comment out to prevent this from happening in the future?

GazOutEast

SD - when you're about

I'm still on RC1 and haven't touched (RSS Feeder 1.1.1 according toPackage Manager in the admin panel) since the first half of the year,except to reactivate feeds when they go inactive (I can live with thatuntil the feed providers get their acts together).

Suddenly this month, I've got a server error log (not inside SMF - but on the server) filling up with entries of -

PHP Fatal error:  Call to undefined function  db_query() in /home/druwa/public_html/board/Sources/Subs-RSS.php on line 145

The relevant code lines (143 - 150) are -



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



$request = db_query("   is the offending line according to the errors

Any idea why this should suddenly kick up?
I only discovered it when my hosting got suspended earlier today, forserver abuse after hourly logs like this one on the hosting manager'sscreens -

Time: Mon Dec 28 09:06:21 2009 -0500Account: account-nameResource: Process TimeExceeded: 59012 > 1800 (seconds)Executable: /usr/bin/phpCommand Line: /usr/bin/php /home/account-name/public_html/board/index.phpPID: 8643Killed: No

Apparently each instance was running 24 hours+, and that's why they hit me with a suspension.

It really sucks because I've also found my users discussing the outage on the forums on other sites now.

Thanks in advance for any advice
Gaz[/]
I have 20:20 vision - I can see anything bigger than 20" x 20"

SlammedDime

That code is from the RSS Feed Poster mod from vbgamer, not my mod.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

GazOutEast

Hi Sd

Yes, so I've discovered - when I upgraded from v1.1.10 to 2.0 RC1, vbgamers mod didn't work - can't remember why but think it was an install error - so I deleted it.

However, checking the Sources folder, it has both Subs-RSS.php and Subs-Rss.php - the second one being yours.
As the Subs-RSS.php is the only file left standing from vbg's mod, it should not be running anything because nothing is calling it, including the scheduler.

Something seriously cranky is going on here, and I'm wondering if there's a case-desensitiser anywhere in SMF or your mod (or even in PHP) that might be causing the install to simultaneously, or alternatingly call the Rss and RSS versions of the file?

2am here now, but in the morning I'll dig out vbg's xml install file and do a manual purge of his system - hopefully without breaking yours in the process.

Sorry to have troubled you
Gaz
I have 20:20 vision - I can see anything bigger than 20" x 20"

Rated

Hi everyone,

I have some issues with getting the feeder to make the posts.

He posted 1 time and then for hours straight nothing, while new feeds kept coming in.
I also read ppl doing a manual start but how do i do that?
The only options i have is add feed and for the rest noting, and where do i edit the time when he gets the feeds and what exact part do i need to edit?
Just new to SMF and creating forums and such.

Running on SMF RC2

Thanks

Spoogs

Admin>>Maintenance>>Scheduled Tasks 

or

yoursite.com/index.php?action=admin;area=scheduledtasks;sa=tasks

Rated

Quote from: Spoogs on December 29, 2009, 02:42:35 PM
Admin>>Maintenance>>Scheduled Tasks 

or

yoursite.com/index.php?action=admin;area=scheduledtasks;sa=tasks
Thanks have it all working now, repeat was set at 6 hours, changed it now :D

Spoogs

Ur welcome, glad u got it sorted

Rated

And im back with my second issue :P

I want the full article to be posted, ive checked the option and filled in the Regular Impression, let me give you my example here.

</script></div>
<div class="boxad"><!-- --></div>
</TD>
</TR>
<TR valign="top">
<TD height="90%" class="newsBody">
<div class="KonaBody">-- There is currently a major cable war going on between Fox and Time Warner Cable which has Fox demanding that Time Warner pay one dollar per month per customer in order to continue receiving their family of networks including Fox, FX and MyNetworkTV. Time Warner has refused their proposal and they are threatening to pull all Fox stations off the air this Friday. Hence, Time Warner Cable subscribers would be unable to watch Friday Night SmackDown!. Fox has taken out ads in several markets saying that Time Warner is trying to deprive its customers of shows such as House and American Idol. SmackDown! is listed in several ads, including a few spots with <a href="/news/wi/wwe/wwe_news.shtml">WWE</a> talent addressing the possible loss of the program.<P>
-- During a recent interview, the wrestler formerly known as Kizarny, Nick Cvjetkovich (now performing under the name Sinn Bodhi), gave his unique take on the backstage atmosphere in World Wrestling Entertainment. &quot;Working at WWE was also awful because there is so much politics and back stabbing you never know who your enemies are because they are all gutlessly and unaccountably hiding in the shadows,&quot; he said. &quot;I wasn't given a straight reason why I was released. One minute I was told how unique I was and how great of a work ethic I had. The next minute they had nothing for me. I have heard many different theories. I guess I just didn't fit their mold of cookie cutter. Not enough abs showing I guess even though in the ring I can run circles around every ex-NFL player or jacked up underwear model collecting a paycheck in the WWE developmental system. Vince and his billion dollar case of ADD wants Ken Dolls sports entertaining against other Ken Dolls at the moment. Me looking weird or different didn't compute with the tunnel vision that WWE sometimes has even though Rob Zombie, Marilyn Manson and Hot F*****g Topic retail stores are all the rage with kiddies.&quot; To read the interview in its entirety, visit Wrestling101.com. He gives his thoughts on TNA, his friendship with <a href="/wrestlers/edge.shtml">Edge</a> and Christian, his unique gimmick, speaking carny, and much more.<P>

-- RAW's newest tandem, Chris Masters and Eve, can be seen performing &quot;Pec the Halls&quot; in a special video on WWE.com. <P></div>
<IMG src="/images/rss.gif" width="36" height="17" align="left" border="0" vspace="0" hspace="5"> <strong>Use our headlines for your site or blog!</strong> For you website owners and bloggers, we syndicate our content so you can carry our headlines on your site or blog for free!  To get our headlines, you can use our RSS Feeds from our <a href="/rss/wi/index.shtml">RSS Feeds</a> page by clicking <a href="/rss/wi/index.shtml">here</a>.
<p align="right">
<!-- AddThis Bookmark Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"><img src="http://s9.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="AddThis Social Bookmark Button" /></a> <script type="text/javascript">var addthis_pub = 'winc';</script><script type="text/javascript" src="http://s9.addthis.com/js/widget.php?v=10"></script> 

<!-- AddThis Bookmark Button END --></div>
</TD>
</TR>


With the Regular Impression:
~<div class="KonaBody">(?:.*)<\/div>~siU

And Example 2:

<div class="itemBody"  id="itemBody">
<img src="http://images.fok.nl/fp/icons/icon_politie2.jpg" id="newsicon" vspace="3" hspace="3" border="1" align="left" alt="Nederland" /> <p>De politie heeft bevestigd dat een opgepakte man op de A6 bij Lelystad uit een politiebusje is ontsnapt. De politie heeft geen idee hoe het kon gebeuren dat de man uit een speciale arrestantenbus wist te springen.</p><p>De man was in Emmeloord opgepakt voor diefstal en hij werd overgebracht naar het cellencomplex in Lelystad. De politie zoekt met speurhonden naar de man, die na zijn ontsnapping vermoedelijk het bos is ingerend.</p><em>Met dank aan <strong>Shapeshift</strong> en <strong>bierspons</strong> voor de submit.</em>
<div class="clear"><br /></div>
<div class="bron" style="text-align:right;display:inline;">
<table><tr>


With RI:

~<div class="itemBody"  id="itemBody">(?:.*)<\/div>~siU

I checked the full article option above but he still displays a little part with a link to the post.

Can anyone tell me what im doing wrong?
And is the RI on the above 2 examples correct?

SlammedDime

(?:.*) should be (.*)

?: tells the match not to be logged in the match array.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Rated

Quote from: SlammedDime on December 29, 2009, 04:32:27 PM
(?:.*) should be (.*)

?: tells the match not to be logged in the match array.
And again it works :D
And again thanks :D

Love the quick support your giving on your product :)

GazOutEast

Hi SD and everyone

Just a quick note for those who previously had vbgamer's Feed Poster plug in installed, and have switched to SlammedDime's plugin ....

I discovered the error source that caused my hosting account to be suspended (twice) was remainder files after uninstalling vbgamers mod eight months earlier.

The files it left behind were /forumroot/cronrss.php and /forumroot/Sources/Subs-RSS.php - those need manually deleted from cpanel file manager or via FTP
Additionally, remember to delete any cpanel cron jobs you set up for vbgamer's mod - they will continue trying to trigger the cronrss.php file whether it is there or not - causes server resource abuse and will get your account suspended most likely.

Hope it helps someone
Gaz
I have 20:20 vision - I can see anything bigger than 20" x 20"

SAFAD

Afro Can You Tell Us How You Get FIfa Working ?
Cuz I Coudn't
Even The Tut Didn't Help
I Tried With Many Regex
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

lush

hey guys, great mod.
was wondering if it would be possible to get it to post code tags properly?
eg  in origional post a link is between code tags and the link is not live


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






SlammedDime

Unlikely... it would be near impossible to account for how everyone decides to implement 'code' tags on their site.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

virtualxtc

If you have already pulled all the topics without the full article setup will it edit them if you set it up or does it only now apply to new post in the feed?

SlammedDime

It will only apply to new items from those feeds.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

GazOutEast

Hi SD

Just wanted to give you a bit of praise - nice job on the upgraded package for 2.0 RC2 - flawless install and recapture of settings

Well done that man.
I have 20:20 vision - I can see anything bigger than 20" x 20"

virtualxtc

Quote from: SlammedDime on January 03, 2010, 01:21:56 AM
It will only apply to new items from those feeds.
Thanks mate. Well done on this mod.

butchs

#899
I have been getting errors with 1.1.4 on SMF 2 RC2.

When I delete topics via the moderator selection list:
Undefined variable: delete_own in RemoveTopic.php, Line: 613
if ($modSettings['postmod_active'] && !$row['approved'] && $row['id_member'] != $user_info['id'] && !$delete_own)

Less common via "index.php?action=admin;area=modsettings;sa=rssfeeds;feed=1":
Undefined variable: board in ManageSettings.php, Line: 2129
'selected' => !empty($_SESSION['move_to_topic']) && $_SESSION['move_to_topic'] == $row['id_board'] && $row['id_board'] != $board,

$delete_own and $board should be in the globals or defined somewhere?

I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Advertisement: