<?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 dev</title>
	<atom:link href="http://www.whypad.com/tag/web-dev/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>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>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>OOP PHP:  What is the Double Colon in Objects/Classes for?</title>
		<link>http://www.whypad.com/posts/php-using-the-double-colon/500/</link>
		<comments>http://www.whypad.com/posts/php-using-the-double-colon/500/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 21:26:03 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=500</guid>
		<description><![CDATA[I happen to be the only PHP programmer that I know, so it&#8217;s hard to ask your buddy what the heck that :: is used for in some OO PHP programs.  I know you could post it on a forum and get the answer, but I never did.  And Google wasn&#8217;t really forth coming when [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.whypad.com/wp-content/uploads/php.gif" alt="php" title="php" width="120" height="67" class="alignleft size-full wp-image-502" />I happen to be the only PHP programmer that I know, so it&#8217;s hard to ask your buddy what the heck that :: is used for in some OO PHP programs.  I know you could post it on a forum and get the answer, but I never did.  And Google wasn&#8217;t really forth coming when you put :: in a search.  Finally I found it in the PHP documentation:  check out <a href="http://us.php.net/manual/en/language.oop5.paamayim-nekudotayim.php">Scope Resolution Operator (::)</a>.  In short, it&#8217;s used to access Static or Constant members of a class.  Here&#8217;s a brief example:</p>
<p><span id="more-500"></span></p>
<pre class="brush: php;"> class DatabaseConnector {
   const CONNECTION_STRING = 'myconnectionstring';
}

//Referece that connection string constant like so...
DatabaseConnector::CONNECTION_STRING;
</pre>
<p>So there you go, mystery solved <img src='http://www.whypad.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In case you&#8217;re wondering what the :: is called, it&#8217;s a Paamayim Nekudotayim, which is Hebrew for the cryptic phrase: double colon!</p>
<p>Cheers,<br />
Byron</p>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=500&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/php-using-the-double-colon/500/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP: Using Switch to test Multiple Conditions</title>
		<link>http://www.whypad.com/posts/php-using-switch-to-test-multiple-conditions/210/</link>
		<comments>http://www.whypad.com/posts/php-using-switch-to-test-multiple-conditions/210/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 03:41:10 +0000</pubDate>
		<dc:creator>Byron Bennett</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.whypad.com/?p=210</guid>
		<description><![CDATA[Ok, so maybe this is common knowledge, but I still felt a little clever when I figured out this trick.  The situation was that I wanted to test a bunch of different conditions to figure out which time category a date falls into.  It would be fairly simple to do with a bunch of if&#8230;then&#8230;else&#8217;s, [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so maybe this is common knowledge, but I still felt a little clever when I figured out this trick.  The situation was that I wanted to test a bunch of different conditions to figure out which time category a date falls into.  It would be fairly simple to do with a bunch of if&#8230;then&#8230;else&#8217;s, but really ugly.  Here&#8217;s the trick I came up with&#8230;use   switch(true), and then set up your cases to evaluate to true or false.  Here&#8217;s some example code:</p>
<p><span id="more-210"></span></p>
<pre>

$mymd = date('Ymd', $row->date_due);
$tymd = date('Ymd');  //Today

switch (true) {
	case $mymd == $tymd :
		$ind = "today";
		break;
	case $mymd < $tymd :
		$ind = "overdue";
		break;
	case $mymd < ($tymd + (6 - date('w'))) :
		$ind = "restofweek";
		break;
	default :
		$ind = (int) date('Ym',$row['duedate']);
		break;
}
</pre>
<img src="http://www.whypad.com/?ak_action=api_record_view&id=210&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.whypad.com/posts/php-using-switch-to-test-multiple-conditions/210/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
