<?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>Ryan Bosinger &#187; PHP</title>
	<atom:link href="http://ryanbosinger.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanbosinger.com/blog</link>
	<description>things I learn, as I learn them</description>
	<lastBuildDate>Fri, 18 May 2012 20:45:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>What would it be like to walk thirty dogs?</title>
		<link>http://ryanbosinger.com/blog/2010/what-would-it-be-like-to-walk-thirty-dogs/</link>
		<comments>http://ryanbosinger.com/blog/2010/what-would-it-be-like-to-walk-thirty-dogs/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 21:50:13 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=394</guid>
		<description><![CDATA[Ruff! I&#8217;ve been working on this site, thirtydogs.com, for some time now. Thirtydogs is basically a place where you can find and share ideas for somewhat unconventional things to do with your time. Ideas on thirtydogs.com can range from Start an ant farm to Roast wieners or marshmallows over the stovetop element. I built Thirtydogs [...]]]></description>
			<content:encoded><![CDATA[<p>Ruff!</p>

<p>I&#8217;ve been working on this site, <a href="http://www.thirtydogs.com">thirtydogs.com</a>, for some time now.  Thirtydogs is basically a place where you can find and share ideas for somewhat unconventional things to do with your time.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/11/Screen-shot-2010-11-14-at-1.35.48-PM.png"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/11/Screen-shot-2010-11-14-at-1.35.48-PM-300x200.png" alt="" title="Screen shot 2010-11-14 at 1.35.48 PM" width="300" height="200" class="aligncenter size-medium wp-image-395" /></a>
</p>

<p>
Ideas on thirtydogs.com can range from <a href="http://www.thirtydogs.com/ideas/view/start-an-ant-farm">Start an ant farm</a> to <a href="http://www.thirtydogs.com/ideas/view/roast-wieners-or-marshmallows-over-the-stovetop-element">Roast wieners or marshmallows over the stovetop element</a>.  
</p>

<p>I built Thirtydogs using the PHP framework <a href="http://www.codeigniter.com">Codeigniter</a>.  It&#8217;s a great, lightweight framework.  It had what I needed without a bunch of extra crap.</p>

<p>Anyways, <a href="http://www.thirtydogs.com">go check it out</a> and make sure to check back often.  There&#8217;s a lot of features sitting at the 90% mark that I should be rolling out over the next couple of months.  We&#8217;re also planning on tightening up the design.  I think the most interesting thing will be to see what this site evolves into as a community develops around it.  Hopefully some creative people dig the site and we can build a nice big database of ridiculous ideas.</p>

<p>Remember, <em>waste your time creatively</em>.</p>

]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/what-would-it-be-like-to-walk-thirty-dogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 7: My Conclusion)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-7-my-conclusion/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-7-my-conclusion/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:30:22 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=283</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-283"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li>Playing with FrogCMS (Part 7: My Conclusion)</li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>Overall I like FrogCMS.  I&#8217;m not convinced it has enough features to be worth using on a regular basis (for me).  It is however so easy and fast to use that you might as well use it as oppose to building a pure static site.</p>

<h2>Too lightweight?</h2>

<p>
I like lightweight software.  I do most of my work in Notepad++ (as opposed to a heavy IDE), I use Foobar2000 instead of iTunes or Windows Media Player.  I love working with the lightweight Codeigniter PHP framework.  FrogCMS&#8217;s slogan is <em>Content Management Simplified</em> and their project goal is clear:
</p>

<blockquote>
The philosophy of Frog CMS is to keep the core CMS as light, fast and flexible as possible.
</blockquote>

<p>
The reality for me is that it&#8217;s easy to use and fast to get going but doesn&#8217;t quite do a whole lot for you in the end.  That being said, if you have a website design and some fairly static content you could easily go with FrogCMS and benefit from having a backend admin, user management and few other tools.  However, as soon as your needs grow beyond that you would find yourself either considering a more powerful CMS or writing your own plugins (more on that next) both of which would take a lot more work.
</p>

<h2>Extending with plug-ins</h2>

<p>
I love the idea of starting with a lightweight core but having the option to increase the power and flexibility of a system with plug-ins.  This has always been WordPress&#8217;s philosophy as well.  In the case of FrogCMS there doesn&#8217;t seem to be a whole lot of plug-ins to choose from.  If you have PHP skills it might be cool to use FrogCMS as your base and do all your custom development in the form of plug-ins.  It would sure beat doing all the dev work from the ground up and naturally keep things more manageable and modular.  If the FrogCMS community were to grow and more supported plug-ins hit the scene much more would be possible and would quickly change be general opinion.
</p>

<h2>For freelancing?  for clients?</h2>

<p>
For me, one of the main reasons to use a CMS is for a client website.  Often a client will want to be able to add and manage their own content to some degree.  Why shouldn&#8217;t they?  It&#8217;s certainly not worth it to always be coding your own backend system when so many great CMS&#8217;s are available (especially if you&#8217;re building smaller lower budget sites).  For this purpose I&#8217;d be a little afraid to use FrogCMS.  It&#8217;s great because the backend interface is clean and simple but it also requires to client to basically &#8220;code&#8221; their own pages.  Although markdown and textile are cool I don&#8217;t think they&#8217;re really any <em>easier</em> than pure HTML and I don&#8217;t really want a client inputting their own HTML anyway (could cause future issues).  Markdown, textile or HTML would be fine for simple things like styling text but I think the general content input system needs a little more.  Here&#8217;s what I&#8217;m thinking:
</p>

<ol>
<li>
<p><strong>Images/Media</strong></p>
<p>There needs to be an easier way for a client to add an image to a page.  Currently (without a plugin) they would have to upload the image through the file manager and link to that image using a form of mark-up.  This is a big one for me.  Other types of media such as audio and video are usually requested by clients as well.  At very least FrogCMS needs a supported plug-in to help with adding media to a page.</p>
</li>
<li>
<p><strong>Forms?</strong></p>
<p>If you look into the &#8220;commenting&#8221; plug-in for FrogCMS you can see there is a way to make forms.  However, you&#8217;ll basically just be doing PHP.  If FrogCMS had a built in system for making forms it could easily get complicated (and therefore stray from the project goal) but if there was a simple method to help with forms and user input that would be great.  Maybe a core plug-in?
</p>
<li>
<p><strong>Further divided content parts</strong></p>
<p>I thought it was neat how easily I could make a content part and then add that as a tab to the page edit screen.  It would be nice to take this a bit further.  Maybe a content part could have smaller sub-parts.  In the example of the &#8220;Gong of the Day&#8221; callout it would be nice to have three sub-parts: gong name, gong description, gong link.  It would be a lot nicer for a non-techie client to fill in these three fields than to alter mark-up.</p>
</li>
</ol>

<h2>Final say</h2>

<p>I feel like I&#8217;m giving FrogCMS a negative vibe but overall I really did like it.  It&#8217;s not quite powerful enough for my purposes at this time but I do love it&#8217;s simplicity.  I&#8217;m considering taking a stab at building out some of my own plug-ins to solve a few of issues I considered weak spots.  A little extra push would make this CMS perfect for me.  I&#8217;ll make sure to keep you posted!</p>

<p>Thanks for reading,</p>
<p style="padding-left: 24px;"><em>Boztown</em></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-7-my-conclusion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 6: User Management)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-6-user-management/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-6-user-management/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:29:41 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=262</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-262"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li>Playing with FrogCMS (Part 6: User Management)</li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>As I wrote in my last post:</p>

<blockquote>
I&#8217;d like to pretend I&#8217;m setting up an &#8220;editor&#8221; account for the client and feel out how they would experience adding and manipulating content.
</blockquote>

<h2>Adding a new user</h2>

<p>So that&#8217;s what I&#8217;m going to do.  In the top right corner of the admin screen you&#8217;ll see a &#8220;users&#8221; tab.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_060.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_060.gif" alt="FrogCMS users tab" title="frog_cms_060" width="339" height="105" class="aligncenter size-full wp-image-263" /></a>
</p>

<p>If we click that we&#8217;ll get a list of users and a nifty &#8220;New User&#8221; button on the right.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_061.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_061.gif" alt="FrogCMS new user" title="frog_cms_061" width="383" height="169" class="aligncenter size-full wp-image-264" /></a>
</p>

<p>
You can also see the FrogCMS uses <a href="http//www.gravatar.com" target="_blank">Gravatars</a> for their avatar system.  This is pretty cool.  If you don&#8217;t know already <a href="http//www.gravatar.com" target="_blank">Gravatar.com</a> allows you associate an avatar with your email address.  So any time you enter your email address on a site (to either register, or post a comment like on this blog) it&#8217;s possible for that site to use your gravatar.  
</p>

<p>Now I can register a new user as an &#8220;editor&#8221;.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_062.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_062-300x170.gif" alt="FrogCMS new user registration" title="frog_cms_062" width="300" height="170" class="aligncenter size-medium wp-image-265" /></a>
</p>

<p>When I log in as this new user I can see only the &#8220;Pages&#8221; and &#8220;Files&#8221; tabs are available to me.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_063.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_063.gif" alt="FrogCMS pages and files" title="frog_cms_063" width="290" height="148" class="aligncenter size-full wp-image-269" /></a>
</p>

<h2>Adding content as an editor</h2>

<p>The first thing I was going to try to do was edit the content on the homepage.  Apparently I can&#8217;t edit this page as an editor (it&#8217;s not a link).  I might be missing something but I&#8217;m not sure the reasoning for this.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_064.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_064.gif" alt="FrogCMS can&#039;t edit homepage" title="frog_cms_064" width="313" height="139" class="aligncenter size-full wp-image-270" /></a>
</p>

<p>I&#8217;ll go ahead and edit the &#8220;Lessons&#8221; page instead.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_065.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_065.gif" alt="FrogCMS edit page" title="frog_cms_065" width="305" height="205" class="aligncenter size-full wp-image-271" /></a>
</p>

<p>
Now I&#8217;m going to imagine myself as a client.  I see I can add some text to my page here but I want to add an image.  How do I do that?  Well unfortunately there&#8217;s no simple way to add an image that&#8217;s built right into FrogCMS.  There are some image gallery plug-ins linked to from the <a href="http://www.madebyfrog.com/extend/contributed-plugins.html">FrogCMS contributed plugins page</a> but half the links are down and none of them seem to be what I&#8217;m looking for.  The only option seems to be to upload the image through the FrogCMS file manager and then link to that image using either HTML, <a href="http://daringfireball.net/projects/markdown/">Markdown</a> or <a href="http://textism.com/tools/textile/">Textile</a>.  If you&#8217;re not familiar with the latter two they are basically a different form of mark-up that&#8217;s suppose to be more writer friendly than pure HTML.  These tags would be converted to HTML when the page is saved.
</p>

<h2>Adding an image to a page</h2>

<p>So let&#8217;s run through this with <a href="http://daringfireball.net/projects/markdown/">Markdown</a>.  I imagine I would instruct my client how to do this.</p>

<ol>
<li>Click the &#8220;files&#8221; tab and then &#8220;Upload file&#8221;.
<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_066.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_066.gif" alt="FrogCMS upload file" title="frog_cms_066" width="390" height="176" class="aligncenter size-full wp-image-272" /></a></p>
</li>
<li>Choose the image.  I chose this photo of a gong being beaten.
<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/GongStrike.jpg"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/GongStrike.jpg" alt="GongStrike" title="GongStrike" width="200" height="300" class="aligncenter size-full wp-image-274" /></a></p>
</li>
<li><p>Add the appropriate markdown for displaying an image.  The markdown site shows the syntax as this:</p>


<div class="wp_syntax"><div class="code"><pre class="markdown" style="font-family:monospace;">![alt text](/path/to/img.jpg &quot;Title&quot;)</pre></div></div>



<p>So I&#8217;ll put in this (title is optional):</p>


<div class="wp_syntax"><div class="code"><pre class="markdown" style="font-family:monospace;">![Bangin the gong](public/GongStrike.jpg)</pre></div></div>



<p><strong>Note: </strong>Both the markdown and textile options have a little toolbar that will help you out.  That&#8217;s nice.  There is even an image button but it seems to want to use absolute URLs.</p>
<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_068.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_068.gif" alt="FrogCMS markdown toolbar" title="frog_cms_068" width="386" height="141" class="aligncenter size-full wp-image-276" /></a></p>
</li>
</ol>

<p>Yep, that worked: </p>
<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_069.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_069-300x213.gif" alt="Gongshop Lessons" title="frog_cms_069" width="300" height="213" class="aligncenter size-medium wp-image-277" /></a></p>

<p>Well, I think I get the gist of it.  As with anything, there is definitely more to it but I think I&#8217;m done my experimenting.  In the next part I&#8217;ll do a quick write-up about my overall feelings and whether or not I think I would use FrogCMS.</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-6-user-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 5: The Blog)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-5-the-blog/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-5-the-blog/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:28:38 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=232</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-232"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li>Playing with FrogCMS (Part 5: The Blog)</li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>
You know what?  I think I&#8217;m just going to cheat on this one.  In a fresh installation of Frog there is already page called <em>Archive</em>.   It just happens to be titled archive but it&#8217;s also of page type <em>archive</em>.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_050.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_050.gif" alt="" title="frog_cms_050" width="263" height="81" class="aligncenter size-full wp-image-233" /></a>
</p>

<p>
To start, I&#8217;ll rename <em>archive</em> to <em>blog</em>.  
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_051.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_051.gif" alt="FrogCMS rename page" title="frog_cms_051" width="377" height="188" class="aligncenter size-full wp-image-243" /></a>
</p>

<p>
I&#8217;ll also leave the default articles (subpages) that were already there.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_052.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_052.gif" alt="FrogCMS pages" title="frog_cms_052" width="377" height="407" class="aligncenter size-full wp-image-244" /></a>
</p>

<p>If we go check it out it seems we now have a simple blog.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_053.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_053-300x178.gif" alt="FrogCMS Gongshop blog" title="frog_cms_053" width="300" height="178" class="aligncenter size-medium wp-image-245" /></a>
</p>

<p>Gorgeous.  It also looks like I can add a post by adding a child &#8220;page&#8221; to the blog page.</p>

<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_054.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_054.gif" alt="FrogCMS add child page" title="frog_cms_054" width="488" height="122" class="aligncenter size-full wp-image-247" /></a></p>

<p>
If we edit our blog page we can edit how these articles are displayed, change the number of posts listed, the order they&#8217;re sorted in, etc.
</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$last_articles</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">children</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'limit'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'order'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'page.created_on DESC'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$last_articles</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$article</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;entry&quot;&gt;
  &lt;h3&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;p class=&quot;info&quot;&gt;Posted by <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">author</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> on <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>  
     &lt;br /&gt;tags: <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/p&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>Well I&#8217;m fine with that but I don&#8217;t see any code in there that will truncate my post and provide a &#8220;read more&#8221; link like a normal blog.  To make sure I post a new article filled with lorem ipsum and sure enough it runs on and on.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_055.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_055-300x157.gif" alt="FrogCMS blog" title="frog_cms_055" width="300" height="157" class="aligncenter size-medium wp-image-249" /></a>
</p>

<p>
I&#8217;ll have to fix that.  Luckily there&#8217;s instructions on the FrogCMS website: <a href="http://www.madebyfrog.com/docs/how-to/display-teaser-with-read-more-link.html">Display teaser with Read-more link</a>.   Basically they suggest creating another <em>content part</em> like we did for the Gong of the Day in Part 3.  We&#8217;ll have a content part named &#8220;extended&#8221; which will be the full article and the &#8220;body&#8221; part will be the teaser.
</p>

<p>In the &#8220;blog&#8221; page, I&#8217;ve added this code:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> &lt;p&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extended'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Continue Reading&amp;#133;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;</pre></div></div>




<p>Now I have to add the &#8220;extended&#8221; content holder to my layout so it looks like this:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;content-right&quot;&gt;
&nbsp;
	&lt;h3&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extended'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extended'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
&nbsp;
&lt;/div&gt;</pre></div></div>




<p>Finally, I need to add the new content part tab to my blog post page &#8220;Squirrels!&#8221;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_056.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_056.gif" alt="" title="frog_cms_056" width="280" height="145" class="aligncenter size-full wp-image-253" /></a>
</p>

<p>I&#8217;ll keep a few lines of lorem ipsum in the &#8220;body&#8221; and put what the rest of the article into &#8220;content&#8221;.  Save it up and whoop there it is.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_058.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_058-300x162.gif" alt="FrogCMS blog continue reading" title="frog_cms_058" width="300" height="162" class="aligncenter size-medium wp-image-254" /></a>
</p>

<p>It worked but I&#8217;m not sure I like this system very much.  It would probably be a little more slick to reverse this around and have the &#8220;body&#8221; be the main article and have a tab called &#8220;teaser&#8221;.  It also wouldn&#8217;t be too difficult to wrap a PHP function around the content output and truncate it to automatically make a teaser.</p>

<p>There is also a sidebar tab left over from the original setup.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_059.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_059.gif" alt="FrogCMS blog sidebar" title="frog_cms_059" width="368" height="258" class="aligncenter size-full wp-image-255" /></a>
</p>

<p>There you can see come code for displaying a listing of posts by month.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$article</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'articles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$archives</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$article</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">archivesByMonth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;h3&gt;Archives By Month&lt;/h3&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$archives</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> BASE_URL <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$date</span> <span style="color: #339933;">.</span> URL_SUFFIX<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">strftime</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %Y'</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$date</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>




<p>There&#8217;s all kinds of stuff you can do although it does take some minor PHP knowledge and an idea of the FrogCMS functions.</p>

<p>Next I&#8217;m going to look into the user management system.  I&#8217;d like to pretend I&#8217;m setting up an &#8220;editor&#8221; account for the client and feel out how they would experience adding and manipulating content.
</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-5-the-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 4: The Theme [continued...])</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-4-the-theme-continued/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-4-the-theme-continued/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:27:41 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=220</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-220"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li>Playing with FrogCMS (Part 4: The Theme [continued...])</li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>We got that theme up and running pretty quickly.  So far so good.  Now I&#8217;d like to take it just a little bit further and see how flexible we can make things.</p>

