News:

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

Main Menu

RSS Injector available

Started by confusion, December 24, 2005, 04:04:48 PM

Previous topic - Next topic

dupont24

#320
I have got TLM'S to work great... ty very much

One issue I am having and i have no expierence with cron is getting it to run.

I named the file inject.php and from my browser it runs fine....

Here is the last error I got from the cron job

/home/sprintcu/public_html/sportsforum/inject.php: line 1: ?php
: No such file or directory
/home/sprintcu/public_html/sportsforum/inject.php: line 2:
: command not found
/home/sprintcu/public_html/sportsforum/inject.php: line 3: //: is a directory
/home/sprintcu/public_html/sportsforum/inject.php: line 4: syntax error near unexpected token `dirname'
/home/sprintcu/public_html/sportsforum/inject.php: line 4: `@include_once(dirname(__FILE__) . '/SSI.php');
'


Then I renamed it to rss_injector to see if that made any difference, and get this from the cron job

/bin/sh: /home/sprintcu/public_html/sportsforum/rss_injector.php: Permission denied

pihutch

I am getting the following error when I run TLM's injector:

QuoteFatal error: Call to undefined function: createpost() in /homepages/41/d87694803/htdocs/palmettoshutterbugs/forum/rss_injector.php on line 113

And here is that portion of the rss_injector.php (I think):

QuotecreatePost($msgOptions, $topicOptions, $posterOptions);


I'm running SMF1.0.8 but will be updating to 1.0.9 as soon as I get this sorted out (one thing at a time, ya know).  Any help would be greatly appreciated.

Cheers,
Patrick

TLM

Quote from: dupont24 on November 12, 2006, 12:57:33 PM
I named the file inject.php and from my browser it runs fine....
Ok....
Quote from: dupont24 on November 12, 2006, 12:57:33 PM
/home/sprintcu/public_html/sportsforum/inject.php: line 1: ?php
: No such file or directory
/home/sprintcu/public_html/sportsforum/inject.php: line 2:
: command not found
/home/sprintcu/public_html/sportsforum/inject.php: line 3: //: is a directory
/home/sprintcu/public_html/sportsforum/inject.php: line 4: syntax error near unexpected token `dirname'
/home/sprintcu/public_html/sportsforum/inject.php: line 4: `@include_once(dirname(__FILE__) . '/SSI.php');
'


Then I renamed it to rss_injector to see if that made any difference, and get this from the cron job

/bin/sh: /home/sprintcu/public_html/sportsforum/rss_injector.php: Permission denied
Do you have command line access to your host?  Also are you setting up the cron job with

php rss_injector.php

Note the cmd php infront of the script.




Quote from: pihutch on November 14, 2006, 09:57:54 AM
QuotecreatePost($msgOptions, $topicOptions, $posterOptions);
I'm running SMF1.0.8 but will be updating to 1.0.9 as soon as I get this sorted out (one thing at a time, ya know).  Any help would be greatly appreciated.

Not possible to upgrade to 1.1 rc3?  I never poked 1.0.8/9 at all with this so I dont know if it will work at all.

pihutch

I haven't had any success in upgrading to RC1.1/1.3.  I can't get the dang tables to convert correctly and I really don't have that much time to work around it, so I am just sticking with 1.0.8/9 until I absolutely have to upgrade.  Is this something you can look into working out for 1.0.8/9?

Cheers,
Patrick

TLM

Like you my friend, time is my enemy as well...  Otherwise I would.

pihutch

Thanks anyway, TLM.  Does anyone else have any idea what is causing this error?  I'm assuming that the createpost function is not a valid command in 1.0.x, but I have no idea what it should be.

Cheers,
Patrick

dupont24

Quote from: TLM on November 14, 2006, 10:32:19 AM


php rss_injector.php

Note the cmd php infront of the script.


I am trying this from cpanel I am with Bluehost and I have really no clue as to what I should be putting in the command line.

I thought i was to put a path to the file.

So I tried : sportsforum/inject.php and other various forms.....and I take it that is in correct....lol

Calling the url up in the browser works great so I thought that a cron job just basically called up the url.

What should i put in the command line.

Thanks for your help......And thanks for this great mod......now if i could only get google to index smf better.....I just switched from Vbulletin and already I can see indexing is going to be an issue......Google is not reading the posts...oh well different topic not for here....

haktanir2

#327
I've been trying to get this RSS injector to work for some time now, it just does not want to work so I gave up on the idea until someone can make a mod of it.

With all the complicated mods made for SMF, it just surprises me that no one still made a mod of this. It's a great concept and I'd probably pay to have this mod if I could be sure it would work.

RRasco

ok, so I got this mod working a while back.  its TLMs version.  and it works great.  i dont know if this can even be made into a mod because it requires you to install magpieRSS as well as do something with pear.  I dont even remember all the steps I did but it was pretty complex in getting it to work.  I am going to try and refresh my memory as to what I did to get it to work to help out.  If there is an easy way to make it a mod, I am going to try and do it, but I am still pretty new to PHP.  Attached is my cronjob I use to update the feeds.  You may be having permissions problems(obviously).  CHMOD it to allow write access read and execute access for all.

Vehicle Management System for SMF - SMFGarage.com

buzlighty2007

Is this available in a mod yet? I will definately beta test any such mod for rss injection.

TLM

