Advertisement:

Author Topic: RSS Feeder  (Read 376136 times)

Offline Vampy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Female
  • Purple Peril
    • Purple Hell
Re: RSS Feeder
« Reply #360 on: April 02, 2009, 05:33:05 PM »
Thanks mrtrc266 I'll try that :D

Thanks that worked - now just one question - any way to get the main pic as well as the text?
« Last Edit: April 02, 2009, 05:42:12 PM by Vampy »

Offline Killer-B

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
  • Bite me
    • HostPuppy.net
Re: RSS Feeder
« Reply #361 on: April 02, 2009, 06:04:56 PM »
mrtrc -

Where'd you pull this code from for her news? "yn-story-content"

yn = yahoo news obviously...  but the "story" and "content' bits... did you go into the HTML header files and look again?

SMF 2.0RC1

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #362 on: April 02, 2009, 06:18:10 PM »
@ Killer & Vampy

This works for all feed I have used so far, we'll use this as an example...

Feed URL...
http://rss.news.yahoo.com/rss/world

Once you click on that you'll see the list of feeds and click on the first feed...
http://news.yahoo.com/s/nm/20090402/od_uk_nm/oukoe_uk_g20_australia_apology

Look for the first words in the article "LONDON (Reuters)"

Right click and view the source and search for "LONDON (Reuters)"

Find the first DIV before that, in this case its <div class="yn-story-content"> so the Regular Expression will be...

~<div class="yn-story-content">(.*)<\/div>~siU

Hope that helps
« Last Edit: April 02, 2009, 06:39:47 PM by mrtrc266 »

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #363 on: April 02, 2009, 06:20:50 PM »
Quote
Thanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.

Offline Vampy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Female
  • Purple Peril
    • Purple Hell
Re: RSS Feeder
« Reply #364 on: April 02, 2009, 06:36:37 PM »
Quote
Thanks that worked - now just one question - any way to get the main pic as well as the text?

No Problem....Not sure about that, I think the pics in another DIV so I'm not sure how that would work.
Yeah I checked and it is - If I go back to that div all I get is the pic and the "teaser" text - just like the main index page

Thanks for trying I appreciate it

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #365 on: April 08, 2009, 02:13:38 AM »
This is working great in retrieving the full articles but for some reason it won't pull the pics. Check it out here....

http://monsters-mansion.com/index.php/topic,3134.msg5850/topicseen.html

Any ideas on this?


Thanks in advance.

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #366 on: April 08, 2009, 05:54:25 AM »
It is pulling the images, the problem is the site doesn't use full urls in their image src tags like they should, they use relative urls, which means the image tries to load relative to your site, which of course doesn't work.  I'll think of a way to fix it, but I don't know how easy it will be.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #367 on: April 08, 2009, 10:25:27 AM »
Thank you very much, that would be awesome ig you could get that going.

Offline Jimi1810

  • Semi-Newbie
  • *
  • Posts: 23
Re: RSS Feeder
« Reply #368 on: April 08, 2009, 12:50:56 PM »
Sorry if this has been covered but I am able to import the full article without any problems, except one; when ever there is a "£" symbol the text stops.

http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/gossip_and_transfers/rss.xml [nofollow]

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 [nofollow]

where it says "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at £15m. (Daily Mirror)"

I don't get that in the thread, I get "AC Milan general manager Adriano Galliani admits their offer for David Beckham is way off what LA Galaxy want - the Americans are believed to value the midfielder at"

It stops at the "£" and doesn't post anything else below it from the page, it does this for every story it imported which contains a "£" symbol, is there any way I can fix this? if it matters, the regular expression I am using is:

Code: [Select]
~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU
thanks, I love this mod, it's the main reason I am converting to SMF  :D

Sorry I've not checked in a while so not 100% sure, but did you get a chance to have a look at this SlammedDime? if not no worries, thanks.

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #369 on: April 08, 2009, 01:03:11 PM »
@ Jimi1810 

Try this DIV instead, I just got it to pull the full article using that.

<div class="ch1">

Offline Jimi1810

  • Semi-Newbie
  • *
  • Posts: 23
Re: RSS Feeder
« Reply #370 on: April 08, 2009, 01:44:06 PM »
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.

