<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Easy Day Media &#187; Wordpress</title>
	<atom:link href="http://www.easydaymedia.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.easydaymedia.com</link>
	<description>Poker Affiliate, Wordpress Coder</description>
	<lastBuildDate>Wed, 21 Oct 2009 02:37:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress 2.8.5</title>
		<link>http://www.easydaymedia.com/wordpress/wordpress-2-8-5/</link>
		<comments>http://www.easydaymedia.com/wordpress/wordpress-2-8-5/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 02:37:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.easydaymedia.com/?p=40</guid>
		<description><![CDATA[The hardening release of wordpress 2.8.5 has just been released.  This release aims to fix a lot of the issues generated with 2.8.4 namely the explotion issues that came up for a lot of users who were seasoned wordpress veterans.
If you think you fall into this category, check out the Wordpress exploit scanner to [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wordpress.org/development/2009/10/wordpress-2-8-5-hardening-release/">hardening release</a> of wordpress 2.8.5 has just been released.  This release aims to fix a lot of the issues generated with 2.8.4 namely the explotion issues that came up for a lot of users who were seasoned wordpress veterans.</p>
<p>If you think you fall into this category, check out the <a href="http://wordpress.org/extend/plugins/exploit-scanner/">Wordpress exploit scanner</a> to see if your site has been hit.</p>
<p>Be sure to remove all traces of any exploits before you upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.easydaymedia.com/wordpress/wordpress-2-8-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress and SimplePie Content Truncate Solution</title>
		<link>http://www.easydaymedia.com/wordpress/wordpress-and-simplepie-content-solution/</link>
		<comments>http://www.easydaymedia.com/wordpress/wordpress-and-simplepie-content-solution/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 01:51:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.easydaymedia.com/?p=9</guid>
		<description><![CDATA[Going to start this blog off with a simple coding problem that was presented to me earlier today.  Kaus (Cheryle) over at the PokerAffiliateListings.com forums asked for help with displaying a wordpress feed using simplepie on a static html page.
A Little Background
Cheryle is using wordpress to power the news section of her website but she [...]]]></description>
			<content:encoded><![CDATA[<p>Going to start this blog off with a simple coding problem that was presented to me earlier today.  Kaus (Cheryle) over at the PokerAffiliateListings.com forums asked for help with displaying a wordpress feed using simplepie on a static html page.</p>
<h4>A Little Background</h4>
<p>Cheryle is using wordpress to power the news section of her website but she wants to display the posts on the static portion of her site.  She is accomplishing this by grabbing the feed from wordpress and parsing it using simplepie.  The full feed that is available from her website contains &#8220;img&#8221; tags which she also wants to parse but she does not want to show the full content, only a brief description.</p>
<p>SimplePie contains two different functions for displaying the main portion of a feed:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?php <br />
echo $item-&gt;get_content();<br />
?&gt;</div></div>
<p>and</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?php <br />
echo $item-&gt;get_description();<br />
?&gt;</div></div>
<p>The first example displays the full content of the feed while the second example displays a brief description.</p>
<h4>The Problem</h4>
<p>Using $item->get_description(); does not parse the &#8220;img&#8221; tags the way she would like.  In fact, it completely removes them.  In addition to that, she would like to be able to control the amount of content that is being displayed for asthetical purposes.</p>
<h4>Mike&#8217;s SimplePie &#8211; Simple Solution</h4>
<p>By creating a snippet of code, we can truncate the $item->get_content(); function to display only the required number of words.  Here is the code:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?php<br />
&nbsp; $content = $item-&gt;get_content(); <br />
&nbsp; $numwords = 40; <br />
&nbsp; preg_match(&quot;/([\S]+\s*){0,$numwords}/&quot;, $content, $desc); <br />
&nbsp; $shortdesc = trim($desc[0]); <br />
echo $shortdesc;<br />
?&gt;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.easydaymedia.com/wordpress/wordpress-and-simplepie-content-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
