<?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>dBaines.com</title>
	<atom:link href="http://dbaines.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dbaines.com</link>
	<description>Portfolio and Blog of David Baines, South Australian Web Developer</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:27:30 +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>DotNetNuke Quick Tip: Remove gap between input and button</title>
		<link>http://dbaines.com/blog/archive/dotnetnuke-quick-tip-remove-gap-between-input-and-button/</link>
		<comments>http://dbaines.com/blog/archive/dotnetnuke-quick-tip-remove-gap-between-input-and-button/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 02:24:00 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1988</guid>
		<description><![CDATA[A quick little tutorial on how to remove a gap between the DNN search skin object.]]></description>
			<content:encoded><![CDATA[<p>If you're working on a DNN skin that requires the search button to be next to the search input you're going to be annoyed by a tiny little gap that likes to insert itself between your elements.</p>
<p>Fear not, though, it's a relatively simple issue to fix!</p>
<p>The file you need to edit is: <code class="inline-code">/admin/Skins/search.ascx</code>.</p>
<p>Inside that file on line 6 you'll find a sneaky little non-breaking space element. Delete that element.</p>
<figure id="attachment_1991" aria-describedby="figcaption_attachment_1991" style="width: 868px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_nbsp.jpg"><img class="size-full wp-image-1991" title="non-breaking space" src="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_nbsp.jpg" alt="" width="858" height="335" /></a><figcaption id="figcaption_attachment_1991"> non-breaking space</figcaption></figure>
<p>&nbsp;</p>
<p>Save that file and upload it if necessary and you'll notice your search bar goes from:</p>
<figure id="attachment_1989" aria-describedby="figcaption_attachment_1989" style="width: 247px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_boo.jpg"><img class="size-full wp-image-1989" title="Boo!" src="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_boo.jpg" alt="" width="237" height="67" /></a><figcaption id="figcaption_attachment_1989">Boo!</figcaption></figure>
<p>to:</p>
<figure id="attachment_1992" aria-describedby="figcaption_attachment_1992" style="width: 247px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_yay.jpg"><img class="size-full wp-image-1992" title="Yay!" src="http://dbaines.com/blog/wp-content/uploads/2012/02/gv_yay.jpg" alt="" width="237" height="67" /></a><figcaption id="figcaption_attachment_1992">Yay!</figcaption></figure>
<span class="message important">It's important to note that this skin file is a core file and there's always the possibility that the file will be replaced or completely changed during an upgrade. </span>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/dotnetnuke-quick-tip-remove-gap-between-input-and-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbaines2012 WordPress Theme on Github</title>
		<link>http://dbaines.com/blog/archive/dbaines2012-wordpress-theme-on-github/</link>
		<comments>http://dbaines.com/blog/archive/dbaines2012-wordpress-theme-on-github/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 11:24:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Free Download]]></category>
		<category><![CDATA[Wordpress Template]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1965</guid>
		<description><![CDATA[<p>I've done a visual refresh of the WordPress Theme here so I've started a new Github project to separate it from the previous theme.</p>
<p>Like last time, this is a development template and is in no way ready to be used on any website "as is". It's only being shared as a developer resource. If you see something here you like and want to know how it's done then you can download the source and peruse the templates <img src='http://dbaines.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is the theme being used on this website <strong>right now</strong>. It's like a live demo!</p>
<p><span id="more-1965"></span></p>

<p><strong>Version 1.1 - 2012-01-18</strong></p>
<ul>
<li>Fixed missing theme option: slider category. Specifies which category of posts to show on the homepage slider</li>
<li>Fixed google plus social </li><br />&#160;<br /> <a href="http://dbaines.com/blog/archive/dbaines2012-wordpress-theme-on-github/" class="read_more">Continue Reading</a></ul>]]></description>
			<content:encoded><![CDATA[<span class="message info">Version 1.1 - Last updated 2012-01-18<br />
Looking for help? <a title="dbaines2012 WordPress Theme Wiki" href="https://github.com/dbaines/dbaines2012-Wordpress-Theme/wiki" target="_blank">Try the wiki</a>.</span>
<p>I've done a visual refresh of the WordPress Theme here so I've started a new Github project to separate it from the previous theme.</p>
<p>Like last time, this is a development template and is in no way ready to be used on any website "as is". It's only being shared as a developer resource. If you see something here you like and want to know how it's done then you can download the source and peruse the templates <img src='http://dbaines.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is the theme being used on this website <strong>right now</strong>. It's like a live demo!</p>
<p><span id="more-1965"></span></p>
<h2 class="subheader">Version History</h2>
<p><strong>Version 1.1 - 2012-01-18</strong></p>
<ul>
<li>Fixed missing theme option: slider category. Specifies which category of posts to show on the homepage slider</li>
<li>Fixed google plus social icon options</li>
<li>Redesigned theme options page to use tabs to make it easier to use</li>
<li>Wiki now available on github project page</li>
<li>New theme options:
<ul>
<li>Social Image (/images/facebook.png)</li>
<li>Facebook og:type</li>
<li>Facebook fb:admins</li>
<li>Facebook fb:app_id</li>
<li>Meta Author</li>
<li>Meta Description</li>
<li>Meta Keywords</li>
</ul>
</li>
<li>Google +1 script now only loads if +1 has been enabled in theme options.</li>
</ul>
<p><strong>Version 1.0 - 2012-01-17</strong></p>
<p>This one is very much a continuation of <a title="dBaines.com 2011 WordPress Theme" href="http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/">the 2011 theme</a> with the following new features:</p>
<ul>
<li>Cleaned up some old and unused files</li>
<li>Visual Refresh for 2012:
<ul>
<li>Redesigned Slider, brought in tutorial posts as well as portfolio posts</li>
<li>Heavy use of CSS3 animations</li>
<li>New login screen to match the changes in WordPress 3.3.x</li>
<li>Comment and cForm form fields have been redesigned</li>
</ul>
</li>
<li>Paged posts have been styled</li>
<li>Removed some unnecessary "type" attributes on links and scripts (not needed in HTML5)</li>
<li>Theme Options rewritten and based on <a title="Plugin Options Starter Kit" href="http://wordpress.org/extend/plugins/plugin-options-starter-kit/" target="_blank">Plugin Options Starter Kit</a>, as such text customisations now have their own <acronym title="What You See Is What You Get">WYSIWYG</acronym> editor.</li>
<li>New Theme Options:
<ul>
<li>Show/Hide author information at the bottom of posts - will only display if the author has filled in their WordPress profile information.</li>
<li>Homepage: Number of slides</li>
<li>Show "Listening To" on blog posts</li>
<li>Homepage introduction text</li>
<li>Show/Hide social links in header and customise URLs</li>
</ul>
</li>
</ul>
<a href="https://github.com/dbaines/dbaines2012-Wordpress-Theme" class="downloadbtn downloadbtn_star" title="View at GitHub" onClick="javascript: _gaq.push(['_trackPageview', 'dbaines2012 WordPress Theme on Github/View at GitHub']);" target="_blank"><span class="downloadbtn_icon"></span>View at GitHub</a>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/dbaines2012-wordpress-theme-on-github/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Post Type Art Gallery Tutorial</title>
		<link>http://dbaines.com/blog/archive/wordpress-custom-post-type-art-gallery-tutorial/</link>
		<comments>http://dbaines.com/blog/archive/wordpress-custom-post-type-art-gallery-tutorial/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 05:06:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1920</guid>
		<description><![CDATA[This lengthy tutorial will teach you how to set up a custom post type for an art gallery and implementing the colorbox popups instead of full-post pages, then implementing a custom homepage with a slider of your latest images.]]></description>
			<content:encoded><![CDATA[<p>This is a multi-page post of tutorials that will teach you how to create a custom post type for an art gallery, template it and then implement a custom home page with a slider.</p>
<p>I'll be working with the as-of-writing default template, TwentyEleven, but the steps can really be applied to any skin as long as you acknowledge the dimensions of your website before you start.</p>
<p>This introductory page will act as a guide to break up the tutorial in to easy to digest chunks, so here's a run down of each page and what you will learn:</p>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Part 2" href="?page=2">Page Two</a></h2>
<figure id="attachment_1471" aria-describedby="figcaption_attachment_1471" style="width: 601px" class="wp-caption aligncenter"><a href="/blog/wp-content/uploads/2012/01/customposttype.jpg"><img class="size-full wp-image-1471" title="Custom Post Type Settings" src="/blog/wp-content/uploads/2012/01/customposttype.jpg" alt="" width="591" height="398" /></a><figcaption id="figcaption_attachment_1471">Custom Post Type Settings</figcaption></figure>
<ul>
<li>Create an "artwork" custom post type using the Custom Post Type UI plugin</li>
<li>Apply additional image sizes using the Additional Image Sizes plugin</li>
<li>Creating  your first art gallery post</li>
</ul>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Part 3" href="?page=3">Page Three</a></h2>
<figure id="attachment_1492" aria-describedby="figcaption_attachment_1492" style="width: 650px" class="wp-caption aligncenter"><a href="/blog/wp-content/uploads/2012/01/stylesadded.jpg"><img class="size-large wp-image-1492" title="Styling Added" src="/blog/wp-content/uploads/2012/01/stylesadded-1024x444.jpg" alt="" width="640" height="277" /></a><figcaption id="figcaption_attachment_1492">Styling Added</figcaption></figure>
<ul>
<li>Creating a template to display your artwork post type as a gallery rather than a series of posts.</li>
</ul>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Part 4" href="?page=4">Page Four</a></h2>
<figure id="attachment_1507" aria-describedby="figcaption_attachment_1507" style="width: 310px" class="wp-caption aligncenter"><a href="/blog/wp-content/uploads/2012/01/Colorboxed.jpg"><img class="size-medium wp-image-1507" title="Colorboxed" src="/blog/wp-content/uploads/2012/01/Colorboxed-300x243.jpg" alt="" width="300" height="243" /></a><figcaption id="figcaption_attachment_1507">Colorboxed</figcaption></figure>
<ul>
<li>Implementing Colorbox to display your "full posts" as a popup gallery</li>
</ul>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Part 5" href="?page=5">Page Five</a></h2>
<figure id="attachment_1523" aria-describedby="figcaption_attachment_1523" style="width: 650px" class="wp-caption aligncenter"><a href="/blog/wp-content/uploads/2012/01/slidercustomised.jpg"><img class="size-large wp-image-1523" title="Customised the Slider" src="/blog/wp-content/uploads/2012/01/slidercustomised-1024x579.jpg" alt="" width="640" height="361" /></a><figcaption id="figcaption_attachment_1523">Customised the Slider</figcaption></figure>
<ul>
<li>Creating a homepage for your website</li>
<li>Using Sudo Slider to develop a "latest artwork" slider.</li>
</ul>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Part 6" href="?page=6">Page Six</a></h2>
<figure id="attachment_1531" aria-describedby="figcaption_attachment_1531" style="width: 650px" class="wp-caption aligncenter"><a href="/blog/wp-content/uploads/2012/01/postmetastyled.jpg"><img class="size-large wp-image-1531" title="Styled titles and dates" src="/blog/wp-content/uploads/2012/01/postmetastyled-1024x475.jpg" alt="" width="640" height="296" /></a><figcaption id="figcaption_attachment_1531">Styled titles and dates</figcaption></figure>
<ul>
<li>Adding titles and dates to your slider and styling</li>
<li>Linking the titles directly to a colorbox popup</li>
</ul>
<h2 class="subheader"><a title="Wordpress Custom Post Type Art Gallery Tutorial - Epilogue" href="?page=7">Epilogue</a></h2>
<ul>
<li>Download final template from Github</li>
<li>Other tutorials to keep going with</li>
</ul>
<p>Ready to get started? Head on over to Part Two.</p>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/wordpress-custom-post-type-art-gallery-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Google +1 Buttons to Colorbox</title>
		<link>http://dbaines.com/blog/archive/adding-google-1-buttons-to-colorbox/</link>
		<comments>http://dbaines.com/blog/archive/adding-google-1-buttons-to-colorbox/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 21:02:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[colorbox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plus one]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1704</guid>
		<description><![CDATA[A quick run-down with code examples on how to add the google +1 button to your colorbox popups. These can be great if you have a portfolio set up like mine, where each colorbox popup is actually a post.]]></description>
			<content:encoded><![CDATA[<p>Something I've recently enabled in my theme (<a title="dBaines 2011 WordPress Template available at GitHub" href="http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/">available on GitHub</a>!) is Google +1 buttons.</p>
<p>Here I'll detail the steps I took to add the +1 buttons to my artwork and motion portfolio pages.</p>
<p>First you need to understand the logic behind my portfolio. The artwork page is actually a list of WordPress posts that have the <em>post-type</em> of artwork, so each picture has it's own post and it's own permalink. This is essential for the +1 buttons, as they each need to have their own <acronym title="Uniform Resource Locator">URL</acronym> to +1 independent of each other.</p>
<p>If you are using a different <acronym title="Content Management System">CMS</acronym>, just ensure that each image (or whatever you're <a title="Colorbox" href="http://colorpowered.com/colorbox/" target="_blank">colorboxing</a>™) has a unique <acronym title="Uniform Resource Locator">URL</acronym>, even if it's just the <acronym title="Uniform Resource Locator">URL</acronym> of the image itself.</p>
<h2 class="subheader">Step 1: Adding the <acronym title="Uniform Resource Locator">URL</acronym> somewhere that Javascript can access</h2>
<p>In my wordpress loop I needed to add the permalink for the WordPress post, in this case I just used the "data-*" attribute:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;/path/to/image.jpg&quot; data-permalink=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; class=&quot;galleryThumbnail&quot; title=&quot;my really cool image&quot;&gt;</pre></div></figure>
<p>If you're just going to use the <acronym title="Uniform Resource Locator">URL</acronym> of the image you can skip this step, as we can just steal the <acronym title="Uniform Resource Locator">URL</acronym> from the "href" attribute.</p>
<h2 class="subheader">Step 2: The Javascript</h2>
<p>I already had a custom "title" set up in my colorbox call, as I wanted the option for the user to download the image. Here is the script I had originally:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a.galleryThumbnail&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>colorbox<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
opacity<span style="color: #339933;">:</span> <span style="color:#800080;">0.92</span><span style="color: #339933;">,</span>
scalePhotos<span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
maxHeight<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;90%&quot;</span><span style="color: #339933;">,</span>
maxWidth<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;90%&quot;</span><span style="color: #339933;">,</span>
title<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> title <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> download <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxDownload&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">+</span>url<span style="color: #339933;">+</span><span style="color: #0000ff;">'&quot; title=&quot;Download This Image&quot;&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxTitleLeft&quot;&gt;'</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">+</span>download<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>I already have some variables set up in there that's pulling information from the markup. This gives you an idea on how we're going to access the permalink, so let's start the magic!</p>
<h2 class="subheader">The Magic</h2>
<p>We can't just add in the typical &lt;g:plus&gt; tag in the script since it just plain doesn't work. Conveniently, <a title="Google's PlusOne button docs" href="http://code.google.com/apis/+1button/#jsapi" target="_blank">the plus guys have a handy-dandy documentation page</a> that covers just about everything we need to tackle this problem. We need to use the Javascript <acronym title="Application Programming Interface">API</acronym> instead, which is really quite easy.</p>
<p>We need to set up a target element which is as simple as adding an empty element to the return, like so:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxTitleLeft&quot;&gt;'</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #0000ff;">'&lt;/span&gt;&lt;span id=&quot;cboxGplus&quot;&gt;&lt;/span&gt;'</span><span style="color: #339933;">+</span>download<span style="color: #339933;">;</span></pre></div></figure>
<p>So I've added an empty span with the ID of cboxGplus. Now we want to target that element with the <code class="inline-code">gapi.plusone.render</code> command. At the end of the title function, add a comma after the last curly brace ("}") then add in the colorbox "onComplete" option:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&nbsp;
title<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> title <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> download <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxDownload&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">+</span>url<span style="color: #339933;">+</span><span style="color: #0000ff;">'&quot; title=&quot;Download This Image&quot;&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxTitleLeft&quot;&gt;'</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #0000ff;">'&lt;/span&gt;&lt;span id=&quot;cboxGplus&quot;&gt;&lt;/span&gt;'</span><span style="color: #339933;">+</span>download<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
onComplete<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// This is where the plusone magic will happen</span>
<span style="color: #009900;">&#125;</span>
&nbsp;</pre></div></figure>
<p>The onComplete function, funilly enough, will run when the colorbox pop up finishes loading. So once the image has loaded and everything's settled, we'll tell Google to render that button for us. Do it Google! Do it!</p>
<p>Inside the function add the following two lines:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> permalink <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data-permalink&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
gapi<span style="color: #339933;">.</span>plusone<span style="color: #339933;">.</span>render<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cboxGplus&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;size&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;small&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;href&quot;</span><span style="color: #339933;">:</span> permalink<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>The variable is pulling the permalink from the data-permalink attribute. If you're using the full-size image as the <acronym title="Uniform Resource Locator">URL</acronym> to +1 then change the "data-permalink" to "href".</p>
<p>The render command is being triggered for the "cboxGplus" element. It's being rendered as a "small" button, showing the count and the href is being pulled from the permalink variable. Neat-o.</p>
<h2 class="subheader">All together</h2>
<p>So now our complete code looks like this:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&nbsp;
title<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> title <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> download <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxDownload&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">+</span>url<span style="color: #339933;">+</span><span style="color: #0000ff;">'&quot; title=&quot;Download This Image&quot;&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span id=&quot;cboxTitleLeft&quot;&gt;'</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #0000ff;">'&lt;/span&gt;&lt;span id=&quot;cboxGplus&quot;&gt;&lt;/span&gt;'</span><span style="color: #339933;">+</span>download<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
onComplete<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// +1 Button</span>
<span style="color: #000000; font-weight: bold;">var</span> permalink <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>attr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data-permalink&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
gapi<span style="color: #339933;">.</span>plusone<span style="color: #339933;">.</span>render<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cboxGplus&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;size&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;small&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;href&quot;</span><span style="color: #339933;">:</span> permalink<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;</pre></div></figure>
<p>And after some <acronym title="Cascading Style Sheets">CSS</acronym> tweaking, check it out, it's now showing up:<br />
<em>Note: This example has "count" set to false, so the count bubble is hidden.</em></p>
<figure id="attachment_1716" aria-describedby="figcaption_attachment_1716" style="width: 310px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/07/plusone-working.jpg"><img class="size-medium wp-image-1716" title="The +1 Button On Colorbox" src="http://dbaines.com/blog/wp-content/uploads/2011/07/plusone-working-300x241.jpg" alt="" width="300" height="241" /></a><figcaption id="figcaption_attachment_1716">The +1 Button On Colorbox</figcaption></figure>
<h2 class="subheader">See it in action</h2>
<p>This is now live on my website, over in either my <a href="/artwork">artwork</a> or <a href="/motion">motion</a> pages. <a title="dBaines 2011 WordPress Template available at GitHub" href="http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/">The source is freely available over at GitHub</a>. The pages you're interested in are:</p>
<ul>
<li>/js/dbaines.js - Do a search for "// Colorboxing Artwork"</li>
<li>/loop.php - Do a search for "/* Artwork */" and look for the <strong>a</strong> tag.</li>
</ul>
<p>Hope that helps, let me know if you have any questions in the comments section below, or <a title="Drop me a line, or a square. Or if you really want to impress me, a trapezoid. Everyone likes those. " href="/about/#contact">drop me a line</a> via email.</p>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/adding-google-1-buttons-to-colorbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>dbaines2011 WordPress Theme now on Github</title>
		<link>http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/</link>
		<comments>http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 09:26:01 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Free Download]]></category>
		<category><![CDATA[Wordpress Template]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1667</guid>
		<description><![CDATA[<p>I've uploaded <a title="dbaines2011 @ Github" href="https://github.com/dbaines/dbaines2011-Wordpress-Theme" target="_blank">my current WordPress theme as a Github project</a>, freely available for WordPress hackers of the world to dissect and learn from. So if there's anything here that you've seen and thought, "How the hell is he making that happen?" well, now you can find out! Feel free to download, use, dissect, play-with or do nasty, nasty things that you really shouldn't tell anyone about.</p>

<p><span id="more-1667"></span> </p>
<p><strong>Version 1.7 - 2012-01-17</strong></p>
<ul>
<li>FINAL VERSION - Superceded by the 2012 theme.</li>
<li>Re-arranged and styled the author info box at the bottom of loop-single.php, shows up when user has filled out their profile</li>
<li>Styled Author Archives page</li>
<li>Multiple Size Favicon (64, 32, 16)</li>
<li>Added a little "sticky" icon/flag for sticky posts</li>
<li>Switched from </li><br />&#160;<br /> <a href="http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/" class="read_more">Continue Reading</a></ul>]]></description>
			<content:encoded><![CDATA[<span class="message info"><em>FINAL</em> <em>Version 1.7 - Updated: 2012-01-17</em></span>
<p>I've uploaded <a title="dbaines2011 @ Github" href="https://github.com/dbaines/dbaines2011-Wordpress-Theme" target="_blank">my current WordPress theme as a Github project</a>, freely available for WordPress hackers of the world to dissect and learn from. So if there's anything here that you've seen and thought, "How the hell is he making that happen?" well, now you can find out! Feel free to download, use, dissect, play-with or do nasty, nasty things that you really shouldn't tell anyone about.</p>
<span class="message important">This template is no longer being developed. Instead any future updates are being done to the <a title="dbaines2012 WordPress Theme on Github" href="http://dbaines.com/blog/archive/dbaines2012-wordpress-theme-on-github/">dbaines2012 project</a>, also available at Github.</span>
<p><span id="more-1667"></span> <h2 class="subheader">Version History</h2></p>
<p><strong>Version 1.7 - 2012-01-17</strong></p>
<ul>
<li>FINAL VERSION - Superceded by the 2012 theme.</li>
<li>Re-arranged and styled the author info box at the bottom of loop-single.php, shows up when user has filled out their profile</li>
<li>Styled Author Archives page</li>
<li>Multiple Size Favicon (64, 32, 16)</li>
<li>Added a little "sticky" icon/flag for sticky posts</li>
<li>Switched from EasySlider to SudoSlider</li>
<li>Removed left over Google Prettify code</li>
</ul>
<p><strong>Version 1.6 - 2011-08-22</strong></p>
<ul>
<li>Fixed the excessive PRE tags in Geshi causing massive padding everywhere. (This was actually part of the last update, I just forgot to document it)</li>
<li>Minified the customised EasySlider script in plugins.js</li>
<li>Fixed accesskey 2 for about link</li>
<li>Updated download shortcode to open in new window, removed "Download" part of title text so you can use it as a pretty link button instead.</li>
<li>Added "or" between load more button and show pagination</li>
<li>Added some logic to show a disabled load more button if there are no more posts to load</li>
<li>Added an error message if the loadMore button fails to load the next page</li>
<li>Adapted post-icons to allow for multiple icons using some jQuery (dbaines.js)</li>
</ul>
<p><strong>Version 1.5 - 2011-08-21</strong></p>
<ul>
<li>Removed changelog from style.css for older releases. Still available at GitHub and the <acronym title="Uniform Resource Locator">URL</acronym> at the top of the file.</li>
<li>Updated to Modernizr 2.0.6 Custom</li>
<li>Removed border-top for active menu item when using wordpress menus, since custom post types were showing the blog as being active, rather than the correct parent page. Bug in WordPress?</li>
<li>Added custom close button for colorbox</li>
<li>Added a blue hover state to the homepage logo link</li>
<li>Implemented Google Code Prettify to replace GeSHi, but changed back due to quirks of Prettify (namely line number incrementing, copy and paste issues and other things GeSHi does better) - I've left the code in /functions/functions.shortcodes.prettify.php</li>
<li>As a result of the above I've moved the GeSHi stuff in to functions/functions.shortcodes.geshi.php for hot swapping action</li>
<li>Added "Show Pagination" link to the load more posts button. Shows wp-pagenavi links next to the load more button. LoadMoreButton also pulls in the wp-pagenavi from each page so if the user loads a few pages and then shows the pagination, it shows the relevant page as being current.</li>
<li>Fixes to the Load More feature:
<ul>
<li>Functionised&amp;tm; the part of the dbaines.js file that adds colorbox classes to everything so we can call it after the new page has been loaded</li>
<li>Called gapi.plusone.go after a successful load so the google plus buttons are rendered.</li>
<li>Rejiggered the ajax call for the loadMore link to only do one .load() and then cherrypick the things to go to places and what not</li>
</ul>
</li>
<li>Added some accesskeys:
<ul>
<li>0: Takes the user to the new accessibility page</li>
<li>1: Homepage</li>
<li>2: About</li>
<li>3: Blog</li>
<li>4: Portfolio</li>
<li>5: Search</li>
<li>6: Sitemap</li>
<li>9: Contact Page</li>
<li>S: Skip to Content</li>
</ul>
</li>
</ul>
<p><strong>Version 1.4 - 2011-08-04</strong></p>
<ul>
<li>Styled figcaption for codebox</li>
<li>Added aprilfools.css for headache inducing fun come April-time</li>
<li>Added WordPress Option: Google Analytics UA Code</li>
<li>Added WordPress Option: Enable WordPress Menu - Uses a WordPress menu, "Main Menu" as the main navigation instead of the hardcoded links</li>
<li>Added WordPress Option: Replace 'friends' with 'blogroll' links</li>
<li>Added WordPress Option: All posts have thumbnails - includes shiny new generic post-thumbnail.png</li>
<li>Added WordPress Option: <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> Post Loading - Facebook/twitter esque post loading technique</li>
<li>Removed -webkit-appearance from search input</li>
<li>Added Google +1 buttons to search results</li>
<li>Added .2 seconds of transitions (of various vendors) to the top-level nav links for fun and profit</li>
<li>Gave .homepageSlider h2 1px of text shadow blur to fix the shadow being white in chrome 12/13.</li>
<li>Added line-height: 1.5 to p,ul - if it affects too many things I'll specify it to content areas only.</li>
<li>Hardware Acceleration (via the "Magic Bullet" -webkit-transform: translateZ(0);) given to homepage slider and websites slider</li>
<li>Added a "Shortcodes Reference" box in the new post admin page. Super convenient!</li>
<li>Responsive Design changes:
<ul>
<li>Fixed rendering of the search input in Firefox for the mobile design, again. Should stick this time.</li>
<li>Made the artwork portfolio look somewhat nicer on the reponsive design</li>
<li>Changes for the contact form when less than 960px wide</li>
<li>Made the "About me" image centred and styled like the centred images in the blog</li>
</ul>
</li>
</ul>
<p><strong>Version 1.3 - 2011-08-01</strong></p>
<ul>
<li>Fixed search input rendering in Firefox for the mobile display</li>
<li>Added +1 buttons to portfolio colourbox popups (dbaines.js)</li>
<li>Added +1 buttons to websites loop</li>
</ul>
<p><strong>Version 1.2 - 2011-07-31 (double day update!)</strong></p>
<ul>
<li>Fixed the 1.1 date</li>
<li>Figure HTML5 elements for wp-captions</li>
<li>Figure HTML5 elements for tutorial post thumbnails</li>
<li>Figure elements for code blocks, adding caption option to codebox shortcode</li>
<li>HTML5 form fields for comments form</li>
<li>Removed some vendor prefixes for some box shadows and rounded corners as the major browsers now use non-vendor-prefixes.</li>
<li>Fixed some more inconsistent typography</li>
<li>New WordPress Theme Options:
<ul>
<li>Google +1 "count" bubbles on/off</li>
<li>Footer Text</li>
<li>Comments Intro</li>
<li>Laid groundwork for <acronym title="What You See Is What You Get">WYSIWYG</acronym> editors in theme options page, still a bit buggy.</li>
</ul>
</li>
</ul>
<p><strong>Version 1.1 - 2011-07-31</strong></p>
<ul>
<li>Reponsive Design changes for &lt;960 and &lt;600 wide</li>
<li>&lt;600 wide is optimised for mobile devices</li>
<li>Pseudoelement <acronym title="Cascading Style Sheets">CSS</acronym> icons for subsection (dark grey area) and post meta icons</li>
<li>Fixed some inconsistent typography</li>
<li>Added GooglePlus and Forrst Icon to homepage</li>
<li>Plugins.js for minified plugins</li>
<li>jQuery from Google CDN, Updated to 1.6.2</li>
<li>Added rel="me" to links to my profiles on things</li>
<li>Re-arranged functions.php, cleaned up, separated large chunks in to manageable files (ie. functions.shortcodes.php)</li>
<li>Removed Facebook Likes</li>
<li>Added Google +1 Buttons</li>
<li>WordPress Options Page!
<ul>
<li>Google +1 Buttons on/off</li>
</ul>
</li>
<li>Updated login css to reflect changes in WordPress 3.2</li>
</ul>
<p><strong>Version 1.0</strong></p>
<ul>
<li>First Release</li>
</ul>
<a href="https://github.com/dbaines/dbaines2011-Wordpress-Theme" class="downloadbtn downloadbtn_star" title="View at GitHub" onClick="javascript: _gaq.push(['_trackPageview', 'dbaines2011 WordPress Theme now on Github/View at GitHub']);" target="_blank"><span class="downloadbtn_icon"></span>View at GitHub</a>

<a href='http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/db2011-home/' title='Homepage Slider'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2011-home-150x150.jpg" class="attachment-thumbnail" alt="Homepage Slider" title="Homepage Slider" /></a>
<a href='http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/db2011-blog/' title='Blog View'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2011-blog-150x150.jpg" class="attachment-thumbnail" alt="Blog View" title="Blog View" /></a>
<a href='http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/db2011-portfoliohome/' title='Portfolio Home and Search Options'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2011-portfoliohome-150x150.jpg" class="attachment-thumbnail" alt="Portfolio Home and Search Options" title="Portfolio Home and Search Options" /></a>
<a href='http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/db2011-colorbox/' title='Portfolio Colorbox Popup'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2011-colorbox-150x150.jpg" class="attachment-thumbnail" alt="Portfolio Colorbox Popup" title="Portfolio Colorbox Popup" /></a>
<a href='http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/db2011-theme-options/' title='Theme Options'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2011-theme-options-150x150.jpg" class="attachment-thumbnail" alt="Theme Options" title="Theme Options" /></a>
]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/dbaines2011-wordpress-theme-now-on-github/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Assassin&#8217;s Creed: Brotherhood</title>
		<link>http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/</link>
		<comments>http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 04:09:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[assassin's creed]]></category>
		<category><![CDATA[Game Review]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1609</guid>
		<description><![CDATA[<p>So it's been a while since I've reviewed a game and Assassin's Creed Brotherhood just came out for the PC so I sat down, took some screenshots and wrote down my thoughts.</p>

<p><span id="more-1609"></span>The game takes place directly after Assassin's Creed II. So if you haven't played that one then you're probably going to be lost for the most part at the beginning. It does an okay job of bringing us back up to speed with the overall story which is great.</p>
<p>You start out as any hero would after saving the world. You go around doing mundane things, helping old ladies cross the street and bringing the groceries home for the local hottie. Then everything goes to shit, as I <br />&#160;<br /> <a href="http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/" class="read_more">Continue Reading</a></p>]]></description>
			<content:encoded><![CDATA[<p>So it's been a while since I've reviewed a game and Assassin's Creed Brotherhood just came out for the PC so I sat down, took some screenshots and wrote down my thoughts.</p>
<figure id="attachment_1610" aria-describedby="figcaption_attachment_1610" style="width: 946px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_title.jpg"><img class="size-full wp-image-1610      " title="In the immortal words of the Crystal Method, &quot;That's the name of the game.&quot;" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_title.jpg" alt="" width="936" height="270" /></a><figcaption id="figcaption_attachment_1610">In the immortal words of the Crystal Method, &quot;That&#39;s the name of the game.&quot;</figcaption></figure>
<p><span id="more-1609"></span>The game takes place directly after Assassin's Creed II. So if you haven't played that one then you're probably going to be lost for the most part at the beginning. It does an okay job of bringing us back up to speed with the overall story which is great.</p>
<p>You start out as any hero would after saving the world. You go around doing mundane things, helping old ladies cross the street and bringing the groceries home for the local hottie. Then everything goes to shit, as I guess it had to.</p>
<figure id="attachment_1617" aria-describedby="figcaption_attachment_1617" style="width: 310px" class="wp-caption alignleft"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_01.jpg"><img class="size-medium wp-image-1617" title="My villiage! It's being attacked! " src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_01-300x168.jpg" alt="" width="300" height="168" /></a><figcaption id="figcaption_attachment_1617">My villiage! It&#39;s being attacked! </figcaption></figure>
<p>By a very common trope you're stripped of your earnings and worldly possessions when the now-bustling village you built in AC2 gets attacked by the Pope's son. What a jerk.</p>
<p>The game takes place in Rome. Just one city, unlike the previous games that would take place in a few different cities with a rather boring overworld to get between them. Personally I kind of liked only being in one city. It made it easier to get around and you very quickly learn the landscape.</p>
<p><div class="clear">&nbsp;</div> <h2 class="subheader" id="bad">The Bad</h2></p>
<p>Unfortunately after a few missions you start to realise the developers really haven't learned from the issues of their previous games.</p>
<p>Just like every other Assassin Creed game, there's just four buttons. That means you get one key to do fifty different things. Thanks, consoles!<br />
Pressing shift may at any time, often disregarding whether you're in high profile mode or not:</p>
<ul>
<li>Climb the nearest building</li>
<li>Hop on the nearest platform/fence</li>
<li>Push somebody</li>
<li>Tackle somebody</li>
<li>Grab somebody</li>
<li>Pick up a weapon</li>
<li>Pick up a dead body</li>
<li>Try and loot a dead body</li>
<li>Climb on a horse</li>
</ul>
<p>It's really a game of dice to see what your character's going to do. This gets very old very quickly.<br />
You're SOL if you want to hop on a horse if you're standing in a field of the recently deceased. There are guards coming at you and all you want to do is high tail it out of there, yet all you can do is pick up dead bodies. Oh the woes of being an assassin.</p>
<figure id="attachment_1623" aria-describedby="figcaption_attachment_1623" style="width: 310px" class="wp-caption alignright"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_07.jpg"><img class="size-medium wp-image-1623" title="Hot wall-climbing action!" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_07-300x168.jpg" alt="" width="300" height="168" /></a><figcaption id="figcaption_attachment_1623">Hot wall-climbing action!</figcaption></figure>
<p>The camera locks into place when you're in the process of climbing up on to a platform so it breaks any fluidity, since you need to wait for the animation to stop before you can look around for the next platform to hop to. If you try and create a fluid run you really only end up on walls you didn't want to go up or falling on to a street you really weren't aiming for.</p>
<p>Similarly you can't move your mouse through walls. This makes navigating tight corners very slow and painful. Lots of running in to walls and tripping over because I can't see where I'm going. I'm using the keyboard so the only directions I can go is up down left and right and they are all relative to where the mouse is looking, which would be great if I could move the mouse. If I need to move south west and the camera is locked in to place I need to stagger left and down until I can move freely again.</p>
<p>Several times I've had a target locked on and tried to assassinate them only for Ezio to turn around and take out two completely innocent civilians for apparently no reason what so ever. Sometimes you'll leap at your target and take him out, sometimes you'll just kill some civilians.</p>
<p>Jumping distances are thoroughly inconsistent. Sometimes you'll jump massive distances and make it, other times you'll jump a substantially less distance and your character will fail and fall down. I have a feeling this is mostly due to poorly made scripted jumps though. Most of the big ones you can do (in game, not in a cutscene) are done during the core missions. There are quite a few times I've stood and looked around for another way to go because there was no way I'm going to make this jump they want me to do. I know for a fact I've fallen down from smaller distances. In the end I just guess they want me to go that way so I jump and some how miraculously make it.<br />
The most recent example of this is during one of the Leonardo missions I was able to jump an enormous gap between two buildings that had wooden beams poking out between them. I thought for sure I was going to fall down and die but miraculously made it. Straight after that in a Romulus temple I fell down jumping from one chandelier to another. Even though it looked like they were a lot closer than the two beams I jumped between earlier.</p>
<p>Other times simple little jumps just won't happen. For example if I'm sitting on a broken wall of a house and there's a platform below me, no amount or combination of keypresses will get me from where I am to where I want to go. I either need to leap off completely missing my target, tackle somebody or slowly climb down and hop along the pokey-outey bricks to get over there.</p>
<p>All of the standard Assassin's Creed failures that have been around since the first game, and that you'd think they'd iron out by the third game. If you enjoyed the first two games and you didn't mind these issues, you're really going to like this one.</p>
<h2 class="subheader" id="good">The Good</h2>
<p>There are some pretty cool new features though.</p>
<figure id="attachment_1642" aria-describedby="figcaption_attachment_1642" style="width: 310px" class="wp-caption alignright"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_26.jpg"><img class="size-medium wp-image-1642 " title="Assassin Recruits are fantastic at gangbanging soldiers in dark alleys. " src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_26-300x168.jpg" alt="" width="300" height="168" /></a><figcaption id="figcaption_attachment_1642">Assassin Recruits are fantastic at gangbanging soldiers in dark alleys. </figcaption></figure>
<p>You also now have assassin recruits you can train and call in for  support at any time. High level assassins are awesome, and watching them  come out of nowhere and take out a group of guards is immensely  satisfying.</p>
<p>Hiring a group of mercs and travelling the country-side sicking them on guard patrols is amazingly fun. That are very good fighters too, so hiring a group can often lead to upwards of an hour of killing.</p>
<p>You can now call your horse who will magically appear nearby and crush any civilians that gets between you and itself. I called mine Epona. You can ride your horse throughout Rome and it's a quick way to get around. I'm not sure about everyone else but I specifically went out of my way to run over civilians when I was on my horse.</p>
<p>I'm not sure if it was in AC2, but smoke bombs are fantastic as well. One assassination mission I was perched on a tall column watching the target below chatting with some guards. I threw a smoke bomb at him, dove down and took him out with my hidden blade, stole a horse and took off. The guards had no idea what happened and I didn't get any notoriety. It was so cool.</p>
<p>There are tonnes of missions to do as well, which is great. I think they really learned their lesson from the bad press the got for AC1, for it's lack of missions and mission types. I've been playing for about a week and still have a map full of mission markers.</p>
<p>Like AC2 you can purchase buildings. Instead of just purchasing some buildings in your villiage, you can now purchase a whole bunch of buildings, shops and landmarks located all over Rome. One of the building types you can purchase is a tunnel entrance. You can find several tunnel entrances throughout Rome and when you've purchased them they serve as a quick-travel location.</p>
<figure id="attachment_1621" aria-describedby="figcaption_attachment_1621" style="width: 310px" class="wp-caption alignleft"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_05.jpg"><img class="size-medium wp-image-1621" title="Burning that mother down." src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_05-300x168.jpg" alt="" width="300" height="168" /></a><figcaption id="figcaption_attachment_1621">Burning that mother down.</figcaption></figure>
<p>Instead of just having look out towers to synchronise the map with, you now also have Borgia towers. These towers have varying areas of influence around them that prevent you from purchasing any buildings in the area. For each tower there is a Borgia captain. Once you kill him you're able to burn that mother down and release the area from the evil Borgian presence. Once liberated the tower that miraculously survived the burnination now turns in to a place where you can manage your assassins.</p>
<p>Not only are there Templar lairs, there are now also Romulan crypts, housing the creepy wolf-skin-wearing Followers of Romulus. Beating all six will unlock an equally creepy new armour set for your lovable little assassin.</p>
<p>Getting to free-play as Desmond in the real world was fun as well. There are a few things you can find outside of the Animus, but for the most part it's an empty sandbox that while cool gets pretty boring.</p>
<p>There's a new Virtual Training mode which I enjoyed. A very Metal Gear Solid VR Training-esque mode that you can use to practice your killing and maiming like any normal person would.</p>
<p>All in all I think the game is highly enjoyable. It has some great new features, a quality story with some much more interesting modern-day chapters than the previous games. The issues I've mentioned are the same issues found in both previous games so if you didn't notice the issues with Assassin's Creed or Assassin's Creed II, or you simply didn't think they were a big deal then you are absolutely going to love this game.</p>
<p>Now enjoy a whole bunch of random screenshots I took while playing:</p>

<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_02/' title='Playing as Desmond'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_02-150x150.jpg" class="attachment-thumbnail" alt="Desmond leads lucy around a spooky crypt while tripping on peyote." title="Playing as Desmond" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_03/' title='VR Training'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_03-150x150.jpg" class="attachment-thumbnail" alt="VR Training" title="VR Training" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_04/' title='Synchronising with Rome. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_04-150x150.jpg" class="attachment-thumbnail" alt="Synchronising with Rome." title="Synchronising with Rome." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_06/' title='LOLOLOLOL'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_06-150x150.jpg" class="attachment-thumbnail" alt="Subject 16 is such a troll." title="LOLOLOLOL" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_08/' title='Leaping from a burning Borgia Tower'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_08-150x150.jpg" class="attachment-thumbnail" alt="Leaping from a burning Borgia Tower" title="Leaping from a burning Borgia Tower" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_09/' title='Hidden symbols in the world.'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_09-150x150.jpg" class="attachment-thumbnail" alt="Those glowy symbols hidden in the Animus are back." title="Hidden symbols in the world." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_10/' title='I appear to be glowing. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_10-150x150.jpg" class="attachment-thumbnail" alt="This seems perfectly normal." title="I appear to be glowing." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_11/' title='Training up some assassins. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_11-150x150.jpg" class="attachment-thumbnail" alt="Training up some assassins." title="Training up some assassins." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_12/' title='Borgia&#039;s influence. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_12-150x150.jpg" class="attachment-thumbnail" alt="Borgia&#039;s influence." title="Borgia&#039;s influence." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_28/' title='Steve&#039;s a jerk'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_28-150x150.jpg" class="attachment-thumbnail" alt="Somebody tell Steve he looks like a douche up there." title="Steve&#039;s a jerk" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_13/' title='Trust Leonardo to invent the Cardboard Box.'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_13-150x150.jpg" class="attachment-thumbnail" alt="Hey look, a cardboard box!" title="Trust Leonardo to invent the Cardboard Box." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_14/' title='Woah! Double Assassination! What does it mean?'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_14-150x150.jpg" class="attachment-thumbnail" alt="Woah! Double Assassination! What does it mean?" title="Woah! Double Assassination! What does it mean?" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_15/' title='I appear to be leaking some white lines. What? Stop staring. God!'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_15-150x150.jpg" class="attachment-thumbnail" alt="I&#039;m just chillin&#039; with my friends and some hookers. It&#039;s cool. I&#039;m totally not an assassin." title="I appear to be leaking some white lines. What? Stop staring. God!" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_16/' title='Prince of Persia has my back.'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_16-150x150.jpg" class="attachment-thumbnail" alt="It&#039;s times like these I&#039;m glad Prince of Persia (2008) has my back. Both of him." title="Prince of Persia has my back." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_17/' title='Just restorin&#039; some tunnels. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_17-150x150.jpg" class="attachment-thumbnail" alt="SPQR stands for Super Practical Quest Relocater." title="Just restorin&#039; some tunnels." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_18/' title='Action scene!'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_18-150x150.jpg" class="attachment-thumbnail" alt="Action scene!" title="Action scene!" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_19/' title='Groovy specs, man.'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_19-150x150.jpg" class="attachment-thumbnail" alt="I had to take a screenshot of this guy&#039;s groovy specticles." title="Groovy specs, man." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_20/' title='Taking my Mercenaries for their walk. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_20-150x150.jpg" class="attachment-thumbnail" alt="Taking my Mercenaries for their walk." title="Taking my Mercenaries for their walk." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_21/' title='Full Synchronisation Objectives'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_21-150x150.jpg" class="attachment-thumbnail" alt="Most missions have bonus objectives to get Full Synchronisation." title="Full Synchronisation Objectives" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_22/' title='Recruits are great. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_22-150x150.jpg" class="attachment-thumbnail" alt="My Assassin Recruit takes out a guard from above." title="Recruits are great." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_23/' title='Jump!'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_23-150x150.jpg" class="attachment-thumbnail" alt="You push him. No you. Okay fine, I&#039;ll push him." title="Jump!" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_24/' title='Assadesmondo!'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_24-150x150.jpg" class="attachment-thumbnail" alt="Ezio&#039;s Village in Modern Times" title="Assadesmondo!" /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_25/' title='I&#039;m about to push over that upside-down guy.'><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_25-150x150.jpg" class="attachment-thumbnail" alt="That guy isn&#039;t very good at painting what he sees. Too much imagination." title="I&#039;m about to push over that upside-down guy." /></a>
<a href='http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/dbaines_ac2_27/' title='I realise this is an actual structure in Rome, but it still looks random. '><img width="150" height="150" src="http://dbaines.com/blog/wp-content/uploads/2011/03/dbaines_ac2_27-150x150.jpg" class="attachment-thumbnail" alt="Ah, I see this building was made by the ancient Romgyptians." title="I realise this is an actual structure in Rome, but it still looks random." /></a>
]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/assassins-creed-brotherhood-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Zenphoto Option to WordPress Custom Post Type Search</title>
		<link>http://dbaines.com/blog/archive/adding-zenphoto-option-to-wordpress-custom-post-type-search/</link>
		<comments>http://dbaines.com/blog/archive/adding-zenphoto-option-to-wordpress-custom-post-type-search/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 04:45:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[zenphoto]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1587</guid>
		<description><![CDATA[Following on from my Custom Post Types Search tutorial, we'll add a Zenphoto option that will switch the action and method of the form and the input name if a user clicks on it. ]]></description>
			<content:encoded><![CDATA[<p>This is an add-on tutorial to my previous tutorial, "<a href="http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/">WordPress Custom Post Type Search</a>".</p>
<p>This will walk you through how to add a Zenphoto option, and if the Zenphoto option is clicked, it will show further options to select title, description, tag or filename.</p>
<div class="ddlbox"><a href="/demos/wp_customsearch_zp/" title="View Demo" class="ddlbox_demo">View Demo</a></div>
<h2 class="subheader">Adding the Zenphoto option</h2>
<p>This part is pretty simple. Find your <code class="inline-code">#searchOptions</code> container we set up previously and add in this line:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post_type&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchOptionsZenphoto&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #339933;">&gt;</span>Search Zenphoto Only<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span></pre></div></figure>
<figure id="attachment_1599" aria-describedby="figcaption_attachment_1599" style="width: 356px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotooption.jpg"><img class="size-full wp-image-1599" title="The Zenphoto Option" src="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotooption.jpg" alt="" width="346" height="126" /></a><figcaption id="figcaption_attachment_1599">The Zenphoto Option</figcaption></figure>
<p>Now we have a new option to specifically search Zenphoto only.<br />
Notice I've also removed "Search All" since there's no way to consolidate the results from WordPress and Zenphoto without hacking the search results page to pull down both results. That's a little of scope for today's tutorial.</p>
<h2 class="subheader">jQuery</h2>
<p>Unlike the previous tutorial, the Zenphoto search won't go through WordPress at all, so we'll need to redirect the search to Zenphoto if that option is clicked.</p>
<p>Here's the heavily commented code I put together to do just that:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> thisOption <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Switching Form Types Depending On Which Option Is Selected</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchOptions input[name=post_type]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Throw the ID in to a variable for easy access</span>
thisOption <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If ZenPhoto is selected...</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>thisOption <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/zenphoto/page/search/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;post&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;words&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If not ZenPhoto (WordPress)</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/wordpress/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;get&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>So now if we click on "Search Zenphoto Only" it will change the form to search action and method attributes to make it search your Zenphoto install. If we select any of the other options it will switch back to the WordPress settings. It will also modify the input field name since WordPress looks for "s" and Zenphoto looks for "words".</p>
<p>You will need to ensure you change the "action" values to your actual zenphoto and wordpress installs. The Zenphoto action will need "/page/search/" at the end to point to the Zenphoto search page.</p>
<h2 class="subheader">More Zenphoto Options</h2>
<p>By default Zenphoto includes search options of it's own:</p>
<figure id="attachment_1602" aria-describedby="figcaption_attachment_1602" style="width: 345px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotoadv_default.jpg"><img class="size-full wp-image-1602" title="Advanced Options" src="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotoadv_default.jpg" alt="" width="335" height="164" /></a><figcaption id="figcaption_attachment_1602">Advanced Options</figcaption></figure>
<p>So let's try and incorporate that in to our search box.</p>
<p>First add a new section to your search form:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>section id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchZPOptions&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>input id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_desc&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_desc&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span>  value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;desc&quot;</span>  <span style="color: #339933;">/&gt;</span> <span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_desc&quot;</span><span style="color: #339933;">&gt;</span>Search Description<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;</span>br <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_filename&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_filename&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span>  value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;filename&quot;</span>  <span style="color: #339933;">/&gt;</span> <span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_filename&quot;</span><span style="color: #339933;">&gt;</span>Search Folder<span style="color: #339933;">/</span>Filename<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;</span>br <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_tags&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_tags&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span>  value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;tags&quot;</span>  <span style="color: #339933;">/&gt;</span> <span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_tags&quot;</span><span style="color: #339933;">&gt;</span>Search Tags<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;</span>br <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>input id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_title&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_title&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span>  value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;title&quot;</span>  <span style="color: #339933;">/&gt;</span> <span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SEARCH_title&quot;</span><span style="color: #339933;">&gt;</span>Search Title<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span></pre></div></figure>
<p>This code is mostly taken straight from the Zenphoto search form. By default they are all checked, but you can turn them off by removing the <code class="inline-code">checked="checked"</code> attribute.</p>
<p>We'll also add the following to our <acronym title="Cascading Style Sheets">CSS</acronym> to indent it a little to make it look like it's supposed to be apart of the ZenPhoto selection above it, and to hide it by default:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#searchZPOptions</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></figure>
<p>Then add the show/hide functions to your jQuery to show the additional options if a user clicks on the Zenphoto Option:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> thisOption <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Switching Form Types Depending On Which Option Is Selected</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchOptions input[name=post_type]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Throw the ID in to a variable for easy access</span>
thisOption <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If ZenPhoto is selected...</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>thisOption <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Show ZPOptions</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchZPOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/zenphoto/page/search/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;post&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;words&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If not ZenPhoto (WordPress)</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Hide ZPOptions</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchZPOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/wordpress/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;get&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>So now if a user clicks on the Zenphoto option, it not only redirects the form, but also shows the Zenphoto tickboxes.</p>
<figure id="attachment_1601" aria-describedby="figcaption_attachment_1601" style="width: 357px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotoadv.jpg"><img class="size-full wp-image-1601" title="Advanced Search Options" src="http://dbaines.com/blog/wp-content/uploads/2011/03/zenphotoadv.jpg" alt="" width="347" height="206" /></a><figcaption id="figcaption_attachment_1601">Advanced Search Options</figcaption></figure>
<h2 class="subheader">Cleaning Up After Zenphoto</h2>
<p>Since WordPress uses <code class="inline-code">get</code> to retrieve the search terms, it's also going to send all of Zenphoto's SEARCH_* inputs to the WordPress search page. We can create a function that checks for a WordPress search and then removes those input fields:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Check for Submit press and delete ZenPhoto options from sending if on WordPress</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#searchsubmit&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>click<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>thisOption <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#SEARCH_desc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>remove<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#SEARCH_filename&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>remove<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#SEARCH_tags&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>remove<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#SEARCH_title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>remove<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>So now if somebody clicks the submit button, the script will check to see if thisOption has the Zenphoto value. If it doesn't, it's obviously a WordPress search, so we'll go ahead and remove those elements from being sent.</p>
<p>So your whole jQuery script should look something like this:<br />
<figure class="codeboxFig"><div class="codebox"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Show/Hide</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchAnchor&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> thisOption <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Switching Form Types Depending On Which Option Is Selected</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchOptions input[name=post_type]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Throw the ID in to a variable for easy access</span>
thisOption <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If ZenPhoto is selected...</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>thisOption <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Show ZPOptions</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchZPOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/zenphoto/page/search/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;post&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set Zenphoto Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;words&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// If not ZenPhoto (WordPress)</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">// Hide ZPOptions</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchZPOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Form Settings</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form#search&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;path/to/wordpress/&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;get&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set WordPress Input Name</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchMain input&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Check for Submit press and delete ZenPhoto options from sending if on WordPress</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchsubmit&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>thisOption <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;searchOptionsZenphoto&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#SEARCH_desc&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#SEARCH_filename&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#SEARCH_tags&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#SEARCH_title&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure></p>
<p>Check out this demo to see it in action, using my old Zenphoto install I still had lying around on my server:<br />
<div class="ddlbox"><a href="/demos/wp_customsearch_zp/" title="View Demo" class="ddlbox_demo">View Demo</a></div></p>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/adding-zenphoto-option-to-wordpress-custom-post-type-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Post Type Search</title>
		<link>http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/</link>
		<comments>http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 12:26:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1551</guid>
		<description><![CDATA[Learn how to add some options to your Wordpress search bar to allow the user to specify exactly where they want to search.]]></description>
			<content:encoded><![CDATA[<figure id="attachment_1552" aria-describedby="figcaption_attachment_1552" style="width: 310px" class="wp-caption alignright"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-searchoptions.jpg"><img class="size-medium wp-image-1552" title="Search Options" src="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-searchoptions-300x167.jpg" alt="" width="300" height="167" /></a><figcaption id="figcaption_attachment_1552">Drop-down search options, dBaines.com 2011</figcaption></figure>
<p>I like having an easy-to-use search bar that isn't redundant and doesn't require several different search bars to do things that a single search bar should be able to do. PhpBB, I'm looking at you.</p>
<p>Today I'll teach you how to add some options to your WordPress search bar to search for several different things. The search bar will allow the user to search:</p>
<ul>
<li> All post types and categories</li>
<li>Only blog post types</li>
<li>Only portfolio post types (which in this example will be an array of three different kinds of post types in itself)</li>
<li>Only in the tutorial category</li>
</ul>
<p>Set up your search bar as you normally would in your template. For this example, I'm just going to have a search bar on an empty page, for simplicity's sake.</p>
<h2 class="subheader">Modifying your template</h2>
<p>Open up the template that has your search bar in it. Your search form should look something like this:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;form id=&quot;search&quot; name=&quot;searchform&quot; method=&quot;get&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;section id=&quot;searchMain&quot;&gt;
&lt;input type=&quot;search&quot; id=&quot;s&quot; name=&quot;s&quot; title=&quot;Search Blog&quot; placeholder=&quot;Search My Website&quot; /&gt;
&lt;button type=&quot;submit&quot; value=&quot;search&quot; id=&quot;searchsubmit&quot;&gt;Search&lt;/button&gt;
&lt;/section&gt;
&lt;/form&gt;
&nbsp;</pre></div></figure>
<figure id="attachment_1558" aria-describedby="figcaption_attachment_1558" style="width: 240px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-01.jpg"><img class="size-full wp-image-1558" title="Figure 1" src="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-01.jpg" alt="" width="230" height="38" /></a><figcaption id="figcaption_attachment_1558">Fig. 1 - Your Form So Far</figcaption></figure>
<p>Here I've used a HTML5 element called <code class="inline-code">section</code> to wrap around my form elements. You can use a <code class="inline-code">div</code> if you're not comfortable using HTML5 elements. We need a container element for these elements because the options are going to be in a separate container, but still in side the form.<br />
Create another <code class="inline-code">section</code> element underneath the searchMain section, and call it something like searchOptions. Populate this element with some radio buttons and some labels, as you would if you were setting up any old regular form with a radio selection. The "name" for these radio buttons will be "post_type". Set up the values to represent what you would like the post_type to be when the user searches. My code at this point is now looking like this:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;form id=&quot;search&quot; name=&quot;searchform&quot; method=&quot;get&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;section id=&quot;searchMain&quot;&gt;
&lt;input type=&quot;search&quot; id=&quot;s&quot; name=&quot;s&quot; title=&quot;Search Blog&quot; placeholder=&quot;Search My Website&quot; /&gt;
&lt;button type=&quot;submit&quot; value=&quot;search&quot; id=&quot;searchsubmit&quot;&gt;Search&lt;/button&gt;
&lt;/section&gt;
&lt;section id=&quot;searchOptions&quot;&gt;
&lt;input type=&quot;radio&quot; value=&quot;all&quot; name=&quot;post_type&quot; id=&quot;searchOptionsAll&quot; checked /&gt; &lt;label for=&quot;searchOptionsAll&quot;&gt;Search All&lt;/label&gt;&lt;br /&gt;
&lt;input type=&quot;radio&quot; value=&quot;post&quot; name=&quot;post_type&quot; id=&quot;searchOptionsBlog&quot; /&gt; &lt;label for=&quot;searchOptionsBlog&quot;&gt;Search Blog Only&lt;/label&gt;&lt;br /&gt;
&lt;input type=&quot;radio&quot; value=&quot;portfolio&quot; name=&quot;post_type&quot; id=&quot;searchOptionsPortfolio&quot; /&gt; &lt;label for=&quot;searchOptionsPortfolio&quot;&gt;Search Portfolio Only&lt;/label&gt;&lt;br /&gt;
&lt;input type=&quot;radio&quot; value=&quot;tutorials&quot; name=&quot;post_type&quot; id=&quot;searchOptionsTutorials&quot; /&gt; &lt;label for=&quot;searchOptionsTutorials&quot;&gt;Search Tutorials Only&lt;/label&gt;
&lt;/section&gt;
&lt;/form&gt;
&nbsp;</pre></div></figure>
<figure id="attachment_1559" aria-describedby="figcaption_attachment_1559" style="width: 243px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-02.jpg"><img class="size-full wp-image-1559" title="Figure 2" src="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-02.jpg" alt="" width="233" height="133" /></a><figcaption id="figcaption_attachment_1559">Fig 2 - The Search Options!</figcaption></figure>
<p>Note: I've added the "<code class="inline-code">checked</code>" attribute to the first radio button. This will act as the default action. This way you don't need to worry about coding in a fallback in case someone doesn't select an option.<br />
If you would like a different option to be used as the default search, remove the <code class="inline-code">checked</code> attribute from the first radio button and add it to the one you want to be the default.<br />
So now we've got a pretty good looking form coming together.</p>
<h2 class="subheader">Functions.php</h2>
<p>You've got a pretty swanky form going now, but does it actually do anything? If you click search, you'll notice it sends <code class="inline-code">?s=%searchterm%&amp;post_type=%yourselection%</code> to the search results page up in the <acronym title="Uniform Resource Locator">URL</acronym>. We're now going to take advantage of those GET variables and do some pretty cool things with them.</p>
<p>Open up your <code class="inline-code">functions.php</code> and at the bottom, paste in the following code:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">/***********************************
*
* SEARCH FILTER
* http://speckyboy.com/2010/09/19/10-useful-wordpress-search-code-snippets/
*
***********************************/</span>
<span style="color: #000000; font-weight: bold;">function</span> SearchFilter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_search</span> or <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_feed</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Portfolio</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;portfolio&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'artwork'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'websites'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'motion'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// Tutorials</span>
<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;tutorials&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category_name'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tutorials'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// EVERYTHING! MWAHAHAHAHAHA</span>
<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_type'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'artwork'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'websites'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'motion'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// This filter will jump into the loop and arrange our results before they're returned</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_get_posts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'SearchFilter'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>I like to always attribute links to the places I find the snippets of code I use, so you'll notice I've included a link to <a title="10 Useful WordPress Search Snippets" href="http://speckyboy.com/2010/09/19/10-useful-wordpress-search-code-snippets/" target="_blank">the site where I originally found the snippet we'll be using today</a>.<br />
I've added two checks, the first one checks if the page we're on is a search, the second one checks if we're looking a feed. The feed part is optional and you can remove it. I included it because I also wanted to have these queries available as custom feeds.</p>
<p>Once the feed or search check is confirmed, it will move on to look at the $_GET values for the "post_type" variable:</p>
<ul>
<li>If it finds "portfolio" it will create a custom query to return all posts in the "artwork", "websites" and "motion" post types that match the search terms. These are proper custom post types I had previously set up in the back-end using the Custom Post Type UI plugin.</li>
<li>If it finds "tutorials" it will create a custom query to return all posts in the tutorials category that match the search terms.</li>
<li>if it finds "all" it will create a custom query similar to the first one, however instead of just returning those three post types, it also returns "post" post types, which are the default blog post types for WordPress. This way you're essentially searching all four post types for the same term.</li>
</ul>
<p>Notice I didn't need to set up a custom query for the "Search blog only" option. If you look back at the code for the radio buttons, the value it sends is simply "post". As we've learned in the code snippet above, "post" is the post type for the default WordPress blog posts. The variable the search form sends to the search results page is post_type, which is actually a real variable you can pass to WordPress at any time. As such when you search only the blog it will send ?post_type=post to the search results page and WordPress will know exactly what to do with this out of the box.</p>
<p>Now you'll probably want to change the post_types above to use the post_types you want to search for on your own WordPress install. Unless you find yourself in the incredibly coincidental scenario of having exactly the same sort of post types as me. In which case, high five!</p>
<p>So now your search form should be fully functional and ready to go!</p>
<h2 class="subheader">Some jQuery magic</h2>
<p>If you're like me, you like a search bar to not take up too much room, and be fairly easy to access. These new options seem to take up a lot of space and don't look very good. What can we do about that? Well, how about we add a show/hide options button? Sounds pretty good to me!</p>
<p>Go back to your search form template and add in a link just after the search button. Make sure to give it a unique ID so we can target it in jQuery later. Here I've called mine searchAnchor:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="php" style="font-family:monospace;">  <span style="color: #339933;">&lt;</span>section id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchMain&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;search&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;s&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;s&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Search Blog&quot;</span> placeholder<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Search My Website&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>button type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;search&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchsubmit&quot;</span><span style="color: #339933;">&gt;</span>Search<span style="color: #339933;">&lt;/</span>button<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;searchAnchor&quot;</span><span style="color: #339933;">&gt;</span>Search Options<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>section<span style="color: #339933;">&gt;</span></pre></div></figure>
<figure id="attachment_1560" aria-describedby="figcaption_attachment_1560" style="width: 351px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-03.jpg"><img class="size-full wp-image-1560" title="Figure 3" src="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-customsearch-03.jpg" alt="" width="341" height="116" /></a><figcaption id="figcaption_attachment_1560">Figure 3 - Complete Form with New Link</figcaption></figure>
<p>Okay, great. Now we have a little link there. If you already have a scripts file with other jQuery business in it, open that up. If not, create a <code class="inline-code">scripts.js</code> file and dump it in to your theme folder. Enter in the following code:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchAnchor&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchOptions&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></figure>
<p>Make sure you link up your new scripts.js file to your theme, then try it out! Now when you click the link it hides the options. Clicking it again shows them again! Woo! But we'll probably want it hidden by default. So open up your <acronym title="Cascading Style Sheets">CSS</acronym> file and add the following:</p>
<figure class="codeboxFig"><div class="codebox"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #cc00cc;">#searchOptions</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
&nbsp;</pre></div></figure>
<p>Lookin' good, good lookin'. Now it's hidden by default, and clicking on the "search options" link shows them. Now all that's left is to style that puppy up. Add some background colours, borders and all sorts of crazy CSS3 goodness and you'll soon end up with a pretty swanky lookin' form.</p>
<figure id="attachment_1552" aria-describedby="figcaption_attachment_1552" style="width: 310px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-searchoptions.jpg"><img class="size-medium wp-image-1552" title="Search Options" src="http://dbaines.com/blog/wp-content/uploads/2011/03/wp-searchoptions-300x167.jpg" alt="" width="300" height="167" /></a><figcaption id="figcaption_attachment_1552">Drop-down search options, dBaines.com 2011</figcaption></figure>
<p>If I'm still using the db2011 theme while you're reading this then there should be a <strong>live, working demo</strong> right there in the top right corner of this very website!</p>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/wordpress-custom-post-type-multiple-search/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>db2010 WordPress &amp; ZenPhoto Themes Download</title>
		<link>http://dbaines.com/blog/archive/db2010-wordpress-zenphoto-theme-download/</link>
		<comments>http://dbaines.com/blog/archive/db2010-wordpress-zenphoto-theme-download/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 08:42:59 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Free Download]]></category>
		<category><![CDATA[Wordpress Template]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1521</guid>
		<description><![CDATA[<p>Now that I've launched dBaines 2011 I thought I'd release db2010 for the world to download and dissect. I hope to make this a tradition <img src='http://dbaines.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p><br />
<span id="more-1521"></span><br />
<strong>A brief run-down of features for the WordPress theme:</strong></p>
<ul>
<li>Perfect integration with <a title="ZenPhoto.org" href="http://www.zenphoto.org" target="_blank">ZenPhoto</a> 1.3</li>
<li>Uses HTML5 and CSS3</li>
<li>No Support for <acronym title="Internet Explorer 6">IE6</acronym> - May work, untested, not likely.</li>
<li>Homepage Template that pulls latest ZenPhoto posts</li>
<li>Search bar searches wordpress if you're on a wordpress page, searches zenphoto if you're on a zenphoto page.</li>
<li>Admin Bar (defunct now since WordPress 3.1 comes with it's own admin bar)</li>
<li>Tutorial post type with custom display</li>
<li>QuickUpdate post type with custom display</li>
<li>Microthemes with cookie</li>
<li>Custom admin login theme</li>
<li>All plugins fallback to either default functionality or display friendly </li><br />&#160;<br /> <a href="http://dbaines.com/blog/archive/db2010-wordpress-zenphoto-theme-download/" class="read_more">Continue Reading</a></ul>]]></description>
			<content:encoded><![CDATA[<figure id="attachment_1524" aria-describedby="figcaption_attachment_1524" style="width: 650px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/db2010.jpg"><img class="size-large wp-image-1524" title="db2010" src="http://dbaines.com/blog/wp-content/uploads/2011/03/db2010-1024x326.jpg" alt="" width="640" height="203" /></a><figcaption id="figcaption_attachment_1524">db2010 Blog</figcaption></figure>
<p>Now that I've launched dBaines 2011 I thought I'd release db2010 for the world to download and dissect. I hope to make this a tradition <img src='http://dbaines.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<a href="http://dbaines.com/files/wp_db2010/db2010_wp-20110307.zip" class="downloadbtn downloadbtn_archive" title="Download db2010 for WordPress  (4.52mb)" onClick="javascript: _gaq.push(['_trackPageview', 'db2010 WordPress &#038; ZenPhoto Themes Download/Download db2010 for WordPress  (4.52mb)']);" target="_blank"><span class="downloadbtn_icon"></span>Download db2010 for WordPress  (4.52mb)</a>
<a href="http://dbaines.com/files/wp_db2010/db2010_zp-20110307.zip" class="downloadbtn downloadbtn_archive" title="Download db2010 for ZenPhoto (55kb)" onClick="javascript: _gaq.push(['_trackPageview', 'db2010 WordPress &#038; ZenPhoto Themes Download/Download db2010 for ZenPhoto (55kb)']);" target="_blank"><span class="downloadbtn_icon"></span>Download db2010 for ZenPhoto (55kb)</a>
<p><span class="message info"><strong>Please Note</strong>: This is a theme that served a very specific purpose and as such is in no way ready to be plonked in to any old WordPress install. I'm not releasing it so that others can use it, I'm releasing it so that others can learn from it. I will not be providing support for people trying to use it as a theme. What you can and cannot do with this theme is outlined at the bottom of this post.</span><br />
<span id="more-1521"></span><br />
<strong>A brief run-down of features for the WordPress theme:</strong></p>
<ul>
<li>Perfect integration with <a title="ZenPhoto.org" href="http://www.zenphoto.org" target="_blank">ZenPhoto</a> 1.3</li>
<li>Uses HTML5 and CSS3</li>
<li>No Support for <acronym title="Internet Explorer 6">IE6</acronym> - May work, untested, not likely.</li>
<li>Homepage Template that pulls latest ZenPhoto posts</li>
<li>Search bar searches wordpress if you're on a wordpress page, searches zenphoto if you're on a zenphoto page.</li>
<li>Admin Bar (defunct now since WordPress 3.1 comes with it's own admin bar)</li>
<li>Tutorial post type with custom display</li>
<li>QuickUpdate post type with custom display</li>
<li>Microthemes with cookie</li>
<li>Custom admin login theme</li>
<li>All plugins fallback to either default functionality or display friendly fallback message.</li>
<li>Various helpful shortcodes:
<ul>
<li>Download buttons</li>
<li>Columns</li>
<li>Demo/Download buttons for script releases</li>
<li>Clear</li>
<li>Subheadings (h2 with a class)</li>
<li>Important/Info/Error messages</li>
<li>Hilight</li>
<li>Inline Code</li>
<li>GeSHi styled Codebox, doesn't rely on a plugin</li>
</ul>
</li>
</ul>
<p><strong>A brief run-down of features for the ZenPhoto theme:</strong></p>
<ul>
<li>Completely static homepage category display. Unfortunately I just couldn't get the logic down to display the homepage dynamically without doing crazy things with subcategories and what-not.</li>
<li>Absolutely relies on the WordPress template. The header, subsection and footer are all dynamic and pulled from WordPress.</li>
<li>Matched very closely in style to the WordPress theme. I tried to make it as tight of an integration as a could.</li>
</ul>
<p><strong>Supported plugins out of the box:</strong></p>
<ul>
<li><a href="http://n00bism.net/dokuwiki/wordpress/zenpressed/" target="_blank">ZenPressed</a> (specifically a <a title="ZenPressed dbmod" href="/files/wp_db2010/zenpressed_dbainesmod.zip">highly modified version with features for sliders</a>)</li>
<li><a href="http://sevennine.net/archives/2005/11/01/wp-audioscrobbler-03-beta/" target="_blank"><acronym title="WordPress">WP</acronym> AudioScrobbler</a></li>
<li><a href="http://mtekk.us/code/breadcrumb-navxt/" target="_blank">Breadcrumbs NavXT</a></li>
<li><a href="http://www.ahmedgeek.com/facebook-like-button-v5-0-major-update" target="_blank">Facebook Like</a></li>
<li><a href="http://dbaines.com/blog/wp-admin/plugins.php?action=activate&amp;plugin=get-custom-field-values%2Fget-custom.php&amp;plugin_status=all&amp;paged=1&amp;s&amp;_wpnonce=3c93086757" target="_blank">Get Custom Field Values</a></li>
<li><a href="http://wordpress.org/extend/plugins/wp-pagenavi/" target="_blank"><acronym title="WordPress">WP</acronym> PageNavi</a></li>
</ul>
<p>You can find more detail at the <a title="View post: db2010" href="http://dbaines.com/blog/archive/db2010/">initial db2010 announcement post</a>.</p>
<p><strong>Credits</strong>:</p>
<p><em>I'll try and link these all to their appropriate places soon. In the meantime a quick google should show appropriate results.</em></p>
<ul>
<li>Silk Icons</li>
<li>Function Icons</li>
<li>EasySlider 1.7</li>
<li>Tipsy</li>
<li>jQuery.preload</li>
<li>jQuery.autogrow-textarea</li>
<li>jQuery.cookies</li>
<li>jQuery.input.hint</li>
<li>jQuery.jCaption</li>
<li>jQuery.styleswitcher</li>
<li>Modernizr</li>
<li>YUI <acronym title="Cascading Style Sheets">CSS</acronym> base</li>
</ul>
<p><strong>Do's and Don't's</strong></p>
<p>You are completely free to re-work this theme and use it on your own personal blog or website.</p>
<p>You are completely free to use snippets of code or techniques used/learned from this theme in your own theme.</p>
<p>You are completely free to re-develop this theme and release it for any platform (including as a standalone WordPress theme.) I only ask that you keep a credit to me (a comment in the <acronym title="Cascading Style Sheets">CSS</acronym> file or header.php will be fine) and that you release it for free.</p>]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/db2010-wordpress-zenphoto-theme-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A brief showcase of Co-Opp&#8217;s 404 Pages.</title>
		<link>http://dbaines.com/blog/archive/a-brief-showcase-of-co-opps-404-pages/</link>
		<comments>http://dbaines.com/blog/archive/a-brief-showcase-of-co-opps-404-pages/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 07:32:02 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://dbaines.com/?p=1139</guid>
		<description><![CDATA[<p>I like to think I make a pretty good 404 page. Not a lot of people see them, so I thought I'd document a few from <a title="Co-Opp: Because gaming is awesome." href="http://www.co-opp.net" target="_blank">Co-Opp</a> over the past few years.</p>
<p><strong>2008</strong>: This was the first 404 page I developed for Co-Opp. At the time, the Co-Opp logo was sitting on top of a bunch of blue circles with some drips coming off the bottom. I decided to spin that familiar vision of the logo slightly and have the blue cloud turn in to a pool of blood.</p>

<p style="text-align: center;">
</p><p><strong>2009</strong>: The logo changed slightly when the website was redesigned in 2009 and the logo no longer sat on a cloud of blue drippiness. As such the previous 404's <br />&#160;<br /> <a href="http://dbaines.com/blog/archive/a-brief-showcase-of-co-opps-404-pages/" class="read_more">Continue Reading</a></p>]]></description>
			<content:encoded><![CDATA[<p>I like to think I make a pretty good 404 page. Not a lot of people see them, so I thought I'd document a few from <a title="Co-Opp: Because gaming is awesome." href="http://www.co-opp.net" target="_blank">Co-Opp</a> over the past few years.</p>
<p><strong>2008</strong>: This was the first 404 page I developed for Co-Opp. At the time, the Co-Opp logo was sitting on top of a bunch of blue circles with some drips coming off the bottom. I decided to spin that familiar vision of the logo slightly and have the blue cloud turn in to a pool of blood.</p>
<figure id="attachment_1141" aria-describedby="figcaption_attachment_1141" style="width: 310px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404-2008.jpg"><img class="size-medium wp-image-1141" title="2008" src="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404-2008-300x143.jpg" alt="" width="300" height="143" /></a><figcaption id="figcaption_attachment_1141">2008</figcaption></figure>
<p style="text-align: center;">
<p><strong>2009</strong>: The logo changed slightly when the website was redesigned in 2009 and the logo no longer sat on a cloud of blue drippiness. As such the previous 404's pun was no longer relevant. Although still a good 404 page, I wanted something new and something more related to classic gaming that the logo represented. I came up with the idea of using the 404 to represent a classic game over screen.</p>
<figure id="attachment_1142" aria-describedby="figcaption_attachment_1142" style="width: 310px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404-2009.jpg"><img class="size-medium wp-image-1142" title="2009" src="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404-2009-300x300.jpg" alt="" width="300" height="300" /></a><figcaption id="figcaption_attachment_1142">2009</figcaption></figure>
<p style="text-align: center;">
<p><strong>2011</strong>: In early 2011, Co-Opp experienced a complete shift. The logo was back to the original one and everything became much more refined in purpose. I thought for a few days what I would use for a 404 page. I was very close to setting up a scene in Team Fortress 2 (via Garry's Mod) of a battle and having the Co-Opp logo lay dead in the middle saying something like, "Oh no! The page you were looking for was killed in cross-fire!" or something. A member of Co-Opp posted a photo to his Facebook account showing him ferociously about to eat a bunch of peas, and everything just clicked.</p>
<figure id="attachment_1140" aria-describedby="figcaption_attachment_1140" style="width: 310px" class="wp-caption aligncenter"><a href="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404_2011.jpg"><img class="size-medium wp-image-1140" title="2011" src="http://dbaines.com/blog/wp-content/uploads/2011/03/co-opp_404_2011-300x268.jpg" alt="" width="300" height="268" /></a><figcaption id="figcaption_attachment_1140">2011</figcaption></figure>
<p style="text-align: center;">]]></content:encoded>
			<wfw:commentRss>http://dbaines.com/blog/archive/a-brief-showcase-of-co-opps-404-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