Offline mrtrc266

  • SMF Hero
  • ******
  • Posts: 2,164
  • Gender: Male
    • Monsters Mansion
Re: RSS Feeder
« Reply #371 on: April 08, 2009, 02:16:02 PM »
Thanks for your help mrtrc266, I've just changed it to that but still having the same problem unfortunately.

Hmmm, I actually just tried it with the regex your were using ~<div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU and the result is here....

http://www.monsters-mansion.com/smf2/index.php/topic,2782.0.html

Then tried with the ch1 div ~<div class="ch1">(.*)<h3>Bookmark with:<\/h3>~siU and result is here...
http://www.monsters-mansion.com/smf2/index.php/topic,2783.0.html
and here
http://www.monsters-mansion.com/smf2/index.php/topic,2784.0.html

Only diff really is that one tries to pull the pic? Sorry I thought I was onto something but as usual I'm waayyy off....LOL







Offline Jimi1810

  • Semi-Newbie
  • *
  • Posts: 23
Re: RSS Feeder
« Reply #372 on: April 09, 2009, 06:08:43 AM »
Oh you actually have it working! thanks a lot for that, at least I know it is possible. I'll try installing it on another of my test forums and see if that makes a difference.

*edit* tried a clean install of SMF 2.0 RC1 and downloaded the latest 1.1.1 of this mod (had 1.1.0 before) but still getting the same problem, hmm.
« Last Edit: April 09, 2009, 06:25:34 AM by Jimi1810 »

Offline Vampy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Female
  • Purple Peril
    • Purple Hell
Re: RSS Feeder
« Reply #373 on: April 10, 2009, 10:08:42 AM »
Sorry to be a pain again but do you think the regex <div class="mxb">(.*)<h3>Bookmark with:<\/h3>~siU would work with this feed - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml ? I'm still trying to find a way to get the pictures in it too



In addition to this I still have the issue when using my theme (tabs-purple)- all I get is a blank white box when I want to add or edit a feed (see attached) - is there some file within my theme I need to edit to get it to show properly? I couldn't see anything outside of default files etc within the install xml file
« Last Edit: April 10, 2009, 10:23:27 AM by Vampy »

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #374 on: April 10, 2009, 01:09:09 PM »
Vampy, you probably have a blank screen like that because there is a Modifications.english.php in the languages folder in your Theme directory.  There should not be.  You should copy everything in that file into the Modifications.english.php folder in the default theme language directory, then delete it.

For that feed, you'd want to use: ~<td class="storybody">(.*?)</td>~si and that should get everything.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline Vampy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Female
  • Purple Peril
    • Purple Hell
Re: RSS Feeder
« Reply #375 on: April 11, 2009, 11:10:33 AM »
Thanks SlammedDime but that's what's causing me such a headache with this - there IS no Modifications.english.php file in my themes languages folder, the only thing in there is ThemeStrings.english.php - everything else runs from the default files.

I'll try that string for the BBC feed - fingers crossed :D

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #376 on: April 11, 2009, 11:22:48 AM »
Are there any errors in your error log?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline Vampy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Female
  • Purple Peril
    • Purple Hell
Re: RSS Feeder
« Reply #377 on: April 11, 2009, 11:35:05 AM »
From within SMF error logs this is all I have

 Apply Filter: Only show the error messages of this URL  http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845
   

Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
2: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '('
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/ScheduledTasks.php
Line: 1723
   


     Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL http://www.purplehell.com/TestForum/index.php?action=admin;area=scheduledtasks
Apply Filter: Only show the errors with the same message
8: Undefined index: message
Apply Filter: Only show the errors from this file
File: /home/purplcom/public_html/TestForum/Sources/Subs-Post.php
Line: 1845


Nothing looks suspicious - do you want me to look on the server error logs too?
« Last Edit: April 11, 2009, 11:30:05 PM by Vampy »

Offline Mack450

  • Semi-Newbie
  • *
  • Posts: 97
Re: RSS Feeder
« Reply #378 on: April 11, 2009, 03:31:47 PM »
cronrss.php is not working for me
www.atvsector.com

Powered by SMF

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,276
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
Re: RSS Feeder
« Reply #379 on: April 12, 2009, 12:20:09 AM »
Can't really help you... this mod doesn't have such a file.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...