<?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>Fresh &#187; PHP</title>
	<atom:link href="http://welikeitfresh.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://welikeitfresh.com</link>
	<description>Home-squeezed goodness with no added pulp. Ideas and inspiration from the eROI creative team.</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:14:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fresh Project: Starlicious</title>
		<link>http://welikeitfresh.com/2010/05/11/fresh-project-starlicious/</link>
		<comments>http://welikeitfresh.com/2010/05/11/fresh-project-starlicious/#comments</comments>
		<pubDate>Tue, 11 May 2010 16:56:46 +0000</pubDate>
		<dc:creator>Sydney</dc:creator>
				<category><![CDATA[eROI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Fresh projects]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://welikeitfresh.com/?p=3831</guid>
		<description><![CDATA[Everyone tries to deny it, but when it comes to celebrity gossip, we can’t help but indulge.  At eROI we have been able to enjoy our celebrity guilty pleasure for months now thanks to an opportunity to partner with No Soap Radio Entertainment to help bring their creation, Starlicious, to life online. Do you know [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone tries to deny it, but when it comes to celebrity gossip, we can’t help but indulge.  At eROI we have been able to enjoy our celebrity guilty pleasure for months now thanks to an opportunity to partner with No Soap Radio Entertainment to help bring their creation, <em><a href="http://starlicious.tv">Starlicious</a></em>, to life online. Do you know which Oscar-winning actress briefly lived in an NYC homeless shelter?  We do!</p>
<p><em><a href="http://starlicious.tv">Starlicious</a></em> is an original online game show combining the competitive and addictive nature of Jeopardy-style trivia with the subject matter of Access Hollywood and US Weekly.  We were tasked with designing and developing the online environment in which viewers could watch each of the <a href="http://starlicious.tv">10 episodes</a>, shown over the 12 week season.<br />
<a href="http://welikeitfresh.com/files/2010/05/starlicious-show.jpg"></a></p>
<p><a href="http://welikeitfresh.com/files/2010/05/starlicious-show.jpg"><img class="aligncenter size-medium wp-image-3839" title="starlicious-show" src="http://welikeitfresh.com/files/2010/05/starlicious-show-450x290.jpg" alt="" width="450" height="290" /></a></p>
<p><span id="more-3831"></span></p>
<p>In addition to the trivia show, No Soap Radio Entertainment wanted to provide celebrity enthusiasts from around the country the ability to play an online trivia game of their own. In response to this need, we designed and developed a <a href="http://starlicious.tv">trivia game</a> using a combination of technologies including Flash, PHP and XML. Here, the questions are shown in a timed, multiple-choice environment, and users can register (via Facebook Connect, MySpace ID, etc.) to post high scores, challenge friends and compete for prizes.  The prizes include the opportunity to be a contestant on a future episode of <em><a href="http://starlicious.tv">Starlicious</a></em>, as well as a grand-prize tropical getaway.</p>
<p><a href="http://welikeitfresh.com/files/2010/05/starlicious-trivia.jpg"><img class="aligncenter size-medium wp-image-3840" title="starlicious-trivia" src="http://welikeitfresh.com/files/2010/05/starlicious-trivia-450x236.jpg" alt="" width="450" height="236" /></a></p>
<p>As part of its distribution and marketing strategy, No Soap partnered with <a href="http://dailyfill.com">Dailyfill.com</a> to ensure that <em><a href="http://starlicious.tv">Starlicious</a></em> reached a targeted and relevant audience to optimize engagement. This required us to design and develop a flexible site to fit within an iframe on <a href="http://dailyfill.com">Dailyfill.com</a>.</p>
<p>Half way through the first season, <em><a href="http://starlicious.tv">Starlicious</a></em> is exceeding projections and building a loyal audience – which makes us very happy for our client! Celebrities are a minor (or big…) obsession for some of us and every day we learn something new! So check out <em><a href="http://starlicious.tv">Starlicious</a></em> for yourself and see how much you really know about Brangelina.</p>
]]></content:encoded>
			<wfw:commentRss>http://welikeitfresh.com/2010/05/11/fresh-project-starlicious/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento Template Development Cheat Sheet</title>
		<link>http://welikeitfresh.com/2010/03/23/magento-cheat-sheet/</link>
		<comments>http://welikeitfresh.com/2010/03/23/magento-cheat-sheet/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 19:26:25 +0000</pubDate>
		<dc:creator>Meggan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://welikeitfresh.com/?p=75</guid>
		<description><![CDATA[
After spending some time working with Magento (an open-source ecommerce platform that&#8217;s been on the development scene for a few years now), I have determined that what their documentation really needs is a WordPress-esque &#8220;Template Tags&#8221; area.
When you&#8217;re just starting out with a new platform, documentation is invaluable, and the documentation for Magento seems woefully [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-2548" src="http://welikeitfresh.com/files/2010/03/Magento_logo.png" alt="Magento_logo" width="249" height="78" /></p>
<p>After spending some time working with <a href="http://www.magentocommerce.com/">Magento</a> (an open-source ecommerce platform that&#8217;s been on the development scene for a few years now), I have determined that what their documentation really needs is a WordPress-esque &#8220;Template Tags&#8221; area.</p>
<p>When you&#8217;re just starting out with a new platform, documentation is invaluable, and the documentation for Magento seems woefully lacking in terms of front-end development. (If you have a favorite resource, I&#8217;d love to hear about it!)</p>
<p>Here are some tips / shortcuts / code snippets I&#8217;ve found useful; maybe they&#8217;ll be helpful to new Magento developers as well.</p>
<p><span id="more-75"></span></p>
<h3>For use in the .phtml files:</h3>
<p><strong>PAGE PATH</strong></p>
<pre>&lt;?php echo $this-&gt;getUrl('<strong>myCMSpage</strong>'); ?&gt;</pre>
<p><strong>IMAGE PATH</strong></p>
<pre>&lt;?php echo $this-&gt;getSkinUrl('<strong>images/button.gif</strong>'); ?&gt;</pre>
<p><strong>PRODUCT LINK </strong></p>
<pre>&lt;?php echo $this-&gt;getProductData()-&gt;getProductUrl(); ?&gt;</pre>
<p><strong>PRODUCT NAME</strong></p>
<pre>&lt;?php echo $this-&gt;htmlEscape($this-&gt;getProductData()-&gt;getName()); ?&gt;</pre>
<p><strong>DISPLAY ALL OF A PRODUCT&#8217;S CATEGORIES</strong></p>
<pre>&lt;?php $categories = $_product-&gt;getCategoryIds();
foreach($categories as $k =&gt; $_category_id):
    $_category = Mage::getModel('catalog/category')-&gt;load($_category_id); ?&gt;
    &lt;a href="&lt;?php echo $_category-&gt;getUrl() ?&gt;"&gt;&lt;?php echo $_category-&gt;getName() ?&gt;
&lt;?php endforeach; ?&gt;</pre>
<p><strong>USE A STATIC BLOCK IN A TEMPLATE FILE</strong></p>
<pre>&lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;
setBlockId('<strong>YOURBLOCKID</strong>')-&gt;toHtml(); ?&gt;</pre>
<p><strong>TEST FOR A PRODUCT ATTRIBUTE</strong></p>
<pre>&lt;?php if ($this-&gt;product['<strong>attributename</strong>'] == "<strong>attributevalue</strong>") {
    <em>// your stuff here</em>
} ?&gt;</pre>
<p><strong>TEST IF IN CATEGORY </strong></p>
<pre>&lt;?php if ($this-&gt;getCurrentCategory()-&gt;getName() == "<strong>My Category</strong>") {
    <em>//do some stuff</em>
} ?&gt;</pre>
<p><strong>CALL AN ATTRIBUTE ON THE PRODUCT LIST PAGE </strong></p>
<pre>&lt;?php if ($_product-&gt;getData('<strong>attributename</strong>')):
    $_staff_pick= $_product-&gt;getResource()-&gt;getAttribute ('<strong>attributename</strong>')-&gt;getFrontend()-&gt;getValue($_product);
    if ($_attributename == "Yes"){
        // DISPLAY ATTRIBUTE
    }
endif; ?&gt;</pre>
<p><strong>MORE FUNCTIONS THAT MAY COME IN HANDY</strong></p>
<pre>$this-&gt;getCurrentCategory()-&gt;getImageUrl();
$this-&gt;getCurrentCategory()-&gt;getDescription();
$this-&gt;IsTopCategory();
$this-&gt;getProductListHtml();
$this-&gt;getCmsBlockHtml();</pre>
<p><strong>OTHER PRODUCT ATTRIBUTES YOU CAN CALL</strong><br />
Using <code>$this-&gt;product['attributename']</code> syntax:<br />
(Values for these attributes are here just as examples; Yours will likely be different.)</p>
<pre>[store_id] =&gt; 1
[entity_id] =&gt; 3
[entity_type_id] =&gt; 4
[attribute_set_id] =&gt; 4
[type_id] =&gt; simple
[sku] =&gt; 2281
[category_ids] =&gt; 2,15,17,23,24
[created_at] =&gt; 2008-09-09 16:24:03
[updated_at] =&gt; 2008-09-15 22:47:51
[has_options] =&gt; 0
[name] =&gt; ProductName
[url_key] =&gt; productname
[gift_message_available] =&gt; 2
[meta_title] =&gt;
[meta_description] =&gt;
[image] =&gt; /p/r/product_productname.gif
[small_image] =&gt; /p/r/product_productname.gif
[thumbnail] =&gt; /p/r/product_productname.gif
[custom_design] =&gt; default/yourthemefolder
[options_container] =&gt; container2
[url_path] =&gt; productname.html
[status] =&gt; 1
[visibility] =&gt; 4
[tax_class_id] =&gt; 0
[weight] =&gt; 1.0000
[price] =&gt; 37.9900
[description] =&gt;
[short_description] =&gt;
[meta_keyword] =&gt;
[custom_layout_update] =&gt;
[media_gallery] =&gt; Array
[tier_price] =&gt; Array
[stock_item] =&gt;</pre>
<h3>For use from within a Magento CMS page:</h3>
<p><strong>CALL A STATIC BLOCK FROM WITHIN A CONTENT AREA</strong></p>
<pre>{{block type="cms/block" block_id="<strong>your_block_identifier</strong>" template="cms/content.phtml"}}</pre>
<p><strong>IMAGE PATH FROM WITHIN CMS</strong></p>
<pre>{{skin url="<strong>images/logo.gif</strong>"}}</pre>
<h3>Notes</h3>
<p>I work off a file very similar to this and reference it all the time. Feel free to save any or all of these examples into a file that you can reference when you&#8217;re developing a Magento theme &#8211; I know that when I was first starting out in Magento I would have killed to have a reference like this to start from. Anybody else have some cheat-sheet snippets for Magento they&#8217;d like to share?</p>
]]></content:encoded>
			<wfw:commentRss>http://welikeitfresh.com/2010/03/23/magento-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>AutoTTF WordPress Plugin for Rendering True Type Fonts</title>
		<link>http://welikeitfresh.com/2009/07/10/autott-wordpress-plugin-for-rendering-true-type-fonts/</link>
		<comments>http://welikeitfresh.com/2009/07/10/autott-wordpress-plugin-for-rendering-true-type-fonts/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 17:29:08 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[typography]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://welikeitfresh.com/?p=636</guid>
		<description><![CDATA[Like most cool technologies, this WordPress plugin was developed out of necessity for a client project. In a nutshell it works very similar to the way sifr works only without involving flash in the process. Instead, the plugin relies on php and the GD graphics library to dynamically replace html tags with images of true [...]]]></description>
			<content:encoded><![CDATA[<p>Like most cool technologies, this WordPress plugin was developed out of necessity for a client project. In a nutshell it works very similar to the way <a href="http://www.mikeindustries.com/blog/sifr/" target="_blank">sifr</a> works only without involving flash in the process. Instead, the plugin relies on php and the GD graphics library to dynamically replace html tags with images of true type typography.  As it is heavily inspired by the <a href="http://drupal.org/project/signwriter" target="_blank">Signwriter drupal module</a>, it is clearly not a novel method, however, in the spirit of open source it seemed natural to port the functionality to WordPress.</p>
<p>In brief, once installed, the plugin will act automatically, relying on CSS classes to target content. Typography styles are defined using a simple rule syntax not at all unlike CSS allowing for versatility and flexability all from within the wordpress dashboard. Since it is a server-side technology, the method is truly cross-platform and allows license-burdened fonts to be secured to prevent download.</p>
<p><a href="http://blog.realmofzod.com/wordpress-plugins/auto-ttf/" target="_blank">Download the plugin here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://welikeitfresh.com/2009/07/10/autott-wordpress-plugin-for-rendering-true-type-fonts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Plugins XTREME!  (part 1)</title>
		<link>http://welikeitfresh.com/2008/11/21/wordpress-plugins-xtreme-part-1/</link>
		<comments>http://welikeitfresh.com/2008/11/21/wordpress-plugins-xtreme-part-1/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 15:00:41 +0000</pubDate>
		<dc:creator>Jill</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://welikeitfresh.com/?p=132</guid>
		<description><![CDATA[I&#8217;m getting ready to build a sweet new WordPress site, and to prepare I decided to create a little bookmarks folder for all the plugins I use on every single WordPress install.  In the folder I put links to all the WordPress plugins I use on every site, so I can right-click on the folder [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://welikeitfresh.com/files/2008/11/xtreme.jpg"><img class="alignright size-full wp-image-142" src="http://welikeitfresh.com/files/2008/11/xtreme.jpg" alt="" width="292" height="211" /></a>I&#8217;m getting ready to build a sweet new WordPress site, and to prepare I decided to create a little bookmarks folder for all the plugins I use on every single WordPress install.  In the folder I put links to all the WordPress plugins I use on every site, so I can right-click on the folder (which I named &#8220;WP Plugins XTREME&#8221;)  and select &#8216;Open All in Tabs&#8217; and then start downloading the latest versions of them all in one swoop.</p>
<p>I know I already wrote a post listing &#8216;<a href="http://welikeitfresh.com/2008/10/30/plugins-every-wordpress-site-should-have/">plugins every WordPress site should have</a>&#8216; but there were quite a few I didn&#8217;t mention &#8211; just because I personally like the plugin and use it every time doesn&#8217;t mean it works for everybody in every situation.  But I love these SO much and I&#8217;m just worried that some poor WordPress developer doesn&#8217;t know about them, so what else can I do but write about more plugins?</p>
<p><span id="more-132"></span>Here are the plugins I mentioned in my <a href="http://welikeitfresh.com/2008/10/30/plugins-every-wordpress-site-should-have/">previous post</a>:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All-In-One-SEO Pack</a></li>
<li><a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">Google XML Sitemap</a></li>
<li><a href="http://wordpress.org/extend/plugins/wp-spamfree/">WP-SpamFree</a></li>
<li><a href="http://wordpress.org/extend/plugins/google-analytics-for-wordpress/">yoast.com Google Analytics</a></li>
<li><a href="http://www.google.com/support/feedburner/bin/answer.py?answer=78483&amp;topic=13252">Feedburner FeedSmith</a></li>
</ul>
<p>In addition to those, there are a few more plugins I have a special warm place in my heart for.  (And despite the title of this post, they are pretty basic and not really all that &#8220;XTREME&#8221; &#8211; but is anything labeled &#8220;XTREME&#8221; really all that &#8220;extreme&#8221; anyway?)</p>
<h3>Improved Include Page</h3>
<p>I don&#8217;t know how many times this plugin has simplified my life.  If you are using WordPress as a CMS, and you want the client/blogger to be able to edit any text on your site, this plugin is super-awesome.  You can take any block of text, say, a newsletter call out in the sidebar, a special offers box on the homepage, or any other piece of segmented tex &#8211; and create a new page for it.  Let&#8217;s say you make a page called &#8216;Newsletter Signup Text&#8217;, and it&#8217;s ID number is 3.  Then in your sidebar include file, just call the function: <strong>iinclude_page(3);</strong> and the content of that page will be displayed.</p>
<p>Here&#8217;s another example.  On the homepage for FutureVet, there are multiple, separate blocks of static content.  I could have created one page called &#8220;Home&#8221;, included all my code structure and multiple ‹div› tags in the page content, and just crossed my fingers that whoever edited that page didn&#8217;t accidentally delete any of my code.  Instead, I split up the editable content into different pages, and used Improved Include Page to include them in the homepage template.</p>
<p><a href="http://welikeitfresh.com/files/2008/11/futurevet.jpg"><img class="aligncenter size-full wp-image-133" src="http://welikeitfresh.com/files/2008/11/futurevet.jpg" alt="" width="440" height="179" /></a></p>
<p>To do this, I created a template called homepage.php.  In the WordPress admin area, I created one page called &#8220;Home&#8221; that contains the introduction text, and assigned it to the homepage.php template.  I created three subpages of Home, and named them &#8220;Kids Callout&#8221;, &#8220;Students Callout&#8221; and &#8220;Vet Professionals Callout&#8221;.  Those three pages contain the text in the three blue boxes.  In the homepage.php template, I added the three <strong>iinclude_page()</strong> calls to each of those pages, in the appropriate place in the code.  Now all the text on the homepage is editable, with no risk of accidentally deleting important structure code!  I love it.</p>
<p>Improved Include now also has a &#8220;teaser&#8221; option &#8211; useful if you have a regular full-blown page of content but want to show a little preview of the content on your homepage or sidebar.  It works just like the excerpt option for posts, just use the ‹!&#8211;more&#8211;› tag to determine the cut off point for the teaser.  (Thanks to Christine for bringing that to my attention! :)  )</p>
<h3>More Fields</h3>
<p>One thing that WordPress doesn&#8217;t really do as well as other CMS&#8217;s like Expression Engine, is how it handles custom fields. Custom fields provide little bits of information (or &#8216;metadata&#8217;) that are attached the post but not in the actual post content.  The trouble with custom fields in WordPress is that they only provide text input, and they can be confusing to use.  By default, you create a custom field by picking the custom field variable name from a dropdown, then adding the value for the field, then clicking &#8220;Add Field&#8221;.  If you ever need to change a field, you have to go through two steps &#8211; updating the custom field, and then saving the page.  I&#8217;d wager that many people make the mistake of not saving the custom field before they save a page.  Plus, if you have several types of pages, that need different custom fields, it can be hard to remember which fields you need for which page.  Custom fields can be a big headache in WordPress.</p>
<p>That&#8217;s where More Fields comes in handy.  With More Fields you can create groups of custom fields, each with their own space on the edit screen, with a helpful descriptive label (much easier to understand than variable names).  Plus you can choose whether you want a text field, a checkbox or a select box for each custom field.  The next major release of the plugin will also include WYSIWYG text areas as well! (Awesome!)</p>
<p>Here&#8217;s an example of how More Fields improves your custom field experience.  Let&#8217;s say you have a recipe blog, and you like posting nutrition information along with every dish, and you want to display them in a decorative box to the side of your post.  Here&#8217;s how that would look with standard custom fields:</p>
<p><a href="http://welikeitfresh.com/files/2008/11/customfieldbad1.jpg"><img class="aligncenter size-full wp-image-135" src="http://welikeitfresh.com/files/2008/11/customfieldbad1.jpg" alt="" width="440" height="252" /></a></p>
<p>Ugly and confusing!</p>
<p>Here&#8217;s what they look like with More Fields:</p>
<p><a href="http://welikeitfresh.com/files/2008/11/nutrition.jpg"><img class="aligncenter size-full wp-image-136" src="http://welikeitfresh.com/files/2008/11/nutrition.jpg" alt="" width="440" height="167" /></a></p>
<p>Ah, much better!</p>
<p>Custom Fields have many, many uses &#8211; any time you need to attach metadata or variables to a post &#8211; and More Fields makes them so much easier and more practical to use.</p>
<p>Also, let me not forget to mention how easy it is to call these custom fields in your templates.  Just use <strong>meta(&#8216;customfield_name&#8217;)</strong> (to print the data) or <strong>get_meta(&#8216;customfield_name&#8217;)</strong> (to assign or manipulate the data).    If you aren&#8217;t aware of the standard way of getting custom fields in WordPress, let&#8217;s just say it requires many more lines of code, and leave it at that.</p>
<p>More Fields.  Why settle for anything less?</p>
<h3>To be continued&#8230;</h3>
<p>I have a few more plugins to cover but I think I&#8217;ve gushed enough for today.  Tune in next time for even more WordPress Plugins&#8230;  XTREME! (guitar squeal!)</p>
<p><a href="http://welikeitfresh.com/files/2008/11/music171.gif"><img class="alignleft size-full wp-image-144" src="http://welikeitfresh.com/files/2008/11/music171.gif" alt="" width="149" height="157" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://welikeitfresh.com/2008/11/21/wordpress-plugins-xtreme-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