<h2>Adding a dynamic ID and class to the body</h2>

<p><a href="http://www.madebyfrog.com/docs/how-to/find-all-frog-functions.html" title="FrogCMS Functions">Here</a> you can find a list FrogCMS functions.  There should be something here that will allow me to dynamically add a relevant ID and class to the body tag of everypage.  I decided to go with this function:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>The slug is basically the readable URL (so the page title separated by dashes and cleansed of special characters).  So I altered to body tag in my layout to look like this:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;body id=&quot;page-&lt;?php echo $this-&gt;slug(); ?&gt;&quot; class=&quot;&quot;&gt;</pre></div></div>




<p>Now if we move to our test page&#8230;<p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_040.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_040.gif" alt="" title="frog_cms_040" width="274" height="86" class="aligncenter size-full wp-image-223" /></a>
<p>

<p>We can take a look at Firebug and see that our body has the ID <span class="name">page-test</span>.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_042.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_042.gif" alt="" title="frog_cms_042" width="212" height="58" class="aligncenter size-full wp-image-224" /></a>
</p>

<p>This is perfect but if we look at the homepage we&#8217;ll see that the body ID is <span class="name">page-</span>.  The homepage does not have a slug.  I&#8217;m going to get around this with a quick and dirty conditional.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
	   <span style="color: #000088;">$body_id</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'home'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
	   <span style="color: #000088;">$body_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
     <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;body id=&quot;page-<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$body_id</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; class=&quot;&quot;&gt;</pre></div></div>




<p>Ok, that works.  Will backfire on me down the road?  Probably, but for now it works fine.</p>

<h2>Adding metadata</h2>

<p>Let&#8217;s make sure any keywords or descriptions we add the the metadata of a page actually render out on that page.  This is basically straight out of the FrogCMS docs.  Just paste this into the head of the page:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">  &lt;meta name=&quot;keywords&quot; content=&quot;&lt;?php echo $this-&gt;keywords(); ?&gt;&quot; /&gt;
  &lt;meta name=&quot;description&quot; content=&quot;&lt;?php echo $this-&gt;description(); ?&gt;&quot; /&gt;</pre></div></div>


  

<p>Make sure to enter the keywords and description.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_043.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_043.gif" alt="" title="frog_cms_043" width="446" height="278" class="aligncenter size-full wp-image-226" /></a>
</p>

<p>Taco, fettuccine, linguine, martini, bikini&#8230; keyword and description meta data in perfect cursive&#8230;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_044.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_044.gif" alt="" title="frog_cms_044" width="524" height="77" class="aligncenter size-full wp-image-227" /></a>
</p>

<h2>Page headers</h2>

<p>I&#8217;m going to quickly make a change to display the page title as a H2 on everypage.  In the layout I replace this:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h3&gt;What’s new at the Gong Shop?&lt;/h3&gt;</pre></div></div>




