<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James Fishwick</title>
	<atom:link href="http://jamesfishwick.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesfishwick.com</link>
	<description>Web developer based in Charlottesvile, VA.</description>
	<lastBuildDate>Thu, 02 May 2013 21:09:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>working with HTML5 getParent and getFile</title>
		<link>http://jamesfishwick.com/working-with-html5-getparent-and-getfile/</link>
		<comments>http://jamesfishwick.com/working-with-html5-getparent-and-getfile/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 21:05:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Note to Self]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=612</guid>
		<description><![CDATA[<p>I have a FileEntry that represents the following file/path: <code>/cognitivemodelsaging/cognitivemodelsaging_lo.mp4</code><br />
Whenever I call <code>getParent()</code> for the given FileEntry, it returns <code>undefined</code>.  Frustrating.</p>
<div>But the reason why is that getParent does not return a string of the directory name, nor &#8230;</div>]]></description>
				<content:encoded><![CDATA[<p>I have a FileEntry that represents the following file/path: <code>/cognitivemodelsaging/cognitivemodelsaging_lo.mp4</code><br />
Whenever I call <code>getParent()</code> for the given FileEntry, it returns <code>undefined</code>.  Frustrating.</p>
<div>But the reason why is that getParent does not return a string of the directory name, nor simply a <a href="https://developer.mozilla.org/en-US/docs/DOM/File_API/File_System_API/EntrySync">dirEntry object</a> from which you can grab <code>dirEntry.name()</code>. Rather it runs the resultant dirEntry or error object through one of two callback functions.</div>
<div></div>
<div>So rather we need to do something like:</div>
<pre class="brush: jscript; title: ; notranslate">

fileEntry.getParent(function(dirEntry) {

console.log(&quot;got a parent&quot;);

console.log(&quot;full path = &quot; + dirEntry.fullPath);

}, function(error) {

console.log(&quot;failed to get parent = &quot; + error);

})

}, function() {

console.log(&quot;could not get file entry&quot;);

});

</pre>
<p>Likewise for calling <code>dirEntry.getFile</code>, except in this case we need our first argument to be a filepath (absolute or relative). Another note is that both these calls are asynchronous, and that calling the anonymous callbacks can have repercussions in regard to scope. So it make sense to call named functions declared in a strategic place.</p>
<p>Here is an example in which I call these methods inside a constructor function, and I need the callbacks to have access to some private variables of said function. The function takes a fileEntry object, and constructs a metadata object to be rendered as a table (and eventually be exported as an csv). Relating to our topic at hand, I am changing a metadata default for images to another value if the jpg sits next to a swf. </p>
<p>Anyway, you can see how in my &#8220;success&#8221; callback, I&#8217;m updating an external <code>data</code> array and re-rendering a table based on the async results. </p>
<pre class="brush: jscript; title: ; notranslate">
function Asset (entry){
				
				console.dir(entry);
			
				var _fileParts = entry.name.split('.');
				console.log(&quot;fileParts&quot;,_fileParts);
				var _ext = _fileParts.splice(-1,1).toString();
				console.log(&quot;ext&quot;,_ext);
				var _fileName = _fileParts.join('.');
				console.log(&quot;fileName&quot;,_fileName);
				var _nameArray =  _fileName.split('_');
				console.log(&quot;nameArray&quot;,_nameArray);
				var _quality = (_ext === 'mp4') ? _nameArray.splice(-1,1).toString() : 'lo';
				console.log(&quot;quality&quot;,_quality);
				
				
				this.filename = entry.fullPath;
				this.nb_asset_type = 'UNKNOWN';
				this.video_resolution_label = &quot;low&quot;;
				this.video_inline_pixel_height = null;
				this.video_inline_pixel_width = null;
				this.video_native_pixel_height = null;
				this.video_native_pixel_width = null;
				this.video_bitrate = null;
				this.flash_pixel_height = null;
				this.flash_pixel_width = null;
				this.flash_version = null;
				this.flash_params = null;
				this.flash_variables = null;
				
				this.setter = function() {
					for(var prop in arguments[0])   {
						if(this.hasOwnProperty(prop))   {
							this[prop]=arguments[0][prop];   
						}
					}
				}
				
				switch(_ext) {
				case &quot;mp4&quot; :
				this.nb_asset_type = &quot;video&quot;;
				if (_quality === &quot;hi&quot;) {
					this.video_resolution_label = &quot;high&quot;;
					this.nb_asset_type += &quot; (high res.)&quot;;
					this.video_inline_pixel_height = 600;
					this.video_inline_pixel_width =  800;
					this.video_native_pixel_height = 600;
					this.video_native_pixel_width = 800;
					this.video_bitrate = 768;
				}
				else if (_quality === &quot;med&quot;) {
					this.video_resolution_label = &quot;medium&quot;;
					this.nb_asset_type += &quot;  (medium res.)&quot;;
					this.video_inline_pixel_height = 360;
					this.video_inline_pixel_width =  480;
					this.video_native_pixel_height = 360;
					this.video_native_pixel_width = 480;
					this.video_bitrate = 512;
				}
				else {
					this.nb_asset_type += &quot; (low res.)&quot;;
					this.video_inline_pixel_height = 240;
					this.video_inline_pixel_width =  320;
					this.video_native_pixel_height = 240;
					this.video_native_pixel_width = 320;
					this.video_bitrate = 256;
				}
				break;
				case &quot;xml&quot; :
				this.nb_asset_type = &quot;video closed_caption file&quot;;
				break;
				case &quot;jpg&quot; :
				this.nb_asset_type = &quot;video poster image&quot;;
				break;
				case &quot;txt&quot; :
				this.nb_asset_type = &quot;video transcript&quot;;
				break;
				case &quot;swf&quot;:
				this.nb_asset_type = &quot;flash&quot;;
				this.flash_pixel_height = 595;
				this.flash_version = 7;
				break;
				default :
				this.nb_asset_type = &quot;UNKNOWN&quot;;
				break;
			}
			
			function foundSWF(){
				data[position - 2].nb_asset_type = &quot;flash poster image&quot;;
				$container.handsontable('render');
			}
			
			function noSWF(){
				nb_asset_type = &quot;video poster image&quot;;
			}
			
			if (_ext == &quot;jpg&quot;) {
					entries[i].getParent(function(dirEntry) {
					dirEntry.getFile(_fileName+'.swf', {}, 
					foundSWF, 
					noSWF);
				}, 
				function(error) {
					nb_asset_type = error.name;
				})
				}
			
			}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/working-with-html5-getparent-and-getfile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count Photos in a WordPress Gallery</title>
		<link>http://jamesfishwick.com/count-photos-in-a-wordpress-gallery/</link>
		<comments>http://jamesfishwick.com/count-photos-in-a-wordpress-gallery/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 12:47:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=582</guid>
		<description><![CDATA[<p>You may wish to display a count  of the photos in your Gallery for a given post, possibly on the front index. I&#8217;ve often seen this done with SQL queries, which always made me cringe a bit. Its also advised &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>You may wish to display a count  of the photos in your Gallery for a given post, possibly on the front index. I&#8217;ve often seen this done with SQL queries, which always made me cringe a bit. Its also advised that you count the post children, going over an array like:</p>
<pre class="brush: php; title: ; notranslate">$images =&amp; get_children( 'post_type=attachment&amp;post_mime_type=image' );</pre>
<p>The problem here is that galleries, especially under the new media manager paradigm, don&#8217;t necessarily contain just images attached to the post. They actually could contain none, some or all.</p>
<p>So, the best way is actually to use <a href="http://codex.wordpress.org/Function_Reference/get_shortcode_regex" target="_blank">get_shortcode_regex</a> to grab the gallery shortcode. From there, we can count the &#8220;id&#8221; arguments, which represent universal identifiers for the photos regardless of what post they are attached to. If we don&#8217;t find any such arguments, we know that just the unadorned &#8220;[ gallery ]&#8221; is being used, meaning its safe to count images attachments.</p>
<pre class="brush: php; title: ; notranslate">
if ( has_post_format( 'gallery' )) {
						// or filter by custom post type or category
						$pattern = get_shortcode_regex();
						preg_match('/'.$pattern.'/s', $post-&gt;post_content, $matches);
						if (is_array($matches) &amp;&amp; $matches[2] == 'gallery') {
						   // do something
						   preg_match('/\[ gallery ids=\&quot;(.*?)\&quot;]/',$matches[0],$ids);
						  if (is_array($ids) &amp;&amp; $ids[1] ) {
							$photos = explode(',',$ids[1]);
						  } else {
							$photos = get_children( array( 'post_parent' =&gt; $post-&gt;ID, 'post_type'   =&gt; 'image' ) );
						  }
						  echo count($photos ).' photos in this gallery.';
						}
					}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/count-photos-in-a-wordpress-gallery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jetpack Audio Embed Shortcode: A fix for Flash fallback not working</title>
		<link>http://jamesfishwick.com/audio-embed-shortcode-flash-fallback-not-working-with-jetpack-a-fix/</link>
		<comments>http://jamesfishwick.com/audio-embed-shortcode-flash-fallback-not-working-with-jetpack-a-fix/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 15:56:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=585</guid>
		<description><![CDATA[<p>If you&#8217;re using all mp3&#8242;s or otherwise triggering flash fallback with your audio embed, check to make sure that the &#8220;player.swf&#8221; that Jetpack is trying to use is actually up. For example, http://en.wordpress.com/wp-content/plugins/audio-player/player.swf or http://s0.wp.com/wp-content/plugins/audio-player/player.swf (At the time of this &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re using all mp3&#8242;s or otherwise triggering flash fallback with your audio embed, check to make sure that the &#8220;player.swf&#8221; that Jetpack is trying to use is actually up. For example, http://en.wordpress.com/wp-content/plugins/audio-player/player.swf or http://s0.wp.com/wp-content/plugins/audio-player/player.swf (At the time of this post, these both return 404). If these are down, you&#8217;ll need to use a local copy of &#8220;player.swf&#8221; until they go back up.</p>
<p>Here is a temporary fix:</p>
<p><a href="http://wordpress.org/extend/plugins/audio-player/developers/" target="_blank">Grab this old plugin</a> (what Jetpack&#8217;s audio support is based from). Don&#8217;t install it, though. Find the &#8220;player.swf&#8221; file inside &#8220;\audio-player.2.0.4.6\audio-player\assets&#8221; Place this somewhere on your site, a good place is in your plugin directory.<br />
Then go to &#8220;/wp-content/plugins/jetpack/modules/shortcodes&#8221; on your ftp, and edit &#8220;audio.php&#8221; Change line 237 to your local copy of &#8220;player.swf.&#8221; Change back when Automattic get their ish together.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/audio-embed-shortcode-flash-fallback-not-working-with-jetpack-a-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read a File Line By Line</title>
		<link>http://jamesfishwick.com/read-a-file-line-by-line/</link>
		<comments>http://jamesfishwick.com/read-a-file-line-by-line/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 18:11:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Code Snippet]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=568</guid>
		<description><![CDATA[<p>Should be what you need 90% of the time in all shells:&#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>Should be what you need 90% of the time in all shells:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
file=&quot;/export/home/jfishwi/paths.txt&quot;
while IFS= read -r line
do
        # display $line or do somthing with $line
	echo &quot;$line&quot;
done &lt;&quot;$file&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/read-a-file-line-by-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List folders with file counts</title>
		<link>http://jamesfishwick.com/list-folders-with-file-counts/</link>
		<comments>http://jamesfishwick.com/list-folders-with-file-counts/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 18:55:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Code Snippet]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=565</guid>
		<description><![CDATA[&#8230;]]></description>
				<content:encoded><![CDATA[<pre class="brush: bash; title: ; notranslate">
find -mindepth 1 -maxdepth 1 -type d | while read dir; do
     count=$(find &quot;$dir&quot; -type f | wc -l);
     echo &quot;$dir ; $count&quot;; 
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/list-folders-with-file-counts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move all x files recursively to a specific directory</title>
		<link>http://jamesfishwick.com/move-all-x-files-recursively-to-a-specific-directory/</link>
		<comments>http://jamesfishwick.com/move-all-x-files-recursively-to-a-specific-directory/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 17:16:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Code Snippet]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=561</guid>
		<description><![CDATA[<p>Easiest way I know:</p>
<p>Obviously, your filemask will probably be a bit more involved. <img src='http://i1.wp.com/jamesfishwick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' data-recalc-dims="1" /> &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>Easiest way I know:</p>
<pre class="brush: bash; title: ; notranslate">find sourcedir -type f -exec mv {} targetdir \;</pre>
<p>Obviously, your filemask will probably be a bit more involved. <img src='http://i1.wp.com/jamesfishwick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' data-recalc-dims="1" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/move-all-x-files-recursively-to-a-specific-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getting the filename in JavaScript</title>
		<link>http://jamesfishwick.com/getting-the-filename-in-javascript/</link>
		<comments>http://jamesfishwick.com/getting-the-filename-in-javascript/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 04:33:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=556</guid>
		<description><![CDATA[<p>weeee, nice little one liner:&#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>weeee, nice little one liner:</p>
<pre class="brush: jscript; title: ; notranslate">
var filename = document.URL.replace(/^.*[\\\/]/, '');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/getting-the-filename-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Media Library pre-processing with phpThumb</title>
		<link>http://jamesfishwick.com/wordpress-media-library-pre-processing-with-phpthumb/</link>
		<comments>http://jamesfishwick.com/wordpress-media-library-pre-processing-with-phpthumb/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 22:18:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=550</guid>
		<description><![CDATA[<p>Certainly great things can be done to images with CSS3 and polyfills, and WP&#8217;s image editor is pretty keen&#8230; but sometimes you want some sort of image processing done in-between when you upload an image and its saved to the &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>Certainly great things can be done to images with CSS3 and polyfills, and WP&#8217;s image editor is pretty keen&#8230; but sometimes you want some sort of image processing done in-between when you upload an image and its saved to the library. Maybe rounded corners, color correction, watermarks, <a href="http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php">whatever</a>.</p>
<p>If you try to do this processing dynamically via phpThumb&#8217;s url API, it can be quite a challenge to get caching working correctly, and, generally you will be seeing performance hits, both in memory and page page. Luckily, we can hook into &#8220;image_make_intermediate_size&#8221; and process the image as described above. Try something like this in your <code>functions.php</code></p>
<p><span id="more-550"></span></p>
<pre class="brush: php; title: ; notranslate">
//obviously we need the library
require_once('/home/xxxx/public_html/wp-content/plugins/get-post-image/phpthumb/phpthumb.class.php');
add_filter('image_make_intermediate_size', 'james_rounded_filter');
 
function james_rounded_filter($file) {

        // create phpThumb object
        $phpThumb = new phpThumb();
        $phpThumb-&gt;resetObject();

        // set data source -- do this first, any settings must be made AFTER this call      
        $phpThumb-&gt;setSourceData(file_get_contents($file));
        $output_filename = $file;

        // PLEASE NOTE:
        // You must set any relevant config settings here. The phpThumb
        // object mode does NOT pull any settings from phpThumb.config.php
        $phpThumb-&gt;setParameter('config_document_root', '/home/xxxx/public_html/wp-content/plugins/get-post-image/phpthumb/');
        $phpThumb-&gt;setParameter('config_cache_directory', '/home/xxxx/public_html/wp-content/cache/phpthumb/');
		$phpThumb-&gt;setParameter('cache_directory_depth', 4);

        // set parameters (see &quot;URL Parameters&quot; in phpthumb.readme.txt)
        $phpThumb-&gt;setParameter('fltr', 'ric|12|12');
        $phpThumb-&gt;setParameter('q', '95');

        // generate &amp; output thumbnail
        if ($phpThumb-&gt;GenerateThumbnail()) { // this line is VERY important, do not remove it!
            if ($phpThumb-&gt;RenderToFile($output_filename)) {
                // do something on success, besides processing
				error_log('Successfully rendered to &quot;'.$output_filename.'&quot;'.&quot;\n\n&quot;, 3, '/home/xxxx/public_html/wp-content/cache/thumblog.txt');
            } else {
                // do something with debug/error messages
                error_log('Failed:'.implode(&quot;\n\n&quot;, $phpThumb-&gt;debugmessages), 3, '/home/xxxx/public_html/wp-content/cache/thumblog.txt');
               die;
            }
        } else {
            // do something with debug/error messages
            error_log('Failed:'.$phpThumb-&gt;fatalerror.&quot;\n\n&quot;.implode(&quot;\n\n&quot;, $phpThumb-&gt;debugmessages), 3, '/home/xxxx/public_html/wp-content/cache/thumblog.txt');
            die;
        }
	
		if ( !is_wp_error($output_filename) &amp;&amp; $output_filename) {
			return $output_filename;
		}
		
		return false;
}
</pre>
<p>If you only want to your processing to happen against a subset of images, then you should define a custom image size for this subset. You can then filter the pre-processing using a function like so:</p>
<pre class="brush: php; title: ; notranslate">
function my_get_image_size( $name ) {
	global $_wp_additional_image_sizes;

	if ( isset( $_wp_additional_image_sizes[$name] ) )
		return $_wp_additional_image_sizes[$name];

	return false;
}
</pre>
<p><code>$name</code> being whatever you named your custom size. Getter would be, something like this (what you are getting is an array of the values you initially set):</p>
<pre class="brush: php; title: ; notranslate">
$image_size = my_get_image_size( 'my-custom-size' );
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/wordpress-media-library-pre-processing-with-phpthumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shuffle multiple arrays in the same way</title>
		<link>http://jamesfishwick.com/shuffle-multiple-arrays-in-the-same-way/</link>
		<comments>http://jamesfishwick.com/shuffle-multiple-arrays-in-the-same-way/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 02:37:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=519</guid>
		<description><![CDATA[<p>Say you have multiple arrays of the same length which you want to shuffle. But they are &#8220;row&#8221; arrays, in which the &#8220;columns&#8221; need to stay the same as order is changed.</p>
<p>For example, if I had three arrays like &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>Say you have multiple arrays of the same length which you want to shuffle. But they are &#8220;row&#8221; arrays, in which the &#8220;columns&#8221; need to stay the same as order is changed.</p>
<p>For example, if I had three arrays like so:</p>
<pre class="brush: php; title: ; notranslate">
$colors = array('red', 'blue', 'green', 'yellow');
$numbers = array(1, 2, 3, 4);
$shapes = array('circle', 'square', 'triangle', 'pentagon'); 
</pre>
<p>And then after the shuffle of which I speak you might have:</p>
<pre class="brush: php; title: ; notranslate">
$colors = array( 'green', 'yellow', 'red', 'blue');
$numbers = array(3, 4, 1, 2);
$shapes = array('triangle', 'pentagon', 'green', 'square', ); 
</pre>
<p>In other words, the position of &#8220;green&#8221; always matches &#8220;3&#8243; always matches &#8220;triangle.&#8221;</p>
<p>This does the trick:</p>
<pre class="brush: php; title: ; notranslate">
if (my arrays all equal each other, exercise for user) ) {
			$count = count($colors);
			$order = range(1, $count);

			shuffle($order);
			array_multisort($order, $colors, $numbers, $shapes);
		}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/shuffle-multiple-arrays-in-the-same-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Jetpack Easy Playlists update</title>
		<link>http://jamesfishwick.com/jetpack-easy-playlists-update-2/</link>
		<comments>http://jamesfishwick.com/jetpack-easy-playlists-update-2/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 18:32:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jamesfishwick.com/?p=511</guid>
		<description><![CDATA[<p>Check it out; using these options:</p>
<p>[<em>jplaylist pid="496" print="ul" linked="true" random="true" external="400,500"</em>]</p>
<p><a href="http://jamesfishwick.com/software/jetpack-easy-playlists/">JEP homepage</a> (yeah, I&#8217;ll update those screenshots some day&#8230;)&#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>Check it out; using these options:</p>
<p>[<em>jplaylist pid="496" print="ul" linked="true" random="true" external="400,500"</em>]</p>
<span style='text-align:left;display:block;'><p>Download: <a href="http://jamesfishwick.com/wp-content/uploads/2012/12/13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3">13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3</a><br />Download: <a href="http://jamesfishwick.com/wp-content/uploads/2012/12/3-04-Telstar.mp3">3-04-Telstar.mp3</a><br />Download: <a href="http://jamesfishwick.com/wp-content/uploads/2012/12/02-Peter-Jay-The-Blue-Men-Friendship.mp3">02-Peter-Jay-The-Blue-Men-Friendship.mp3</a><br /></p></span>
<script type="text/javascript">function jep_popup() {var w = window.open("","jep","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=500");w.document.write("<html><head><title>Another Jetpack Easy Playlists update</title><link rel=\"stylesheet\" href=\"http://jamesfishwick.com/wp-content/themes/origin/style.min.css\" /></head><body><div class=\"post type-jep\"><h1 class=\"entry-title\">Another Jetpack Easy Playlists update</h1><div class=\"post_content entry-content\">" + unescape("<span style='text-align:left;display:block;'><p>Download: <a href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3\">13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3<\/a><br \/>Download: <a href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/3-04-Telstar.mp3\">3-04-Telstar.mp3<\/a><br \/>Download: <a href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/02-Peter-Jay-The-Blue-Men-Friendship.mp3\">02-Peter-Jay-The-Blue-Men-Friendship.mp3<\/a><br \/><\/p><\/span><ul><li>Green Jeans &mdash; The Fabulous Flee-Rakkers&nbsp;<a target=\"_blank\" href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3\">[download]<\/a><\/li><li>Telstar &mdash; The Tornados&nbsp;<a target=\"_blank\" href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/3-04-Telstar.mp3\">[download]<\/a><\/li><li>Friendship &mdash; Peter Jay & The Blue Men - &nbsp;<a target=\"_blank\" href=\"http:\/\/jamesfishwick.com\/wp-content\/uploads\/2012\/12\/02-Peter-Jay-The-Blue-Men-Friendship.mp3\">[download]<\/a><\/li><\/ul>") + "</div></div></body></html>");w.document.close(); }</script>
<form><input type="button" value="Pop-up" onclick="jep_popup()" /></form>
<ul><li>Green Jeans &mdash; The Fabulous Flee-Rakkers&nbsp;<a target="_blank" href="http://jamesfishwick.com/wp-content/uploads/2012/12/13-The-Fabulous-Flee-Rakkers-Green-Jeans.mp3">[download]</a></li><li>Telstar &mdash; The Tornados&nbsp;<a target="_blank" href="http://jamesfishwick.com/wp-content/uploads/2012/12/3-04-Telstar.mp3">[download]</a></li><li>Friendship &mdash; Peter Jay & The Blue Men - &nbsp;<a target="_blank" href="http://jamesfishwick.com/wp-content/uploads/2012/12/02-Peter-Jay-The-Blue-Men-Friendship.mp3">[download]</a></li></ul>
<p><a href="http://jamesfishwick.com/software/jetpack-easy-playlists/">JEP homepage</a> (yeah, I&#8217;ll update those screenshots some day&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesfishwick.com/jetpack-easy-playlists-update-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