Why should it be a mod?  Honestly its not that hard to install, there is no code modification and only a simple sql setup which should be almost self explanatory.  If anything all that should be done is for a better documention on how to set it up properly.  I see no point in making this a mod package for SMF as it weeds out those that don't understand the script.  I have seen peoples boards where they simple installed every package they could, and then asked what does it do, and complain it does not do what they wanted.  By not putting this into a package, I am saving myself the grief of this, either educate your selves some to understand simple instructions on how to install it, or don't use it.




RRasco, whats wrong with calling the php script via a cli php instead of attempting to "browse" to the script?  The only advantage you would get is that you would fill your logs with when the script was called is all I can see.  Is GET even a vaild cli cmd in linux/bsd boxes?  I know of wget thats it.




dupont24, you have to understand the concept of where the cronjob would start for you if you dont like playing around with paths till it works.  Most companys would dump you in something like a root folder for your site which has something like public_html, public_ftp, etc... inside public_html you put your website.  Once you figure out where they start you off at, call that home.  From there you figure the path to the script, eg

/home/mindless, is my websites home directory, but the script is in public_html/forums/rss_injector.php.  So for a cron job I have two possible options to keep things simple.

*/4 * * * * php public_html/forums/rss_injector.php
or
*/4 * * * * php /home/mindless/public_html/forums/rss_injector.php

note how I setup the paths in both examples, both would work just as well.  Adding > /dev/null to the end of both cmds/crons would be ideal if you dont want spam from the cron system.




Whom ever suggested I use simplePie, I have poked at it some and have a test version that works mostly, just a few small things here and there I need to be sure that work before I post the newer script.  Also you may have noted the old link some pages back I posted is broken, I will be fixing that sometime here in the near future.

Sindorf

Quote from: TLM on November 24, 2006, 10:00:54 PM
Whom ever suggested I use simplePie, I have poked at it some and have a test version that works mostly, just a few small things here and there I need to be sure that work before I post the newer script.

That was me :)

Thanks for your work TLM...

kuklovod

Thanks for the nice injector TLM, got it working with a bit of polish to have it insert text in correct codepage (but that was magPIE's fault, fixed by adding iconv to _cdata parser there).

georgepdog

Outstanding work on this code.  I have it running at hxxp:www.arsportstalk.net/smf [nonactive] under the user NewsHound.  I'm using the MagPie version, but would love to change over to SimplePie when it's offered.

I do have a request.  Some of the feeds we use will duplicate posts.  This is especially true when an article is a breaking news article.  It gets published once it breaks, but then, they either update the story to fill in more details or make some other tweak.  Since the check is by date, the story gets injected again.  I would like to see some sort of way, whether matching on the article title or the like, that I can avoid this.  I've thought about adding the code myself but time and my newness to SMF have prevented me from doing so.

Thank you very much for paving the way.  This has helped our site tremendously in keeping fresh content going on the site.

TLM

Quote from: georgepdog on November 30, 2006, 12:35:00 PM
I do have a request.  Some of the feeds we use will duplicate posts.  This is especially true when an article is a breaking news article.  It gets published once it breaks, but then, they either update the story to fill in more details or make some other tweak.  Since the check is by date, the story gets injected again.  I would like to see some sort of way, whether matching on the article title or the like, that I can avoid this.  I've thought about adding the code myself but time and my newness to SMF have prevented me from doing so.

Iv accually thought about this for the same reason, just no time right now to really sit down and hash out an idea for that...

Gosu Schwarz

Good work on the mod. How about someone make a new topic with the links to download it and how to install it so people don't have to search through 20+ pages? Just a suggestion. :)

georgepdog

Quote from: Sindorf on October 01, 2006, 09:04:58 PM
TLM, may I have a very very little request for you? Is it possible to modify your rss_injector.php for using non-UTF-8 RSS feed charsets? If you have time of course... If you don't have time to do, it doesn't matter.

In any case, thanks for your efforts. :)

Regards... - Sindorf

I'm using the MagPie version and am having the opposite problem.  Any UTF-8 feed such as search based feeds from Yahoo or Google do not work at all.  If it is an ISO-something or other, it works beautifully.

Sindorf

Latin1 works beautifully georgepdog... (that would be ISO-8859-1) but Latin5 (which is ISO-8859-9) is not working at all...

I have searched a bit about that (shoot google) , and other people are getting some kind of errors like me...

Also some UTF-(a number) links are not working...

Maybe that's a problem of MagpieRSS... (it was updated a year and a month a ago... brrrrr... very old :)) or maybe related with the PHP itself...

georgepdog

Quote from: Sindorf on December 03, 2006, 06:39:09 PM
Latin1 works beautifully georgepdog... (that would be ISO-8859-1) but Latin5 (which is ISO-8859-9) is not working at all...

I have searched a bit about that (shoot google) , and other people are getting some kind of errors like me...

Also some UTF-(a number) links are not working...

Maybe that's a problem of MagpieRSS... (it was updated a year and a month a ago... brrrrr... very old :)) or maybe related with the PHP itself...

Yep.  That's been my experience.  I think all the ones I've been successful with have been the Latin 1 feeds.

Also, I can't get any feeds through feedburner to work, but I think that has to do with their feeds not having a pubdate to use for the date compare.

Veign

I don't want to step on anyone's toes but I have a modified version that:
- Uses SimplePie as the feed parser
- Pulls requested feeds from a DB table (feed url, board id, member id)
- Uses some very basic configuration settings in the php file to control the look of the post

If anyone is interested in this I will upload to my server so you can check it out (have it).  If this steps on the toe's of TLM than I didn't mean to and will not make another post on this subject.


Advertisement: