<?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>WhyPad &#187; Web Development</title>
	<atom:link href="http://www.whypad.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whypad.com</link>
	<description>Tips, tricks, and hacks for life and tech...</description>
	<lastBuildDate>Tue, 06 Jul 2010 15:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress: Add Your Plugin&#8217;s Settings Link to Admin Plugins Page</title>
		<link>http://www.whypad.com/posts/wordpress-add-settings-link-to-plugins-page/785/</link>
		<comments>http://www.whypad.com/posts/wordpress-add-settings-link-to-plugins-page/785/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 04:20:28 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=785</guid>
		<description><![CDATA[Hello, WordPress plugin authors!  I&#8217;ve been envious of that little &#8220;Settings&#8221; link on the Plugins page in the Admin on several of the plugins I use on my blogs.  I wanted one for my own PhotoSmash plugin! My first stop, Google, yielded no fruit, but persistence paid off.  So, thanks to GD-Star Ratings and Shadowbox-JS, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.whypad.com/posts/wordpress-add-settings-link-to-plugins-page/785/"><img class="alignleft size-thumbnail wp-image-715" title="wp" src="http://www.whypad.com/wp-content/uploads/wp-150x150.png" alt="" width="150" height="150" /></a>Hello, WordPress plugin authors!  I&#8217;ve been envious of that little &#8220;Settings&#8221; link on the Plugins page in the Admin on several of the plugins I use on my blogs.  I wanted one for my own PhotoSmash plugin!</p>
<p><span id="more-785"></span></p>
<p>My first stop, Google, yielded no fruit, but persistence paid off.  So, thanks to GD-Star Ratings and Shadowbox-JS, I finally figured it out!</p>
<p>And now, for your coding pleasure, here&#8217;s the step-by-step:</p>
<h2>Steps for Showing Settings Link</h2>
<p>1. Add a function that injects your link into the links array.  The array_unshift adds your link to the front of the array.  The $this_plugin wizardry is determining whether this instance of the filter is being called for your plugin or another one.  You only want to add the link to your plugin <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .  Here&#8217;s the code:</p>
<pre class="brush: php;">

/**
 * Add Settings link to plugins - code from GD Star Ratings
 */
 function add_settings_link($links, $file) {
static $this_plugin;
if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);

if ($file == $this_plugin){
$settings_link = '&lt;a href=&quot;admin.php?page=bwb-photosmash.php&quot;&gt;'.__(&quot;Settings&quot;, &quot;photosmash-galleries&quot;).'&lt;/a&gt;';
 array_unshift($links, $settings_link);
}
return $links;
 }
</pre>
<p>Of course, you&#8217;ll need to change the page link as appropriate.  The easiest way to get that is to go to your plugin&#8217;s settings page and copy it from the URL.  You want everything after the last forward slash &#8220;/&#8221;. Screenshot!</p>
<p><a href="http://www.whypad.com/wp-content/uploads/plugin-url.png"><img class="aligncenter size-full wp-image-786" title="plugin-url" src="http://www.whypad.com/wp-content/uploads/plugin-url.png" alt="" width="480" height="51" /></a></p>
<p>2. Add a filter for the plugin_action_links filter. When the Plugins page is displayed in Admin, this filter will pass your function the links array.  Here&#8217;s the code:</p>
<pre class="brush: php;">

add_filter('plugin_action_links', array(&amp;$bwbPS, 'add_settings_link'), 10, 2 );
</pre>
<p>Note this part:  array(&amp;$bwbPS, &#8216;add_settings_link&#8217;)</p>
<p>If you&#8217;re putting your function inside a class, you need to use an array as a parameter, with your plugin&#8217;s instance variable&#8230;mine is $bwbPS.  The &#8220;&amp;&#8221; in front of the instance variable tells it to use the instance by reference (which I believe is automatic for objects anyway, but just do it <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).  The part after the &#8216;,&#8217; is the function name we&#8217;re calling.  You can name it whatever you like.</p>
<p>If you&#8217;re not placing your function inside a class, then you&#8217;re code will look like:</p>
<pre class="brush: php;">

add_filter('plugin_action_links', 'add_settings_link', 10, 2 );
</pre>
<p>But you&#8217;re going to want to make sure your function name is totally unique in the whole WordPress world.  Otherwise, POW!  Namespace collision.</p>
<p>Hope that helps!  It&#8217;s easy, and it&#8217;s so very helpful to have that link there.  I just love a plugin that has it because I don&#8217;t have to search for it in the sidebar, and secondly, I figure that the coder must know what he/she&#8217;s doing <img src='http://www.whypad.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Cheers,</p>
<p>Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=785&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/wordpress-add-settings-link-to-plugins-page/785/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Add Scripts to the Pages You Want</title>
		<link>http://www.whypad.com/posts/wordpress-add-scripts-to-the-pages-you-want/749/</link>
		<comments>http://www.whypad.com/posts/wordpress-add-scripts-to-the-pages-you-want/749/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:18:47 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=749</guid>
		<description><![CDATA[WordPress makes it very easy to load Scripts into your blog. The beauty of the method that WordPress provides is that it allows plugins and themes to use the same script at the same time by ensuring the script is loaded only once.   The problem we often run into is that not everyone plays [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.whypad.com/wp-content/uploads/Lisu_script.gif"><img class="alignleft size-thumbnail wp-image-748" title="Lisu_script" src="http://www.whypad.com/wp-content/uploads/Lisu_script-150x150.gif" alt="" width="150" height="150" /></a>WordPress makes it very easy to load Scripts into your blog. The beauty of the method that WordPress provides is that it allows plugins and themes to use the same script at the same time by ensuring the script is loaded only once.  </p>
<p><span id="more-749"></span></p>
<p>The problem we often run into is that not everyone plays by the rules, and so you get plugin conflicts and fatal errors!</p>
<p>In this tip, I&#8217;ll show you how easy it is load scripts the right way with wp_enqueue_script and also, how to load them on only the pages you want.</p>
<h2>Load Scripts the Right Way with wp_enqueue_script()</h2>
<p>I have a couple of plugins out there that use jQuery and Thickbox, and probably 30% of my support questions are related to themes and/or plugins that load jQuery by hardcoding the link into the header!  This is a major sin by developers, because it assumes that your theme or your plugin is the only one in the whole wide world that your users will be using that rely on jQuery.  </p>
<p>When the jQuery (or really any other script) is hardcoded by a theme or plugin and it is loaded by another plugin (right way or wrong way), jQuery stops working!</p>
<p>WordPress, thankfully makes it amazingly simple to load jQuery and a ton of other scripts.  Here&#8217;s how:</p>
<pre class="brush: php;">
&lt;?php
//To load a script that isn't already registered with WordPress (it has a ton of pre-registered scripts like jQuery, Thickbox, etc)
wp_enqueue_script( $handle, $source, $deps, $ver, $in_footer );

//Here's one loading a script that's in my template folder
wp_enqueue_script('stlouie',get_bloginfo('template_url') . '/js/stl.js');

//Here's one loading a pre-registered script
wp_enqueue_script('jquery');
?&gt;
</pre>
<p>Check out the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">WP Codex page</a> for a full description of how to use wp_enqueue_script and a list of the pre-registered javascripts that you can easily use.</p>
<p><strong>Note: I was trying to use wp_enqueue_script with TinyMCE outside of the Admin, and it didn&#8217;t work.  So, some scripts might be Admin Only&#8230;not sure <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </strong></p>
<h2><strong>Where to Use wp_enqueue_script()</strong></h2>
<p>If you want to use wp_enqueue_script() in your posts and pages, and you want to limit it to certain pages or posts, you can put the following in your theme&#8217;s functions.php file:</p>
<pre class="brush: php;">
&lt;?php
add_action('wp_print_scripts', 'enqueueMyScripts');

function enqueueMyScripts(){
  // To load a script only on a Page with ID = 23, follow this format:
    if( is_page('23') ) {
         wp_enqueue_script( 'myscript', get_bloginfo('template_url') . '/js/myscript.js');
   }

  //To load for any page/post that's not Admin
   if( !is_admin() ){
        wp_enqueue_script( 'myscript', get_bloginfo('template_url') . '/js/myscript.js');
   }

  //You can use pretty much any of the WP conditional tags to determine whether to enqueue or not
}
?&gt;
</pre>
<p>Here&#8217;s the link to the <a href="http://codex.wordpress.org/Conditional_Tags">WP Conditional Tags</a>.</p>
<p>Notice that you need to tap into the wp_print_scripts action instead of the &#8216;init&#8217; action since is_page() is not available yet in the init action.</p>
<p>I&#8217;ve recorded this because it took me a good bit of time to figure out to use wp_print_scripts instead of init&#8230;Placing the add_action() inside header.php didn&#8217;t work either. Vladimir Prelovac&#8217;s <a href="http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin">helpful post</a> put me on the right track&#8230;He also has a great book,<a href="http://www.amazon.com/gp/product/1847193595?ie=UTF8&amp;tag=byronbennett-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847193595">WordPress Plugin Development (Beginner&#8217;s Guide)</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=byronbennett-20&amp;l=as2&amp;o=1&amp;a=1847193595" border="0" alt="" width="1" height="1" />*! This book was very helpful to me with several techniques, particularly around adding images to the WordPress media library.</p>
<p>Cheers,<br />
Byron</p>
<p>* Note: the link to Vladimir&#8217;s book is my affiliate link, and I&#8217;ll receive a small commission should you click and buy.</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=749&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/wordpress-add-scripts-to-the-pages-you-want/749/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress ReWrite &#8211; new Plugin Coming and a Hint</title>
		<link>http://www.whypad.com/posts/wordpress-rewrite-new-plugin-coming-and-a-hint/738/</link>
		<comments>http://www.whypad.com/posts/wordpress-rewrite-new-plugin-coming-and-a-hint/738/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 06:08:07 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=738</guid>
		<description><![CDATA[First of all, let me start by saying that Custom ReWriting in WordPress has consumed way more of my time than it ever should have.  I have prayed and pleaded, even considered asking one of the WordPress Gurus on their message board, but I&#8217;ve not had much luck getting responses there (questions were probably so [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, let me start by saying that Custom ReWriting in WordPress has consumed way more of my time than it ever should have.  I have prayed and pleaded, even considered asking one of the WordPress Gurus on their message board, but I&#8217;ve not had much luck getting responses there (questions were probably so esoteric that nobody cared but me <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p><span id="more-738"></span></p>
<p>Finally, I have my new plugin working, I think!  It gives you an interface in the Admin for setting up your ReWrite Rules and then handles all the rest behind the scenes.  I&#8217;m not sure how robust it is, but it meets my needs.</p>
<p>I had 2 humongous problems that ate up 10 hours or more of my time.  Hope this helps you if you decide not to go the easy route and just you Smashly ReWriter (coming soon to a download near you!).</p>
<h2>Page ID, ID, Post ID, PageName, P</h2>
<p>The aliases for getting a page to come up in WP are nearly endless.  But when using $wp_rewrite rules, you have to be careful.  While index.php?page_id=245 might work for a post if you type it into a browser, save yourself, oh, about 6 hours and make sure you match up Pages with ?page_id= and Posts with ?p= when creating rewrite rules.</p>
<h2>&amp;amp; or &amp; ?</h2>
<p>Save yourself another 4 hours and don&#8217;t try to get fancy and write your urls the way you think they ought to be to be XHTML compliant&#8230;that is, using &amp;amp; to join multiple query variables.  Sometimes it doesn&#8217;t pay to be too proper.</p>
<p>A good xhtml url would have parameters inserted like:  state=NC&amp;amp;city=CLT</p>
<p>WP Rewriter wants it just plain ole:  state=NC&amp;city=CLT</p>
<p>Well, I hope the new plugin will help somebody out there.  I&#8217;m planning to release in the next few days over on <a href="http://smashly.net">Smashly.net</a>.  It makes this business about as simple as I can possibly come up with.  Hopefully some RegEx wizards will contribute some common match rules to help people along.</p>
<p>Cheers,</p>
<p>Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=738&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/wordpress-rewrite-new-plugin-coming-and-a-hint/738/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Radio Buttons not Showing Checked in FireFox</title>
		<link>http://www.whypad.com/posts/firefox-radio-button-bug/559/</link>
		<comments>http://www.whypad.com/posts/firefox-radio-button-bug/559/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 21:36:23 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=559</guid>
		<description><![CDATA[In the process of building a WordPress plugin that I&#8217;m sure will sweep the nation  , I came across a really annoying FireFox bug with Radio Buttons.  The problem is that if you two groups of Radio Buttons (say 3 buttons in each group) and you set one button as Checked in each group, sometimes, [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of building a WordPress plugin that I&#8217;m sure will sweep the nation <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , I came across a really annoying FireFox bug with Radio Buttons.  The problem is that if you two groups of Radio Buttons (say 3 buttons in each group) and you set one button as Checked in each group, sometimes, the button in the first group won&#8217;t show up as Checked.  Arrrgghhhh!<span id="more-559"></span></p>
<h2>Radio Buttons not Showing Checked &#8211; a FireFox Bug</h2>
<p>So, why????  And why does it do it sometimes and not other times.  Well, I thought I knew the answer.  I thought that if the names of your radio button groups are similar up to a point, FireFox doesn&#8217;t differentiate between them in it&#8217;s initial rendering.  So I changed the names a little bit (see below) and that appeared to fix it.  Then I refreshed the screen&#8230;and <strong>WHAM!!!!</strong> broke again.</p>
<p>Here&#8217;s the HTML I had:</p>
<pre class="brush: xml;">
&lt;!--Group 1 --&gt;
&lt;input style=&quot;width: auto;&quot; checked=&quot;checked&quot; name=&quot;sppl_tr_country&quot; type=&quot;radio&quot; value=&quot;US&quot; tabindex=&quot;55&quot; /&gt;US&lt;br /&gt;
&lt;input style=&quot;width: auto;&quot; name=&quot;sppl_tr_country&quot; type=&quot;radio&quot; value=&quot;UK&quot; tabindex=&quot;55&quot; /&gt;UK&lt;br /&gt;
&lt;input style=&quot;width: auto;&quot; name=&quot;sppl_tr_country&quot; type=&quot;radio&quot; value=&quot;CA&quot; tabindex=&quot;55&quot; /&gt;CA
&lt;!--Group 2 --&gt;
&lt;input style=&quot;width: auto;&quot; name=&quot;sppl_tr_cost&quot; type=&quot;radio&quot; value=&quot;$$&quot; tabindex=&quot;56&quot; /&gt;$$&lt;br /&gt;
&lt;input style=&quot;width: auto;&quot; checked=&quot;checked&quot; name=&quot;sppl_tr_cost&quot; type=&quot;radio&quot; value=&quot;$$$&quot; tabindex=&quot;56&quot; /&gt;$$$&lt;br /&gt;
&lt;input style=&quot;width: auto;&quot; name=&quot;sppl_tr_cost&quot; type=&quot;radio&quot; value=&quot;$$$$&quot; tabindex=&quot;56&quot; /&gt;$$$$&lt;br /&gt;
&lt;input style=&quot;width: auto;&quot; name=&quot;sppl_tr_cost&quot; type=&quot;radio&quot; value=&quot;$$$$$&quot; tabindex=&quot;56&quot; /&gt;$$$$$
</pre>
<p>In IE 6 and Chrome, it was rendering:</p>
<p><img class="alignnone size-full wp-image-560" title="radios_right" src="http://www.whypad.com/wp-content/uploads/radios_right.gif" alt="radios_right" width="228" height="149" /></p>
<p>In FireFox, it rendered:</p>
<p><img class="alignnone size-full wp-image-561" title="radio_wrong" src="http://www.whypad.com/wp-content/uploads/radio_wrong.gif" alt="radio_wrong" width="230" height="140" /></p>
<p>The exact same HTML across 3 browsers, and weirdly enough, IE6 got it right.  There were occassions when FF got it right too, but sometimes if you refreshed the screen, it would be wrong again.</p>
<p>For the love of Pete!  What&#8217;s going on?</p>
<p><strong>I thought </strong>the trouble was how close my Radio Button names were to each other:</p>
<ul>
<li>Group 1:   sppl_tr_country</li>
<li>Group 2:   sppl_tr_cost</li>
</ul>
<p>The first 10 characters were the same.  Change the first character (or presumably something near the front) so that the names are different early on seemed to work, until I refreshed the screen.  Here&#8217;s how I changed the screen:</p>
<ul>
<li>Group 1:   1_sppl_tr_country</li>
<li>Group 2:  2_sppl_tr_country</li>
</ul>
<p>Ah well, if anyone knows what&#8217;s up, pleeeeeeeeease let us know!</p>
<p>Cheers!</p>
<p>Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=559&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/firefox-radio-button-bug/559/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Hosting Your WP Plugin with Aptana and Subclipse &#8211; Video pt. 2</title>
		<link>http://www.whypad.com/posts/hosting-your-wp-plugin-with-aptana-and-subclipse-video-pt-2/545/</link>
		<comments>http://www.whypad.com/posts/hosting-your-wp-plugin-with-aptana-and-subclipse-video-pt-2/545/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 07:24:55 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Worksoft Certify]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=545</guid>
		<description><![CDATA[This is the 2nd part of this 3 part video series on hosting a plugin on WordPress.org.  There are 3 easy steps to accomplish this, but you need to do them all and you have to do them in order.  So if you haven&#8217;t already gotten your WordPress Subversion repository in an email, take a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-537" title="wp-plugin" src="http://www.whypad.com/wp-content/uploads/wp-plugin.gif" alt="wp-plugin" width="150" height="150" />This is the 2nd part of this 3 part video series on hosting a plugin on WordPress.org.  There are 3 easy steps to accomplish this, but you need to do them all and you have to do them in order.  So if you haven&#8217;t already gotten your WordPress Subversion repository in an email, take a look at Part 1 of this series <a href="http://www.whypad.com/posts/host-plugin-on-wordpress-video-tuts/536/">here</a>.  Here in Part 2, we&#8217;re going to download and install the Aptana IDE to use as a graphical interface to subversion.  WordPress very helpfully provides instructions for the bare basics needed to use SVN to get your plugin hosted.  <img class="alignright size-medium wp-image-546" title="picture-4" src="http://www.whypad.com/wp-content/uploads/picture-4-300x264.png" alt="picture-4" width="300" height="264" />Take a gander at the image at the right.  That sent shivers down my spine.  I did download SVN and tried a few SVN commands from the terminal.  And they worked, but I really wanted something a little more point-and-click.  And Aptana was it.</p>
<p><span id="more-545"></span></p>
<p>If you want to give the manual version of SVN a go, check out the WordPress instructions <a href="http://wordpress.org/extend/plugins/about/svn/">here</a>.</p>
<h2>A Word on SVN</h2>
<p>SVN is a code repository that provides superb versioning and access controls for development teams.  These types of tools are particularly necessary in large development groups where many developers might be working on the same code.    If you&#8217;re like me, you may have only the faintest idea as to what SVN does.  Well, not to fear.  These next two videos are going to tell you exactly what you need to do in order to get your plugin&#8217;s code into the repository.</p>
<h2>Configuring Aptana for Subversion Integration</h2>
<p>Aptana is an IDE that is based on the open source Eclipse IDE project.  The following video shows you how to download and configure Aptana for connecting to your repository.  <object width="425" height="344" data="http://www.screentoaster.com/swf/STPlayer.swf" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="flashvars" value="video=stUE5QQEZIR1pdR1VcUlhdU1NT" /><param name="src" value="http://www.screentoaster.com/swf/STPlayer.swf" /></object></p>
<div style="width: 425px; text-align: right;"><a href="http://www.screentoaster.com/">Record your screencast online</a></div>
<p>You probably noticed that the sound was cut off there at the end.  <a href="http://www.screentoaster.com/">ScreenToaster</a> was having some problems and it was cutting off recording audio at 4:00 mins.  And I&#8217;m so bad at doing these videos that I couldn&#8217;t bear trying it yet again for 10 seconds more sound.  Basically I said, &#8220;The Subclipse box will show up in the bottom right.  And check out part 3, which brings it home!&#8221;</p>
<p>Once you&#8217;ve configured Aptana and SVN (Subclipse), you&#8217;re now ready to make the connection to your remote WordPress plugin repository.  So, check out video 3 which demonstrates the steps for getting your plugin files into the repository.</p>
<p>Cheers!</p>
<p>Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=545&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/hosting-your-wp-plugin-with-aptana-and-subclipse-video-pt-2/545/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Host a Plugin on WordPress &#8211; Video pt. 1</title>
		<link>http://www.whypad.com/posts/host-plugin-on-wordpress-video-tuts/536/</link>
		<comments>http://www.whypad.com/posts/host-plugin-on-wordpress-video-tuts/536/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 06:49:18 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Aptana]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=536</guid>
		<description><![CDATA[The first time I wrote a WordPress plugin, I thought, &#8220;Cool, I&#8217;m going to host this puppy on the WordPress website and I&#8217;ll get tons of traffic.&#8221;  Then I got to the front door and they started talking about SVN.  Then I took a look at what SVN (aka Subversion) was all about, and that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-537" title="wp-plugin" src="http://www.whypad.com/wp-content/uploads/wp-plugin.gif" alt="wp-plugin" width="150" height="150" />The first time I wrote a WordPress plugin, I thought, &#8220;Cool, I&#8217;m going to host this puppy on the WordPress website and I&#8217;ll get tons of traffic.&#8221;  Then I got to the front door and they started talking about <a href="http://subversion.tigris.org/">SVN</a>.  Then I took a look at what SVN (aka Subversion) was all about, and that was the end of that.  But then, I wrote a more serious plugin, <a href="http://www.whypad.com/posts/photosmash-galleries-wordpress-plugin-released/507/">PhotoSmash Galleries</a>, which lets your users upload photos to galleries on your blog, that you can moderate later.  And I knew I had to climb the learning curve and get PhotoSmash hosted.</p>
<p><span id="more-536"></span></p>
<p>I like to think of myself as a geek/nerd, but dipping into SVN, I quickly realized that there are several standard deviations of geekdom between me (what I now understand to be Geek Light) and the people who speak SVN (Geek Core).  So for those of you who are geeky enough to write plugins for WordPress, but do not fall into Geek Core, I offer you this video series, holding your hand, like I wish someone had done for me, through the whole process&#8230;well, after you&#8217;ve got your plugin written anyway.</p>
<h2>3 Easy Steps to Hosting a Plugin on WordPress</h2>
<p>There are 3 easy steps for hosting your plugin on WordPress.  At least they should be easy after you watch these videos.</p>
<h3>1) Request a Subversion (SVN) Repository for Your Plugin at WordPress</h3>
<p>This step basically asks WordPress for a place to host your plugin.  Here&#8217;s the video:</p>
<p><object width='425' height='344' type='application/x-shockwave-flash' data='http://www.screentoaster.com/swf/STPlayer.swf'><param name='movie' value='http://www.screentoaster.com/swf/STPlayer.swf'/><param name='allowFullScreen' value='true'/><param name='flashvars' value='video=stUE5QQEZIR1pdR1pVWVlaUl9U'/></object>
<div style='width: 425px; text-align: right;'><a href='http://www.screentoaster.com/'>Free online screencasting tool</a></div>
<p>After you&#8217;re done with that, it may take several hours (or even longer) to get your email back from WordPress.  Somebody has to review your request and then set up your repository, so get on with life and come back and check your email in the morning.</p>
<p>After you get your Repository notification email, your now ready for <strong>step 2</strong>.  Check out <a href="http://www.whypad.com/posts/hosting-your-wp-plugin-with-aptana-and-subclipse-video-pt-2/545/">video #2!</a><br />
Cheers!<br />
Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=536&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/host-plugin-on-wordpress-video-tuts/536/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhotoSmash Galleries WordPress Plugin Released</title>
		<link>http://www.whypad.com/posts/photosmash-galleries-wordpress-plugin-released/507/</link>
		<comments>http://www.whypad.com/posts/photosmash-galleries-wordpress-plugin-released/507/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 06:39:14 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[WordPress Plugin]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=507</guid>
		<description><![CDATA[UPDATE:  7/12/2009 -PhotoSmash 0.3 has been released.  Its new homepage is just getting started, so you might need to browse below if you don&#8217;t find what you looking for over at Smashly.net.  Thanks for your patience! Release Candidate 2 version 0.2.996 (RC3 for 0.3.00) now available at WordPress. Final Release Candidate before going public with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:  7/12/2009 -PhotoSmash 0.3 has been released.  Its new homepage is just getting started, so you might need to browse below if you don&#8217;t find what you looking for over at <a href="http://smashly.net/photosmash-galleries/">Smashly.net</a>.  Thanks for your patience!</strong></p>
<p><strong>Release Candidate 2 version 0.2.996 (RC3 for 0.3.00)</strong> now available at <a href="http://wordpress.org/extend/plugins/photosmash-galleries/download/">WordPress</a>.</p>
<p><span id="more-507"></span></p>
<p><strong>Final Release Candidate before going public with 0.3.00!</strong></p>
<p><strong><span style="font-weight: normal;">I need to do some documentation.  Launch the new home for PhotoSmash.</span></strong></p>
<p><strong>Note!  This version has Sorting (only 2 choices right now &#8211; Date Uploaded &#8211; Ascending or Descending&#8230;more to come).</strong></p>
<p><strong>Going live very soon!!! I hope&#8230;</strong></p>
<p><strong><span style="color: #ff0000;">Beta Testers of 0.2.99?: </span></strong></p>
<p><span style="color: #ff0000;"><strong>First:</strong> <span style="color: #000000;">after uploading this version is to go to Plugin Info and run the Update Database.  If you still get a Database Warning in PhotoSmash Settings page, your database needs to be updated.</span></span></p>
<p><strong><span style="color: #ff0000;">Second: </span></strong><span style="color: #000000;">note that the behavior of custom forms has changed.  Note that you no longer have to turn on Custom Form usage in PhotoSmash Settings.  You can get a custom form to work by setting it </span>in the Gallery Settings (there is a mass update button in PhotoSmash Settings/Advanced tab/Default upload form setting &#8211; this button will update all existing galleries to use the selected custom form). Or you can use the shortcodes in your post:   [photosmash form=your_form_name]</p>
<p>Additional security enhancements around URL&#8217;s were made to this version.  It now utilizes WP 2.8 URL sanitizing, and remains backwards compatible with 2.7.</p>
<p><strong>Beta Testers wanted!</strong> Go to the PhotoSmash <a href="http://wordpress.org/extend/plugins/photosmash-galleries/download/">Other Versions</a> download page and download the Development version.  When you unzip, you should have version 0.2.992.  I didn&#8217;t make this 0.3.00 so you can use the automatic update feature of WP to upgrade to the Gold version.</p>
<p>There are tons of new features, so please beat it up and let me know what you find.  I&#8217;ve tried, kind of unsuccessfully to hide the complexity from the Plugin-n-go user of PhotoSmash, so if you have any suggestions for making the basic plugin more friendly&#8230;PLEASE let me know!</p>
<p>A new website, Smashly.net, is on its way also.  It&#8217;s just a shell right now, but it will ultimately house PhotoSmash, Supple Forms, and the Smashly WordPress community.  I want to have it ready for the PhotoSmash 0.3.00 official release&#8230;we shall see.</p>
<p>Thanks for your help!</p>
<p><strong>Byron<br />
</strong></p>
<p><strong>Permanent Alert (posted 4/16/2009):</strong> Please note that using 0777 as a folder permission is highly discouraged (DESPITE MY RECOMMENDATIONS IN THE COMMENTS BELOW). Please note that I no longer recommend setting folder permissions to 0777, but rather the upload folders should have 0755. Version 0.2.55 includes the Plugin Info page in the admin section that helps you determine what your permissions are and will let you set them appropriately (unless SAFE MODE is on in your PHP config).</p>
<p><strong>[Here begins the ORIGINAL Post]</strong></p>
<p><img class="alignleft size-thumbnail wp-image-511" title="screenshot-1" src="http://www.whypad.com/wp-content/uploads/screenshot-1-150x150.gif" alt="screenshot-1" width="150" height="150" /></p>
<p>I am pleased to announce the release of my first &#8220;real&#8221; WordPress plugin, PhotoSmash Galleries.  While there are at least a dozen photo gallery plugins available for WordPress, PhotoSmash adds something to the WordPress world that wasn&#8217;t there before (at least, I think so).  What could that possibly be? you ask.  Well, PhotoSmash makes it possible for your users to upload photos to galleries right from your Posts or Pages.</p>
<p>For directions in using the plugin, see the <a href="#usage">Usage section</a> below.</p>
<h3>Download:</h3>
<p>Download at the <a href="http://wordpress.org/extend/plugins/photosmash-galleries/">PhotoSmash page on WordPress</a></p>
<p>View <a href="http://www.whypad.com/wp-content/uploads/readme1.txt">readme.txt</a><br />
There is a <strong>demo</strong> at:  <a href="http://pmopress.com">PMOPress.com</a></p>
<p><a href="http://wordpress.org/extend/plugins/photosmash-galleries/"></a></p>
<h3>Features:</h3>
<ul>
<li>Produces XHTML 1.0 Transitional markup for public facing pages</li>
<li>User contributable photo galleries</li>
<li>AJAX photo uploads</li>
<li>Control who can upload images: admin only, authors &amp; contributors (and higher), or registered users and higher</li>
<li>Moderate images uploaded by registered users (Admins and authors are automatically approved)</li>
<li>Receive email alerts for new images that need to be moderated</li>
<li>Options page for setting general defaults or specific gallery settings</li>
<li>Auto-adding of photo galleries</li>
<li>Multiple galleries per post, added using a simple tag system</li>
<li>Integrates with popular image viewing systems like Lightbox and Shadowbox</li>
<li>Tweak appearance through the included css file</li>
<li>Allows loading images to galleries by URL</li>
<li>Option to set thumbnails to crop to size or maintain aspect raito</li>
<li>Various display options for captions, including displaying the contributor&#8217;s name and website link</li>
<li>Admins can set how many images per row in the galleries (can be set by gallery)</li>
<li>Admins can set how many images per page ( 0 turns off pagination )</li>
<li>Supports <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/">Role Manager</a> plugin with &#8220;Upload to PhotoSmash&#8221; capability (when assigned to a subscriber, they can upload to any gallery and &#8220;Photosmash ?&#8221; capability (where ? is the gallery ID&#8230;when assigned to a subscriber, they can upload to that specific gallery, regardless of the minimum upload user)</li>
<li>Option for a URL field on the upload form. Submitted URLs can be used as links for captions</li>
</ul>
<h3>Requested Features</h3>
<p>I&#8217;ll add requested features here as people ask, so I don&#8217;t lose track:</p>
<ol>
<li><span style="text-decoration: line-through;">Give an option to show uploader&#8217;s name and link to website</span></li>
<li><span style="text-decoration: line-through;">Allow image upload by URL.</span></li>
<li>RSS or subscribe for notifications by email</li>
<li>Use the on page upload to add photos to NextGen Gallery (I have no illusions about besting NextGen&#8230;I&#8217;m just aiming for fast and simple, so I don&#8217;t mind this one bit <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</li>
<li>Import photos from existing library</li>
<li>Upload a zip file of photos</li>
<li>Multiple photo uploads &#8211; swf uploader</li>
<li>Need to remove the &#8220;by-reference&#8221; indicator from certain function calls in admin&#8230;.causing PHP call-by-reference warning.</li>
<li>Need to reduce the final file size from 5M to a user configurable variable in the ajax-upload.php settings&#8230;it&#8217;s letting uploaded files stay huge &#8211; slow to download with little real quality gain on screen</li>
<li><span style="text-decoration: line-through;">Need to show Memory capabilities for server in the admin page.</span></li>
<li><span style="text-decoration: line-through;">Think about breaking up the Defaults page from the Gallery Edit page&#8230;.just something to consider</span></li>
<li>Upload photos from Flickr or Photobucket</li>
<li><span style="text-decoration: line-through;">Allow admins to set how many photos per row&#8230;use table for that</span></li>
<li><span style="text-decoration: line-through;">Add paging to galleries, allowing admins to set # of photos per page</span></li>
<li>Add CoolIris support (that thing just blows me away)</li>
<li><span style="text-decoration: line-through;">Add tabs to admin pages</span></li>
<li>Send email to Subscribers who upload images: 1) upload successful (maybe &#8211; they&#8217;ll see it on the gallery anyway if they&#8217;re logged in &#8211; can&#8217;t send an email otherwise) 2) image was moderated (definitely), allow admin to type brief msg or use default msg.</li>
<li><span style="text-decoration: line-through;">Create special role that can be assigned to individual subscribers without turning on uploading for all subscribers</span></li>
<li>Auto-resize upload (allow admin to set maximum pixel size of final images)</li>
<li>Create watermarks from custom image.</li>
<li>Allow creating new thumbnails to replace the originals.</li>
<li><span style="text-decoration: line-through;">Add option for URL field on the upload form, with options to use URLs in captions.</span></li>
<li>Latest additions widget</li>
<li>Mashup pages by tags, contributors, latest</li>
<li>RSS</li>
<li>Photo-level Comments</li>
<li>Star ratings</li>
<li>Option for contributors to delete images</li>
<li>Sorting</li>
<li>Shortcode for Showing individual images</li>
<li>Dashboard image approval box</li>
<li>Star rating system for photos</li>
<li>Upload files other than images (mp3, videos, documents)</li>
<li>is there no end to the freaking list???</li>
</ol>
<p>Soooooo&#8230;.if anyone makes any enhancements to the code that they think other users might like, please let me know.</p>
<p>Most sites don&#8217;t need to let users upload photos, and PhotoSmash handles that requirement as well by letting you set a minimum role for uploading by gallery. If you&#8217;re simply looking to do photo galleries that only you or your authors can upload to, you&#8217;ve got lots of options in the WordPress cosmos. Where PhotoSmash differentiates there is that it lets you add images directly within your posts and pages without going to the Admin section.</p>
<p>Personally, I needed PhotoSmash for my CityTracs website which I&#8217;m porting over to WordPress.  I want to let users upload their photos to the destination galleries there, hence the origins of PhotoSmash. Hopefully, PhotoSmash will find its niche on the Web.</p>
<h3>Screenshots</h3>
<p>Ahhh&#8230;the screenshots: <img class="size-full wp-image-511" title="screenshot-1" src="http://www.whypad.com/wp-content/uploads/screenshot-1.gif" alt="screenshot-1" width="500" height="415" /></p>
<p>Here&#8217;s a shot from the PhotoSmash options page in the Admin&#8230;when you&#8217;re actually in there, scroll down to work with individual galleries: <img class="size-full wp-image-512" title="screenshot-2" src="http://www.whypad.com/wp-content/uploads/screenshot-2.gif" alt="screenshot-2" width="500" height="374" /></p>
<p>And finally a shot of the AJAX image upload box: <img class="size-full wp-image-513" title="screenshot-3" src="http://www.whypad.com/wp-content/uploads/screenshot-3.gif" alt="screenshot-3" width="500" height="343" /></p>
<h3><a name="usage"></a> &#8211; How to Use PhotoSmash</h3>
<p>Using PhotoSmash is extremely simple:</p>
<ol>
<li><a href="http://www.whypad.com/wp-content/uploads/bwb-photosmash.zip">Download PhotoSmash</a> and unzip&#8230;you should wind up with a folder named: bwb-photosmash</li>
<li>Upload the bwb-photosmash plugin folder to your /wp-content/plugins/ folder</li>
<li>In the Plugins page of your WordPress Admin, activate PhotoSmash</li>
<li>There are 3 ways to add new galleries to your posts:
<ol>
<li>Under settings, go to the PhotoSmash options page and turn on Auto-adding of galleries.  You can auto-add galleries to the top of each post or the bottom of each post by changing the drop down to the correct selection.  Click Update Defaults button to save changes</li>
<li>Also in the PhotoSmash options page, scroll down below the PhotoSmash defaults section and select New in the gallery drop down.  Fill in the details you want to use for the new gallery, and click the Save Gallery button to create the new gallery.  After the save is complete, select your new gallery from the Gallery drop down and click the Edit button to retrieve it.  The code (like <span style="color: #ff0000;">[photosmash id=1] </span>)for adding this specific gallery to any post or page will be in red beneath the Gallery drop down.  Cut and past the code anywhere you like in your posts or pages.  You can also specify multiple specific galleries within a single post or page by putting the tags with their ids in as needed.</li>
<li>PhotoSmash can also create galleries on the fly for specific posts.  Simply enter the following code anywhere you like in posts or pages and a gallery will be automatically created:  <span style="color: #ff0000;"> [photosmash]</span> The code should include everything in red, including the braces and the = sign.</li>
</ol>
</li>
<li>To add photos to your galleries, go to the post or page and click Add Photos link.  I&#8217;m not sure what the size limit is right now.  It may vary based on your php.ini settings.</li>
<li>If you choose to let Registered users upload photos, their photos will be visible to Admins and the themselves only.  Admins will be presented with buttons for Approve or Bury.  Approve is self explanatory.  Bury simply deletes the record from the database and deletes (unlinks in PHP terms) the files from the bwbps and bwbps/thumbs/ folders in the wp-content/uploads/ folder</li>
<li>You will receive an email alert for photos requiring moderation.  These alerts use a pseudo-cron like scheduling scheme that is triggered whenever someone views one of your blog&#8217;s pages.  You can set the alert program to check every 10 minutes, 1 hour, or 1  day, or not at all.</li>
<li>To edit a photo&#8217;s caption, go to the PhotoSmash options page in wp-admin.  Select the desired gallery from the drop down and click Edit.  When the page comes back, the images for that gallery will show up at the bottom of the page.  There will be text boxes beneath image allowing you to edit captions.  Click save to save caption edits.  Approve buttons will be present for images needing moderation.  Delete will be available for all images.</li>
<li>To integrate with <a href="http://www.lokeshdhakar.com/projects/lightbox2/">Lightbox</a> or <a href="http://www.mjijackson.com/shadowbox/">Shadowbox</a>, simply include the correct &#8220;rel&#8221; information in the Gallery specific options on the PhotoSmash options page.  You can set your general PhotoSmash default rel in PhotoSmash Defaults section so that any newly created galleries will automatically get the rel.   For Lightbox, set the rel to lightbox.  Shadowbox can use lightbox or shadowbox.  To group a galleries images together as an album for Shadowbox, use something like:  shadowbox[album] as the gallery&#8217;s rel.</li>
<li>To prevent a post from receiving a gallery when Auto-add is activated, simply enter the following tag anywhere in the post&#8217;s content:   <span style="color: #ff0000;">
<pre class="brush: powershell;">[/ps]
</pre>
<p> </span></li>
<li>To use with <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/">Role Manager</a> plugin:  the Role Manager plugin lets you give specific subscribers additional capabilities.  PhotoSmash supports these capabilities by allowing you to give users additional access to galleries that their roles do not allow (e.g. a Subscriber could upload to a gallery that is set to Admins only).  Here are the steps:
<ol>
<li>Install the Role Manager Plugin (see link above)</li>
<li>In the Users menu box in Admin, click on Capabilities</li>
<li>Add a capability called:  Upload to PhotoSmash</li>
<li>To assign this capability to a user, click Authors &amp; Users</li>
<li>Edit the user you are targeting</li>
<li>At bottom of user profile screen, check the Upload to PhotoSmash checkbox in the Assign extra capabilities section and Save (Update) user&#8230;this user can now upload to any gallery regardless of the minimum role you have specified for those galleries.</li>
<li>To target a specific gallery, in #3, create the capability:  Photosmash ? (where ? is the gallery ID #, e.g.  Photosmash 10 ).  You can find the gallery ID # in the Gallery Settings screen in PhotoSmash admin section.  It is the same number that is used in the shortcode that can be used to specify a gallery.  Choose this capability in #6 instead of the Upload to Photosmash capability.  Assigning both would be redundant since Upload to Photosmash gives access to all galleries.  You can assign as many specific galleries to a user as you like.</li>
<li>To add the URL field to the upload form and use the user submitted URLs as the link for your captions, there are 2 settings needed to use feature: 1) you must turn on the field to show up in the Upload Form. Do this in PhotoSmash Settings / Gallery Defaults tab, the checkbox at the bottom of form. 2) There are 2 options in Gallery Settings and PhotoSmash Settings pages under the Viewing tab and in the Image caption style that will use the User submitted URL as the caption link&#8230;look at option #3 and the last one.</li>
</ol>
</li>
<li>Whew&#8230;that&#8217;s about it&#8230;.I think.</li>
</ol>
<p>This plugin is available through WordPress.org so you will be able to upgrade it with the wonderful automatic plugin upgrade feature in WP 2.7.</p>
<p>If you&#8217;ve got ideas, or better yet, code to make PhotoSmash better, please let us know.  Maybe somebody has ideas on how to integrate Flash gallery viewing like NextGen gallery has, or making the upload form more attractive.   Anyway, I&#8217;d love to hear from you.</p>
<h3>Plugin Conflicts/Recommendations</h3>
<ul>
<li>Lightbox &#8211; there are 2 versions&#8230;one works, one doesn&#8217;t. <a href="http://wordpress.org/extend/plugins/lightbox-2/">This one </a>does.</li>
<li>Some plugins that utilize the jquery-forms javascript code may conflict. One user found that a Chat box plugin was making continual ajax calls back to the server. This caused the PhotoSmash upload form to fire indiscriminately. You could still upload an image by selecting it and clicking submit, but you would get the 400k error for no reason. If someone has a suggestion as to how I might prevent his problem, I&#8217;m all ears&#8230;it appears to stem from common use of jquery.forms.js.</li>
<li>Flutter version .2.51 causes javascript errors in IE 6 when using Lightbox and possibly even other [?]box image viewers.  Haven&#8217;t tested with IE 7 or 8.  FF appears OK.  Check out <a href="http://www.whypad.com/posts/supple-forms-a-wordpress-cms-plugin/566/">Supple Forms </a>for a Flutter alternative <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<h3>The Belated Changelog</h3>
<ul>
<li>0.2.62 (4/29/2009) &#8211; Fixed url validation on uploading images. Fixed css to make gallery table 100% width. Added options for using user submitted url&#8217;s as the thumbnail links (option must be set in Gallery Settings to become effective).  Add option to make thumbnail and caption links target new windows (option is only under PhotoSmash Settings).</li>
<li>0.2.61 (4/27/2009) Fixed manual creation of new galleries to use PhotoSmash defaults. Now using Colin Verot&#8217;s upload class version 2.7 RC2.  Previous version had a Safe Mode &#8220;feature&#8221; that was causing 400k errors.</li>
<li><strong>New Feature:</strong> (4/26/2009) 0.2.6 URL field added to upload form. 2 options added to allow the image caption to link to those urls. See the Usage section for instructions on use.</li>
<li>0.2.55 (4/16/2009) Added Plugin Info page in admin to assist with trouble shooting. Checks folders and tables and server info. Server info code borrowed from the immanent NextGen Gallery plugin by Alex Rabe. Change in folder permission recommendations from 0777 to 0755. Plugin Info page helps with those permissions as well.</li>
<li>0.2.54 (4/6/2009) Fixed &#8220;delete gallery&#8221; error in bwbps.admin.php. Nonce security wasn&#8217;t configured properly.</li>
<li>0.2.52 &amp; 0.2.53 (3/23/2009) Fixed implosion error in bwbps-photosmash.php on line 767.  Fixed a plugin conflict with redeclaring the JSON class when uploading.  This conflict was found with Twitter Tools.</li>
<li><strong>New Feature:</strong> (3/13/2009)  0.2.5 Added support for Role Manager plugin.  Can now grant specific subscribers access to upload to any gallery or to specific galleries regardless of the minimum roles.   See Usage notes for details.  Also, changed bwbps.js to allow IE uploads to show properly.  Were showing in a single column due to rendering of &#8220;margin: auto&#8221;</li>
<li><strong>2 New Features + bug fixes: </strong>0.2.4 (3/11/2009) Added Tabs to admin pages. Added pagination by gallery. Fixed use of admin defined captions for Add Photos link and Upload form upload message. Fixed CSS for IE for number of images per row.</li>
<li><strong>New Feature: </strong>0.2.3 (3/8/2009) admins can set how many images to display per row&#8230;setting is by gallery.  Can also set default for new galleries</li>
<li>0.2.22 (3/6/2009) corrected XHTML validation error &#8211; replaced &amp; with &amp;amp; in the ThickBox href on the Add Photos links.</li>
<li>0.2.21 (3/5/2009) corrected XHTML validation errors.  Corrected duplication of moderation nonce on front page.</li>
<li><strong>New Feature: </strong>0.2.2 (3/4/2009) added options for displaying captions, including displaying contributor&#8217;s WordPress nicename and their URL</li>
<li><strong>New Feature: </strong>0.2.1 (3/3/2009) added ability to upload images from a URL</li>
<li><strong>New Feature:</strong> 0.2.0  added the ability to choose to either maintain aspect ratio or crop when creating thumbnails.</li>
<li>0.1.99 &#8211; in bwbps-photosmash.php fixed &lt;?= WINC to &lt;?php echo WIND; ?&gt;&#8230;this was causing some uses problems.  Changed bwbps.js to use standard $j(&#8216;#bwbps_uploadfile&#8217;).val() instead of $j(&#8216;input[@name=bwbps_uploadfile]&#8216;).fileValue().</li>
<li>0.1.97 &#8211; now using JSON.php class in admin Photo Manager page for ajax calls&#8230;.affects ajax.php. Fixed the same json_encode problem for PHP4 in admin as for the upload</li>
<li>0.1.96 &#8211; added the <a href="http://abeautifulsite.net/notebook/71">JSON.php</a> class to ajax_upload.php to make json_encode compatible with PHP4.</li>
<li>0.1.95 &#8211; changed the code that handles image files to utilize WP_CONTENT_DIR and WP_CONTENT_URL. This was needed to deal with implementations of WP that did not use the root directory, or used non-standard (but perfectly acceptable) locations for their Content or Upload directories.</li>
</ul>
<h3>Acknowledgements</h3>
<ul>
<li>Thanks to Colin Verot for making his upload class available through the GPL.  PhotoSmash uses Colin&#8217;s <a href="http://www.verot.net/php_class_upload.htm">class.upload.php</a> for manipulating images and making sure the correct folders exist.</li>
<li>Thanks to <a href="http://abeautifulsite.net/notebook/71">Cory</a> and <a href="http://mike.teczno.com/json.html">Michal</a> for their work on the JSON encoding class.</li>
<li>Thanks to the WordPress community for sharing, inspiration, patience, and passion.</li>
<li>Thanks to my alpha/beta debuggers&#8230;I won&#8217;t name names, because I don&#8217;t want to leave anyone out. But you can see much of there contributions in the first 120 comments below.</li>
<li>Thanks to Alex Rabe for the immeasurable <a href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN Gallery</a>, which has helped me figure out a few things and has provided inspiration and the occasional snippet of code&#8230;particularly in the area of the Tabs in admin pages and the styling on the pagination.</li>
</ul>
<h3><a name="donate"></a><a></a></h3>
<p>Finally, if you do end up liking PhotoSmash enough to use it, that will be a thrill for me.  If it makes your life easier in some way and you want to throw a little donation my way, that would be an even bigger thrill and much appreciated.  Either way, I hope you like P&#8217;Smash.</p>
<div class="alignleft">
<form action="https://www.paypal.com/cgi-bin/webscr" enctype="application/x-www-form-urlencoded" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="2626694" />
<input name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" type="image" /> <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /><br />
</form>
</div>
<div style="clear:both;">Cheers!</div>
<div style="clear:both;">Byron</div>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=507&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/photosmash-galleries-wordpress-plugin-released/507/feed/</wfw:commentRss>
		<slash:comments>482</slash:comments>
		</item>
		<item>
		<title>Get ASP.NET DropDownList Selected Value with jQuery</title>
		<link>http://www.whypad.com/posts/get-aspnet-server-dropdownlist-selected-value-with-jquery/418/</link>
		<comments>http://www.whypad.com/posts/get-aspnet-server-dropdownlist-selected-value-with-jquery/418/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 22:19:00 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[ASP.NET/C#]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=418</guid>
		<description><![CDATA[With Microsoft&#8217;s recent announcement that they will begin shipping jQuery with Visual Studio, the little Javascript framework is about to hit the big time (it was already sort of big time, but this is BIG TIME).  And rightfully so. I have been a Prototype and Scriptaculous user for over a year now.  But I am [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-419" title="aspnetjquery" src="http://www.whypad.com/wp-content/uploads/aspnetjquery.gif" alt="" width="138" height="66" />With Microsoft&#8217;s <a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx">recent announcement </a>that they will begin shipping jQuery with Visual Studio, the little Javascript framework is about to hit the big time (it was already sort of big time, but this is BIG TIME).  And rightfully so.</p>
<p><span id="more-418"></span></p>
<p>I have been a Prototype and Scriptaculous user for over a year now.  But I am starting the transition over to jQuery, and am loving what I see.  The learning curve is easy if you&#8217;re coming in from one of the other frameworks, so don&#8217;t sweat it.</p>
<p>If you&#8217;re an ASP.net programmer and you use server controls, then you know that ASP changes the control ID into something that the server will be able to understand on postbacks.  This makes it a little tricky to reference these controls with Javascript on the client.</p>
<h2>The ASP Trick</h2>
<p><img class="alignleft size-full wp-image-420" title="ddlcycles" src="http://www.whypad.com/wp-content/uploads/ddlcycles.gif" alt="" width="142" height="78" />Well, here&#8217;s a neat little trick that I picked up on one of the forums that will allow you to get the value of an ASP.net dropdownlist using jQuery.  Place the following Javascript function at the bottom of your .aspx file.  I think you&#8217;ll need to have it after your DropDownList to insure that it works properly.</p>
<pre class="brush: jscript;">&lt;script type=&quot;text/javascript&quot;&gt;
        function getDropDownList1Value()
        {
            var SelectedVal = $('#&lt; %=&lt;strong&gt;DropDownList1.ClientID %&gt;').val();
            return SelectedVal;
        }
&lt;/script&gt;</pre>
<p>The jQuery part of this function is shown in blue here:  <span style="color: #0000ff;"><strong>$(&#8216;#</strong></span><span style="color: #ff0000;">&lt;%=DropDownList1.ClientID %&gt;</span><strong><span style="color: #0000ff;">&#8216;).val()</span> </strong></p>
<p>The real magic is the red part.  This is ASP code that will be processed on the server to write the control&#8217;s Client ID into the function.  Given such a small amount of jQuery, you could easily pull out the jQuery code and use it with other frameworks or plain old JScript as well.  The key after all, is getting your Javascript to know what the control&#8217;s DOM ID is.</p>
<p>Using the function is as simple as:</p>
<p>var myValue = getDropDownList1Value();</p>
<p>This could, of course, be used with any ASP.net server control for other purposes as well.</p>
<h2>A jQuery Alternative: The CSS Class Selector</h2>
<p>Another alternative with jQuery, would be to assign a css class to the control and use that class as your selector.  Here&#8217;s a jQuery example to select on a css class called mydropdown:</p>
<p>$(&#8216;.mydropdown&#8217;).val();</p>
<p>Just assign the mydropdown class to your ASP control in Visual Studio and jQuery will find your control.  But be careful&#8230;jQuery will find every control that has that class, so give a unique class to each control you want to try this with.</p>
<p>Hope that helps.</p>
<p>Cheers!<br />
Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=418&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/get-aspnet-server-dropdownlist-selected-value-with-jquery/418/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe AIR: Using a Rich Text Editor &#8211; TinyMCE Tutorial</title>
		<link>http://www.whypad.com/posts/adobe-air-using-a-rich-text-editor-tinymce-tutorial/139/</link>
		<comments>http://www.whypad.com/posts/adobe-air-using-a-rich-text-editor-tinymce-tutorial/139/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 00:12:43 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[rich text editor]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://www.whypad.com/posts/adobe-air-using-a-rich-text-editor-tinymce-tutorial/139/</guid>
		<description><![CDATA[UPDATE: Please note that this original article was written for a Beat version of AIR. Commenter Jaawad below has indicated that the code here no longer works in the newly released version of AIR. Here&#8217;s the old article&#8230;First off, I am psyched about Adobe AIR and its possibilities as a development platform. But I&#8217;ll save [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Adobe AIR" rel="attachment wp-att-143" href="http://www.whypad.com/posts/adobe-air-using-a-rich-text-editor-tinymce-tutorial/139/adobe-air/"><img class="imgleft" src="http://www.whypad.com/wp-content/uploads/air_logo2.jpg" alt="Adobe AIR" /></a><strong>UPDATE:   Please note that this original article was written for a Beat version of AIR.   Commenter Jaawad below has indicated that the code here no longer works in the newly released version of AIR.   Here&#8217;s the old article&#8230;</strong>First off, I am psyched about Adobe AIR and its possibilities as a development platform. But I&#8217;ll save that for a later date.   In this post, I want to share a simple example of using Adobe AIR with the TinyMCE rich text editor (wysiwyg editor). To get the lowdown on using TinyMCE, check out the Moxiecode website <a title="TinyMCE by Moxiecode" href="http://tinymce.moxiecode.com/">here</a>&#8230;.This tutorial includes example files for download below.<span id="more-139"></span></p>
<h3>Choosing the TinyMCE Editor &amp; Why FCKEditor doesn&#8217;t work with AIR</h3>
<p>There are a number of very good and free HTML editors on the web that you can use in your applications. These include Yahoo&#8217;s <a href="http://developer.yahoo.com/yui/editor/">YUI Rich Text Editor</a>, the <a href="http://www.fckeditor.net/">FCKEditor</a>, Dojo&#8217;s <a href="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text">Dijit Editor,</a> the <a href="http://extjs.com/">Ext framework&#8217;s</a> HTMLEditor, and <a href="http://tinymce.moxiecode.com/">TinyMCE</a> among others. Unfortunately, not all editors will work within Adobe AIR. AIR uses WebKit as its HTML rendering engine. This is the same engine used by Safari, so if your chosen editor does not support Safari, it is likely that you will not be able to use it in AIR. At this point (10/19/2007) <a href="http://www.fckeditor.net/">FCKEditor</a> does not work with versions of Safari prior to version 3.0, so it probably doesn&#8217;t work in AIR either (see their compatibility list on front page &#8211; upper right corner, hover over the Safari icon).</p>
<p>I mention FCKEditor because I like some of the functions it has, like built in image and file uploading, and a sweet little plugin that lets you switch toolbars on the fly so you can set up tabs like on <a href="http://docs.google.com/">Google Docs</a>  to change the toolset. You may be able to do these with TinyMCE, but I haven&#8217;t found them yet.</p>
<p>Regardless of the editor you choose, this method for displaying and accessing your editor should work as long as it&#8217;s compatible with AIR. You&#8217;ll need to use your editor&#8217;s methods for instantiating itself, but the sandbox concept is all AIR.</p>
<h3>Using TinyMCE in Adobe AIR Tutorial and Example</h3>
<p>I spent several hours trying to get TinyMCE working in AIR and finally did! Even Google was of no help in finding the answers. Ultimately, it required reverse engineering Adobe&#8217;s Bee.AIR sample application. So I hope that this example will save you some time.</p>
<p>I started my journey by creating a basic  HTML file that included the TinyMCE.js file just like the examples on their site showed. In this file, you would have a &lt;textarea&gt; tag and a couple of lines of javascript using the tinyMCE.init() function to transform the textarea into the TinyMCE editor.   Running this locally in Safari  worked perfectly, so at least the plumbing should work in AIR.</p>
<p>If you use Dreamweaver or Aptana, check out Adobe&#8217;s <a href="http://labs.adobe.com/wiki/index.php/AIR:Dreamweaver_CS3_Extension">AIR extension for Dreamweaver</a> (they also have a plugin for Aptana). This will save you from having to run your debug and packaging  in the command line.   Make sure you&#8217;ve got your site set up as a site in DW, then go to Site/Air Application Settings. The full documentation for using AIR in Dreamweaver is <a href="http://livedocs.adobe.com/labs/air/1/devappshtml/help.html?content=AIR_extension_3.html">here</a>.</p>
<p>Previewing  the application (from within Dreamweaver menu path: Site/Air Application Settings), did not transform the textarea into a TinyMCE editor.   Adobe&#8217;s blog editing <a title="Adobe AIR sample applications" href="http://labs.adobe.com/technologies/air/samples/">sample application</a> Bee.AIR came to the rescue for figuring out how to get TinyMCE to do its thing in AIR.   The problem was that you have to place the editor in a remote sandbox.   The example below describes how to set that up.</p>
<p>I have included the source code for a very simple working sample application below, as well as a packaged/installable version of the AIR application. Here goes with the steps it took to get this to work:</p>
<ol>
<li>Make sure you have installed the latest version of Adobe Air Integrated Runtime on your computer (Air Beta 2 at the time of this writing). Download at the Adobe download page <a href="http://www.adobe.com/devnet/air/ajax/">here</a>.</li>
<li>You must have the Air SDK installed (available at Adobe download page). A great, and almost required, tutorial is <a title="Installing the Adobe Air SDK" href="http://airdev.org/gettingstarted">here</a> at Airdev.org. I use a Mac and have never monkeyed around with Terminal. So this came in very handy.</li>
<li>Install the <a href="http://labs.adobe.com/wiki/index.php/AIR:Dreamweaver_CS3_Extension">extension</a> for your IDE (available at Adobe download page): Dreamweaver and Aptana are provided by Adobe</li>
<li>Your app will need 2 html files plus the TinyMCE package
<ol>
<li>Main application .html file representing the Application Sandbox.   You can access the AIR API&#8217;s directly from this file and from script files you include here</li>
<li>An .html file containing the TinyMCE setup and textarea.   This will be placed in the remote Sandbox.   To access AIR API&#8217;s here, you&#8217;ll need to use the Sandbox Bridge.   Read more on the security model at the Abode AIR with HTML &amp; AJAX <a href="http://livedocs.adobe.com/labs/air/1/devappshtml/help.html?content=AIR_extension_3.html">Documentation</a>.   Navigate the tree to: Application Development Essentials/AIR Security/Sandboxes.</li>
<li>The TinyMCE package&#8230;this is a big Gotcha! You can download TinyMCE from the MoxieCode website, but using this does not work when trying to install your finished application. Using the official version downloaded from MoxieCode works just fine in Preview from within Dreamweaver (which launches the ADL tool that comes with the SDK). Even using the Create AIR File option in Dreamweaver to build your AIR application package works fine. But trying to install your AIR application will give you the following error:<br />
<blockquote><p>Installation error:<br />
Missing digested package file: tinymce/jscripts/tiny_mce/plugins/cleanup/editor_plugin.js</p></blockquote>
<p>This was fixed by simply using the TinyMCE folder provided with the Bee source files. This version of the editor appears to be the current version on the Moxiecode website, but it contains several modifications, including an override of the &lt;hr/&gt; insert function which you may want to fix. Now the app installs and the editor is visible, but it&#8217;s disabled. This is fixed by replacing the tiny_mce_src.js file in Bee&#8217;s version with the copy of the file provided with the official version. If you do all of that, it should work. Or, you can just use the package provided in the sample application I provide below.</p>
<p><strong>If anybody figures out what the deal is with this, please&#8230;please&#8230;let share that in the comments.</strong></li>
<li>The other files included in the attached sample application are not required for using tinyMCE with Air. Prototype is just there to make my life easier. The AIRAliases.js file contains aliases to Air classes, shortening your code when using the AIR API. These aliases aren&#8217;t used at all in this example even though I included the file.</li>
</ol>
</li>
<li>Your TinyMCE editor will need to go in an iframe in your main HTML file.     This iframe sets up the remote sandbox, giving it security priviledges that are not available in the application sandbox.   The markup for putting your TinyMCE editor on your page should look something like:<br />
<blockquote><p><code><br />
&lt;div style="margin-top: 20px;"&gt;<br />
&lt;iframe src="http://air/tinymce.html" id="pp_content_txt" sandboxRoot="http://air/"<br />
documentRoot="app-resource:/" scrolling="no" width="100%" height="270"<br />
onfocus = "this.contentWindow.childSandboxBridge.focus()"&gt;<br />
&lt;/iframe&gt;<br />
&lt;/div&gt;</code></p></blockquote>
</li>
<li>That iframe pulls in your tinymce.html file as its source. This file contains the code to include the TinyMCE javascript files and instantiate an editor. It will look like a standard html file with some key items:
<ul>
<li>A script tag, pulling in the tiny_mce_src.js file</li>
<li>Script in the head that initializes the TinyMCE instance: uses the tinyMCE.init() function</li>
<li>More script in the head (or potentially an included .js file) that handles the tinyMCE functions like: setContent() and getContent(), etc</li>
<li>A textarea that will be transformed into the editor by the tinyMCE.init() function</li>
</ul>
</li>
</ol>
<p>The example files are available for download below. If you haven&#8217;t already done so, you&#8217;ll need to get steps 1 through 3 done first. Just because you can run Air apps (step 1) on your computer doesn&#8217;t mean you&#8217;re configured to create them (steps 2 &amp; 3&#8230;with 3 being optional, but recommended).</p>
<p><strong>Update:</strong> I&#8217;ve learned a lot about the Sandboxes over the last couple of weeks and now have an understanding of how and why to use it. The Sandbox is definitely your friend. TinyMCE has to reside in the remote sandbox because it uses eval() and possibly other functions that are not allowed in the application sandbox (where the main app resides). If you&#8217;re doing an HTML/Javascript app, you&#8217;ll likely do most of your HTML and a good bit of your JS in the remote sandbox. You can&#8217;t reach the AIR API&#8217;s from the remote sandbox directly, so you have to build objects that expose function to both the parent and child sandboxes so they can communicate. There&#8217;s a lot to learn here. A good start is found in the Abode AIR with HTML &amp; AJAX <a href="http://livedocs.adobe.com/labs/air/1/devappshtml/help.html?content=AIR_extension_3.html">Documentation</a>  under: Application Development Essentials/AIR Security/Sandboxes.</p>
<p>Downloads for the example app:</p>
<p><a title="Adobe Air: TinyMCE Example (AIR application)" href="http://www.whypad.com/wp-content/uploads/tinymceonair.air">Adobe Air: TinyMCE Example (AIR application)</a><br />
<a title="Adobe Air: TinyMCE Example (Source files)" href="http://www.whypad.com/wp-content/uploads/tinymce_air_ex.zip">Adobe Air: TinyMCE Example (Source files)</a></p>
<p>Other helpful Adobe Air tutorials and links:</p>
<ul>
<li>Adobe AIR <a href="http://www.adobe.com/devnet/air/ajax/">downloads</a></li>
<li><a href="http://labs.adobe.com/technologies/air/samples/">Adobe AIR sample applications</a></li>
<li><a href="http://livedocs.adobe.com/labs/air/1/devappshtml/help.html?content=HTMLHelloWorld_dw_1.html">Creating your first HTML AIR app in Dreamweaver</a> &#8211; Adobe&#8217;s tutorial</li>
<li><a href="http://airdev.org/tutorials/creating-your-first-html-air-app/mac">Creating your first HTML &amp; Javascript app in Adobe Air</a> &#8211; Airdev.org&#8217;s tutorial</li>
<li><a href="http://airdev.org/gettingstarted">Installing the Adobe AIR SDK</a> &#8211; a must read as far as I&#8217;m concerned</li>
<li>more to come&#8230;make your own suggestions below!</li>
</ul>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=139&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/adobe-air-using-a-rich-text-editor-tinymce-tutorial/139/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Getting Offline with Google Gears and Gearpad &#8211; problem solved</title>
		<link>http://www.whypad.com/posts/getting-offline-with-google-gears-and-gearpad-problem-solved/135/</link>
		<comments>http://www.whypad.com/posts/getting-offline-with-google-gears-and-gearpad-problem-solved/135/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 22:07:30 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[google gears]]></category>

		<guid isPermaLink="false">http://www.whypad.com/posts/getting-offline-with-google-gears-and-gearpad-problem-solved/135/</guid>
		<description><![CDATA[Today, in 2007, taking a Web App offline is actually a relevant topic. In a few years, we will be able to look at solutions to the offline issue as a buggy whips in a Model T world. WiMax and whatever genius solution they finally come up with will have us all connected all the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="imgleft"><img src="http://www.whypad.com/wp-content/uploads/googleart.gif" alt="googleart.gif" /></span>Today, in 2007, taking a Web App offline is actually a relevant topic.  In a few years, we will be able to look at solutions to the offline issue as a buggy whips in a Model T world.  WiMax and whatever genius solution they finally come up with will have us all connected all the time.  But it is just 2007 after all and we need to go offline occasionally.</p>
<p><span id="more-135"></span></p>
<p>Enter <a href="http://gears.google.com" title="Google Gears">Google Gears</a> and <a href="http://labs.adobe.com/technologies/air/" title="Adobe Air">Adobe Air</a> and, I&#8217;m sure, some other stuff that is out there.  Well, I&#8217;m working on a web application that I need to go offline.  I&#8217;m no javascript ninja or anything like that, so I&#8217;m starting the Gears learning curve by working through the sample application, <a href="http://code.google.com/apis/gears/sample.html" title="Google sample applications - download the zip of all samples">Gearpad </a>(<a href="http://aaronboodman.com/gearpad/">working demo</a>).</p>
<p>There is a ton of stuff out there on Gears, so I won&#8217;t rehash it here.  But if you want to install Gearpad on your own website to try it out for yourself, here are the solutions to a few problems I encountered:</p>
<ol>
<li>If you do not have the latest instance of the gears plugin installed, you may get a:  Could not create requested object error (or some variation of that).   If you install from the main gears page, you don&#8217;t get the latest version (0.1.56.0), at least as of today.  Go here and download the latest greatest: <a href="http://code.google.com/p/google-gears/downloads/list">gears download list</a>.  Download it and run it.  If you installing on Firefox, use File/open from the firefox app.  From IE, you can double click on the downloaded file on your desktop.</li>
<li>After you&#8217;ve got all the files copied over to your server, the db_config.php updated for you databsae, and your database table built, now you log it.  When I did this, it gearpad got stuck syncing&#8230;This obviously wasn&#8217;t right.<br />
<h3>The Problem:</h3>
<p>evidently, gearpad checks the &#8220;clientid&#8221; that is inserted into your local database.  The first one inserted is 0.  This looks like the value FALSE to some code, so it does a check on the clientid value and thinks it&#8217;s false.  Then it poops out.</p>
<h3>The Fix:</h3>
<ul>
<li>The easiest thing would be to create another login.  I didn&#8217;t try that, but it should work.</li>
<li>  Trouble is you may have blown your email address on the first login.  If that&#8217;s the case, then you need to use the dbquery.html tool to manually update the clientid in the database.  You can get the query tool from the same zip file that had the sample application (tools folder, not samples).  Here&#8217;s the <a href="http://code.google.com/apis/gears/GoogleGears_SamplesAndTools.zip">file</a>.
<ol>
<li>Stick the file in your gearpad folder on your webserver and call it up manually</li>
<li>Type in sql statement: <code>UPDATE user SET clientid = 1</code></li>
<li>Now you need to update your mySQL database to reflect the change. Set last_clientid = 1 and next clientid = 2</li>
</ol>
</li>
</ul>
<h3>That should fix it!</h3>
</li>
</ol>
<p>Good luck!  I anguished over that little problem.  Hope to save you some headache.</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=135&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/getting-offline-with-google-gears-and-gearpad-problem-solved/135/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