<p>with this: </p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h3&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;</pre></div></div>



<p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_047.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_047-300x197.gif" alt="" title="frog_cms_047" width="300" height="197" class="aligncenter size-medium wp-image-230" /></a>
</p>

Alright, I&#8217;m kind of sick of this now.  I&#8217;m going to finish a few things off and set up the site with only the pages shown in my comp.   Next we&#8217;ll see about the <em>blog</em> section.
</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-4-the-theme-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 3: The Theme)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-3-the-theme/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-3-the-theme/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:26:55 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=173</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-173"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li>Playing with FrogCMS (Part 3: The Theme)</li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<div style="border: 1px dotted #000; padding: 14px;">
Don&#8217;t treat this as a tutorial.  I mean, you could, but it won&#8217;t be the best tutorial you&#8217;ve ever read.  This is almost like  stream-of-consciousness blogging of my experience.  I recommend you hack along with your own project and use my experience as a cross reference.  
</div>

<p>I quickly built out a template for <em>The Gong Shop</em> site using just XHTML and an external CSS file.  Now I have to figure out how to get this into FrogCMS.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_home.jpg"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_home-300x243.jpg" alt="The Gong Shop Home" title="comp_gongshop_home" width="300" height="243" class="aligncenter size-medium wp-image-161" /></a>
</p>

