RSS Readfeed action

One for Walter I think…

I’m testing the ReadFeed action. When setup creates an error on the page…

  XML error: Mismatched tag at line 47

The RSS feed is checked as valid

Any idea’s why?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi there

I’ve come across this and mentioned it before. Try downloading the older version 0.4.0 from ReadFeed - ActionsForge and I’ve found that fixes the problem for me.

All the best

Gordon
http://www.gordonlow.net/

On 24 Jul 2012, at 12:13pm, David Owen wrote:

One for Walter I think…

I’m testing the ReadFeed action. When setup creates an error on the page…

 XML error: Mismatched tag at line 47

The RSS feed is checked as valid

Any idea’s why?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks but the earlier version made no difference

David Owen

On 24 Jul 2012, at 13:11, Gordon Low wrote:

I’ve come across this and mentioned it before. Try downloading the older version 0.4.0 from ReadFeed - ActionsForge and I’ve found that fixes the problem for me.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

found this, that appears to work on initial testing…

http://www.corvidworks.com/articles/wordpress-content-on-other-pages

kind regards

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

One for Walter I think…

I’m testing the ReadFeed action. When setup creates an error on the page…

  XML error: Mismatched tag at line 47

The RSS feed is checked as valid

Any idea’s why?

David

What is the URL of the Fred you are trying to consume?

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I was testing on this one…

David

On 24 Jul 2012, at 18:25, “waltd” email@hidden wrote:

One for Walter I think…

I’m testing the ReadFeed action. When setup creates an error on the page…

 XML error: Mismatched tag at line 47

The RSS feed is checked as valid

Any idea’s why?

David

What is the URL of the Fred you are trying to consume?

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?

Walter

On Jul 24, 2012, at 7:13 AM, David Owen wrote:

One for Walter I think…

I’m testing the ReadFeed action. When setup creates an error on the page…

 XML error: Mismatched tag at line 47

The RSS feed is checked as valid

Any idea’s why?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here it is on my server: http://scripty.walterdavisstudio.com/feedtest/

Make sure that you entered the actual URL of the feed in the Action interface, that’s a common mistake that people make – putting the URL of the page where you found the feed, rather than the feed itself.

As far as changing it, you certainly can. The thing to do is to look at the actual XML returned by the feed. You can “view source” on it using NetNewsWire and see the actual un-trammeled XML. Once you do, you can create a template based on the default. The way this works is you start with an HTML template of what you want each list item to contain. The default is:

<a href="%s" rel="new_window">%s</a><br />%s

Each %s in there is a placeholder that will be replaced by a variable. You set the actual variables in the “Elements” field in the Action.

link, title, description

That’s a comma-separated list of XML tags that you want to use. There must be one for each of the %s markers in the template, no more and no less. When you look at the raw XML, you will see other tags that you may be interested in. pubDate is in your feed, you could substitute that into the template where you want the date to appear.

Unfortunately, you are struck with the values exactly as they appear in the XML. If you wanted to “humanize” the date, you’d have to use JavaScript in the browser to make it friendlier. I don’t see a way to slip some extra PHP code into the converter to alter the format of the feed to match your page layout. Likewise with the length of the description, I’m afraid.

Walter

On Jul 24, 2012, at 3:34 PM, David Owen wrote:

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There’s a different route using php and adding the Wordpress engine into a static page as long as its on the same server

  <?php

// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘./url-to-blog/wp-load.php’);
query_posts(‘showposts=5’);
?>

Then adding to post to the page…

  <?php while (have_posts()): the_post(); ?>

<?php the_title(); ?>

<?php the_date('d m'); ?>

<?php the_excerpt(); ?>

Read the full story...

<?php endwhile; ?>

I just need to trim <?php the_excerpt(); ?>

David

On 25 Jul 2012, at 03:06, Walter Lee Davis wrote:

Here it is on my server: http://scripty.walterdavisstudio.com/feedtest/

Make sure that you entered the actual URL of the feed in the Action interface, that’s a common mistake that people make – putting the URL of the page where you found the feed, rather than the feed itself.

As far as changing it, you certainly can. The thing to do is to look at the actual XML returned by the feed. You can “view source” on it using NetNewsWire and see the actual un-trammeled XML. Once you do, you can create a template based on the default. The way this works is you start with an HTML template of what you want each list item to contain. The default is:

%s
%s

Each %s in there is a placeholder that will be replaced by a variable. You set the actual variables in the “Elements” field in the Action.

link, title, description

That’s a comma-separated list of XML tags that you want to use. There must be one for each of the %s markers in the template, no more and no less. When you look at the raw XML, you will see other tags that you may be interested in. pubDate is in your feed, you could substitute that into the template where you want the date to appear.

Unfortunately, you are struck with the values exactly as they appear in the XML. If you wanted to “humanize” the date, you’d have to use JavaScript in the browser to make it friendlier. I don’t see a way to slip some extra PHP code into the converter to alter the format of the feed to match your page layout. Likewise with the length of the description, I’m afraid.

Walter

On Jul 24, 2012, at 3:34 PM, David Owen wrote:

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Are you looking for a method to shorten a string of text? You could do this:

$limit = 20; //20 words
$arr = preg_split('/s+/', the_excerpt());
$arr = array_slice($arr,0,$limit);
$out = implode(' ', $arr);
if(count($arr) > $limit) $out .= '…';
print($out);

Now this doesn’t necessarily work out of the box, since I don’t know what the method the_excerpt() does in this context, but it should get you close. You might also want to look at the code for the_excerpt() and see if it takes an optional argument to limit the length of the excerpt.

Walter

On Jul 25, 2012, at 4:15 AM, David Owen wrote:

There’s a different route using php and adding the Wordpress engine into a static page as long as its on the same server

 <?php

// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘./url-to-blog/wp-load.php’);
query_posts(‘showposts=5’);
?>

Then adding to post to the page…

 <?php while (have_posts()): the_post(); ?>

<?php the_title(); ?>

<?php the_date('d m'); ?>

<?php the_excerpt(); ?>

Read the full story...

<?php endwhile; ?>

I just need to trim <?php the_excerpt(); ?>

David

On 25 Jul 2012, at 03:06, Walter Lee Davis wrote:

Here it is on my server: http://scripty.walterdavisstudio.com/feedtest/

Make sure that you entered the actual URL of the feed in the Action interface, that’s a common mistake that people make – putting the URL of the page where you found the feed, rather than the feed itself.

As far as changing it, you certainly can. The thing to do is to look at the actual XML returned by the feed. You can “view source” on it using NetNewsWire and see the actual un-trammeled XML. Once you do, you can create a template based on the default. The way this works is you start with an HTML template of what you want each list item to contain. The default is:

%s
%s

Each %s in there is a placeholder that will be replaced by a variable. You set the actual variables in the “Elements” field in the Action.

link, title, description

That’s a comma-separated list of XML tags that you want to use. There must be one for each of the %s markers in the template, no more and no less. When you look at the raw XML, you will see other tags that you may be interested in. pubDate is in your feed, you could substitute that into the template where you want the date to appear.

Unfortunately, you are struck with the values exactly as they appear in the XML. If you wanted to “humanize” the date, you’d have to use JavaScript in the browser to make it friendlier. I don’t see a way to slip some extra PHP code into the converter to alter the format of the feed to match your page layout. Likewise with the length of the description, I’m afraid.

Walter

On Jul 24, 2012, at 3:34 PM, David Owen wrote:

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks i’ll do some testing on that. Working out what the_excerpt() exactly does and where is no easy job with numerous Wordress files to wrestle.

In the meantime I’ve got the basics working here with a plugin hack.

David

On 25 Jul 2012, at 12:49, Walter Lee Davis wrote:

Are you looking for a method to shorten a string of text? You could do this:

