<?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>James Revillini &#187; php</title>
	<atom:link href="http://james.revillini.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.revillini.com</link>
	<description>Say 'no' to styrofoam.</description>
	<lastBuildDate>Sun, 25 Jul 2010 13:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CakePHP mutliple checkbox input</title>
		<link>http://james.revillini.com/2010/04/05/cakephp-mutliple-checkbox-input/</link>
		<comments>http://james.revillini.com/2010/04/05/cakephp-mutliple-checkbox-input/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 15:01:31 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2010/04/05/cakephp-mutliple-checkbox-input/</guid>
		<description><![CDATA[This is just here because I always forget how to do it: echo $form-&#62;input('fieldname', array('options'=&#62;array('1'=&#62;'val1', '3'=&#62;'val2' [...]), 'multiple'=&#62;'checkbox', 'label'=&#62;'Da Label'));]]></description>
			<content:encoded><![CDATA[<p>This is just here because I always forget how to do it:</p>
<pre class="brush: plain;">echo $form-&gt;input('fieldname', array('options'=&gt;array('1'=&gt;'val1', '3'=&gt;'val2' [...]), 'multiple'=&gt;'checkbox', 'label'=&gt;'Da Label'));</pre>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2010/04/05/cakephp-mutliple-checkbox-input/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script: Convert Excel or tab-delimited file to html table</title>
		<link>http://james.revillini.com/2008/01/30/php-script-convert-excel-or-tab-delimited-file-to-html-table/</link>
		<comments>http://james.revillini.com/2008/01/30/php-script-convert-excel-or-tab-delimited-file-to-html-table/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 22:39:15 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2008/01/30/php-script-convert-excel-or-tab-delimited-file-to-html-table/</guid>
		<description><![CDATA[Here&#8217;s a script which I wrote today while on the jorb.  The purpose was so that someone could copy and paste from an excel spreadsheet into a textarea, click a button, and voila: an html table. The nice thing was that when I pasted Excel data into the textarea, it was tab-delimited with line breaks.  [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a script which I wrote today while on the jorb.  The purpose was so that someone could copy and paste from an excel spreadsheet into a textarea, click a button, and voila: an html table.</p>
<p>The nice thing was that when I pasted Excel data into the textarea, it was tab-delimited with line breaks.  At that point, all I needed to do was some replacements and throw a table wrapper on it.</p>
<p>Here&#8217;s the code for the conversion function (sorry &#8211; i haven&#8217;t installed a php code parser yet to style this more nicely):</p>
<p>&lt;?php<br />
/**<br />
* convert tab delimited file to html table<br />
* @input string tab-delimited text<br />
* found at http://james.revillini.com<br />
* note: you are not required to keep the above copyright notice in this code.<br />
*/<br />
function tabs_to_table($input) {<br />
//define replacement constants<br />
define(&#8216;TAB_REPLACEMENT&#8217;, &#8216;&lt;/td&gt;&lt;td&gt; &#8216;);<br />
define(&#8216;NEWLINE_REPLACEMENT&#8217;, &#8216;&lt;/td&gt;&lt;/tr&gt;&lt;tr%s&gt;&lt;td&gt; &#8216;);<br />
define(&#8216;TABLE_BEGIN&#8217;, &#8216;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &#8216;);<br />
define(&#8216;TABLE_END&#8217;, &#8216;&lt;/td&gt;&lt;tr&gt;&lt;/table&gt;&#8217;);&lt;/code&gt;</p>
<p>//replace all tabs with end-cell, begin-cell<br />
$input = preg_replace  (’/\t/’  , TAB_REPLACEMENT  , $input);</p>
<p>//split the list on linebreaks<br />
$rows = preg_split  (’/\r\n/’  , $input);</p>
<p>//replace all linebreaks with end-row, begin-row (with or without altRow class)<br />
$output = ”;<br />
foreach ($rows as $index =&gt; $row) {<br />
$output .= $row . sprintf(NEWLINE_REPLACEMENT, ($index%2?”:’ class=”alt”‘));<br />
}</p>
<p>//build table<br />
$input = TABLE_BEGIN . $output . TABLE_END;<br />
return ($input);<br />
}<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2008/01/30/php-script-convert-excel-or-tab-delimited-file-to-html-table/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SwfUploadComponent: A CakePHP Component for Handling File Uploads</title>
		<link>http://james.revillini.com/2007/03/24/swfuploadcomponent-a-cakephp-component-for-handling-file-uploads/</link>
		<comments>http://james.revillini.com/2007/03/24/swfuploadcomponent-a-cakephp-component-for-handling-file-uploads/#comments</comments>
		<pubDate>Sat, 24 Mar 2007 19:46:24 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2007/03/24/swfuploadcomponent-a-cakephp-component-for-handling-file-uploads/</guid>
		<description><![CDATA[I recently published an article at The Bakery which explains how to incorporate SWFUpload into your CakePHP application. SWFUpload is a fantastic javascript/flash library which facilitates multiple file uploads with real-time upload progress. The article includes the SwfUploadComponent as well as usage tips. I developed this component because I needed to handle uploads which could [...]]]></description>
			<content:encoded><![CDATA[<p>I recently published an article at <a title="The Bakery: Everything CakePHP" href="http://bakery.cakephp.org/">The Bakery</a> which explains <a title="Read the article: SwfUpload and Multipurpose Uploader" href="http://bakery.cakephp.org/articles/view/296">how to incorporate SWFUpload into your CakePHP application</a>.  SWFUpload is a fantastic javascript/flash library which facilitates multiple file uploads with real-time upload progress.</p>
<p>The article includes the SwfUploadComponent as well as usage tips.  I developed this component because I needed to handle uploads which could be associated with any number of objects in Mango.  One of the key goals of Mango is to be user-friendly, and since file uploading is one of the least fun experiences on the Web (in my opinion, anyway), I needed to find a way to at least simulate the kind of user interaction that the desktop operating system offers.  <a href="http://swfupload.mammon.se/">SWFUpload</a> meets that need.</p>
<p>I&#8217;m working on a project page for SwfUploadComponent which will have the API for the component.  Stay tuned.</p>
<p>Thanks to Eelco Wiersma for the <a title="it all started with a blog post ..." href="http://www.pagebakers.nl/2006/12/19/swfupload-part-ii/">original code</a> which I used as a basis for development.  Also, thanks to <a title="the legend ..." href="http://cakeforge.org/users/gwoo/">gwoo</a> for guidance and cakebin pastes &#8211; he helped me to tweak it for performance and readability.</p>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2007/03/24/swfuploadcomponent-a-cakephp-component-for-handling-file-uploads/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Mango Initial Release Draws Near</title>
		<link>http://james.revillini.com/2007/03/08/mango-initial-release-draws-near/</link>
		<comments>http://james.revillini.com/2007/03/08/mango-initial-release-draws-near/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 03:48:13 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2007/03/08/mango-initial-release-draws-near/</guid>
		<description><![CDATA[I&#8217;ve fixed most of the major bugs, and moved a few ideas I had to the next release wish list. As a final step, I must complete the help files. I plan to take care of that over the weekend and release a working copy within the next week.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve fixed most of the major bugs, and moved a few ideas I had to the next release wish list.  As a final step, I must complete the help files.  I plan to take care of that over the weekend and release a working copy within the next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2007/03/08/mango-initial-release-draws-near/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>March 2007 Mango Status Update</title>
		<link>http://james.revillini.com/2007/03/03/march-2007-mango-status-update/</link>
		<comments>http://james.revillini.com/2007/03/03/march-2007-mango-status-update/#comments</comments>
		<pubDate>Sat, 03 Mar 2007 10:08:52 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2007/03/03/march-2007-mango-status-update/</guid>
		<description><![CDATA[The Mango Initial Release is drawing near. I&#8217;ve resumed work on the project I was getting all fired up about last year &#8211; thanks to my wife &#8211; and it&#8217;s looking really good. A few things about the plan have changed, however. First, I decided that for now, I&#8217;m just targeting me as an audience [...]]]></description>
			<content:encoded><![CDATA[<p>The Mango Initial Release is drawing near.  I&#8217;ve resumed work on the project I was getting all fired up about last year &#8211; thanks to my wife &#8211; and it&#8217;s looking really good.</p>
<p>A few things about the plan have changed, however.  First, I decided that for now, I&#8217;m just targeting <em>me</em> as an audience for this thing.  Trying to program it in a way that would work for the whole world was stressing me out and slowing down development.  My wife snapped me out of a funk one night when I was lamenting my predicament by asking, &#8216;Why don&#8217;t you just make it for <em>you</em> and don&#8217;t worry about selling it?&#8217;</p>
<p>It was the best advice I ever listened to &#8211; it made me remember why I started this.  I suddenly knew the direction I wanted to go in.  I got my spark back.</p>
<p>Thanks, Lovie.</p>
<p>This doesn&#8217;t mean that Mango is dead or anything.  I&#8217;m still going to release it to the public under one of the open source licenses, but whether or not I try to turn it into a money making adventure remains a question that I&#8217;m not too concerned with right now.  Right now I&#8217;m excited because I&#8217;ve got the following features in there now:</p>
<ul>
<li>WYSIWYG editor &#8211; <a title="TinyMCE Rich Text Editor by Moxiecode" href="http://tinymce.moxiecode.com/" target="_blank">TinyMCE</a></li>
<li>Multiple file uploads with progress bars for each file &#8211; <a title="SWFUpload Multiple File Uploads with Progress!" href="http://swfupload.mammon.se/" target="_blank">SWFUpload</a></li>
<li>Multimedia attachment to Pages &#8211; Anarchy Web Player (not sure if I&#8217;m staying with this or if I will roll my own)</li>
<li>Full YAHOO UI integration for a great look and feel and intuitive, responsive interfaces.</li>
<li>A basic authentication system</li>
<li>All the usual stuff that wikis have.</li>
</ul>
<p>I still need to have a search feature, but I might leave that for the second realease.  Mostly, I&#8217;m trying to concentrate on the most important part: making editing pages easy and fun.  I need to run through things tomorrow and figure out what needs to be locked down better.  I&#8217;m sure I&#8217;ve got security holes in it right now.  once I plug those, I&#8217;ll put it online and start checking in new versions periodically as I reach stable milestones.</p>
<p>It feels really good to be working on this right now.  My wife has been very supportive, which helps a lot.  Almost every day I come home, put down my stuff, crack open the laptop, and start hammering away at it.  I&#8217;ve even gotten the alias &#8216;Wiki-man&#8217; recently.</p>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2007/03/03/march-2007-mango-status-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mango &#8211; a wiki for the rest of us</title>
		<link>http://james.revillini.com/2006/11/08/mango-a-wiki-for-the-rest-of-us/</link>
		<comments>http://james.revillini.com/2006/11/08/mango-a-wiki-for-the-rest-of-us/#comments</comments>
		<pubDate>Wed, 08 Nov 2006 13:48:09 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://james.revillini.com/2006/11/08/mango-a-wiki-for-the-rest-of-us/</guid>
		<description><![CDATA[This weekend, I&#8217;m hoping to release a beta of a wiki system I&#8217;m developing called &#8216;Mango.&#8217;� My intention is to start off with some basic wiki functionality, get some testers, revise, then produce a version 1 release which will be available for free download on the web. Ultimately, I would like to do a full [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend, I&#8217;m hoping to release a beta of a wiki system I&#8217;m developing called &#8216;Mango.&#8217;�  My intention is to start off with some basic wiki functionality, get some testers, revise, then produce a version 1 release which will be available for free download on the web.</p>
<p>Ultimately, I would like to do a full product launch a month or two from now which includes a boxed version of this software.�  The commercial, packaged version will include the Mango software, printed and digital user manual, and video tutorial cd-rom and/or dvd.</p>
<p>I will be hosting a live version of Mango at http://mango-demo.revillini.com.</p>
<p>I will also host my family wiki using Mango at http://family.revillini.com &#8211; this was the original intent of the software, even though it does not yet have any geneology-specific features at this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2006/11/08/mango-a-wiki-for-the-rest-of-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
