<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Adding feeds with CG-FeedRead &#8211; a tutorial</title>
	<atom:link href="http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/feed" rel="self" type="application/rss+xml" />
	<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213</link>
	<description>Mathematics, learning, computing, travel - and whatever...</description>
	<lastBuildDate>Tue, 16 Mar 2010 02:48:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eric</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-190951</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Wed, 27 Jan 2010 17:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-190951</guid>
		<description>Zac,

Fixed it. Wordpress settings user error!</description>
		<content:encoded><![CDATA[<p>Zac,</p>
<p>Fixed it. Wordpress settings user error!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-190947</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Wed, 27 Jan 2010 17:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-190947</guid>
		<description>Zac,

Are you still helping with the cg-feedreader?

I am trying to get it to work on the main page of a site.
I am getting this error:

CGFR: Recaching blog ( http://www.kucia.com/blog/wp-rss2.php )... CGFR: ERROR trying to read feed blog ( http://www.kucia.com/blog/wp-rss2.php )! CGFR: XMLParser Error: 404 Not Found ... XMLParser Error: 404 Not Found 

Seems that it is more of a missing files issue than a plugin.

Let me know if you can.</description>
		<content:encoded><![CDATA[<p>Zac,</p>
<p>Are you still helping with the cg-feedreader?</p>
<p>I am trying to get it to work on the main page of a site.<br />
I am getting this error:</p>
<p>CGFR: Recaching blog ( <a href="http://www.kucia.com/blog/wp-rss2.php" rel="nofollow">http://www.kucia.com/blog/wp-rss2.php</a> )&#8230; CGFR: ERROR trying to read feed blog ( <a href="http://www.kucia.com/blog/wp-rss2.php" rel="nofollow">http://www.kucia.com/blog/wp-rss2.php</a> )! CGFR: XMLParser Error: 404 Not Found &#8230; XMLParser Error: 404 Not Found </p>
<p>Seems that it is more of a missing files issue than a plugin.</p>
<p>Let me know if you can.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zac</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-21439</link>
		<dc:creator>zac</dc:creator>
		<pubDate>Sat, 05 Apr 2008 23:36:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-21439</guid>
		<description>Hi Phoenix

If you check it again now, maybe it will look how you want. The caching system of this script can be a trap - you make change to the script and then nothing seems to change on the HTML page. 

When modifying, set the timeout ($XML_CACHE_TIME) to a very low value so changes appear immediately. 

Then remember to set it back!

If it is not OK still, send the link and I&#039;ll have a look.</description>
		<content:encoded><![CDATA[<p>Hi Phoenix</p>
<p>If you check it again now, maybe it will look how you want. The caching system of this script can be a trap &#8211; you make change to the script and then nothing seems to change on the HTML page. </p>
<p>When modifying, set the timeout ($XML_CACHE_TIME) to a very low value so changes appear immediately. </p>
<p>Then remember to set it back!</p>
<p>If it is not OK still, send the link and I&#8217;ll have a look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phoenix</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-21431</link>
		<dc:creator>Phoenix</dc:creator>
		<pubDate>Sat, 05 Apr 2008 19:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-21431</guid>
		<description>I know this thread is like a year old. I dont know if anyone even looks at this anymore, but for the sake of keeping sanity I will post my question anyways.

I have tried to limit the number of words that appear, really I only want the title to show up and nothing else. I read through the comments and did what zac said, and i edit the change that mickeyb pointed out. 

My site shows lots of the post, i only want 15 characters, however, where i refresh nothing happens. 

Anyone care to help? I know its old but its worth a try....thanks</description>
		<content:encoded><![CDATA[<p>I know this thread is like a year old. I dont know if anyone even looks at this anymore, but for the sake of keeping sanity I will post my question anyways.</p>
<p>I have tried to limit the number of words that appear, really I only want the title to show up and nothing else. I read through the comments and did what zac said, and i edit the change that mickeyb pointed out. </p>
<p>My site shows lots of the post, i only want 15 characters, however, where i refresh nothing happens. </p>
<p>Anyone care to help? I know its old but its worth a try&#8230;.thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zac</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-8575</link>
		<dc:creator>zac</dc:creator>
		<pubDate>Fri, 23 Mar 2007 21:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-8575</guid>
		<description>Hi Mickey

Latest comments is easy. You just give to the function the feed for comments.

See &lt;a href=&quot;http://www.intmath.com/cg-feedread-example3.php&quot; rel=&quot;nofollow&quot;&gt;Comments feed&lt;/a&gt; for an example.

To achieve this, I just gave it 

/comments/feed/

instead of 

/feed/

In your case, you would give it.

.../wordpress/?feed=comments-rss2

You will get the name of the person who commented.

I&#039;m afraid the name of the blogger will require tweaking Chait&#039;s script. Maybe you could contact him at his blog.

Another option is the following...

Feedread is great if you are pulling feeds from outside sources. But if you are pulling your own feeds, it really is overkill. On my mathematics site, I pull 3 posts from my blog on each page (see here for an &lt;a href=&quot;http://www.intmath.com/Applications-differentiation/5_Curve-sketching-differentiation.php&quot; rel=&quot;nofollow&quot;&gt;example&lt;/a&gt; towards the bottom of the left column). I am not using Feedread at all there, I am accessing the database directly.

Are you interested in that option?</description>
		<content:encoded><![CDATA[<p>Hi Mickey</p>
<p>Latest comments is easy. You just give to the function the feed for comments.</p>
<p>See <a href="http://www.intmath.com/cg-feedread-example3.php" rel="nofollow">Comments feed</a> for an example.</p>
<p>To achieve this, I just gave it </p>
<p>/comments/feed/</p>
<p>instead of </p>
<p>/feed/</p>
<p>In your case, you would give it.</p>
<p>&#8230;/wordpress/?feed=comments-rss2</p>
<p>You will get the name of the person who commented.</p>
<p>I&#8217;m afraid the name of the blogger will require tweaking Chait&#8217;s script. Maybe you could contact him at his blog.</p>
<p>Another option is the following&#8230;</p>
<p>Feedread is great if you are pulling feeds from outside sources. But if you are pulling your own feeds, it really is overkill. On my mathematics site, I pull 3 posts from my blog on each page (see here for an <a href="http://www.intmath.com/Applications-differentiation/5_Curve-sketching-differentiation.php" rel="nofollow">example</a> towards the bottom of the left column). I am not using Feedread at all there, I am accessing the database directly.</p>
<p>Are you interested in that option?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mickeyb</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-8556</link>
		<dc:creator>mickeyb</dc:creator>
		<pubDate>Fri, 23 Mar 2007 14:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-8556</guid>
		<description>Hi Zac

Is it possible to get the blog on the home page to show the name of the blogger too apart from the first ten words

also can latest comments be shown on the front?

cheers

Mickey</description>
		<content:encoded><![CDATA[<p>Hi Zac</p>
<p>Is it possible to get the blog on the home page to show the name of the blogger too apart from the first ten words</p>
<p>also can latest comments be shown on the front?</p>
<p>cheers</p>
<p>Mickey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zac</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-8007</link>
		<dc:creator>zac</dc:creator>
		<pubDate>Wed, 28 Feb 2007 01:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-8007</guid>
		<description>Wak! 

Wordpress changed my &quot;\n\t&quot; into &quot;nt&quot; (because it was in a &lt;pre&gt; tag) and I hadn&#039;t noticed it.

This removes new line and tab characters from the post when counting the number of words (and puts them back in when giving the output).

I have modified the code in my comment so it looks correct and can be copied and pasted.

I see your example is working fine now.</description>
		<content:encoded><![CDATA[<p>Wak! </p>
<p>Wordpress changed my &#8220;\n\t&#8221; into &#8220;nt&#8221; (because it was in a &lt;pre> tag) and I hadn&#8217;t noticed it.</p>
<p>This removes new line and tab characters from the post when counting the number of words (and puts them back in when giving the output).</p>
<p>I have modified the code in my comment so it looks correct and can be copied and pasted.</p>
<p>I see your example is working fine now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mickeyb</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-7997</link>
		<dc:creator>mickeyb</dc:creator>
		<pubDate>Tue, 27 Feb 2007 12:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-7997</guid>
		<description>Hi zac

that bit of script worked ok once I fiddled with it. I replaced 

($string, &quot; nt&quot;);

with 

($string, &quot; %&quot;);

because it was delivering the dlimit but with all the  n and t letters missing from the text. so I thought I&#039;d use a character that rarely appears in the intro of blogs

the script had been working fine until last night. strange how it suddenly went wrong. all I had done was change themes on my  blog but that can&#039;t have done the damage.

cheers

mickey</description>
		<content:encoded><![CDATA[<p>Hi zac</p>
<p>that bit of script worked ok once I fiddled with it. I replaced </p>
<p>($string, &#8221; nt&#8221;);</p>
<p>with </p>
<p>($string, &#8221; %&#8221;);</p>
<p>because it was delivering the dlimit but with all the  n and t letters missing from the text. so I thought I&#8217;d use a character that rarely appears in the intro of blogs</p>
<p>the script had been working fine until last night. strange how it suddenly went wrong. all I had done was change themes on my  blog but that can&#8217;t have done the damage.</p>
<p>cheers</p>
<p>mickey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zac</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-7983</link>
		<dc:creator>zac</dc:creator>
		<pubDate>Mon, 26 Feb 2007 22:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-7983</guid>
		<description>Hi Mickey

If you set (for example)
  $dLimit = 100; 
it will give you the first 100 characters of the post.

Keep smiling!

&lt;b&gt;Update:&lt;/b&gt; Actually, this does not work! I&#039;m not sure why. I have a workaround, though, which is not so bad.

Open cg-feedread.php and paste this function into the top (underneath the comments, near where it has the feedread version number):

&lt;pre&gt;function limit_words($string,$limit)
{
  $numWords = 0;
  $result = &quot;&quot;;
  if($limit&lt;1 &#124;&#124; !is_int($limit)) return $result;
    $word = strtok($string, &quot; \\n\\t&quot;);
    $result .= $word;
    while($word &amp;&amp; (++$numWords &lt; $limit)) {
      $word = strtok(&quot; \\n\\t&quot;);
      $result .= &quot; $word&quot;;
    }
  return $result;
}
&lt;/pre&gt;
Now, about 2/3 of the way down the cg-feedread.php script, find the line that says:

&lt;pre&gt;$itemDescription = cleanBadChars($itemDescription); // just in case...&lt;/pre&gt;

After that line, add these 2 lines (the first is a call to the function and the second adds the &quot;...&quot; at the end of each truncated post.

&lt;pre&gt;$itemDescription = limit_words( $itemDescription, $dLimit );  
$itemDescription .= &quot;...&quot;;			
&lt;/pre&gt;

Now you can go back to your feedread.php file and set the $dLimit to whatever you like. 

It should work okay. Good luck. 

I have not extensively tested this - let me know if it breaks.</description>
		<content:encoded><![CDATA[<p>Hi Mickey</p>
<p>If you set (for example)<br />
  $dLimit = 100;<br />
it will give you the first 100 characters of the post.</p>
<p>Keep smiling!</p>
<p><b>Update:</b> Actually, this does not work! I&#8217;m not sure why. I have a workaround, though, which is not so bad.</p>
<p>Open cg-feedread.php and paste this function into the top (underneath the comments, near where it has the feedread version number):</p>
<pre>function limit_words($string,$limit)
{
  $numWords = 0;
  $result = "";
  if($limit&lt;1 || !is_int($limit)) return $result;
    $word = strtok($string, " \\n\\t");
    $result .= $word;
    while($word &#038;&#038; (++$numWords < $limit)) {
      $word = strtok(" \\n\\t");
      $result .= " $word";
    }
  return $result;
}
</pre>
<p>Now, about 2/3 of the way down the cg-feedread.php script, find the line that says:</p>
</pre>
<pre>$itemDescription = cleanBadChars($itemDescription); // just in case...</pre>
<p>After that line, add these 2 lines (the first is a call to the function and the second adds the "..." at the end of each truncated post.</p>
<pre>$itemDescription = limit_words( $itemDescription, $dLimit );
$itemDescription .= "...";
</pre>
<p>Now you can go back to your feedread.php file and set the $dLimit to whatever you like. </p>
<p>It should work okay. Good luck. </p>
<p>I have not extensively tested this - let me know if it breaks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mickeyb</title>
		<link>http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213/comment-page-1#comment-7981</link>
		<dc:creator>mickeyb</dc:creator>
		<pubDate>Mon, 26 Feb 2007 19:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarecirclez.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213#comment-7981</guid>
		<description>AAAAAaaarrrrrrrgh!

now it has totally and utterly stopped working. It is putting the WHOLE  blogs on my html page instead of just the head and the first few characters!!!!!

what can have gone wrong. I&#039;ve reloaded everything, killed off the blog Dat and html files put it still keeps coming back

what can have gone wrong!!!!</description>
		<content:encoded><![CDATA[<p>AAAAAaaarrrrrrrgh!</p>
<p>now it has totally and utterly stopped working. It is putting the WHOLE  blogs on my html page instead of just the head and the first few characters!!!!!</p>
<p>what can have gone wrong. I&#8217;ve reloaded everything, killed off the blog Dat and html files put it still keeps coming back</p>
<p>what can have gone wrong!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
