News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

RSS Injector available

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

Previous topic - Next topic

Ben_S

Have a look at the post.php in the SMF sources dir and look at how that calls createPost.
Liverpool FC Forum with 14 million+ posts.

TLM

Quote from: Xarcell on September 25, 2006, 07:58:35 PM
Anyone find what to modify to change the icon selected on the posts? I browsed through the files and didn't see anything.

I did not try to change the icon but quick grep in the sources dir, reveals that on the $msgOptions array, add something like, 'icon' => "thumbup",
That might work, untested, and just off the top of my head during a break on studies.

Xarcell

K, it too me a minute to figure what you guys were talking about. I don't know any php.

However I think I figured it out by following your instructions.

In rss_injoector.php under "$msgOptions" I added this line: 'icon' => 'thumbup',

It seems to work.

Thanks guys...


Sindorf

Quote from: TLM on August 31, 2006, 03:22:02 PM
http://www.mindlesstux.com/rss_injector.phps
http://www.mindlesstux.com/rss_injector.sql

For those that like what I have done with mine.  You will need to get MagpieRSS and extract it to a MagpieRSS directory in your forum dir.  Then simply load the sql into the same table with your forum, and edit the feeds, I think the fields are self explanitory.  I am not going to make this into a mod, someone can if they like, but I dont have time to make a admin panel like I had before the hd crash.

Quote from: Ben_S on August 31, 2006, 02:56:38 PM
Basically if you just include SSI.php in your injector file you should be able to call createPost with the required variables. Having included SSI.php, SMF should deal with connecting to the database etc.
I think you have to include Subs-Post.php as well for it to work.  Or at least for me I did.

Well, I want to thank TLM for this great script. It is working nice and fast :) But, this script doesn't work when the feed charset is other than UTF-8.

I have searched Google about this problem and I have found some information about it. The charset problem comes from PHP itself. There are some temporary solutions for using some piece of code to transform the non-UTF-8 charset to UTF-8 but I couldn't find a way to implement them into this script at least for now.

People using MagpieRSS to fetch RSS feeds are having this kind of problems also... Of course, in different applications.

Maybe this script can be modified for use in different charsets (I mean rss_injector.php, not MagpieRSS)

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

TLM

Give me a non utf-8 feed and i'll poke at it when I have time...

* TLM roams back to books for classes...

Ben_S

Quote from: haktanir2 on October 01, 2006, 07:45:54 AM
Does anyone have time to make this into a mod?

To be honest, your better off using it as it is, you aren't going to want to change your feeds that often, and if you do, it's easy via phpMyAdmin and you won't have to wait for a new version every time you upgrade etc.
Liverpool FC Forum with 14 million+ posts.

Sindorf

#287
Quote from: TLM on October 01, 2006, 11:18:09 PM
Give me a non utf-8 feed and i'll poke at it when I have time...

* TLM roams back to books for classes...

Thanks TLM :)

I am giving some feeds in my native language.

http://tools.ntvmsnbc.com/rss/TECH.xml

http://www.aa.com.tr/rss/ajansguncel.xml

1st one is a television channel's (such as CNN International) RSS feed about latest Technology news.

2nd one is a local news agency. Also they have news feeds in English (http://www.aa.com.tr/rss/ajansgunceleng.xml)

I also want to provide an UTF-8 feed. In this feed, special characters (such as apostrophes or commas) cannot be seen (for example "Sindorf's White Jacket" is shown as "Sindorf?s White Jacket") Also some additional characters, which can be found in ISO-8859-9 character set, are sometimes problematic.

The feed is: http://rss.hurriyet.com.tr/rss.aspx?sectionId=12

In addition, I want to provide a feed which is written in Japanese. This is also a non-UTF-8 RSS feed, as far as I think.

http://japanese.engadget.com/rss.xml

Maybe it is better to help you a bit more. I am providing you a link, in which some guy has developed a way to fetch non-UTF8 characters using MagpieRSS.

http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss

I couldn't manage to solve the problem, using the provided help in the above link. But maybe it can help you find a solution quicker.

Thank you for your interest in solving this problem :) I am very grateful to you :)

Edit: I have an idea. How about changing the RSS fetching system? :) I mean, is it possible to use other PHP RSS parser script? For example, SimplePie (http://simplepie.org/) Maybe it is better (and maybe more easier) to use SimplePie for non-UTF8 charsets... What do you think about it?

Xarcell

SimplePie does look nice.

I was looking at magpie and it hasn't been updated in over a year, and clearly it has issues that need fixing.

simonm

QuoteGive me a non utf-8 feed and i'll poke at it when I have time...

... any progress with non utf-8 feeds yet?

TLM

Quote from: simonm on October 09, 2006, 03:25:46 PM
QuoteGive me a non utf-8 feed and i'll poke at it when I have time...

... any progress with non utf-8 feeds yet?

Midterms right now, give me till end of the week before I can start to really look at this.

simonm

#291
Quote from: TLM on October 09, 2006, 05:17:43 PM
Quote from: simonm on October 09, 2006, 03:25:46 PM
QuoteGive me a non utf-8 feed and i'll poke at it when I have time...

... any progress with non utf-8 feeds yet?

Midterms right now, give me till end of the week before I can start to really look at this.

no hurry... just keep up with the good work on this... and good luck with the midterms...

efootball

#292
Thanks for the MOD TLM

The only problem i have was the cron job, just a quick search on google resolved that

See it in action here using bbc rss feeds : hxxp:www.englishfootball.me.uk/football/index.php?board=3.0 [nonactive]


hxxp:smfff.co.uk [nonactive]

hxxp:www.englishfootball.me.uk/football [nonactive]hxxp:smfff.co.uk [nonactive]

hxxp:www.englishfootball.me.uk/football [nonactive]

hxxp:www.gamemilitary.com/ [nonactive]

hxxp:gamemilitary.com/forum/index.php?board=2.0 [nonactive]

RRasco

anyone figured out why it doesn't show the Last Post in the forum index to the right in each category?
Vehicle Management System for SMF - SMFGarage.com

TLM

Quote from: RRasco on October 26, 2006, 01:10:42 PM
anyone figured out why it doesn't show the Last Post in the forum index to the right in each category?
I am gonna assume your talking about the first one made by someone else, and not mine.  Last check mine does that.

RRasco

where is yours at?  i saw you reference it in alot of the posts, but didnt see a link to it.
Vehicle Management System for SMF - SMFGarage.com


RRasco

thx TLM.  how often does this update? and how?  any cron jobs needed?
Vehicle Management System for SMF - SMFGarage.com

ketchup

can someone make this a mods pleeese  :P

Xarcell

There is no need to make it a mod really. It's very simple.

Advertisement: