Advertisement:

Author Topic: RSS Feeder  (Read 375314 times)

Offline GazOutEast

  • Jr. Member
  • **
  • Posts: 309
  • Gender: Male
  • If it's fixed - I can break it
Re: RSS Feeder
« Reply #940 on: January 16, 2010, 01:11:14 AM »
Many thanks - I'll not nag you about it ;) just ask that you ad it to your "round tooit" wish list

Gaz
I have 20:20 vision - I can see anything bigger than 20" x 20"

Offline SAFAD

  • Full Member
  • ***
  • Posts: 679
  • Gender: Male
  • away
    • أكاديمية صفد سوفت
Re: RSS Feeder
« Reply #941 on: January 16, 2010, 02:33:14 AM »
Alright Guys I Will Really Appreciate Your Help
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Offline InfoStrides

  • Full Member
  • ***
  • Posts: 497
  • www.TheInfoStrides.com
    • InfoStrides on Facebook
    • @TheInfoStrides on Twitter
    • TheInfoStrides.com
Re: RSS Feeder
« Reply #942 on: January 25, 2010, 05:50:21 AM »
@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'] : '');

Hello,

How can edit the code to have it in the following format?

Body content

Source: news link (permalink)
Thanks.
« Last Edit: January 25, 2010, 05:55:47 AM by infostrides »

Offline dynaweb

  • Semi-Newbie
  • *
  • Posts: 12
    • RSS Dog
Re: RSS Feeder
« Reply #943 on: January 25, 2010, 01:47:25 PM »
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?
FSS to HTML Widget [nofollow] - Snowboarding Forums [nofollow]

Offline InfoStrides

  • Full Member
  • ***
  • Posts: 497
  • www.TheInfoStrides.com
    • InfoStrides on Facebook
    • @TheInfoStrides on Twitter
    • TheInfoStrides.com
Re: RSS Feeder Errors
« Reply #944 on: February 01, 2010, 01:22:16 AM »
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

Offline Buah

  • Newbie
  • *
  • Posts: 4
Re: RSS Feeder
« Reply #945 on: February 01, 2010, 07:06:28 AM »
This feeder doesn't post.. I tried four different feeds and none of em works, so I think there's something wrong in this mod. No errors at error log.
« Last Edit: February 01, 2010, 07:24:05 AM by Buah »

Offline Spuds

  • SMF Hero
  • ******
  • Posts: 1,798
  • Gender: Male
Re: RSS Feeder
« Reply #946 on: February 01, 2010, 11:14:29 AM »
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

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

Offline Spuds

  • SMF Hero
  • ******
  • Posts: 1,798
  • Gender: Male
Re: RSS Feeder
« Reply #947 on: February 01, 2010, 11:41:33 AM »
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?

Does it just get the short article or nothing at all?

I would think either that the url needs to be encoded so its not truncated somewhere (you could try just changing the ? to a %3F) or that the article you are pointing to does not have a permalink or that the permalink does not point at the full story.  The feeder basically trys to follow the link contained in an rss story to get at the full feed.

Offline InfoStrides

  • Full Member
  • ***
  • Posts: 497
  • www.TheInfoStrides.com
    • InfoStrides on Facebook
    • @TheInfoStrides on Twitter
    • TheInfoStrides.com
Re: RSS Feeder
« Reply #948 on: February 02, 2010, 02:55:48 AM »
Quote
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

Thank you for your prompt response.

How can I turn off strict and notice warnings on a production site?

I only experienced this error whenever I enable RSS Feeder. Most especially during feed posting.

Regards,

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 #949 on: February 02, 2010, 05:46:27 AM »
Your host will have to disable it for you, as it's set in the PHP.ini configuration file.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline dynaweb

  • Semi-Newbie
  • *
  • Posts: 12
    • RSS Dog
Re: RSS Feeder
« Reply #950 on: February 02, 2010, 12:42:42 PM »
Anyone else experience the issue with the question mark in the URL?
FSS to HTML Widget [nofollow] - Snowboarding Forums [nofollow]

Offline tbk22

  • Jr. Member
  • **
  • Posts: 150
  • Gender: Male
  • :F
    • Silkroad Portugal
Re: RSS Feeder
« Reply #951 on: February 07, 2010, 01:33:10 PM »
I cant get this rss feed to work with the MOD

http://feeds.feedburner.com/SilkroadLatestNews

What might be the problem?
=)

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 #952 on: February 07, 2010, 01:54:08 PM »
That's not an RSS feed... it's an HTML document.  You need an actual XML formatted RSS feed.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline tbk22

  • Jr. Member
  • **
  • Posts: 150
  • Gender: Male
  • :F
    • Silkroad Portugal
Re: RSS Feeder
« Reply #953 on: February 07, 2010, 01:56:40 PM »
That's not an RSS feed... it's an HTML document.  You need an actual XML formatted RSS feed.

I know... But then what about this?

http://feeds.feedburner.com/SilkroadLatestNews?format=xml

Its on that page and its not working also with the mod
=)

Offline steve51184

  • Sr. Member
  • ****
  • Posts: 781
Re: RSS Feeder
« Reply #954 on: February 13, 2010, 03:54:27 AM »
hey all i want to edit what is posted and i know the bit i need to edit is in ScheduledTasks.php but i'm not sure how to do it

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'] : '');

all i want is it to show to article and no links to the article or the date at the top etc

p.s. it's my blog s oi don't need to link back to it ;)

Offline steve51184

  • Sr. Member
  • ****
  • Posts: 781
Re: RSS Feeder
« Reply #955 on: February 13, 2010, 04:33:14 AM »
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'] : '');
« Last Edit: February 13, 2010, 04:57:19 AM by ppbz »

Offline InfoStrides

  • Full Member
  • ***
  • Posts: 497
  • www.TheInfoStrides.com
    • InfoStrides on Facebook
    • @TheInfoStrides on Twitter
    • TheInfoStrides.com
Re: RSS Feeder
« Reply #956 on: February 13, 2010, 08:52:07 AM »
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'] : '');

Good! Please can I have it so that it shows the link to the feed after the post rather than at the begin?

For instance:

Date:
Post:
Source: link to the post instead of the website.

Thank you.

Regards,

Offline Spuds

  • SMF Hero
  • ******
  • Posts: 1,798
  • Gender: Male
Re: RSS Feeder
« Reply #957 on: February 13, 2010, 11:43:03 AM »
First the warning ... COMPLETELY UNTESTED

To hopefully help with all the questions of how to I format the message this way to that way I've munged the code to make it easier for folks unfamiliar with php to make changes as they see fit. 

What this does is break the message into sections that should be more obvious what they are, you can then combine in the order, and what sections you do or don't want to show.

Again this was just typed in and has not been tested, primarily because I'm not going to use it and also because I'm lazy.

So 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
// 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;




Offline steve51184

  • Sr. Member
  • ****
  • Posts: 781
Re: RSS Feeder
« Reply #958 on: February 13, 2010, 12:31:51 PM »
wow amazing post but just so you know it's $message and not $message_body

i used just

Quote
$message = $body . "\n";

that gives me just the good stuff :)

Offline Spuds

  • SMF Hero
  • ******
  • Posts: 1,798
  • Gender: Male
Re: RSS Feeder
« Reply #959 on: February 13, 2010, 01:41:02 PM »
wow amazing post but just so you know it's $message and not $message_body

i used just

Quote
$message = $body . "\n";

that gives me just the good stuff :)
Glad it helped ....

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.