<p>I took a look at the <a href="http://code.google.com/p/madebyfrogs/wiki/Frog_Themes" title="About FrogCMS Themes">wiki on Google Code</a> for a little info on how to start creating my theme.  It seems like FrogCMS doesn&#8217;t have a typical theming system but more of a variety of parts that make of up a &#8220;theme&#8221;.  I decide to download a theme from the <a href="http://www.madebyfrog.com/extend/themes.html">contributed themes section</a> @ madebyfrog.com</p>

<p>I chose the <em>FreshMedia</em> theme.  The zip file contained files like this:</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_015.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_015.gif" alt="" title="frog_cms_015" width="406" height="170" class="aligncenter size-full wp-image-176" /></a>
</p>

<p>
It looks like the <span class="name">install.txt</span> has a list of instructions:  put the css and images here, paste this snippet in, add this HTML to a new layout&#8230; etc.  The other downloadable themes seem to work the same way.  I&#8217;m not sure how I feel about this system yet &#8211; but let&#8217;s try it out.
</p>

<p>
First I go to the root of my FrogCMS install and open the folder <span class="name">/public/themes/</span>.  Inside is the default theme <span class="name">normal</span>.  I create a new folder and name it <span class="name">gongshop</span>.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_016.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_016.gif" alt="" title="frog_cms_016" width="399" height="200" class="aligncenter size-full wp-image-179" /></a>
</p>

<p>Then I just paste in the files for the HTML layout I already created.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_017.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_017.gif" alt="" title="frog_cms_017" width="407" height="193" class="aligncenter size-full wp-image-180" /></a>
</p>

<p>I click the Layout tab and then <em>New Layout</em></p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_022.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_022.gif" alt="" title="frog_cms_022" width="322" height="97" class="aligncenter size-full wp-image-186" /></a>
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_018.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_018.gif" alt="" title="frog_cms_018" width="299" height="116" class="aligncenter size-full wp-image-182" /></a>
</p>

