<?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>Jackplug Web Design</title>
	<atom:link href="http://jackplug.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://jackplug.co.uk</link>
	<description>Not just another WordPress site</description>
	<lastBuildDate>Fri, 27 Jan 2012 22:36:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Remote File Date/Time</title>
		<link>http://jackplug.co.uk/remote-file-datetime/</link>
		<comments>http://jackplug.co.uk/remote-file-datetime/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 08:42:43 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5528</guid>
		<description><![CDATA[Working to display webcam images, I needed to capture the time that the image files were last modified. The WordPress function &#8216;filemtime&#8217; does this for local files but won&#8217;t work with remote files. I found this function on codewalkers.com credited to Joe Ferris: &#60;?php function filemtime_remote($uri) { $uri = parse_url($uri); $handle = @fsockopen($uri['host'],80); if(!$handle) return [...]]]></description>
			<content:encoded><![CDATA[<p>Working to display webcam images, I needed to capture the time that the image files were last modified. The WordPress function &#8216;filemtime&#8217; does this for local files but won&#8217;t work with remote files. I found this function on <a title="codewalkers.com" href="http://www.codewalkers.com">codewalkers.com</a> credited to Joe Ferris:</p>
<pre>&lt;?php
function filemtime_remote($uri)
{
    $uri = parse_url($uri);
    $handle = @fsockopen($uri['host'],80);
    if(!$handle)
        return 0;
    fputs($handle,"GET $uri[path] HTTP/1.1\r\nHost: $uri[host]\r\n\r\n");
    $result = 0;
    while(!feof($handle))
    {
        $line = fgets($handle,1024);
        if(!trim($line))
            break;
        $col = strpos($line,':');
        if($col !== false)
        {
            $header = trim(substr($line,0,$col));
            $value = trim(substr($line,$col+1));
            if(strtolower($header) == 'last-modified')
            {
                $result = strtotime($value);
                break;
            }
        }
    }
    fclose($handle);
    return $result;
}
?&gt;</pre>
<p>You can display the result using the <a title="PHP Date" href="http://php.net/manual/en/function.date.php">PHP date parameters</a>. For example:</p>
<pre>&lt;?php
echo date('g:ia',filemtime_remote('FILEURL')); 
<span class="Apple-style-span" style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px; white-space: pre;">?&gt;</span></pre>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/remote-file-datetime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn Off Feeds</title>
		<link>http://jackplug.co.uk/turn-off-feeds/</link>
		<comments>http://jackplug.co.uk/turn-off-feeds/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 08:48:11 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5513</guid>
		<description><![CDATA[Most of my websites are not structured as blogs and I needed away to turn off the RSS and Atom feeds to avoid confusion. Google turns up lots of different approaches to this but the tidiest in my opinion is to modify the theme by adding a few lines to functions.php as follows: /** * [...]]]></description>
			<content:encoded><![CDATA[<p>Most of my websites are not structured as blogs and I needed away to turn off the RSS and Atom feeds to avoid confusion. Google turns up lots of different approaches to this but the tidiest in my opinion is to modify the theme by adding a few lines to functions.php as follows:</p>
<pre>/**
 * Disable Feeds
 */
function disable_our_feeds() {
	wp_die( __('No RSS Feed Available, 
Please visit our &lt;a href="'. get_bloginfo('url') .'"&gt;homepage&lt;/a&gt;.') );
}

add_action('do_feed', 'disable_our_feeds', 1);
add_action('do_feed_rdf', 'disable_our_feeds', 1);
add_action('do_feed_rss', 'disable_our_feeds', 1);
add_action('do_feed_rss2', 'disable_our_feeds', 1);
add_action('do_feed_atom', 'disable_our_feeds', 1);</pre>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/turn-off-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Blackberry is Not Working</title>
		<link>http://jackplug.co.uk/my-blackberry-is-not-working/</link>
		<comments>http://jackplug.co.uk/my-blackberry-is-not-working/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 12:17:33 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5465</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/kAG39jKi0lI" frameborder="0"><br />
</iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/my-blackberry-is-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Cycle Random</title>
		<link>http://jackplug.co.uk/wp-cycle-random/</link>
		<comments>http://jackplug.co.uk/wp-cycle-random/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 08:33:03 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5454</guid>
		<description><![CDATA[WP Cycle is a simple plugin using jQuery Cycle that can be handy when you need an image rotator that&#8217;s not associated with a post, for example in a site header. However, in a header, you almost always want the images presented in random order and there is no obvious way to achieve this. A search of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/wp-cycle/" target="_blank">WP Cycle</a> is a simple plugin using <a href="http://malsup.com/jquery/cycle/">jQuery Cycle</a> that can be handy when you need an image rotator that&#8217;s not associated with a post, for example in a site header. However, in a header, you almost always want the images presented in random order and there is no obvious way to achieve this. A search of the WordPress forums provided the answer:</p>
<p>Just open up the main plugin file  wp-cycle.php and search for this line: <span style="color: #3366ff;">foreach((array)$wp_cycle_images as $image =&gt; $data) {</span> and paste <span style="color: #3366ff;">shuffle($wp_cycle_images);</span> immediately before the <span style="color: #3366ff;">foreach</span> line.</p>
<p>If you need an image rotator within a post <a href="http://blog.estherswhite.net/wordcycle/" target="_blank">Wordcycle</a> is a more flexible solution. It uses the images from the post gallery and provides a very comprehensive selection of shortcode options.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/wp-cycle-random/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thumbnails and Captions</title>
		<link>http://jackplug.co.uk/thumbnails-and-captions/</link>
		<comments>http://jackplug.co.uk/thumbnails-and-captions/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 19:57:51 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5448</guid>
		<description><![CDATA[The new &#8216;featured image&#8217; facility on WordPress is really useful. It has to be enabled in your themes functions.php file with a couple of lines of code something like this: add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 266, 999 ); Once it&#8217;s enabled you can add the image very easily anywhere in the loop using &#60;?php the_post_thumbnail(); ?&#62;. Mark [...]]]></description>
			<content:encoded><![CDATA[<p>The new &#8216;featured image&#8217; facility on WordPress is really useful. It has to be enabled in your themes functions.php file with a couple of lines of code something like this:</p>
<pre>add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 266, 999 );</pre>
<p>Once it&#8217;s enabled you can add the image very easily anywhere in the loop using &lt;?php the_post_thumbnail(); ?&gt;.</p>
<p><a href="http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/" target="_blank">Mark Jaquith</a> has written a nice article explaining how you can set up different images sizes and there&#8217;s a very useful plugin called <a href="http://wordpress.org/extend/plugins/multiple-post-thumbnails/" target="_blank">Multiple Post Thumbnails</a> that allows the addition of multiple featured images.</p>
<p>It&#8217;s not obvious how you can add a caption to a featured image. The trick lies in calling the associated attachment post. You can show the image caption using the following code:</p>
<pre>&lt;?php the_post_thumbnail();
echo get_post(get_post_thumbnail_id())-&gt;post_excerpt; ?&gt;</pre>
<p>Similarly you can show the full description or the image title if you prefer:</p>
<pre>&lt;?php the_post_thumbnail();
echo get_post(get_post_thumbnail_id())-&gt;post_content; ?&gt;
&lt;?php the_post_thumbnail();
echo get_post(get_post_thumbnail_id())-&gt;post_title; ?&gt;</pre>
<p>You can add any classes you need in order to style the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/thumbnails-and-captions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best WordPress Events Manager</title>
		<link>http://jackplug.co.uk/best-wordpress-events-manager/</link>
		<comments>http://jackplug.co.uk/best-wordpress-events-manager/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 10:51:04 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5430</guid>
		<description><![CDATA[My favourite Events Manager for WordPress is RS Events Multiday. If you&#8217;re a template hacker like me you&#8217;ll find this plugin easy to use and very flexible. Three different functions are provided and output can be conveniently customised using four HTML strings and a series of parameters. The plugin has been developed from Robert Sargant&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>My favourite Events Manager for WordPress is <a title="RS Events Multiday" href="http://dalking.de/rs-event-multiday/" target="_blank">RS Events Multiday</a>. If you&#8217;re a template hacker like me you&#8217;ll find this plugin easy to use and very flexible. Three different functions are provided and output can be conveniently customised using four HTML strings and a series of parameters. The plugin has been developed from Robert Sargant&#8217;s original RS Events by Florian Meyer. There&#8217;s lots of helpful information on how to use it on the <a title="Wordpress Plugins" href="http://wordpress.org/extend/plugins/rs-event-multiday/" target="_blank">WordPress plugin page</a> and on <a title="RS Event Multiday" href="http://dalking.de/rs-event-multiday/" target="_blank">Florian&#8217;s website</a>.</p>
<p>I recently wanted to show events from a series of event categories and style the output differently for each category. This turned out to be a bit beyond the scope of the HTML parameters but Florian very kindly came up with a modified loop that did the job. I&#8217;ve reproduced the loop below in case it&#8217;s helpful to other users. It&#8217;s in use at <a title="What's On in Constantine Cornwall" href="http://constantinecornwall.com/whats-on/" target="_blank">constantinecornwall.com</a>. I&#8217;m sure it could be further adapted to provide many other ways of showing events.</p>
<pre>&lt;?php 
/* get IDs of event-posts and store them in an array */
$rs_ids = array();
	$rs_ids = rs_event_id(); 

foreach($rs_ids as $rs_id) {
	 /* define query and start Loop */
	$args = array(
		'p'  =&gt; $rs_id
		);
 	$rs_id_query = new WP_Query($args);
 while ($rs_id_query-&gt;have_posts()) : $rs_id_query-&gt;the_post();
 	?&gt;

&lt;div class="eventlist &lt;?php
/* give div a category id for styling and echo category name as title*/
foreach((get_the_category()) as $category) {
     echo 'cat' . $category-&gt;cat_ID . ' ';
 } ?&gt;"&gt;
	&lt;h3&gt;&lt;?php
 		foreach((get_the_category()) as $category) {
 		echo $category-&gt;cat_name . ' ';
 		}
 	?&gt;&lt;/h3&gt;

&lt;?php
/* do some stuff with html and php, e.g. use rs_event_post() */
		$args = array(
			'html_post_v1' 	=&gt;
			'&lt;h4&gt;%DATE% %TIME% &lt;span&gt;%LOCATION%&lt;/span&gt;&lt;/h4&gt;',
 			'html_post_v2' 	=&gt;
			'&lt;h4&gt;%DATE% &lt;span&gt;%LOCATION%&lt;/span&gt;&lt;/h4&gt;',
 			'html_post_v3' 	=&gt;
			'&lt;h4&gt;%DATE% to %ENDDATE%&lt;span&gt;%LOCATION%&lt;/span&gt;&lt;/h4&gt;',
			'html_post_v4' 	=&gt;
			'&lt;h4&gt;%DATE% (multi-day)&lt;span&gt;%LOCATION%&lt;/span&gt;&lt;/h4&gt;',
			'date_format_1'	=&gt; 'l jS F',
			'date_format_2'	=&gt; 'l jS F',
 			'time_format'	=&gt; 'g:ia',
		);
 		rs_event_post($args) ?&gt;

 		 	&lt;h5&gt;&lt;?php the_title(); ?&gt;&lt;/h5&gt;
	&lt;?php the_content(); ?&gt;
 &lt;div style="clear:both"&gt;&lt;/div&gt;
&lt;/div&gt;
	 &lt;?php
/* end Loop */
	endwhile;
/* end foreach */
 	} ?&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/best-wordpress-events-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fetch Posts from Another Site</title>
		<link>http://jackplug.co.uk/fetch-posts-from-another-site/</link>
		<comments>http://jackplug.co.uk/fetch-posts-from-another-site/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 10:17:42 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5423</guid>
		<description><![CDATA[If you&#8217;re using WordPress Multisite you may be running a bunch of inter-related sites. I wanted to pull posts from one site to another within a group of community websites. This turns out to be really easy to do using a function called &#8216;switch_to_blog&#8217;. Just use the following code in a template within the destination [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using WordPress Multisite you may be running a bunch of inter-related sites. I wanted to pull posts from one site to another within a group of community websites. This turns out to be really easy to do using a function called &#8216;switch_to_blog&#8217;. Just use the following code in a template within the destination site to switch to the source site &#8211; site #1 in this example:</p>
<pre>&lt;?php global $switched; switch_to_blog(1);?&gt;
//call posts from blog 1 as required //
&lt;?php restore_current_blog();?&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/fetch-posts-from-another-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery Tools to show Posts</title>
		<link>http://jackplug.co.uk/using-jquery-tools-to-show-posts/</link>
		<comments>http://jackplug.co.uk/using-jquery-tools-to-show-posts/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 09:57:53 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5222</guid>
		<description><![CDATA[http://jackplug.co.uk/using-jquery-tools-to-show-posts/]]></description>
			<content:encoded><![CDATA[<div>
<p>http://jackplug.co.uk/using-jquery-tools-to-show-posts/</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/using-jquery-tools-to-show-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Video Overlays</title>
		<link>http://jackplug.co.uk/video-overlays/</link>
		<comments>http://jackplug.co.uk/video-overlays/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 15:07:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5192</guid>
		<description><![CDATA[With a little ingenuity it&#8217;s possible to trigger HTML5 video overlays from anywhere within a Page or Post. In the case of a post you&#8217;ll need the Custom Post Template plugin which allows a custom template to be applied to a Post. The first example is a movie trailer: Unstoppable, based on the true story of [...]]]></description>
			<content:encoded><![CDATA[<p>With a little ingenuity it&#8217;s possible to trigger HTML5 video overlays from anywhere within a Page or Post. In the case of a post you&#8217;ll need the <a href="http://wordpress.org/extend/plugins/custom-post-template/" target="_blank">Custom Post Template</a> plugin which allows a custom template to be applied to a Post.</p>
<p>The first example is a movie trailer: <a rel="#overlay1" href="#">Unstoppable</a>, based on the true story of a runaway train and starring Denzil Washington.  Or maybe you&#8217;d prefer the remake of <a rel="#overlay2" href="#">True Grit</a> with Jeff Bridges.</p>
<p>I&#8217;m using the beta version of <a href="http://foliovision.com/seo-tools/wordpress/plugins/fv-wordpress-flowplayer/html5-support">FV WordPress Flowplayer</a> combined with the jQuery video overlay tool described on the <a href="http://flowplayer.org/tools/index.html" target="_blank">Flowplayer</a> website. The integration within WordPress is a bit clunky relying on links with a unique rel attribute and a template with the appropriate video within a matching div. I suppose I could have put the code from the template into the post as well, but I wanted to be able to trigger various videos from different places in the site and this seemed the best approach. I&#8217;m sure someone out there can point me at a more elegant way to achieve this, but in the meantime this seems to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/video-overlays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unstoppable</title>
		<link>http://jackplug.co.uk/unstoppable/</link>
		<comments>http://jackplug.co.uk/unstoppable/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 10:13:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://jackplug.co.uk/?p=5156</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<a id="wpfp_bd8b8cb5c5a541d0a291ea4dc23fdabd" style="width:640px; height:272px;" class="flowplayer_container player plain"></a>
]]></content:encoded>
			<wfw:commentRss>http://jackplug.co.uk/unstoppable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

