<?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>BorkWeb &#187; php</title>
	<atom:link href="http://borkweb.com/story/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://borkweb.com</link>
	<description>Some People Are Squirrel Handed.</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:00:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Oracle 10g: Using The Returning Clause With ADOdb</title>
		<link>http://borkweb.com/story/oracle-10g-using-the-returning-clause-with-adodb</link>
		<comments>http://borkweb.com/story/oracle-10g-using-the-returning-clause-with-adodb#comments</comments>
		<pubDate>Tue, 21 Oct 2008 13:26:49 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[adodb]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dml]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle 10g]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://borkweb.com/?p=638</guid>
		<description><![CDATA[Plymouth State University uses Oracle heavily due to its Student Information System of choice &#8211; SungardHE Banner. As such, I play around in Oracle a lot (sometimes a lot more than I&#8217;d like) and I occasionally find functionality that seems more cumbersome than it should. One such item is selecting the last inserted value on [...]]]></description>
			<content:encoded><![CDATA[<p>Plymouth State University uses <a href="http://www.oracle.com">Oracle</a> heavily due to its Student Information System of choice &#8211; <a href="http://www.sungardhe.com">SungardHE</a> Banner.  As such, I play around in Oracle a lot (sometimes a lot more than I&#8217;d like) and I occasionally find functionality that seems more cumbersome than it should.  </p>
<p>One such item is <strong>selecting the last inserted value on an auto-incrementing column</strong>.</p>
<p>Historically, when you are inserting into a table with auto incrementing values (via a <a href="http://borkweb.com/story/oracles-auto-incrementing-with-sequences">sequence</a>) you have always been able to grab the last value with a simple SELECT statement (line 22):</p>
<pre class="brush: sql; title: ; notranslate">
-- setup a table
CREATE TABLE bork (id INTEGER NOT NULL PRIMARY KEY, data VARCHAR2(10) NOT NULL);

-- create the sequence
CREATE SEQUENCE sq_bork INCREMENT BY 1 START WITH 1; 

-- create a trigger for auto-incrementing the sequence'
CREATE OR REPLACE TRIGGER tr_sq_bork
BEFORE INSERT
ON bork
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT sq_bork.NEXTVAL INTO :NEW.id FROM DUAL;
END;
/

-- insert a record into the table
INSERT INTO bork (name) VALUES ('Matt');

-- retrieve last inserted id
SELECT sq_bork.CURRVAL FROM dual;
</pre>
<p>As you see there, two statements must be executed to get that new id.  The INSERT and the SELECT.  Well, as of Oracle 10g you can utilize the RETURNING clause like so:</p>
<pre class="brush: sql; title: ; notranslate">
INSERT INTO bork (name) VALUES ('Matt') RETURNING id INTO i_id;
</pre>
<p>That statement inserts a record into &#8220;bork&#8221; and returns the value of &#8220;id&#8221; into the &#8220;i_id&#8221; variable.  Pretty sexy and all with one DML statement.  Here&#8217;s what we do at Plymouth to utilize the RETURNING clause with the PHP library <a href="http://adodb.sf.net">ADOdb</a>:</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
//do your database object initialization here:
//$db = new ADONewConnection...

$sql = &quot;BEGIN INSERT INTO bork (data) VALUES ('Matt') RETURNING id INTO :i_id; END;&quot;;
$stmt = $db-&gt;PrepareSP($sql);
$db-&gt;OutParameter($stmt, $inserted_id, 'i_id');
$db-&gt;Execute($stmt);
?&gt;
</pre>
<p>Yup.  4 lines of PHP but only 1 statement sent to the database!  I&#8217;d take the extra lines any day over the latency of data retrieval.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/oracle-10g-using-the-returning-clause-with-adodb/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Plugin: Sexy Comments v1.4 Released!</title>
		<link>http://borkweb.com/story/plugin-sexy-comments-v14-released</link>
		<comments>http://borkweb.com/story/plugin-sexy-comments-v14-released#comments</comments>
		<pubDate>Fri, 03 Aug 2007 12:52:24 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[borkweb]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[matt batchelder]]></category>
		<category><![CDATA[matthew batchelder]]></category>
		<category><![CDATA[mybloglog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sexy]]></category>
		<category><![CDATA[sexy comments]]></category>
		<category><![CDATA[sexycomments]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/plugin-sexy-comments-v14-released</guid>
		<description><![CDATA[[[innerindex]] Introduction This has been a long time coming and I am happy to announce the release of Sexy Comments v1.4! With this version comes a lot of changes&#8230;so be sure to read the installation section! Along with simple optimizations and general restructure, the following features are now available: Feature List Ajax comment preview (new [...]]]></description>
			<content:encoded><![CDATA[<p>[[innerindex]]<br />
<h2 id="_introduction_1" >Introduction</h2>
<p>This has been a long time coming and I am happy to announce the release of Sexy Comments v1.4!  With this version comes <strong>a lot of changes&#8230;so be sure to read the installation section</strong>!  Along with simple optimizations and general restructure, the following features are now available:</p>
<h2 id="_feature-list_1" >Feature List</h2>
<ul>
<li>Ajax comment preview (<strong>new feature</strong>)</li>
<li>Author post highlighting</li>
<li>Avatars
<ul>
<li>Either display/hide avatars</li>
<li>Select your avatar service of choice (Gravatar and MyBlogLog options are available)</li>
<li>Specify maximum avatar dimension (Gravatar Only)</li>
<li>Customize default/trackback avatars</li>
</ul>
</li>
<li>Comment Reply-To  (<strong>new feature</strong>)</li>
<li>Comment Themes  (<strong>new feature</strong>)</li>
<li>CSS overriding</li>
<li>&#8220;Number of Comments&#8221; message customization</li>
<li>jQuery inclusion toggling</li>
</ul>
<p></p>
<h2 id="_installation-upgradi_1" >Installation &#038; Upgrading</h2>
<ol>
<li>Download Sexy Comments v1.4 from the WordPress <a href="http://wordpress.org/extend/plugins/sexy-comments/">plugin directory</a></li>
<li>Unzip that little sucker</li>
<li>Place <strong>sexy-comments</strong> folder in your wp-content/plugins directory (it should look like this: <strong>wp-content/plugins/sexy-comments/</strong></li>
<li>Log in to your WordPress plugin admin page and activate the plugin.</li>
<li>In the plugin admin page, click the <strong>SexyComments</strong> sub-menu.</li>
<li>Customize the settings until you have something that works for you.</li>
<li>Locate your theme&#8217;s template file that displays comments (typically <strong>comments.php</strong>).  Remove the comment output loop and replace with:
<pre class="brush: php; title: ; notranslate">
&lt; ?php sexycomments::show($comments); ?&gt;
</pre>
</li>
<li>If you plan to use the Ajax features or the Reply-To features, you will need to do two things.
<ol>
<li>Enable jQuery and jQuery Form Extension via the Plugin > SexyComments administration page.</li>
<li>Locate the template file that contains the comment submission form (typically <strong>comments.php</strong> <em>near the bottom</em>) and replace that chunk of code with:
<pre class="brush: php; title: ; notranslate">
&lt; ?php sexycomments::form(); ?&gt;
</pre>
</li>
</ol>
<p><em>NOTE: Be sure not to touch the section that generates the form for adding comments! This plugin does not re-create the comment creation form.</em>
</li>
<li>Lastly, consider disabling the plugin CSS and taking the example CSS provided and customize it to suit your theme&#8217;s color scheme.</li>
<li>You should be all set, now! w00t w00t! Go make a MyBlogLog or Gravatar account if you don&#8217;t already have one and upload an avatar. Gravatar tends to be pretty flakey so I&#8217;d suggest using MyBlogLog.</li>
</ol>
<p></p>
<h2 id="_faqs_1" >FAQs</h2>
<ul>
<li><strong>Q:</strong> <em>What is this &#8220;comment loop&#8221; you speak of?</em>
<p><strong>A:</strong> Ah, yes.  That thing.  Well, its anatomy looks similar to this (there will be some variation from theme to theme):</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php if ($comments) : ?&gt;
	&lt;!-- some HTML is typically here --&gt;

	&lt; ?php foreach ($comments as $comment) : ?&gt;
        &lt;!-- the output HTML of each individual comment --&gt;

	&lt; ?php endforeach; /* end for each comment */ ?&gt;
	&lt;!--...more HTML --&gt;
 &lt; ?php else : // this is displayed if there are no comments so far ?&gt;
	&lt; ?php if ('open' == $post-&gt;comment_status) : ?&gt;
		&lt;!-- typically a blank area or a place with a comment --&gt;
	 &lt; ?php else : // comments are closed ?&gt;
		&lt;!-- closed comments section --&gt;
	&lt; ?php endif; ?&gt;
&lt; ?php endif; ?&gt;
</pre>
</li>
<li><strong>Q:</strong> <em>Ok&#8230;so I just upgraded to a new version and there is nothing in the SexyComments admin page&#8230;WTF?</em>
<p><strong>A:</strong> Yeah. Sorry about that.  In this version, the directory structure has changed drastically and Sexy Comments should no longer live in wp-content/plugins/sexycomments.php OR wp-content/plugins/sexycomments/sexycomments.php, but instead it should be in <strong>wp-content/plugins/sexy-comments/</strong>.  Make sure that the plugin is in the correct location of your plugins directory.
</li>
<li><strong>Q:</strong> <em>What happened to sexycomments_print($comments)?  I used to use that to get my comments to display&#8230;will it still work?</em>
<p><strong>A:</strong> Along with a directory structure overhaul, this version had a large code overhaul as well.  The old function (<em>sexycomments_print</em>) is <strong>deprecated</strong> but will still work for the time being.  I greatly urge you to move over to the new function call <strong>sexycomments::show($comments)</strong> as that is the new *impoved* function.
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/plugin-sexy-comments-v14-released/feed</wfw:commentRss>
		<slash:comments>298</slash:comments>
		</item>
		<item>
		<title>Firefox Search Plugin for PHP.net</title>
		<link>http://borkweb.com/story/firefox-search-plugin-for-phpnet</link>
		<comments>http://borkweb.com/story/firefox-search-plugin-for-phpnet#comments</comments>
		<pubDate>Fri, 03 Nov 2006 20:48:22 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[search plugin]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/firefox-search-plugin-for-phpnet</guid>
		<description><![CDATA[Dan, one of my co-workers, has been tooling around with PHP and easily plopped a PHP search extension into Internet Explorer 7. Well. I don&#8217;t like IE7 as much as Firefox and sadly there&#8217;s no super easy way to add a search plugin (if it doesn&#8217;t exist or you can&#8217;t find one&#8230;like in my case) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/borkweb/287928601/" title="Photo Sharing"><img src="http://static.flickr.com/104/287928601_d08f22c753_o.jpg" width="229" height="142" alt="php" class="post_image" align="left"/></a> <a href="http://djbramer.blogs.plymouth.edu/">Dan</a>, one of my co-workers, has been tooling around with PHP and easily plopped a PHP search extension into Internet Explorer 7.  Well.  I don&#8217;t like IE7 as much as <a href="http://getfirefox.com">Firefox</a> and sadly there&#8217;s no super easy way to add a search plugin (if it doesn&#8217;t exist or you can&#8217;t find one&#8230;like in my case) without coding up the XML.<br clear="all"/></p>
<p>So, using Mozilla&#8217;s instructions I whipped up a <a href="http://php.net">PHP.net</a> search plugin.  <a href="http://borkweb.com/code/php.xml">Here it is</a> to anyone interested:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;opensearchdescription xmlns=&quot;http://a9.com/-/spec/opensearch/1.1/&quot; xmlns:moz=&quot;http://www.mozilla.org/2006/browser/search/&quot;&gt;
	&lt;shortname&gt;PHP&lt;/shortname&gt;
	&lt;description&gt;PHP.net&lt;/description&gt;
	&lt;inputencoding&gt;UTF-8&lt;/inputencoding&gt;
	&lt;image width=&quot;16&quot; height=&quot;16&quot;&gt;data:image/jpeg,%FF%D8%FF%E0%00%10JFIF%00%01%02%01%00H%00H%00%00%FF%E1%03%CCExif%00%00MM%00*%00%00%00%08%00%07%01%12%00%03%00%00%00%01%00%01%00%00%01%1A%00%05%00%00%00%01%00%00%00b%01%1B%00%05%00%00%00%01%00%00%00j%01(%00%03%00%00%00%01%00%02%00%00%011%00%02%00%00%00%14%00%00%00r%012%00%02%00%00%00%14%00%00%00%86%87i%00%04%00%00%00%01%00%00%00%9C%00%00%00%C8%00%00%00H%00%00%00%01%00%00%00H%00%00%00%01Adobe%20Photoshop%207.0%002006%3A11%3A03%2015%3A18%3A39%00%00%00%00%03%A0%01%00%03%00%00%00%01%FF%FF%00%00%A0%02%00%04%00%00%00%01%00%00%00%10%A0%03%00%04%00%00%00%01%00%00%00%10%00%00%00%00%00%00%00%06%01%03%00%03%00%00%00%01%00%06%00%00%01%1A%00%05%00%00%00%01%00%00%01%16%01%1B%00%05%00%00%00%01%00%00%01%1E%01(%00%03%00%00%00%01%00%02%00%00%02%01%00%04%00%00%00%01%00%00%01%26%02%02%00%04%00%00%00%01%00%00%02%9E%00%00%00%00%00%00%00H%00%00%00%01%00%00%00H%00%00%00%01%FF%D8%FF%E0%00%10JFIF%00%01%02%01%00H%00H%00%00%FF%ED%00%0CAdobe_CM%00%02%FF%EE%00%0EAdobe%00d%80%00%00%00%01%FF%DB%00%84%00%0C%08%08%08%09%08%0C%09%09%0C%11%0B%0A%0B%11%15%0F%0C%0C%0F%15%18%13%13%15%13%13%18%11%0C%0C%0C%0C%0C%0C%11%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%01%0D%0B%0B%0D%0E%0D%10%0E%0E%10%14%0E%0E%0E%14%14%0E%0E%0E%0E%14%11%0C%0C%0C%0C%0C%11%11%0C%0C%0C%0C%0C%0C%11%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%FF%C0%00%11%08%00%10%00%10%03%01%22%00%02%11%01%03%11%01%FF%DD%00%04%00%01%FF%C4%01%3F%00%00%01%05%01%01%01%01%01%01%00%00%00%00%00%00%00%03%00%01%02%04%05%06%07%08%09%0A%0B%01%00%01%05%01%01%01%01%01%01%00%00%00%00%00%00%00%01%00%02%03%04%05%06%07%08%09%0A%0B%10%00%01%04%01%03%02%04%02%05%07%06%08%05%03%0C3%01%00%02%11%03%04!%121%05AQa%13%22q%812%06%14%91%A1%B1B%23%24%15R%C1b34r%82%D1C%07%25%92S%F0%E1%F1cs5%16%A2%B2%83%26D%93TdE%C2%A3t6%17%D2U%E2e%F2%B3%84%C3%D3u%E3%F3F'%94%A4%85%B4%95%C4%D4%E4%F4%A5%B5%C5%D5%E5%F5Vfv%86%96%A6%B6%C6%D6%E6%F67GWgw%87%97%A7%B7%C7%D7%E7%F7%11%00%02%02%01%02%04%04%03%04%05%06%07%07%06%055%01%00%02%11%03!1%12%04AQaq%22%13%052%81%91%14%A1%B1B%23%C1R%D1%F03%24b%E1r%82%92CS%15cs4%F1%25%06%16%A2%B2%83%07%265%C2%D2D%93T%A3%17dEU6te%E2%F2%B3%84%C3%D3u%E3%F3F%94%A4%85%B4%95%C4%D4%E4%F4%A5%B5%C5%D5%E5%F5Vfv%86%96%A6%B6%C6%D6%E6%F6'7GWgw%87%97%A7%B7%C7%FF%DA%00%0C%03%01%00%02%11%03%11%00%3F%00N%EA%D8%D5%E4%D9%8Fk%2Cg%A6v%8BN%CD%8E!%D5Uf%DF%D2oo%A6%EC%8A%FF%00%9CbG%AB%E2%FD%AA%BCv%B2%C7%8B%1E%2B77a%60s%ADv%1D%7F%9F%BD%CD%B2%E6%FEcT%9F%D2%F0%DE2K%ABa%B3-%E1%F6%D8k%05%C5%AD%7Dv%FA%0F%9F%A7_%E8%B6%7F%DF%14q%FAF%16%3EO%DA%19%5B%09f%EF%B3%B7%D3kE%5B%9Fm%DF%A1%89%DB%FC%F7%A7%EDo%E6%2B%DF%AD%B4%3F%FF%D9%FF%ED%08%86Photoshop%203.0%008BIM%04%25%00%00%00%00%00%10%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%008BIM%03%ED%00%00%00%00%00%10%00H%00%00%00%01%00%01%00H%00%00%00%01%00%018BIM%04%26%00%00%00%00%00%0E%00%00%00%00%00%00%00%00%00%00%3F%80%00%008BIM%04%0D%00%00%00%00%00%04%00%00%00x8BIM%04%19%00%00%00%00%00%04%00%00%00%1E8BIM%03%F3%00%00%00%00%00%09%00%00%00%00%00%00%00%00%01%008BIM%04%0A%00%00%00%00%00%01%00%008BIM'%10%00%00%00%00%00%0A%00%01%00%00%00%00%00%00%00%018BIM%03%F5%00%00%00%00%00H%00%2Fff%00%01%00lff%00%06%00%00%00%00%00%01%00%2Fff%00%01%00%A1%99%9A%00%06%00%00%00%00%00%01%002%00%00%00%01%00Z%00%00%00%06%00%00%00%00%00%01%005%00%00%00%01%00-%00%00%00%06%00%00%00%00%00%018BIM%03%F8%00%00%00%00%00p%00%00%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%03%E8%00%00%00%00%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%03%E8%00%00%00%00%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%03%E8%00%00%00%00%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%03%E8%00%008BIM%04%00%00%00%00%00%00%02%00%018BIM%04%02%00%00%00%00%00%04%00%00%00%008BIM%04%08%00%00%00%00%00%10%00%00%00%01%00%00%02%40%00%00%02%40%00%00%00%008BIM%04%1E%00%00%00%00%00%04%00%00%00%008BIM%04%1A%00%00%00%00%03I%00%00%00%06%00%00%00%00%00%00%00%00%00%00%00%10%00%00%00%10%00%00%00%0A%00U%00n%00t%00i%00t%00l%00e%00d%00-%001%00%00%00%01%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%01%00%00%00%00%00%00%00%00%00%00%00%10%00%00%00%10%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%01%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%10%00%00%00%01%00%00%00%00%00%00null%00%00%00%02%00%00%00%06boundsObjc%00%00%00%01%00%00%00%00%00%00Rct1%00%00%00%04%00%00%00%00Top%20long%00%00%00%00%00%00%00%00Leftlong%00%00%00%00%00%00%00%00Btomlong%00%00%00%10%00%00%00%00Rghtlong%00%00%00%10%00%00%00%06slicesVlLs%00%00%00%01Objc%00%00%00%01%00%00%00%00%00%05slice%00%00%00%12%00%00%00%07sliceIDlong%00%00%00%00%00%00%00%07groupIDlong%00%00%00%00%00%00%00%06originenum%00%00%00%0CESliceOrigin%00%00%00%0DautoGenerated%00%00%00%00Typeenum%00%00%00%0AESliceType%00%00%00%00Img%20%00%00%00%06boundsObjc%00%00%00%01%00%00%00%00%00%00Rct1%00%00%00%04%00%00%00%00Top%20long%00%00%00%00%00%00%00%00Leftlong%00%00%00%00%00%00%00%00Btomlong%00%00%00%10%00%00%00%00Rghtlong%00%00%00%10%00%00%00%03urlTEXT%00%00%00%01%00%00%00%00%00%00nullTEXT%00%00%00%01%00%00%00%00%00%00MsgeTEXT%00%00%00%01%00%00%00%00%00%06altTagTEXT%00%00%00%01%00%00%00%00%00%0EcellTextIsHTMLbool%01%00%00%00%08cellTextTEXT%00%00%00%01%00%00%00%00%00%09horzAlignenum%00%00%00%0FESliceHorzAlign%00%00%00%07default%00%00%00%09vertAlignenum%00%00%00%0FESliceVertAlign%00%00%00%07default%00%00%00%0BbgColorTypeenum%00%00%00%11ESliceBGColorType%00%00%00%00None%00%00%00%09topOutsetlong%00%00%00%00%00%00%00%0AleftOutsetlong%00%00%00%00%00%00%00%0CbottomOutsetlong%00%00%00%00%00%00%00%0BrightOutsetlong%00%00%00%00%008BIM%04%11%00%00%00%00%00%01%01%008BIM%04%14%00%00%00%00%00%04%00%00%00%048BIM%04%0C%00%00%00%00%02%BA%00%00%00%01%00%00%00%10%00%00%00%10%00%00%000%00%00%03%00%00%00%02%9E%00%18%00%01%FF%D8%FF%E0%00%10JFIF%00%01%02%01%00H%00H%00%00%FF%ED%00%0CAdobe_CM%00%02%FF%EE%00%0EAdobe%00d%80%00%00%00%01%FF%DB%00%84%00%0C%08%08%08%09%08%0C%09%09%0C%11%0B%0A%0B%11%15%0F%0C%0C%0F%15%18%13%13%15%13%13%18%11%0C%0C%0C%0C%0C%0C%11%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%01%0D%0B%0B%0D%0E%0D%10%0E%0E%10%14%0E%0E%0E%14%14%0E%0E%0E%0E%14%11%0C%0C%0C%0C%0C%11%11%0C%0C%0C%0C%0C%0C%11%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%0C%FF%C0%00%11%08%00%10%00%10%03%01%22%00%02%11%01%03%11%01%FF%DD%00%04%00%01%FF%C4%01%3F%00%00%01%05%01%01%01%01%01%01%00%00%00%00%00%00%00%03%00%01%02%04%05%06%07%08%09%0A%0B%01%00%01%05%01%01%01%01%01%01%00%00%00%00%00%00%00%01%00%02%03%04%05%06%07%08%09%0A%0B%10%00%01%04%01%03%02%04%02%05%07%06%08%05%03%0C3%01%00%02%11%03%04!%121%05AQa%13%22q%812%06%14%91%A1%B1B%23%24%15R%C1b34r%82%D1C%07%25%92S%F0%E1%F1cs5%16%A2%B2%83%26D%93TdE%C2%A3t6%17%D2U%E2e%F2%B3%84%C3%D3u%E3%F3F'%94%A4%85%B4%95%C4%D4%E4%F4%A5%B5%C5%D5%E5%F5Vfv%86%96%A6%B6%C6%D6%E6%F67GWgw%87%97%A7%B7%C7%D7%E7%F7%11%00%02%02%01%02%04%04%03%04%05%06%07%07%06%055%01%00%02%11%03!1%12%04AQaq%22%13%052%81%91%14%A1%B1B%23%C1R%D1%F03%24b%E1r%82%92CS%15cs4%F1%25%06%16%A2%B2%83%07%265%C2%D2D%93T%A3%17dEU6te%E2%F2%B3%84%C3%D3u%E3%F3F%94%A4%85%B4%95%C4%D4%E4%F4%A5%B5%C5%D5%E5%F5Vfv%86%96%A6%B6%C6%D6%E6%F6'7GWgw%87%97%A7%B7%C7%FF%DA%00%0C%03%01%00%02%11%03%11%00%3F%00N%EA%D8%D5%E4%D9%8Fk%2Cg%A6v%8BN%CD%8E!%D5Uf%DF%D2oo%A6%EC%8A%FF%00%9CbG%AB%E2%FD%AA%BCv%B2%C7%8B%1E%2B77a%60s%ADv%1D%7F%9F%BD%CD%B2%E6%FEcT%9F%D2%F0%DE2K%ABa%B3-%E1%F6%D8k%05%C5%AD%7Dv%FA%0F%9F%A7_%E8%B6%7F%DF%14q%FAF%16%3EO%DA%19%5B%09f%EF%B3%B7%D3kE%5B%9Fm%DF%A1%89%DB%FC%F7%A7%EDo%E6%2B%DF%AD%B4%3F%FF%D98BIM%04!%00%00%00%00%00U%00%00%00%01%01%00%00%00%0F%00A%00d%00o%00b%00e%00%20%00P%00h%00o%00t%00o%00s%00h%00o%00p%00%00%00%13%00A%00d%00o%00b%00e%00%20%00P%00h%00o%00t%00o%00s%00h%00o%00p%00%20%007%00.%000%00%00%00%01%008BIM%04%06%00%00%00%00%00%07%00%08%01%01%00%01%01%00%FF%E1%12Hhttp%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2F%00%3C%3Fxpacket%20begin%3D'%EF%BB%BF'%20id%3D'W5M0MpCehiHzreSzNTczkc9d'%3F%3E%0A%3C%3Fadobe-xap-filters%20esc%3D%22CR%22%3F%3E%0A%3Cx%3Axapmeta%20xmlns%3Ax%3D'adobe%3Ans%3Ameta%2F'%20x%3Axaptk%3D'XMP%20toolkit%202.8.2-33%2C%20framework%201.5'%3E%0A%3Crdf%3ARDF%20xmlns%3Ardf%3D'http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23'%20xmlns%3AiX%3D'http%3A%2F%2Fns.adobe.com%2FiX%2F1.0%2F'%3E%0A%0A%20%3Crdf%3ADescription%20about%3D'uuid%3A662ee06d-6b78-11db-bb16-f420df7fe7bb'%0A%20%20xmlns%3AxapMM%3D'http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2Fmm%2F'%3E%0A%20%20%3CxapMM%3ADocumentID%3Eadobe%3Adocid%3Aphotoshop%3Af2ecf595-6b77-11db-bb16-f420df7fe7bb%3C%2FxapMM%3ADocumentID%3E%0A%20%3C%2Frdf%3ADescription%3E%0A%0A%3C%2Frdf%3ARDF%3E%0A%3C%2Fx%3Axapmeta%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%3C%3Fxpacket%20end%3D'w'%3F%3E%FF%EE%00!Adobe%00d%40%00%00%00%01%03%00%10%03%02%03%06%00%00%00%00%00%00%00%00%00%00%00%00%FF%DB%00%84%00%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%01%02%02%02%02%02%02%02%02%02%02%02%03%03%03%03%03%03%03%03%03%03%01%01%01%01%01%01%01%01%01%01%01%02%02%01%02%02%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%03%FF%C2%00%11%08%00%10%00%10%03%01%11%00%02%11%01%03%11%01%FF%C4%00%8B%00%00%03%00%00%00%00%00%00%00%00%00%00%00%00%00%00%02%04%05%01%00%03%01%00%00%00%00%00%00%00%00%00%00%00%00%00%00%01%03%08%10%00%01%03%04%02%03%00%00%00%00%00%00%00%00%00%00%07%03%04%05%00%12%06%08%01%11%02%15%17%11%00%02%03%01%01%00%02%03%01%00%00%00%00%00%00%00%03%06%04%05%07%02%01%15%17%11%12%16%08%12%00%02%02%01%03%01%09%01%00%00%00%00%00%00%00%00%01%02%11%03%12%00!%04Q%201Aq%222%13%05%15%14%FF%DA%00%0C%03%01%01%02%11%03%11%00%00%00-_5%D1~%C4v%7F%FF%DA%00%08%01%02%00%01%05%00%5C%8A%DD%BB%EF%A44%F6%0B%E0%0DVJ%1B%00c%1B)%FF%DA%00%08%01%03%00%01%05%00%B6%AD%AB%AB%9F.%EB%FF%DA%00%08%01%01%00%01%05%00%93%DB%01%AE%3AH_nF%3C%93%26%B5%7C9%3E%86%03%A8%C1A%C1%23%FF%DA%00%08%01%02%02%06%3F%00%E7p%ED%FA%CB%00%A9%CA%ABd%B0%F8%D8%88%DDJ%C6%60%EE%00%D8%C1%3A%AB%89%F9%CEx%CDn%06%C5e%20M%A6%A512C0%1E%D9%80d%EB%EDIz%BF%B3%95%C8%0El)'%E3%CD%5C%D6D%FA%81%C7%CB_%A1%C8%14%DBZdjA%5C%0A%CBX%EE%0A%EF%1B%06%03%BB%C2zk%FF%DA%00%08%01%03%02%06%3F%00%EC%7F%FF%DA%00%08%01%01%01%06%3F%00t%CE%9A%D64e%C1%A7ZsP%17%A9aA%3Acd%B8%2FY%3A%03g%C3t%07%CFX%E9%84%A3g%B2T%CB1nk%EB%E3%C9%80)%5D%04%BE%94%5C%08%8A%99%BDJ%E3%FB%0Cfw%889%E1%B4zO%E0%25%A2P%B0%DF%EE%D7%BF%E7%24%C3L%FD%9E%C4%CBqH%E3%A6R%F2%10J%AC%813%D8%90%E5q%22W%02%E3%82~6%B2X*%A7%19%93zt%A2f%D0%1C%A6%E6%CB%96%F7%D7%8A%D4Z%1Ez%F6%3C%AE%FC%F3gy-%8D6lt%3F%8F7%06%928%A4%E6W%26%24%22%7B%1F%81w%F6E*%A2D%A9k%E5g%FA%92%94Yb%BA%F4%1CL%0D%3A%9E%9B%A6L%1Ey%D49%F60%A9%3A%04%7D%18u%23%F6%0C*%FF%00x%15X%E4%0F%D1%FAo%23%83%FF%D9&lt;/image&gt;
	&lt;url type=&quot;text/html&quot; method=&quot;post&quot; template=&quot;http://php.net/search.php&quot;&gt;
		&lt;param name=&quot;show&quot; value=&quot;quickref&quot;/&gt;
		&lt;param name=&quot;pattern&quot; value=&quot;{searchTerms}&quot;/&gt;
	&lt;/url&gt;
	&lt;moz :SearchForm&gt;http://php.net/search.php&lt;/moz&gt;
&lt;/opensearchdescription&gt;
</pre>
<p>If you&#8217;re on a Windows XP box, save the XML as php.xml and plop it in:</p>
<pre class="brush: plain; title: ; notranslate">
c:/Documents and Settings/{user}/Application Data/Mozilla/Firefox/Profiles/{something}.default/searchplugins/
</pre>
<p>If you&#8217;re on a Mac, place php.xml in:</p>
<pre class="brush: plain; title: ; notranslate">
/Users/{user}/Library/Application Support/Firefox/Profiles/{something}.default/searchplugins/
</pre>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/firefox-search-plugin-for-phpnet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ajax Experience: Plan of Attack</title>
		<link>http://borkweb.com/story/the-ajax-experience-plan-of-attack</link>
		<comments>http://borkweb.com/story/the-ajax-experience-plan-of-attack#comments</comments>
		<pubDate>Fri, 20 Oct 2006 12:21:46 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Aaron Gustafson]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajaxian]]></category>
		<category><![CDATA[Alex Russell]]></category>
		<category><![CDATA[apache XAP]]></category>
		<category><![CDATA[bill scott]]></category>
		<category><![CDATA[Bob Buffone]]></category>
		<category><![CDATA[Chris Wilson]]></category>
		<category><![CDATA[Conrad Damon]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[dustin machi]]></category>
		<category><![CDATA[Dustin Whittle]]></category>
		<category><![CDATA[enterprise application]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[Matt Quinn]]></category>
		<category><![CDATA[Michael Mahemoff]]></category>
		<category><![CDATA[Molly Holzschlag]]></category>
		<category><![CDATA[Nate Koechley]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RAD]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[the ajax experience]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[Vic Patterson]]></category>
		<category><![CDATA[William Morris]]></category>
		<category><![CDATA[XAP]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/the-ajax-experience-plan-of-attack</guid>
		<description><![CDATA[The Ajax Experience is next Monday (although I arrive Sunday afternoon) through Wednesday and I&#8217;ve prepared my plan of attack: Monday 10:00am-11:30am: Leveraging Ajax for Enterprise Application Development &#8211; Conrad Damon 12:30pm-1:15pm: Keynote: Towards a Service-Oriented Applications Stack &#8211; Matt Quinn 1:30pm-3:00pm: Simplify Ajax development with Apache XAP &#8211; Bob Buffone 3:30pm-5:00pm: Ruining the User [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://borkweb.com/story/the-ajax-experience">The Ajax Experience</a> is next Monday (although I arrive Sunday afternoon) through Wednesday and I&#8217;ve prepared my plan of attack:</p>
<h2 id="_monday_1" >Monday</h2>
<p><strong>10:00am-11:30am</strong>: Leveraging Ajax for Enterprise Application Development &#8211; Conrad Damon<br />
<strong>12:30pm-1:15pm</strong>: Keynote: Towards a Service-Oriented Applications Stack &#8211; Matt Quinn<br />
<strong>1:30pm-3:00pm</strong>: Simplify Ajax development with Apache XAP &#8211; Bob Buffone<br />
<strong>3:30pm-5:00pm</strong>: Ruining the User Experience &#8211; Aaron Gustafson<br />
<strong>5:15pm-6:45pm</strong>: Scriptaculous &#8211; Justin Gehtland<br />
<strong>8:00pm-9:30pm</strong>: Expert Panel Discussion</p>
<h2 id="_tuesday_1" >Tuesday</h2>
<p><strong>8:30am-10:00am</strong>: Intro to Dojo &#8211; Alex Russell<br />
<strong>10:30am-12:00pm</strong>: Yahoo! Experiences with Accessibility, DHTML, and Ajax in Rich (Dunno what Rich is&#8230;probably the start of &#8220;Rich Internet Applications&#8221; [RIA], probably) &#8211; Nate Koechley<br />
<strong>1:00pm-1:45pm</strong>: Keynote: Ajax from AOL&#8217;s Perspective &#8211; William Morris<br />
<strong>2:00pm-3:30pm</strong>: RAD 2.0: Working with symfony (PHP) &#8211; Dustin Whittle<br />
<strong>4:00pm-5:30pm</strong>: Markup &#038; CSS for Developers: Empowering the Application Developer with Front End Magic &#8211; Molly Holzschlag<br />
<strong>7:00pm-7:45pm</strong>: Keynote: The Once &#038; Future Web &#8211; Chris Wilson<br />
<strong>9:00pm-10:30pm</strong>: Expert Panel Discussion</p>
<h2 id="_wednesday_1" >Wednesday</h2>
<p><strong>9:30am-10:30am</strong>: Designing for Ajax &#8211; Bill Scott<br />
<strong>11:00am-12:30pm</strong>: Dojo Cookbook &#8211; Dustin Machi</p>
<p>My schedule is subject to change based on buzz or sudden interest in other presentations.  I look forward to seeing what they have to offer and will be blogging along the way!</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/the-ajax-experience-plan-of-attack/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Remote JavaScripting Example &#8211; Part I</title>
		<link>http://borkweb.com/story/remote-javascripting-example-part-i</link>
		<comments>http://borkweb.com/story/remote-javascripting-example-part-i#comments</comments>
		<pubDate>Fri, 22 Sep 2006 15:47:59 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[matt batchelder]]></category>
		<category><![CDATA[matthew batchelder]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[zach tirrell]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/remote-javascripting-example-part-i</guid>
		<description><![CDATA[[[innerindex]]At Plymouth State we work in a multi-server environment and often wish to display dynamic content from one server in an Ajax-like fashion on another server&#8217;s website. My co-worker, Zach Tirrell, and I have drummed up a solution that works to keep our layout and logic separate, while still serving our end users in a [...]]]></description>
			<content:encoded><![CDATA[<p>[[innerindex]]At <a href="http://www.plymouth.edu">Plymouth State</a> we work in a multi-server environment and often wish to display dynamic content from one server in an Ajax-like fashion on another server&#8217;s website.  My co-worker, <a href="http://nosheep.net">Zach Tirrell</a>, and I have drummed up a solution that works to keep our <a href="http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic">layout and logic separate</a>, while still serving our end users in a smooth, seamless, non-iFramed manner.</p>
<p>I&#8217;ll walk through the creation of a <em>simple</em> search &#8216;widget&#8217; that relies on dynamic data to populate a drop-down box.</p>
<h2 id="_the-tools_1" >The Tools</h2>
<p>- <a href="http://php.net">PHP</a><br />
- JavaScript<br />
- <a href="http://xtpl.sf.net">XTemplate</a><br />
- <a href="http://borkweb.com/code/remote_widget/includes/RemoteJSOutput.class.phps">RemoteJSOutput</a>: a simple script by <a href="http://borkweb.com">Matthew Batchelder</a> (me) and <a href="http://nosheep.net">Zach Tirrell</a></p>
<h2 id="_step-1-create-your-t_1" >Step 1: create your template</h2>
<p>This widget is fairly simple and thus has a simple template.  The template syntax is simply <a href="http://xtpl.sf.net">XTemplate</a> syntax.  </p>
<p>I&#8217;ll name it <strong>widget.tpl</strong> and store it in a templates directory.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- BEGIN: main --&gt;
&lt;div id=&quot;sweet_borkweb_widget&quot; style=&quot;background:#eee;border:1px solid #ccc;text-align:center;&quot;&gt;
  &lt;div style=&quot;color:#000;&quot;&gt;A Couple JavaScript Posts at BorkWeb&lt;/div&gt;
  &lt;select id=&quot;borkweb_posts&quot;&gt;
    &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
  &lt;!-- BEGIN: post --&gt;
    &lt;option value=&quot;{post.url}&quot;&gt;{post.title}&lt;/option&gt;
  &lt;!-- END: post --&gt;
  &lt;/select&gt;
&lt;/div&gt;
&lt;!-- END: main --&gt;
</pre>
<h2 id="_step-2-simple-templa_1" >Step 2: simple template output</h2>
<p>First we&#8217;ll just spit out the template.  Lets create a PHP file to do this.  We&#8217;ll call it <strong>widget.php</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
include('includes/xtemplate.php');
$xtpl = new XTemplate('templates/widget.tpl');

$xtpl-&gt;parse('main');
$xtpl-&gt;out('main');
?&gt;
</pre>
<p>Check out your widget so far.  Its plain.  Lets change that.</p>
<h2 id="_step-3-add-dynamic-c_1" >Step 3: add dynamic content</h2>
<p>We want the drop down list to hold BorkWeb articles.  We&#8217;ll add that in now.</p>
<p>Note: this is where you would normally pull from a database, an RSS feed, or some other source.  For simplicty, we&#8217;ll be using a simple PHP array.  Whoop-de-doo.  Here it is:</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
include('includes/xtemplate.php');
$xtpl = new XTemplate('templates/widget.tpl');

//get list of articles
$articles=array(
  array('title'=&gt;'Ajax, More Than A Buzz Word','url'=&gt;'http://borkweb.com/story/ajax-more-than-a-buzz-word'),
  array('title'=&gt;'Ajax; Templating; and the Separation of Layout and Logic','url'=&gt;'http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic'),
  array('title'=&gt;'Deleting the Internet','url'=&gt;'http://borkweb.com/story/deleting-the-internet'),
  array('title'=&gt;'Node Manipulation in the DOM','url'=&gt;'http://borkweb.com/story/node-manipulation-in-the-dom'),
  array('title'=&gt;'Prototype Cheat Sheets','url'=&gt;'http://borkweb.com/story/prototype-cheat-sheets'),
  array('title'=&gt;'Script.aculo.us Is My New Best Friend','url'=&gt;'http://borkweb.com/story/scriptaculous-is-my-new-best-friend'),
  array('title'=&gt;'The Case For JSON: What Is It and Why Use It?','url'=&gt;'http://borkweb.com/story/the-case-for-json-what-is-it-and-why-use-it')
);

//loop over articles and place in template
foreach($articles as $article)
{
  $xtpl-&gt;assign('post',$article);
  $xtpl-&gt;parse('main.post');
}//end foreach

$xtpl-&gt;parse('main');
$xtpl-&gt;out('main');
?&gt;
</pre>
<p>Check out your widget now.  It has been populated with some data!  w00t!  Now to make it work, we return to our beloved <strong>widget.tpl</strong> template file.</p>
<h2 id="_step-4-make-the-temp_1" >Step 4: make the template work</h2>
<p>We&#8217;re going to add in some javascript.  Lets make the dropdown list redirect the user to the selected article when the drop-down box changes.</p>
<p>I&#8217;m going to add this on our select box:</p>
<pre class="brush: xml; title: ; notranslate">
 onchange=&quot;if(document.getElementById('borkweb_posts').value!='') document.location=document.getElementById('borkweb_posts').value;&quot;
</pre>
<p>The template should now look like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- BEGIN: main --&gt;
&lt;div id=&quot;sweet_borkweb_widget&quot; style=&quot;background:#eee;border:1px solid #ccc;text-align:center;&quot;&gt;
  &lt;div style=&quot;color:#000;&quot;&gt;A Couple JavaScript Posts at BorkWeb&lt;/div&gt;
  &lt;select id=&quot;borkweb_posts&quot; onchange=&quot;if(document.getElementById('borkweb_posts').value!='') document.location=document.getElementById('borkweb_posts').value;&quot;&gt;
    &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
  &lt;!-- BEGIN: post --&gt;
    &lt;option value=&quot;{post.url}&quot;&gt;{post.title}&lt;/option&gt;
  &lt;!-- END: post --&gt;
  &lt;/select&gt;
&lt;/div&gt;
&lt;!-- END: main --&gt;
</pre>
<h2 id="_step-5-prepare-scrip_1" >Step 5: prepare script for remoting</h2>
<p>Now that our lovely widget is functioning, lets prepare it for inclusion in other locations.  This is simple using <a href="http://borkweb.com/code/remote_widget/includes/RemoteJSOutput.class.php">RemoteJSOutput</a> (a simple script written by <a href="http://nosheep.net">Zach Tirrell</a> and <a href="http://borkweb.com">myself</a>).  </p>
<p>We&#8217;ll include that PHP class and use it as follows:</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
include('includes/RemoteJSOutput.class.php');
$remoteOutput=new RemoteJSOutput();

//start output buffering via
$remoteOutput-&gt;start();

include('includes/xtemplate.php');
$xtpl = new XTemplate('templates/widget.tpl');

//get list of articles
$articles=array(
  array('title'=&gt;'Ajax, More Than A Buzz Word','url'=&gt;'http://borkweb.com/story/ajax-more-than-a-buzz-word'),
  array('title'=&gt;'Ajax; Templating; and the Separation of Layout and Logic','url'=&gt;'http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic'),
  array('title'=&gt;'Deleting the Internet','url'=&gt;'http://borkweb.com/story/deleting-the-internet'),
  array('title'=&gt;'Node Manipulation in the DOM','url'=&gt;'http://borkweb.com/story/node-manipulation-in-the-dom'),
  array('title'=&gt;'Prototype Cheat Sheets','url'=&gt;'http://borkweb.com/story/prototype-cheat-sheets'),
  array('title'=&gt;'Script.aculo.us Is My New Best Friend','url'=&gt;'http://borkweb.com/story/scriptaculous-is-my-new-best-friend'),
  array('title'=&gt;'The Case For JSON: What Is It and Why Use It?','url'=&gt;'http://borkweb.com/story/the-case-for-json-what-is-it-and-why-use-it')
);

//loop over articles and place in template
foreach($articles as $article)
{
  $xtpl-&gt;assign('post',$article);
  $xtpl-&gt;parse('main.post');
}//end foreach

$xtpl-&gt;parse('main');
$xtpl-&gt;out('main');

//spit out script encased in JS
$remoteOutput-&gt;puke();
?&gt;
</pre>
<p>Now check out your widget.  Ugly, huh?  Well, don&#8217;t worry, thats the way its supposed to look for now.</p>
<h2 id="_step-6-place-your-wi_1" >Step 6: place your widget somewhere</h2>
<p>Now that we have that beautiful chunk of code in operation, place it on a webpage somewhere.  </p>
<p>Put this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://url.to/your/widget.php&quot;&gt;&lt;/script&gt;
</pre>
<p>on any page you wish to test your widget!</p>
<h2 id="_optional-step-7-crea_1" >Optional Step 7: create a wrapper</h2>
<p>If, like me, you aren&#8217;t a fan of including RemoteJSOutput.class.php all over hell&#8217;s half acre, you can create a wrapper.  This not only allows you to minimize the code you have to repeatedly place everywhere, but it also keeps your <strong>widget.php</strong> script functional on its own!</p>
<p>Here&#8217;s an example wrapper I&#8217;ll call <strong>get_script.php</strong> which will display <strong>wrapper_widget.php</strong> (step 3&#8242;s PHP file, renamed):</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
include('includes/RemoteJSOutput.class.php');
$remoteOutput=new RemoteJSOutput();

//start output buffering via
$remoteOutput-&gt;start();

//create a list of allowable widgets/scripts/yadda yadda
$allow=array('wrapper_widget');

//does the passed variable exist in the allowable widgets?
if(in_array($_GET['script'],$allow))
{
  //include the wrapper
  include($_GET['script'].'.php');
}//end if

//spit out script encased in JS
$remoteOutput-&gt;puke();
?&gt;
</pre>
<p>So rather than using the script tag that Step 6 suggests, we&#8217;d use:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://url.to/your/get_script.php?script=wrapper_widget&quot;&gt;&lt;/script&gt;
</pre>
<h2 id="_conclusion_1" >Conclusion</h2>
<p>This method is simplistic and is simply touching on the topic of widgetization.  I will be following up with dynamic user interactions in Part II, and finally discuss an open-standard widget library with xml definitions.  Stay tuned :)</p>
<h2 id="_download_1" >Download</h2>
<p>Oh, and <a href="http://borkweb.com/code/remote_widget/remote_widget.zip">here&#8217;s the code</a> used in this tutorial all zipped up.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/remote-javascripting-example-part-i/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Learning What I Know</title>
		<link>http://borkweb.com/story/learning-what-i-know</link>
		<comments>http://borkweb.com/story/learning-what-i-know#comments</comments>
		<pubDate>Tue, 15 Aug 2006 23:42:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[suggestions]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/learning-what-i-know</guid>
		<description><![CDATA[I recently received an e-mail from one of my subscribers that asked a question. The answer may be useful to some so I&#8217;m placing it here. The original question It seems so interesting developing websites application these days, thanks to the web 2.0 phenomena. I can&#8217;t call myself a web developer or anything near that, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently received an e-mail from one of my subscribers that asked a question.  The answer may be useful to some so I&#8217;m placing it here.</p>
<h3 id="_the-original-questio_1" >The original question</h3>
<blockquote><p>
It seems so interesting developing websites application these days, thanks to the web 2.0 phenomena. I can&#8217;t call myself a web developer or anything near that, but I&#8217;m interested to learn these kind of [things].</p>
<p>[...]</p>
<p>Since you seem to be real world developer to me, I have a couple of questions to ask you. I&#8217;ve been messing around with XHTML, CSS, Javascript, PHP and MySQL [for] a couple of months now, and it frustrates me sometimes when I sort of forget things and [can]&#8216;t understand the flow of the design of what I&#8217;m trying to achieve. [..]</p>
<p>Based on your experience, do you do everything by your own, i mean there are the front end and the back end [things], do you do both?</p>
<p>Talking of object oriented programming (i guess that&#8217;s what prototype, script.aculo.us and ajax are really about), which OOP did u learn first? I [learned] simple Java before but does that come into play for web development as well? I mean, does it help if i go into detail learning Java?</p>
<p>Any other useful advice? I would appreciate your comments. Thank you.
</p></blockquote>
<h3 id="_my-reply_1" >My Reply</h3>
<p>Web 2.0 phenomenon&#8230;Yeah, its good to stay on top of things like that :)</p>
<p>Development.  <a href="http://www.w3schools.com/xhtml/default.asp">XHTML</a>, <a href="http://w3schools.com/css/">CSS</a>, <a href="http://en.wikipedia.org/wiki/Javascript">Javascript</a>, <a href="http://php.net">PHP</a> and <a href="http://mysql.org">MySQL</a>&#8230;I do it all, however, I did not learn them all at once&#8230;but over a series of years.  I think the key concept is to really try and keep your logic from your design &#8211; keep the MySQL/PHP side of things separate from the XHTML/CSS side of things ( e.g. <a href="http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic">Ajax, Templating, and the Separation of Layout and Logic</a>).  Javascript is a bit of a wildcard and bridges between both the presentation and logic. </p>
<p>You can do the above with and without <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">Object Oriented Programming</a>&#8230;although OOP is the preferred method.  My first OOP language was <a href="http://java.sun.com">Java</a>. Next I branched out to Object Oriented PHP, and finally (last year) I learned Object Oriented Javascript. </p>
<p>All you really need is the OO concept in your head before you branch out and if you&#8217;ve used Java, you should be good to go.  So to answer your question: &#8220;Does it help if you go into detail learning Java.&#8221; is this:  It won&#8217;t hurt, but isn&#8217;t necessary to succeed in learning the above languages/tools.  When using Object Orientation and switching languages, its all about learning the syntax and the gotchas associated with your chosen language.</p>
<p>The biggest chunks of advice I can give regarding your tools of choice are as follows:</p>
<h3 id="_xhtmlcss_1" >XHTML/CSS</h3>
<ul>
<li>keep it simple</li>
<li>use ids/classes rather than inline styles</li>
</ul>
<h3 id="_php_1" >PHP</h3>
<ul>
<li>live on php.net</li>
<li>learn through irritation with your own code&#8230;mine goes through constant revisions and optimizations<br />
- pick up a templating engine to help keep your layout and logic separate.  I use <a href="http://xtpl.sf.net">XTemplates</a>.  I&#8217;m thinking about looking into <a href="http://smarty.php.net/">SmartyTemplates</a>&#8230;.use whatever you wish&#8230;but templates save TONS of time.</li>
</ul>
<h3 id="_mysql_1" >MySQL</h3>
<ul>
<li>know your data</li>
<li>know how to normalize your data</li>
<li>download open source applications and look at their database structure for a good idea of what their doing and go from there</li>
</ul>
<h3 id="_javascript_1" >Javascript</h3>
<ul>
<li>Learn to <a href="http://borkweb.com/story/node-manipulation-in-the-dom">manipulate the DOM</a></li>
<li>Learn <a href="http://borkweb.com/story/object-oriented-javascript">OO Javascript</a></li>
<li>THEN tackle <a href="http://borkweb.com/story/prototype-makes-javascript-painless">Prototype</a> and <a href="http://borkweb.com/story/scriptaculous-is-my-new-best-friend">Script.aculo.us</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/learning-what-i-know/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Your Server-Side Ajax Handler</title>
		<link>http://borkweb.com/story/a-simple-server-side-ajax-handler</link>
		<comments>http://borkweb.com/story/a-simple-server-side-ajax-handler#comments</comments>
		<pubDate>Wed, 22 Mar 2006 13:02:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax handler]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[handler]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[matt batchelder]]></category>
		<category><![CDATA[matthew batchelder]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[script.aculo.us]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/a-simple-server-side-ajax-handler</guid>
		<description><![CDATA[[[innerindex]]In my recent post on &#8216;Ajax; Templating; and the Separation of Layout and Logic,&#8217; I refer to an Ajax Handler that sits server side to handle Ajax calls. Some elaboration is in order. As I have stated in the past, I&#8217;m a huge fan of Prototype AND I choose PHP as my language of choice&#8230;so [...]]]></description>
			<content:encoded><![CDATA[<p>[[innerindex]]In my recent post on &#8216;<a href="http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic">Ajax; Templating; and the Separation of Layout and Logic</a>,&#8217; I refer to an Ajax Handler that sits server side to handle Ajax calls.  Some elaboration is in order.</p>
<p>As I have <a href="http://borkweb.com/story/prototype-makes-javascript-painless">stated in the past</a>, I&#8217;m a huge fan of <a href="http://prototype.conio.net/">Prototype</a> AND I choose <a href="http://php.net">PHP</a> as my language of choice&#8230;so my examples will be using both, but the idea is portable.</p>
<h2 id="_set-up-your-function_1" >Set up your Functions</h2>
<p>Before you create a handler, you need a set of functions that the handler can reference.  Here&#8217;s an example:</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
function world($params='')
{
  return 'Goodbye Cruel World.';
}//end world

function sweetWorldAction($params='')
{
  //we expect params to be an array or a string similar to a parameter string from a GET..i.e. &quot;bork=asdf&amp;cheese=yes please&quot;
  //parse out the variables
  if(!is_array($params))
  {
    parse_str($params,$params);
  }//end if

  //do your logic here
}//end sweetWorldAction
?&gt;
</pre>
<p>Now that we have the functions all set, we&#8217;ll set up a handler that receives Ajax calls and calls the appropriate functions.  </p>
<h2 id="_the-eval-method-a-dy_1" >The Eval Method &#8211; A Dynamic Handler</h2>
<p>This method is one that I toyed around with for a while and I&#8217;ll admit that its pretty simple and clean but there are some drawbacks.  We&#8217;re going to make a few assumptions: All requests will be GET (this is to keep things simple for this example) and we will keep the complexity of .htaccess sweetness out of these examples and assume that each call will be passing a <strong>function</strong> variable that specifies the function we are calling.  I&#8217;ll get to those in a second&#8230;but first I&#8217;ll show you the handler code in this Eval Method:</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
//if the user leaves the page or closes the browser prematurely, this will help prevent half completed statements
ignore_user_abort();

include('functions.php');

//list out your Ajax accessible functions
$valid_functions = array('world','sweetWorldAction');

if($_GET['function'] &amp;&amp; in_array($_GET['function'],$valid_functions))
{
  //get the get parameters
  $params = $_GET;
  //unset the function index from the params because we just don't need it there
  unset($params['function']);

  //build your parameter string:
  $param_string='';
  foreach($params as $key=&gt;$param)
  {
    $param_string.=(($param_string)?'&amp;':'').$key.'='.$param;
  }//end foreach

  //make your function call
  eval($_GET['function'].&quot;('$param_string');&quot;);
}//end if

?&gt;
</pre>
<h2 id="_the-variable-variabl_1" >The Variable Variable Method &#8211; A Dynamic Handler</h2>
<p>This method (compliments of <a href="http://phpdeveloper.org">PHPDeveloper</a>) is simpler than the Eval Method and just as dynamic.</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
//if the user leaves the page or closes the browser prematurely, this will help prevent half completed statements
ignore_user_abort();

include('functions.php');

//list out your Ajax accessible functions
$valid_functions = array('world','sweetWorldAction');

if($_GET['function'] &amp;&amp; in_array($_GET['function'],$valid_functions))
{
  //get the get parameters
  $params = $_GET;
  //unset the function index from the params because we just don't need it there
  unset($params['function']);
  //make your function call
  $_GET['function']($params);
}//end if

?&gt;
</pre>
<h2 id="_the-switch-method-a-_1" >The Switch Method &#8211; A Basic Handler</h2>
<p>This method handles each call individually.  The reason for using switch rather than if-elses is simply because your application will most likely possess a large number of Ajax-ified functions and those if-elses would be ghastly to read <em>and</em> decrease performance&#8230;the Switch statement is much cleaner.</p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
//if the user leaves the page or closes the browser prematurely, this will help prevent half completed statements
ignore_user_abort();

include('functions.php');

if($_GET['function'])
{
  switch $_GET['function']
  {
    case 'world':
      echo world();
      exit;
    break;
    case 'sweetWorldAction':
      echo sweetWorldAction();
      exit;
    break;
  }//end switch
}//end if

?&gt;
</pre>
<h2 id="_make-a-choice_1" >Make a Choice</h2>
<p>Which are you going to use?  While the <strong>Eval</strong> and <strong>Variable Variable</strong> Methods contain very small amounts of code in the handlers, the logic has simply been shifted to the functions themselves.  Increased Ajax-geared logic within the functions themselves <strong>reduces portability</strong>.  However, in the <strong>Switch Method</strong>, logic is organized in a fairly easy to follow manner while making use of very generic functions that can be used in multiple fashions.  Obviously, the Switch Method is my preferred choice :)</p>
<h2 id="_in-closing_1" >In Closing</h2>
<p>Handler scripts make the Ajax magic happen and the separation of handler logic from your application logic is just as important for robust development and debugging as the need for separation of layout and logic.  Play around with the above methods and see which works for you.  If you have a method all your own, I&#8217;d be interested to hear it!</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/a-simple-server-side-ajax-handler/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Script.aculo.us Is My New Best Friend</title>
		<link>http://borkweb.com/story/scriptaculous-is-my-new-best-friend</link>
		<comments>http://borkweb.com/story/scriptaculous-is-my-new-best-friend#comments</comments>
		<pubDate>Mon, 19 Dec 2005 05:13:39 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[MasterWish]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plymouth]]></category>
		<category><![CDATA[plymouth state]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[psu]]></category>
		<category><![CDATA[sajax]]></category>
		<category><![CDATA[script.aculo.us]]></category>
		<category><![CDATA[visual controls]]></category>
		<category><![CDATA[visual effects]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://www.borkweb.com/?p=128</guid>
		<description><![CDATA[Ajax is great. DOM manipulation is sexy. I&#8217;m fairly new to the Ajax world having only developed with with it since July. MasterWish was my guinea pig and continues to be my playground for all things Web 2.0. Luckily, my manager Ken is pumped up about this whole Web 2.0/Ajax thing which has allowed me [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://script.aculo.us"><img src='http://www.borkweb.com/wp-content/upload/scriptaculous.gif' align="left" class="post_image"/></a> <a href="http://www.borkweb.com/story/ajax-more-than-a-buzz-word">Ajax</a> is great.  <a href="http://en.wikipedia.org/wiki/Document_Object_Model">DOM</a> manipulation is sexy.  I&#8217;m fairly new to the Ajax world having only developed with with it since July.  <a href="http://www.masterwish.com">MasterWish</a> was my guinea pig and continues to be <a href="http://www.borkweb.com/story/masterwish-enters-the-web-20-world">my playground</a> for all things <a href="http://en.wikipedia.org/wiki/Web_2.0">Web 2.0</a>.  Luckily, my manager <a href="http://ken.blogs.plymouth.edu">Ken</a> is pumped up about this whole Web 2.0/Ajax thing which has allowed me to experiment with my projects at work as well and <a href="http://www.plymouth.edu">PSU</a> should expect to see some sweet apps roll out over the next year!</p>
<p>Since July, I&#8217;ve been developing my Ajax applications and examples using SAJAX (Simple Ajax), a PHP/Javascript framework for Ajax development.  It was great at first glance&#8230;a lot easier than building Asynchronous Javascript transactions from scratch.  But despite its ease, it was a bit clunky.  Last week I was stumbling around the web looking for anything new to suck up and found a beauty of a tool.  <a href="http://script.aculo.us/">Script.aculo.us</a>. </p>
<p>Script.aculo.us is a Javascript Effects and Control framework developed by <a href="http://mir.aculo.us">Thomas Fuchs</a>, a software architect living in Vienna, Austria who, like me, was disappointed by current web application frameworks that made no sense to him.  His framework is 3 things: <strong>Easy to Use, Simple, and Easy to Use</strong>.  His libraries &#8211; built off of the Ajax framework, <a href="http://prototype.conio.net/">Prototype</a> &#8211; blow SAJAX out of the water!  Let me give you an example to, say, update a news title on an article (I won&#8217;t include the HTML markup as that is trivial):</p>
<p><strong>Here&#8217;s what needs to be done to build a SAJAX call:</strong></p>
<p><em>Step 1: Create a SAJAX Call Function</em></p>
<pre class="brush: jscript; title: ; notranslate">
function x_updateTitle()
{
	sajax_do_call('/process_ajax.php',&quot;x_updateTitle&quot;, x_updateTitle.arguments);
}
</pre>
<p><em>Step 2: Create a server side function to handle the update</em></p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
function x_updateTitle($news_id,$news_title)
{
	//do some database calls to update the title;
}
?&gt;
</pre>
<p><em>Step 3: Edit the server side SAJAX file (process_ajax.php) and add x_updateTitle to the list of valid call functions</em></p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
include('sajax.php');
addFunctions('x_updateTitle');
handleClientRequest();
?&gt;
</pre>
<p><em>Step 4: Call the SAJAX Javascript function from somewhere (in an onClick, onSubmit or something)</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;a onClick=&quot;x_updateTitle(1, document.getElementById('news_title').value, 'callbackFunction');&quot;&gt;asdfdf&lt;/a&gt;
</pre>
<p><strong>Here&#8217;s the equivalent in Script.aculo.us</strong><br />
<em>Step 1: Create a server side function to handle the update</em></p>
<pre class="brush: php; title: ; notranslate">
&lt; ?php
function x_updateTitle($news_id,$news_title)
{
	//do some database calls to update the title;
}
?&gt;
</pre>
<p><em>Step 2: Call the Script.aculo.us Javascript function from somewhere (in an onClick, onSubmit or something)</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;a onClick=&quot;new Ajax.Request('/process_ajax.php', { asynchronous:true, parameters:'news_id=1&amp;news_title=$(\'news_title\')', onSuccess:callbackFunction });&quot;&gt;asdf&lt;/a&gt;
</pre>
<p><strong>Thats it!</strong>  Its a big difference.  Thats just the tip of the iceberg.  Script.aculo.us has many features for implementing <strong>Drag and Drop with one line</strong> of Javascript code; fancy display/hide functions; dynamic DOM Element creation/deletion; field autocompletion; and various other visual effects.  It slick.  And to top it off, the Script.aculo.us website is pretty sweet!  Luckily the <a href="http://wiki.script.aculo.us/">documentation</a> is excellent and is in wiki format.  As Plymouth State moves into the Web 2.0 world, I&#8217;ll be pushing for Script.aculo.us/Prototype to be our Ajax standard.  <strong>I have seen the light and it is good</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/scriptaculous-is-my-new-best-friend/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