<p>
I enter a name for my layout (I&#8217;d like to start with the two column home page).  I enter the type as <span class="name">text/html</span> (I saw it this way on the other layouts).  
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_019.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_019.gif" alt="" title="frog_cms_019" width="457" height="175" class="aligncenter size-full wp-image-183" /></a>
</p>

<p>
I paste the HTML from my template in&#8230; and there we go.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_020.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_020.gif" alt="" title="frog_cms_020" width="310" height="223" class="aligncenter size-full wp-image-184" /></a>
</p>

<p>I venture over to the <em>Pages</em> tab.  At first I&#8217;m not quite sure how to create a page.  There are green &#8220;Add Child&#8221; buttons next to the current pages but how do I add a root level page?  I stare at this for a while and consider it deeply.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_021.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_021.gif" alt="" title="frog_cms_021" width="444" height="239" class="aligncenter size-full wp-image-185" /></a>
</p>

<p>
The <a href="http://www.madebyfrog.com/docs/how-to/create-a-page.html" target="_blank">
<em>Create a Page</em>
</a> section in the FrogCMS docs explains:
</p>

<p><strong>Note that all &#8220;main pages&#8221; in Frog are actually a &#8220;child&#8221; page to the Home page.</strong></p>

<p>Alright, fine.  I&#8217;m just going to go mess with a page and see what happens.</p>

<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_024.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_024.gif" alt="" title="frog_cms_024" width="294" height="189" class="aligncenter size-full wp-image-191" /></a></p>

<p>Let&#8217;s switch this simple page over to my <em>gongshop</em> layout&#8230;</p>

<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_023.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_023.gif" alt="" title="frog_cms_023" width="313" height="146" class="aligncenter size-full wp-image-190" /></a></p>

<p>Now let&#8217;s check out the <em>About Us</em> page in the sites front-end.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_025.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_025-300x258.gif" alt="" title="frog_cms_025" width="300" height="258" class="aligncenter size-medium wp-image-192" /></a>
</p>

<p>No styles.  I&#8217;m sure it&#8217;s a path issue.  I refer to the original theme layout.   You need to reference your stylesheet like so:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo URL_PUBLIC; ?&gt;public/themes/gongshop/screen.css&quot; /&gt;</pre></div></div>




<p>Ok, that worked but we need to make this page dynamic.  I remove the current content from the right-column &#8220;news&#8221; section and paste in:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>Forgot the &#8220;About Us&#8221; page, I want to create a new page.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_026.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_026.gif" alt="" title="frog_cms_026" width="253" height="127" class="aligncenter size-full wp-image-195" /></a>
</p>

<p>I&#8217;ll call the page <em>test</em>, type some words into the body and select <em>Gongshop &#8211; Two Column</em> from the layout dropdown.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_027.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_027-300x144.gif" alt="" title="frog_cms_027" width="300" height="144" class="aligncenter size-medium wp-image-196" /></a>
</p>

<p>This <em>metadata</em> tab seems interesting as well.  I&#8217;ll have to figure out how to use this information in my layout.  For now I&#8217;ll keep rolling.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_028.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_028-300x131.gif" alt="" title="frog_cms_028" width="300" height="131" class="aligncenter size-medium wp-image-197" /></a>
</p>

<p>Just click <em>Save &#038; Close</em> and let&#8217;s check out the site&#8230;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_030.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_030.gif" alt="" title="frog_cms_030" width="498" height="188" class="aligncenter size-full wp-image-198" /></a>
</p>

<p>BAM!  Done.  Let&#8217;s keep moving and see about making this navigation dynamically reflect the pages.</p>

<h2>The Navigation</h2>

<p>Looking back at the default theme &#8220;snippets&#8221; I found the code to loop through the pages to generate the navigation.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    &lt;ul&gt;
      &lt;li&gt;&lt;a<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> url_match<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">' class=&quot;current&quot;'</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> URL_PUBLIC<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$menu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;li&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$menu</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menu</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">,</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">' class=&quot;current&quot;'</span><span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/li&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
    &lt;/ul&gt;</pre></div></div>




<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_031.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_031.gif" alt="" title="frog_cms_031" width="347" height="91" class="aligncenter size-full wp-image-202" /></a>
</p>

<p>I&#8217;m going to make my own snippet and call it &#8220;nav&#8221;.  I copy the <em>foreach</em> loop from above into my new snippet.  I can then add this snippet to my layout like so:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">includeSnippet</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nav'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>Let&#8217;s save that up and take a look&#8230;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_032.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_032.gif" alt="" title="frog_cms_032" width="515" height="117" class="aligncenter size-full wp-image-203" /></a>
</p>

</p>Nice.  That&#8217;s fine for now.  Let&#8217;s look into adding more content parts.  We&#8217;ll see about wiring up the <em>Gong of the day</em> feature and make it easy to update.</p>

<h2>Content Parts</h2>

<p>First I&#8217;m going to strip out the current homepage and do it up my way.  I deleted the content of <em>body</em> and <em>sidebar</em>.  The <em>sidebar</em> part is actually what I&#8217;m interested in but let&#8217;s figure out exactly what&#8217;s going on.  I&#8217;m going to delete the <em>sidebar</em> tab for now.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_033.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_033.gif" alt="" title="frog_cms_033" width="226" height="97" class="aligncenter size-full wp-image-205" /></a>
</p>

<p>
These icons on the right will let you add and remove tabs.
</p>

<p>
Now, while you weren&#8217;t looking I snuck back to the <em>layouts</em> section and made some changes.  I wrapped the &#8220;Gong of the Day&#8221; sidebar callout (refer to the screenshot at the top of this article if you forget what I&#8217;m building) in some PHP.  It looks like this:
</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasContent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gongday'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;div id=&quot;gong-of-the-day&quot;&gt;
	&lt;div class=&quot;content&quot;&gt;
		&lt;h3&gt;&lt;span class=&quot;hidden&quot;&gt;Gong of the day&lt;/span&gt;&lt;/h3&gt;
		&lt;img src=&quot;images/the_traditional.jpg&quot; alt=&quot;Gong of the day photo&quot; /&gt;
		&lt;h4&gt;&lt;a href=&quot;#&quot;&gt;The Traditional&lt;/a&gt;&lt;/h4&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gongday'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
		&lt;p class=&quot;read-more&quot;&gt;&lt;a href=&quot;&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>
Just as it reads:  if the layout gets some content named &#8220;gongday&#8221; then show this bit of HTML and spit in the content in the appropriate spot.  Now I can go back to edit the homepage and add a tab called &#8220;gongday&#8221;.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_034.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_034.gif" alt="" title="frog_cms_034" width="292" height="161" class="aligncenter size-full wp-image-209" /></a>
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_035.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_035.gif" alt="" title="frog_cms_035" width="451" height="258" class="aligncenter size-full wp-image-210" /></a>
</p>

<p>I&#8217;ll throw some text in there and save the page&#8230;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_038.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_038.gif" alt="" title="frog_cms_038" width="338" height="144" class="aligncenter size-full wp-image-213" /></a>
</p>

<p>and we get some results.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_037.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_037-300x150.gif" alt="" title="frog_cms_037" width="300" height="150" class="aligncenter size-medium wp-image-212" /></a>
</p>

<p>
<strong>Note: </strong> The <em>if</em> statement we used in the layout to determine if gongday <em>hasContent</em> will always return true as long as that tab is there.  If you remove the tab, the Gong of the Day callout will disappear.
</p>

<p>That&#8217;s enough for now.  There&#8217;s some more I&#8217;d like to do with the theme such as have classes dynamically added to the body tag and abstracting the layout further into snippets.  I&#8217;ll save that for the next part.
</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-3-the-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 2: The Plan)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-2-the-plan/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-2-the-plan/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:25:54 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=159</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-159"></span>

<div class="attention">
<ul>
<li><a href="2010/playing-with-frogcms-part-1-installation">Playing with FrogCMS (Part 1: Installation)</a></li>
<li>Playing with FrogCMS (Part 2: The Plan)</li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>What am I going to build?  I don&#8217;t know.  I made up this comp for a fake site called <em>The Gong Shop</em>.  It&#8217;s meant to be an online gong store/resource center.  To be clear, I&#8217;m not attempting to build an e-commerce site with FrogCMS.  There doesn&#8217;t seem to be any e-commerce support or supported e-commerce plug-ins for FrogCMS and I don&#8217;t think it&#8217;s meant for this task at all.  I designed these comps in the style of a store as a way test how FrogCMS will allow me to enter and manipulate data.  An inventory of products is a good dataset to play with in my opinion.</p>

<p><strong>Also note: </strong> I have never used FrogCMS.  I just installed it, looked at the documentation for a moment and then went ahead and started drawing out this phony site.  I have no idea if FrogCMS will be the right tool for the job but hopefully that&#8217;s what I find out here.  FrogCMS is designed to be very simple and lightweight.  I like the idea of lightweight but I&#8217;m interested to see if it will be flexible enough to flesh out this idea.  I may try building the same site out using other CMS&#8217;s in the future.</p>

<h2>The Gong Shop Comps</h2>