$limit = 20; //20 words
$arr = preg_split(‘/s+/’, the_excerpt());
$arr = array_slice($arr,0,$limit);
$out = implode(’ ', $arr);
if(count($arr) > $limit) $out .= ‘…’;
print($out);

Now this doesn’t necessarily work out of the box, since I don’t know what the method the_excerpt() does in this context, but it should get you close. You might also want to look at the code for the_excerpt() and see if it takes an optional argument to limit the length of the excerpt.

Walter

On Jul 25, 2012, at 4:15 AM, David Owen wrote:

There’s a different route using php and adding the Wordpress engine into a static page as long as its on the same server

<?php

// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘./url-to-blog/wp-load.php’);
query_posts(‘showposts=5’);
?>

Then adding to post to the page…

<?php while (have_posts()): the_post(); ?>

<?php the_title(); ?>

<?php the_date('d m'); ?>

<?php the_excerpt(); ?>

Read the full story...

<?php endwhile; ?>

I just need to trim <?php the_excerpt(); ?>

David

On 25 Jul 2012, at 03:06, Walter Lee Davis wrote:

Here it is on my server: http://scripty.walterdavisstudio.com/feedtest/

Make sure that you entered the actual URL of the feed in the Action interface, that’s a common mistake that people make – putting the URL of the page where you found the feed, rather than the feed itself.

As far as changing it, you certainly can. The thing to do is to look at the actual XML returned by the feed. You can “view source” on it using NetNewsWire and see the actual un-trammeled XML. Once you do, you can create a template based on the default. The way this works is you start with an HTML template of what you want each list item to contain. The default is:

%s
%s

Each %s in there is a placeholder that will be replaced by a variable. You set the actual variables in the “Elements” field in the Action.

link, title, description

That’s a comma-separated list of XML tags that you want to use. There must be one for each of the %s markers in the template, no more and no less. When you look at the raw XML, you will see other tags that you may be interested in. pubDate is in your feed, you could substitute that into the template where you want the date to appear.

Unfortunately, you are struck with the values exactly as they appear in the XML. If you wanted to “humanize” the date, you’d have to use JavaScript in the browser to make it friendlier. I don’t see a way to slip some extra PHP code into the converter to alter the format of the feed to match your page layout. Likewise with the length of the description, I’m afraid.

Walter

On Jul 24, 2012, at 3:34 PM, David Owen wrote:

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That looks really nice, and I would urge you to stay with this approach – it’s much more direct, and won’t slow down the page loads nearly as much as the rube-goldbergian Pages-to-RSS-to-HTML method in ReadFeed. ReadFeed is more of a last ditch when you want to scrape news from a site you don’t control directly (but presumably have permission, explicit or implicit, to republish).

Walter

On Jul 25, 2012, at 10:36 AM, David Owen wrote:

Thanks i’ll do some testing on that. Working out what the_excerpt() exactly does and where is no easy job with numerous Wordress files to wrestle.

In the meantime I’ve got the basics working here with a plugin hack.

http://www.ineedwebhosting.co.uk/web-hosting-news.php

David

On 25 Jul 2012, at 12:49, Walter Lee Davis wrote:

Are you looking for a method to shorten a string of text? You could do this:

$limit = 20; //20 words
$arr = preg_split(‘/s+/’, the_excerpt());
$arr = array_slice($arr,0,$limit);
$out = implode(’ ', $arr);
if(count($arr) > $limit) $out .= ‘…’;
print($out);

Now this doesn’t necessarily work out of the box, since I don’t know what the method the_excerpt() does in this context, but it should get you close. You might also want to look at the code for the_excerpt() and see if it takes an optional argument to limit the length of the excerpt.

Walter

On Jul 25, 2012, at 4:15 AM, David Owen wrote:

There’s a different route using php and adding the Wordpress engine into a static page as long as its on the same server

<?php // Include WordPress define('WP_USE_THEMES', false); require('./url-to-blog/wp-load.php'); query_posts('showposts=5'); ?>

Then adding to post to the page…

<?php while (have_posts()): the_post(); ?>

<?php the_title(); ?>

<?php the_date('d m'); ?>

<?php the_excerpt(); ?>

Read the full story...

<?php endwhile; ?>

I just need to trim <?php the_excerpt(); ?>

David

On 25 Jul 2012, at 03:06, Walter Lee Davis wrote:

Here it is on my server: http://scripty.walterdavisstudio.com/feedtest/

Make sure that you entered the actual URL of the feed in the Action interface, that’s a common mistake that people make – putting the URL of the page where you found the feed, rather than the feed itself.

As far as changing it, you certainly can. The thing to do is to look at the actual XML returned by the feed. You can “view source” on it using NetNewsWire and see the actual un-trammeled XML. Once you do, you can create a template based on the default. The way this works is you start with an HTML template of what you want each list item to contain. The default is:

%s
%s

Each %s in there is a placeholder that will be replaced by a variable. You set the actual variables in the “Elements” field in the Action.

link, title, description

That’s a comma-separated list of XML tags that you want to use. There must be one for each of the %s markers in the template, no more and no less. When you look at the raw XML, you will see other tags that you may be interested in. pubDate is in your feed, you could substitute that into the template where you want the date to appear.

Unfortunately, you are struck with the values exactly as they appear in the XML. If you wanted to “humanize” the date, you’d have to use JavaScript in the browser to make it friendlier. I don’t see a way to slip some extra PHP code into the converter to alter the format of the feed to match your page layout. Likewise with the length of the description, I’m afraid.

Walter

On Jul 24, 2012, at 3:34 PM, David Owen wrote:

Yep, I got the URL wrong. Should be I Need Web Hosting Mac friendly web hosting and domain registration

Regards the feed results can it…

Display the post’s date?
Can the length of the excerpt / description be adjusted?

David

On 24 Jul 2012, at 20:14, Walter Lee Davis email@hidden wrote:

What is the URL of the feed itself? What value did you enter into the ReadFeed Action interface for the feed address?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes you’re right. This php solution is working a treat. Just need to prettify a little using CSS

David

On 25 Jul 2012, at 17:20, Walter Lee Davis wrote:

That looks really nice, and I would urge you to stay with this approach – it’s much more direct,


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,
I’ve got ReadFeed working on my site, and I’m very happy with it. However, I was wondering if there was a way to handle punctuation in the titles of posts. As it is, if I have quotes or apostrophes in the tile, the reader is interpreting them as gobbledegook. For instance, if a title is “EAT” AT JOE’S, I’d be left with text that looks almost nothing like the title. Is there a way to clean this up? Or am I left with making sure there are only alphanumeric characters in my post titles?

You can check out the site to see how I’m incorporating ReadFeed here:
www.cinemabeach.com

Thanks,
Bryan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can you post an example that shows the problem, just temporarily? I need to look at the RSS that’s being read as well as the HTML that it’s generating. I just had a quick look through the Feed.php class to see if there was a chance that the content of the feed was being double-encoded, and I don’t see any code that might be doing that.

If you would please post the URL of the feed (which you enter in the Action interface) as well as create at least one entry that exposes the issue, I could take a closer look at this for you.

Walter

On Aug 27, 2012, at 6:25 PM, Bryan Thompson wrote:

Hi Walter,
I’ve got ReadFeed working on my site, and I’m very happy with it. However, I was wondering if there was a way to handle punctuation in the titles of posts. As it is, if I have quotes or apostrophes in the tile, the reader is interpreting them as gobbledegook. For instance, if a title is “EAT” AT JOE’S, I’d be left with text that looks almost nothing like the title. Is there a way to clean this up? Or am I left with making sure there are only alphanumeric characters in my post titles?

You can check out the site to see how I’m incorporating ReadFeed here:
www.cinemabeach.com

Thanks,
Bryan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for checking, Walt. I updated one post (the “Craigslist Joe” post in the center of the site)

The feed address I am for this section using is:
http://www.cinemabeach.com/features/category/reviews/feed

As you can see, the text comes out looking like:
“Craigslist Joe” shows the human side to technology

Thanks,
Bryan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh, that’s easy. Change the Character Set to Unicode from whatever it is currently set to on your page where you’re showing the feed. RSS feeds are usually in Unicode, and what you’re seeing is a mis-match between the character set of the feed and your page. If Unicode doesn’t do it, then try some others – Windows Latin, Mac Latin, keep trying until you find one that matches it.

Walter

On Aug 28, 2012, at 10:48 AM, Bryan Thompson wrote:

Thanks for checking, Walt. I updated one post (the “Craigslist Joe” post in the center of the site)

The feed address I am for this section using is:
http://www.cinemabeach.com/features/category/reviews/feed

As you can see, the text comes out looking like:
“Craigslist Joe” shows the human side to technology

Thanks,
Bryan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, I see. My feed is unicode (UTF-8). Are you saying I need to change the character set in Freeway? My page is set to AUTOMATIC now. Should I change this to unicode?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes. Automatic is supposed to be Unicode, since that’s what W3C recommends for all HTML pages, but in practice it often is not that.

Walter

On Aug 28, 2012, at 11:27 PM, Bryan Thompson wrote:

Okay, I see. My feed is unicode (UTF-8). Are you saying I need to change the character set in Freeway? My page is set to AUTOMATIC now. Should I change this to unicode?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options