<h3>The Homepage</h3>
<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_home.jpg"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_home-300x243.jpg" alt="Gongshop Comp - Home" title="comp_gongshop_home" width="300" height="243" class="size-medium wp-image-161" /></a>
</p>
<p>Here I&#8217;m hoping to have a two column layout.  It should be easy for a client to change the <em>Gong of the day</em>.  It should also be easy to update the homepage news and include a picture like shown.</p> 

<h3>The Store</h3>
<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_store1.jpg"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_store1-300x243.jpg" alt="The Gong Shop Store" title="comp_gongshop_store" width="300" height="243" class="size-medium wp-image-165" /></a>
</p>
<p>As I wrote in the beginning of this article: I have no plan or expectations do be doing any e-commerce.  I just want to see how this CMS could handle something like a product inventory.</p>


<h3>The Blog</h3>
<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_blog.jpg"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/comp_gongshop_blog-300x196.jpg" alt="The Gong Shop Blog" title="comp_gongshop_blog" width="300" height="196" class="size-medium wp-image-160" /></a>
</p>
<p>Every CMS seems to demonstrate how easily it could be used as a simple blog.  Let&#8217;s try and include a blog within this site.</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-3-the-them">Playing with FrogCMS (Part 3: The Theme)</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-2-the-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with FrogCMS (Part 1: Installation)</title>
		<link>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-1-installation/</link>
		<comments>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-1-installation/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:23:01 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[FrogCMS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=127</guid>
		<description><![CDATA[Playing with FrogCMS (Part 1: Installation) Playing with FrogCMS (Part 2: The Plan) Playing with FrogCMS (Part 3: The Theme) Playing with FrogCMS (Part 4: The Theme [continued...]) Playing with FrogCMS (Part 5: The Blog) Playing with FrogCMS (Part 6: User Management) Playing with FrogCMS (Part 7: My Conclusion) See the site: The Gong Shop [...]]]></description>
			<content:encoded><![CDATA[<span id="more-127"></span>

<div class="attention">
<ul>
<li>Playing with FrogCMS (Part 1: Installation)</li>
<li><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></li>
<li><a href="2010/playing-with-frogcms-part-3-the-theme">Playing with FrogCMS (Part 3: The Theme) </a></li>
<li><a href="2010/playing-with-frogcms-part-4-the-theme-continued">Playing with FrogCMS (Part 4: The Theme [continued...])</a></li>
<li><a href="2010/playing-with-frogcms-part-5-the-blog">Playing with FrogCMS (Part 5: The Blog)</a></li>
<li><a href="2010/playing-with-frogcms-part-6-user-management">Playing with FrogCMS (Part 6: User Management)</a></li>
<li><a href="2010/playing-with-frogcms-part-7-my-conclusion">Playing with FrogCMS (Part 7: My Conclusion)</a></li>
</ul>
<p style="text-align: center;"><strong>See the site: </strong><a href="http://dev.ryanbosinger.com/gongshop/">The Gong Shop</a></p>
</div>

<p>I&#8217;ve been doing some research and toying around with various CMS&#8217;s lately.  In the last couple years I&#8217;ve started to come to the realization that building a website from the ground up is almost always unnecessary (especially if building a general website for a client).  I&#8217;ve since done some work with Drupal, this blog runs on WordPress and after using the PHP framework CodeIgniter I also decided to give ExpressionEngine a chance.</p>

<p>Anyways, there are a lot of CMS&#8217;s out there and they all have their purposes.  For some reason I feel like testing out FrogCMS so I&#8217;m going to do so and write about it here.</p>

<p>
<strong>Note: </strong> FrogCMS is based on the popular RoR CMS <a href="http://radiantcms.org/" target="_blank">RadiantCMS</a>.  Just sayin&#8217;.
</p>

<h2>Installing FrogCMS</h2>

<p>I&#8217;m going to install FrogCMS under Xampp on my Windows machine.</p>

<p>So I&#8217;ve downloaded FrogCMS 0.9.5 from <a href="http://www.madebyfrog.com/download.html" target_"blank">madebyfrog.com</a>.  As I expected there were files inside.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_003.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_003.gif" alt="FrogCMS files" title="frog_cms_003" width="301" height="449" class="aligncenter size-full wp-image-132" /></a>
</p>

<p>I check out <em>install.txt</em> and apparently the first thing I&#8217;m suppose to do it create a database.  That seems reasonable.  I pop open the Xampp control panel and click <em>admin</em> to get to phpMyAdmin.
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_001.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_001.gif" alt="Xampp Control Panel" title="frog_cms_001" width="453" height="239" class="aligncenter size-full wp-image-130" /></a>
</p>

<p>I&#8217;m going to call this database <em>gongshop</em>.

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_002.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_002.gif" alt="phpMyAdmin new database" title="frog_cms_002" width="449" height="130" class="aligncenter size-full wp-image-131" /></a>
</p>

<p>The next step is to move all the FrogCMS files into a directory or the root of my webserver.  I&#8217;m developing locally using Xampp so I&#8217;ll be putting my files here:  <span class="name">c:\xampp\htdocs\gongshop\</span>.  I work on multiple websites in Xampp so I need change the document root in my <span class="name">httpd.conf</span> file (found in: <span class="name">\xampp\apache\conf\</span>).  

<p>
<strong>Note: </strong> FrogCMS does not need to run on the root of a site.  I could leave the root set as <span class="name">c:\xampp\htdocs\</span> and reference my FrogCMS installtion like this:  <span class="name">http://localhost/gongshop/</span>; but I don&#8217;t want to.</p>
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_004.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_004.gif" alt="apache confd" title="frog_cms_004" width="412" height="47" class="aligncenter size-full wp-image-133" /></a>
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_005.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_005.gif" alt="apache confd" title="frog_cms_005" width="449" height="48" class="aligncenter size-full wp-image-134" /></a>
</p>

<p>Now I need to restart Apache to have these changes take place.</p>
<p>The next step is to hit the FrogCMS <span class="name">/install/</span> directory in my web browser.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_006.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_006.gif" alt="web browser screenshot" title="frog_cms_006" width="390" height="68" class="aligncenter size-full wp-image-135" /></a>
</p>

<p>&#8230;and boom goes the dynamite, I&#8217;ve got an installation page asking me for some db details&#8230;</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_009.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_009.gif" alt="FrogCMS installation database information" title="frog_cms_009" width="327" height="257" class="aligncenter size-full wp-image-138" /></a>
</p>

<p>
I just type in the name of the database I created a couple minutes ago.  My local MySQL has no username or password set (unsecure, but I don&#8217;t care right now).   I just leave &#8220;Database user&#8221; as &#8220;root&#8221; and the password blank and then click <em>Install now</em>
</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_010.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_010.gif" alt="FrogCMS install now" title="frog_cms_010" width="248" height="104" class="aligncenter size-full wp-image-139" /></a>
</p>

<p>We&#8217;ve got some security warnings here.   I&#8217;m going to ignore those for now because this isn&#8217;t going to be a real site + I&#8217;m a badass.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_011.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_011.gif" alt="FrogCMS warning" title="frog_cms_011" width="461" height="96" class="aligncenter size-full wp-image-140" /></a>
</p>

<p>So it looks like we&#8217;re all set here.  You should see a page with your admin login details and a link to the login page.  I&#8217;m just going to go back to phpMyAdmin for a moment to see what happened in my database.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_012.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_012.gif" alt="phpMyAdmin" title="frog_cms_012" width="485" height="334" class="aligncenter size-full wp-image-141" /></a>
</p>

<p>Nice.  Let&#8217;s log into the backend of the new site.</p>

<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_070.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_070-300x155.gif" alt="FrogCMS backend screenshot" title="frog_cms_070" width="300" height="155" class="aligncenter size-medium wp-image-296" /></a></p>

<p>Cool (note:  your &#8220;pages&#8221; might look different &#8211; I&#8217;ve changed a couple things).  It looks like we have something going here.  I&#8217;ll start looking at what I can do with this in the next part but for now let&#8217;s just see what we have for a site front-end out of the box.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_013.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_013.gif" alt="FrogCMS backend" title="frog_cms_013" width="196" height="76" class="aligncenter size-full wp-image-142" /></a>
</p>

<p>Alright, looks good.</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_014.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2010/03/frog_cms_014-300x210.gif" alt="FrogCMS site" title="frog_cms_014" width="300" height="210" class="aligncenter size-medium wp-image-143" /></a>
</p>

<p><strong>Next: </strong><a href="2010/playing-with-frogcms-part-2-the-plan">Playing with FrogCMS (Part 2: The Plan)</a></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2010/playing-with-frogcms-part-1-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: unserialize() Error at offset&#8230; (simple solution)</title>
		<link>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/</link>
		<comments>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:52:51 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=95</guid>
		<description><![CDATA[Here&#8217;s what I was trying to do: serialize an array on one page (PHP: serialize($array)) print out the results using echo or print_r grab the serialized data from another script using file_get_contents unserialize that array so I could go about my business but I kept getting this error: unserialize() [function.unserialize]: Error at offset 0 of [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s what I was trying to do:</p>

<ul>
<li><em>serialize</em> an array on one page (PHP: serialize($array))</li>
<li>print out the results using <code>echo</code> or <code>print_r</code></li>
<li>grab the serialized data from another script using <code>file_get_contents</code></li>
<li><em>unserialize</em> that array so I could go about my business</li>
</ul>

<p>but I kept getting this error: </p>

<code>unserialize() [function.unserialize]: Error at offset 0 of 3457 bytes</code>

<p>I looked around and couldn&#8217;t find a simple a solution.  I&#8217;m sure this error can occur in other ways, but I was trying with the simplest of arrays:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Ryan&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Bosinger&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>My problem was that my echo statement was <strong>throwing some whitespace in there</strong>.  That&#8217;s all.  This fixed it:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;search_results&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://localhost/sphider/search.php?query=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$search_for</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;search=1&amp;start=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result_string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;search_results&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result_string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>Basically, try <strong>trimming the whitespace</strong> before unserializing.  Hope that helps!</p>

<p><em>Also</em>, I was using Codeigniter but I really don&#8217;t think that has anything to do with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Grab RSS feed with PHP</title>
		<link>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/</link>
		<comments>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:18:35 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=74</guid>
		<description><![CDATA[I would like to share a PHP function for writing out parts of an RSS feed to a page. I used this in the redesign of ryanbosinger.com to show the latest three posts of this blog. To use it, just call the function where you&#8217;d like it show up like so: &#60;?php getFeed&#40;&#34;http://ryanbosinger.com/blog/feed&#34;, 3&#41;; ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to share a PHP function for writing out parts of an RSS feed to a page.  I used this in the redesign of <a href="http://www.ryanbosinger.com">ryanbosinger.com</a> to show the latest three posts of this blog.</p>

<p>To use it, just call the function where you&#8217;d like it show up like so:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> getFeed<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ryanbosinger.com/blog/feed&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>The second parameter is the amount of posts to show.  It will write out as an unordered list.  You can choose to write out different parts of the feed by changing:  $x->channel->item[$i]->[name-of-feed-tag]</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> getFeed<span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$posts_to_show</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	try 
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXmlElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$posts_to_show</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> target=<span style="color: #000099; font-weight: bold;">\&quot;</span>_blank<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span> 
	catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> 
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;The blog feed doesn't seem to be available at the moment...&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
