<?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>nooshu &#187; plugin Archives </title>
	<atom:link href="http://nooshu.com/tag/plugin/feed" rel="self" type="application/rss+xml" />
	<link>http://nooshu.com</link>
	<description>Kneeling on the shoulders of giants</description>
	<lastBuildDate>Fri, 20 Jan 2012 11:38:04 +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>WordPress Stats broken? Grab yourself a Jetpack!</title>
		<link>http://nooshu.com/wordpress-stats-broken-grab-yourself-a-jetpack?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-stats-broken-grab-yourself-a-jetpack</link>
		<comments>http://nooshu.com/wordpress-stats-broken-grab-yourself-a-jetpack#comments</comments>
		<pubDate>Tue, 22 Mar 2011 21:47:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1628</guid>
		<description><![CDATA[Have your Wordpress Stats broke? Feel a little lost without that friendly graph on the Dashboard? You need Jetpack!]]></description>
			<content:encoded><![CDATA[<p>Last week one of my favourite WordPress plug-ins broke: <a href="http://wordpress.org/extend/plugins/stats/">WordPress Stats</a>. For anyone who doesn&#8217;t use this fantastic plug-in it&#8217;s a very clean and simple way of viewing visitor statistics directly on your dashboard. It isn&#8217;t as extensive as Google Analytics and for that I&#8217;m grateful as it doesn&#8217;t need to be. I first thought it was a hosting issue but that turned out to be incorrect. The plug-in, in it&#8217;s current form has been discontinued as it has been rolled into a compilation of useful WordPress tools called <a href="http://wordpress.org/extend/plugins/jetpack/">Jetpack</a>.</p>
<p>So what do you get in Jetpack? Well here are three of my favourites:</p>
<ul>
<li><strong>WordPress.com Stats</strong> &#8211; exactly what it says on the tin&#8230;</li>
<li><strong>Shortcode Embeds</strong> &#8211; easily add media from YouTube, Vimeo and Slideshare.</li>
<li><strong>LaTeX</strong> &#8211; need equations in a blog post? This ones for you then.</li>
</ul>
<p>There are eight plug-ins currently available with more coming soon.</p>
<p>The last plug-in I mentioned, LaTeX may sound like it&#8217;s come straight from a .xxx domain name but bare with me; under that slightly suspect name is a powerful tool for anyone who needs to format equations in a post. Here&#8217;s a small demonstration:</p>
<p><img src='http://s0.wp.com/latex.php?latex=e%5E%7Bi%5Cpi%7D+%2B+1+%3D+0&#038;bg=D7DBCD&#038;fg=000&#038;s=3' alt='e^{i&#92;pi} + 1 = 0' title='e^{i&#92;pi} + 1 = 0' class='latex' /></p>
<p>LaTeX has allowed me to embed one of the most beautiful equations in all of mathematics; Euler&#8217;s Equation directly into my blog post. It links Real Numbers, Euler&#8217;s Number, Imaginary Numbers and Pi in a staggeringly simple equation. There&#8217;s a mass of information on LaTeX <a href="http://en.wikibooks.org/wiki/LaTeX">here</a> with everything you&#8217;d ever need pretty much covered.</p>
<p>So if you&#8217;re looking to give your WordPress blog a bit of a boost (horrible pun I know), give <a href="http://wordpress.org/extend/plugins/jetpack/">Jetpack</a> a whirl!</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/wordpress-stats-broken-grab-yourself-a-jetpack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plug-ins and svn:externals</title>
		<link>http://nooshu.com/wordpress-plug-ins-and-svnexternals?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-plug-ins-and-svnexternals</link>
		<comments>http://nooshu.com/wordpress-plug-ins-and-svnexternals#comments</comments>
		<pubDate>Wed, 03 Nov 2010 13:05:18 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1446</guid>
		<description><![CDATA[So you have your Wordpress install in Subversion. What about those pesky plug-ins that always need updating.]]></description>
			<content:encoded><![CDATA[<p>So last week I decided to play with the <a href="http://nooshu.com/svn-post-commit-hook-on-dreamhost/">post-commit hook in Subversion</a> which allows you to easily update your WordPress install after committing changes to your repository. After some trial and error this works perfectly. One issue you may run into with WordPress when it&#8217;s committed to SVN is using the auto-update plug-in function.</p>
<p>Committing your plug-ins to SVN tends to break this (very cool) auto-update functionality. SVN adds a hidden &#8220;.svn&#8221; directory to each directory you commit. WordPress auto-update tries to delete the updating plug-ins folder before downloading and extracting the new version into the &#8220;wp-content/plugins directory&#8221;. WordPress isn&#8217;t able to delete the &#8220;.svn&#8221; directories so the auto update process fails, leaving you without the plug-in you were trying to update (since it deleted it before failing).</p>
<p>So what&#8217;s the solution? Well you could download the latest plug-in version and manually extract / commit it to your repository; but that&#8217;s too long winded (and boring). The ideal solution lies in the use of the svn:externals property. It allows you to attach an external repository location to a folder in your own repository. Since all WordPress plug-ins are hosted in the WordPress repository you can update all your plug-in&#8217;s directly from there with a quick &#8220;SVN Update&#8221;! Perfect!</p>
<p>You can do this via <a href="http://scott.yang.id.au/2006/04/svnexternal-wordpress-plugins/">SSH and the command line</a> or you can do it via a SVN client with a GUI (I use TortoiseSVN). I&#8217;ll be showing you how to do it via the GUI.</p>
<p>First you need to remove the plug-in you want to update from your repository if it&#8217;s been added. This may seem a little strange as you are trying to update it; but we need to update from an external repository and if a version already exists it will fail:</p>
<div id="attachment_1448" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/11/svn-delete-tortoise.gif"><img src="http://nooshu.com/wp-content/uploads/2010/11/svn-delete-tortoise-518x282.gif" alt="Delete the plug-in you wish to update" title="svn-delete-tortoise" width="518" height="282" class="size-medium wp-image-1448" /></a><p class="wp-caption-text">Delete the plug-in you need updating from the repository first</p></div>
<p>Next you need to setup your svn:externals property on the &#8220;wp-content/<strong>plugins</strong>&#8221; directory via the properties menu:</p>
<div id="attachment_1451" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/11/svn-tortoise-properties.gif"><img src="http://nooshu.com/wp-content/uploads/2010/11/svn-tortoise-properties-518x231.gif" alt="tortoise properties menu" title="svn-tortoise-properties" width="518" height="231" class="size-medium wp-image-1451" /></a><p class="wp-caption-text">Edit the properties on the 'plugins' directory.</p></div>
<p>Now for the tedious bit. For all the plug-ins you want SVN to auto-update, you will need to find the WordPress repository URL for. So for the example, to update Akismet and All in One SEO pack you will enter the following:</p>
<div class="codecolorer-container text default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">akismet http://plugins.svn.wordpress.org/akismet/trunk/<br />
all-in-one-seo-pack http://plugins.svn.wordpress.org/all-in-one-seo-pack/trunk/</div></td></tr></tbody></table></div>
<div id="attachment_1453" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/11/svn-tortoise-externals.gif"><img src="http://nooshu.com/wp-content/uploads/2010/11/svn-tortoise-externals-518x273.gif" alt="Using Tortoise SVN externals" title="svn-tortoise-externals" width="518" height="273" class="size-medium wp-image-1453" /></a><p class="wp-caption-text">Add the plug-in repositories to the externals properties, one per line.</p></div>
<p>Once you&#8217;ve added all the plug-ins you want to auto-update (remember to remove them first if they already exist in your repository!) commit your changes. Then watch the magic happen via an update:</p>
<div id="attachment_1454" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/11/svn-plugin-update.gif"><img src="http://nooshu.com/wp-content/uploads/2010/11/svn-plugin-update-518x262.gif" alt="Updating WordPress plugins directly from the repository" title="svn-plugin-update" width="518" height="262" class="size-medium wp-image-1454" /></a><p class="wp-caption-text">Plug-ins checked out from the WordPress repository.</p></div>
<p>Akismet and All in One SEO Pack have been checked out from the WordPress repository trunk. Every time you do an update SVN will check for new versions of the plug-ins. Great stuff! There is a slight warning with checking out from trunk; the developer could be working on a new release and unfinished code may have been committed, so the plug-in may be broken if updating from trunk! To get around this you may want to checkout from the plug-in tags (final versions) instead. To do that change the repository URLs to:</p>
<div class="codecolorer-container text default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">akismet http://plugins.svn.wordpress.org/akismet/tags/2.4.0/<br />
all-in-one-seo-pack http://plugins.svn.wordpress.org/all-in-one-seo-pack/tags/1.6.9/</div></td></tr></tbody></table></div>
<p>Unfortunately this will involve changing your svn:externals property every time a new version of a plug-in comes out, but it&#8217;s less likely your plug-ins will break. <strong>Note</strong>: Remember to replace the tag version number with the latest version. </p>
<p>I hope this little tip helps you streamline your deployment!</p>
<p><strong>P.S.</strong> On a side note, if anybody knows how to auto update from a tag automatically please leave a comment, I&#8217;d love to know if it&#8217;s possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/wordpress-plug-ins-and-svnexternals/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jCarousel missing item width</title>
		<link>http://nooshu.com/jcarousel-missing-item-width?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jcarousel-missing-item-width</link>
		<comments>http://nooshu.com/jcarousel-missing-item-width#comments</comments>
		<pubDate>Tue, 12 Oct 2010 10:04:38 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1409</guid>
		<description><![CDATA[jQuery has a host of carousel plug-ins available to use. jCarousel seems to be the most popular. A small error cause a few issues...]]></description>
			<content:encoded><![CDATA[<p>On a recent project the UX team put together a set of wireframes where the use of <a href="http://developer.yahoo.com/ypatterns/selection/carousel.html">carousels</a> featured heavily. Luckily when you choose a JavaScript library like jQuery you have quite a few carousel plug-ins to choose from. I&#8217;ve used various different ones in the past, but my favorite is called <a href="http://sorgalla.com/jcarousel/">jCarousel</a>. You only have to take a quick look at the jCarousel homepage to see that it will do pretty much anything you ask of it. So in theory it should be a case of copy / paste the code into your site and you&#8217;re away. Unfortunately Web Development doesn&#8217;t always work that way; a small oversight can leave you racking your brains for hours&#8230; arghh!</p>
<p>The design and layout layout had already been created in the usual fashion. All that was left to do was to layer on all the JavaScript goodies (the fun part!). While implementing jCarousel I ran into a curious console error message:</p>
<blockquote><p>&#8220;jCarousel: No width/height set for items. This will cause an infinite loop. Aborting&#8230;&#8221;</p></blockquote>
<p>When I checked the carousel CSS, the item width had been set:</p>
<div class="codecolorer-container css default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.product</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.75em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Strange. The width had been set, so the error message must be from something else. After a few minutes investigation it turned out that the carousel didn&#8217;t have a parent with a set width. When fired the carousel is wrapped with two divs; one wraps the carousel, the other wraps the carousel and the navigation. Neither of these divs have an explicit width set which is what was causing the problem. It was a very quick fix in the end:</p>
<div class="codecolorer-container css default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.jcarousel-container</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span><span style="color: #808080; font-style: italic;">/* Fixed! */</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Upon a little more investigation it seems you can fix this issue in other ways too. Instead of using a class of &#8220;product&#8221; to set the item widths I tried using the following:</p>
<div class="codecolorer-container css default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#carousel</span> li <span style="color: #00AA00;">&#123;</span><span style="color: #808080; font-style: italic;">/* New selector also fixed it! */</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/*...*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.75em</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Very strange! The CSS in both cases changes the same elements, it just ignored the width in the &#8216;product&#8217; class.</p>
<p>So for anyone else encountering the same &#8220;No width/height set for items&#8221; issue here&#8217;s a quick check list for you to try:</p>
<ol>
<li>Make sure you set a width on the items (duh!). Maybe try different CSS selectors if necessary.</li>
<li>Set a width on the &#8220;jcarousel-container&#8221; class or one of its parents.</li>
<li>If all else fails, adapt one of the skin examples bundled with jCarousel.</li>
</ol>
<p>The last one is very annoying if you have your carousel already styled up, but it is guaranteed to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/jcarousel-missing-item-width/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aloha Editor &#8211; Content editing the HTML5 way</title>
		<link>http://nooshu.com/aloha-editor-content-editing-the-html5-way?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=aloha-editor-content-editing-the-html5-way</link>
		<comments>http://nooshu.com/aloha-editor-content-editing-the-html5-way#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:25:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1358</guid>
		<description><![CDATA[There are many ways to edit and update content on a website, but none of them look quite a easy as Aloha Editor.]]></description>
			<content:encoded><![CDATA[<p>The number of times I&#8217;ve built a website based on a CMS only to have the client utter the words &#8220;Oh I&#8217;m confused, it&#8217;d be so much quicker if you made the changes&#8221;. Right, so the CMS was a bit of a waste of time then! But fingers crossed thanks to <a href="http://aloha-editor.com/">Aloha Editor</a> that may be a thing of the past. Often the problem clients have is actually finding the content that needs to be edited in the CMS; Aloha to the rescue!</p>
<p>What Aloha actually does is make the content editable right on the page; no need to jump into the CMS, find the page, make the changes then preview the result. Just click on the text you wish to edit and type away. Done! It&#8217;s hard to believe it actually works until you try it. Why not give it a go on their <a href="http://aloha-editor.com/demos/aloha-world-example/">demo page</a>. It incorporates a few HTML5 technologies which could cause issues with older IE versions, but the demo page seems to work (with a few quirks).</p>
<div id="attachment_1360" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/08/aloha-editor-demo.gif"><img src="http://nooshu.com/wp-content/uploads/2010/08/aloha-editor-demo-518x308.gif" alt="An example of Aloha Editor in action" title="aloha-editor-demo" width="518" height="308" class="size-medium wp-image-1360" /></a><p class="wp-caption-text">Quickly and easily edit the demo webpage.</p></div>
<p>The core has been written to be very small and streamlined, with additional functionality being added by the way of user contributed plug-ins. There&#8217;s already an <a href="http://www.aloha-editor.com/api/">extensive API</a> for developers to play with so I&#8217;m sure many of the missing features will be plugged very soon.</p>
<p>There are alternatives about such as <a href="http://tinymce.moxiecode.com/">TinyMCE</a> and <a href="http://ckeditor.com/">CKEditor</a>, but they&#8217;re integrated directly into a CMS&#8217; administration pages rather than as an inline editor like Aloha. Now before you get too excited there are a few cons:</p>
<ul>
<li>It isn&#8217;t as simple as just dropping the scripts into a page, it needs to be integrated into a backend system for the changes to be saved.</li>
<li>Still in early development so could be quite buggy.</li>
<li>Doesn&#8217;t work with Opera Browser at the moment but this is being worked on.</li>
<li>Some features aren&#8217;t available yet, like image / media insertion. But I&#8217;m sure these will be developed as it matures.</li>
</ul>
<p>So there are still a few issues to iron out but it all looks very promising! There were even murmurs on Twitter today about a WordPress plug-in and a Drupal v7 module (not 6 though I presume) in development. So it won&#8217;t be long before we&#8217;ll be able to try it out on a live site; hopefully it&#8217;s also simple enough for clients to use too!</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/aloha-editor-content-editing-the-html5-way/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress plug-in: Snipplr Snippets</title>
		<link>http://nooshu.com/wordpress-plug-in-snipplr-snippets?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-plug-in-snipplr-snippets</link>
		<comments>http://nooshu.com/wordpress-plug-in-snipplr-snippets#comments</comments>
		<pubDate>Thu, 24 Jun 2010 15:27:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[snipplr]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1230</guid>
		<description><![CDATA[Having a little time to spare I decided to update the Snipplr Plug-in for Wordpress, originally by Tyler Hall.]]></description>
			<content:encoded><![CDATA[<p>Recently I blogged about the fact that <a href="http://nooshu.com/snipplr-under-new-management/">Snipplr was under new management!</a>, and what great news that is. You can see the changes being made already, fingers crossed they manage to nail the spam issue.</p>
<p>Back when Snipplr was young, Tyler Hall wrote a WordPress plug-in for Snipplr that allowed you to embed your snippets directly into your posts. What a great idea; unfortunately it hasn&#8217;t been updated since 2006 and much has changed in the world of WordPress. Enabling the plug-in in it&#8217;s current state is a little flakey; so I&#8217;ve decided to update it for WordPress 3.0+.</p>
<p>The plug-in is called &#8216;Snipplr Snippets&#8217; and is available to download from the <a href="http://wordpress.org/extend/plugins/snipplr-snippets/">WordPress plug-in repository</a>. I&#8217;ve used many of the functions that were in the old plug-in so it isn&#8217;t a complete rewrite but much of the structure has changed (big thank you to Marcin Dominas helped with a couple of issues i was having at first).</p>
<div id="attachment_1232" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/06/snipplr-snippets-sidebar.gif"><img src="http://nooshu.com/wp-content/uploads/2010/06/snipplr-snippets-sidebar-518x359.gif" alt="View of the snippler snippets side bar." title="snipplr-snippets-sidebar" width="518" height="359" class="size-medium wp-image-1232" /></a><p class="wp-caption-text">Snipplr Snippets sidebar widget in action.</p></div>
<p>The administrator area has been updated and there are a couple of new features available which hopefully are self explanatory. I&#8217;ve also updated to the latest version of GeSHi for the syntax highlighting, if you don&#8217;t like the look a feel of the outputted code simply disable the plug-in CSS in the site header (admin panel), copy to your style.css and modify as needed. For the plug-in to work you will need a <a href="http://snipplr.com/">Snipplr account</a> and an <strong>API key</strong> (available from the settings page).</p>
<p>Once you&#8217;ve installed the plug-in and enabled it, it&#8217;s dead simple to include a snippet into your blog post like so:</p>
<div class="codecolorer-container text default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">//Remove the spaces inside the brackets. <br />
[ snippet id=## ]</div></td></tr></tbody></table></div>
<p>Where the ## is the ID of the snippet you wish to include in the post (you can get this from the snippet URL). The code below is pulling in a snippet directly from Snipplr using the plug-in:</p>
<div class='sniplrcode'>
<ol class="jquery" style="font-family:monospace;">
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">$</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">$</span><span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<a href="http://docs.jquery.com/Ajax/load"><span style="color: #000066;">load</span></a><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></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Wait for the page to load, the cache the files you want</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">$</span>.<a href="http://docs.jquery.com/Ajax/ajax"><span style="color: #000066;">ajax</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;javascript.js&#8217;</span><span style="color: #339933;">,</span> dataType<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;text&#8217;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">$</span>.<a href="http://docs.jquery.com/Ajax/ajax"><span style="color: #000066;">ajax</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;image.jpg&#8217;</span><span style="color: #339933;">,</span> dataType<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;text&#8217;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">$</span>.<a href="http://docs.jquery.com/Ajax/ajax"><span style="color: #000066;">ajax</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;flash.swf&#8217;</span><span style="color: #339933;">,</span> dataType<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;text&#8217;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">$</span>.<a href="http://docs.jquery.com/Ajax/ajax"><span style="color: #000066;">ajax</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>url<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;style.css&#8217;</span><span style="color: #339933;">,</span> dataType<span style="color: #339933;">:</span><span style="color: #3366CC;">&#8216;text&#8217;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><a href="http://docs.jquery.com/Core/jQuery"><span style="color: #000066;">jQuery</span></a><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
<p>I&#8217;ve tested the plug-in and it seems to work fine, there was a warning from the CodeColorer plug-in because it also uses GeSHi for syntax highlighting but I haven&#8217;t noticed anything break because of it. If it does please let me know and I&#8217;ll fix it. If you have any suggestions / bugs leave a comment and I&#8217;ll see what look into implementing / fixing them. <a href="http://wordpress.org/extend/plugins/snipplr-snippets/">Download here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/wordpress-plug-in-snipplr-snippets/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Headspace2 JavaScript error</title>
		<link>http://nooshu.com/headspace2-javascript-error?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=headspace2-javascript-error</link>
		<comments>http://nooshu.com/headspace2-javascript-error#comments</comments>
		<pubDate>Thu, 17 Jun 2010 19:25:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1209</guid>
		<description><![CDATA[Post Thesaurus is broken.... oh wait no it isn't. Just a pesky JavaScript error from another plugin!]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: An update of Headspace2 has just been released that seems to solve this issue as well as a few others.</p>
<p>After updating to WordPress 3.0 (yay!) I decided to check the plug-ins that I&#8217;ve written to see if they still worked in version 3.0; to my dismay <a href="http://wordpress.org/extend/plugins/post-thesaurus/">Post Thesaurus</a> had stopped working&#8230; nooooo! Not good! A quick scan using Firebug revealed the issue: the Headspace2 plug-in.</p>
<p><a href="http://wordpress.org/extend/plugins/headspace2/">Headspace2</a> is a superb plug-in that allows you to tweak the SEO potential of your site. There are tonnes of options available; All In One SEO is easier to use, but I prefer the flexibility of Headspace2. The problem was occurring in the headspace-tags.js file:</p>
<div class="codecolorer-container text default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$(get_tag_element()).val() is undefined<br />
/wp-content/plugins/headspace2/js/headspace-tags.js?ver=3.6.32<br />
Line 76</div></td></tr></tbody></table></div>
<p>This error was stopping the rest of the JavaScript on a post page from firing (hence breaking Post Thesaurus). Looking at line 76 of headspace-tags.js you will see:</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// Highlights headspace tags using the WordPress tag field as source</span><br />
<span style="color: #003366; font-weight: bold;">function</span> highlight_tags <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> words <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>get_tag_element<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">','</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//...</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>The code seems to be falling over when there are no tags, so I just added a ternary operator which checks the array length first.</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> words<span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> wordArray <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>get_tag_element<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#40;</span>wordArray.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> words <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>get_tag_element<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">','</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> words <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>If there are no tags create an empty array, else run the usual code. Adding this code fixed the issue and Post Thesaurus works again. Phew! Panic over. I&#8217;m sure this error will be picked up by the developer straight away and fixed in the next update.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/headspace2-javascript-error/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress plug-in: Post Thesaurus</title>
		<link>http://nooshu.com/wordpress-plug-in-post-thesaurus?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-plug-in-post-thesaurus</link>
		<comments>http://nooshu.com/wordpress-plug-in-post-thesaurus#comments</comments>
		<pubDate>Wed, 14 Apr 2010 00:09:38 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[thesaurus]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=940</guid>
		<description><![CDATA[I created this plug-in for Wordpress as I have a tendency of using the word 'great' a little to much...]]></description>
			<content:encoded><![CDATA[<p>Over the past few days I&#8217;ve been working on a new WordPress plug-in, one that I personally have desperately needed recently. It&#8217;s called &#8216;Post Thesaurus&#8217; and it does exactly what you&#8217;d expect it to do. It creates a little widget on the side of the &#8216;Add new post&#8217; page which you can use to suggest new words of the same meaning.</p>
<p>After finding I use the  word &#8216;great&#8217; a little too much, I thought it was about time to do something about it. Here are a few screenshots of the plug-in in action:</p>
<div id="attachment_943" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/04/screenshot-2.gif"><img src="http://nooshu.com/wp-content/uploads/2010/04/screenshot-2-518x254.gif" alt="Post Thesaurus before I&#039;ve searched for a set of words." title="Post Thesaurus Before Search" width="518" height="254" class="size-medium wp-image-943" /></a><p class="wp-caption-text">Notice the widget in the top right corner.</p></div>
<div id="attachment_944" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/04/screenshot-3.gif"><img src="http://nooshu.com/wp-content/uploads/2010/04/screenshot-3-518x254.gif" alt="Post Thesaurus after I&#039;ve completed a word search" title="Post Thesaurus After a Search" width="518" height="254" class="size-medium wp-image-944" /></a><p class="wp-caption-text">The widget has completed a search and populated the results panel.</p></div>
<p>Big thank you to <a href="http://words.bighugelabs.com/">Big Huge Labs</a> for providing the excellent <a href="http://words.bighugelabs.com/api.php">API</a>. I&#8217;ve included an admin page with a few settings (under &#8216;settings&#8217;). One feature to note is the ability to enter your own API key. I&#8217;ve added this just in case the plug-in starts exceeding the 10,000 requests per day a single API key is allowed. <a href="http://words.bighugelabs.com/getkey.php">Sign up is simple</a> and only takes a couple of minutes, then you&#8217;ll have 10,000 requests per day all to yourself.</p>
<p>I&#8217;ve implemented the API using a little jQuery Ajax goodness and some JSONP. Since jQuery is used by the WordPress admin by default, there&#8217;s no additional overhead in having to add it manually.</p>
<p>Grab the plug-in off the WordPress site <a href="http://wordpress.org/extend/plugins/post-thesaurus/">here</a>, or you can download the zip from my site <a href="http://nooshu.com/wp-content/uploads/downloads/post-thesaurus.zip">here</a> <small>(Version 1.0.0.0)</small>.</p>
<p>Hope you find it useful, any feature requests or bugs leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/wordpress-plug-in-post-thesaurus/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>jQuery Plug-in: Tab Down</title>
		<link>http://nooshu.com/jquery-plug-in-tab-down?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-plug-in-tab-down</link>
		<comments>http://nooshu.com/jquery-plug-in-tab-down#comments</comments>
		<pubDate>Fri, 02 Apr 2010 22:43:45 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tab]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=534</guid>
		<description><![CDATA[Simple plug-in for hiding content above the page which is shown by clicking a tab.]]></description>
			<content:encoded><![CDATA[<p>This simple plug-in has been on my TODO list for quite a while, as I&#8217;ve seen the effect used on many websites. It seems particularly useful for displaying contact details / social media updates. I&#8217;m sure there are many similar plug-ins around, but where&#8217;s the fun in using someone else&#8217;s version. So I created a jQuery Tab Down.</p>
<p>Tab Down simply hides content above the page which a user can then access via a floating tab. It&#8217;s easier to illustrate using a couple of demos. <a href="http://nooshu.com/explore/jquery-tab-down/">Demo 1</a> pushes the page content down with the tab, where as <a href="http://nooshu.com/explore/jquery-tab-down/index2.html">demo 2</a> tab content floats over the top of the page content. You can easily switch between versions by passing true or false to the &#8220;floating&#8221; option when calling the tabDown method.</p>
<div id="attachment_538" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/04/tab-down-example.gif"><img src="http://nooshu.com/wp-content/uploads/2010/04/tab-down-example-518x460.gif" alt="jQuery tab down plug-in example" title="tab-down-example" width="518" height="460" class="size-medium wp-image-538" /></a><p class="wp-caption-text">Demo 1 example with floating set to false.</p></div>
<p>The plug-in is simple to use and has a number of options to allow customisation:</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tabContent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; floating<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; time<span style="color: #339933;">:</span> <span style="color: #CC0000;">900</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;easeOutCubic&quot;</span><br />
&nbsp; &nbsp; container<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; downText<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Down&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; upText<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Up&quot;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<ul>
<li><strong>Floating</strong>: Sets if the tab floats over the main content or pushes it down (default: true)</li>
<li><strong>Time</strong>: Time in milliseconds for the slide animation (default: 1000)</li>
<li><strong>Container</strong>: If your tab content is inside a &#8220;wrapper&#8221; div, let the plug-in know the selector for this div, see demo 1 for an example (default: &#8220;body&#8221;)</li>
<li><strong>Downtext</strong>: The text used in the tab before sliding down (default: &#8220;Down&#8221;)</li>
<li><strong>Uptext</strong>: The text used in the tab after sliding down (default: &#8220;Up&#8221;)</li>
<li><strong>Easing</strong>: For smoother animation you can use animation easing, requires the <a href="http://gsgd.co.uk/sandbox/jquery/easing/">jQuery easing plug-in</a> (default: &#8220;swing&#8221;)</li>
</ul>
<p>View <a href="http://nooshu.com/explore/jquery-tab-down/">demo 1</a> and <a href="http://nooshu.com/explore/jquery-tab-down/index2.html">demo 2</a> or <a href="http://nooshu.com/wp-content/uploads/downloads/jquery-tab-down-v0.1.zip">download the code</a> <small>(version 0.1 – updated 2nd Apr 2010)</small>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/jquery-plug-in-tab-down/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plug-in: Simple Navigation Animation Stagger</title>
		<link>http://nooshu.com/jquery-plug-in-simple-navigation-animation-stagger?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-plug-in-simple-navigation-animation-stagger</link>
		<comments>http://nooshu.com/jquery-plug-in-simple-navigation-animation-stagger#comments</comments>
		<pubDate>Thu, 25 Feb 2010 17:47:32 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=323</guid>
		<description><![CDATA[Quick plug-in I put together together to stagger the animation used in a navigation bar.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s great when you run into old code that you&#8217;d completely forgotten about. While reviewing a couple of old sites I&#8217;d put together I ran into some old jQuery animation code the client had requested. I&#8217;ve used it on a couple of projects in the past, not always on the navigation; it can be used with any set of list items. So I popped it into a jQuery plug-in for quick deployment on future projects. View a <a href="http://nooshu.com/explore/navigation-stagger/">demo</a> or <a href="http://nooshu.com/wp-content/uploads/downloads/jquery.staggernaver-0.1.zip">download</a>.</p>
<p><a href="http://nooshu.com/wp-content/uploads/downloads/jquery.staggernaver-0.1.zip">jQuery.staggerNaver</a> simply delays each fadeIn animation on a set of list items to create a type of &#8216;wave&#8217; effect. The plug-in can accept an object with custom user settings:</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">//Plug-in usage</span><br />
jQuery<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#ourULorOL&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">staggerNaver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; animateTime<span style="color: #339933;">:</span> <span style="color: #CC0000;">150</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;swing&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; onePageOnly<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; onePageSelector<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;#home&quot;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<ul>
<li><strong>animateTime</strong>: Time taken for fadeIn animation in milliseconds (default: 210)</li>
<li><strong>easing</strong>: Easing method used, requires the <a href="http://gsgd.co.uk/sandbox/jquery/easing/">easing plug-in</a> if not default (default: &#8220;swing&#8221;)</li>
<li><strong>onePageOnly</strong>: Use only on one page e.g. your home page (default: false)</li>
<li><strong>onePageSelector</strong>: If you are only using the animation on one page, what selector would identify to jQuery that you are on that page? (default: &#8220;#home&#8221;)</li>
</ul>
<p>I&#8217;ve included the one page only setting because as with any set of page animation it can sometimes become very annoying, especially if it does it on every page load! </p>
<p>View a <a href="http://nooshu.com/explore/navigation-stagger/">demo</a> or <a href="http://nooshu.com/wp-content/uploads/downloads/jquery.staggernaver-0.1.zip">download</a> <small>(version 0.1 &#8211; updated 25th Feb 2010)</small>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/jquery-plug-in-simple-navigation-animation-stagger/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plug-in: Scalable Background Image</title>
		<link>http://nooshu.com/jquery-plug-in-scalable-background-image?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-plug-in-scalable-background-image</link>
		<comments>http://nooshu.com/jquery-plug-in-scalable-background-image#comments</comments>
		<pubDate>Wed, 17 Feb 2010 00:44:58 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=279</guid>
		<description><![CDATA[After seeing an interesting scaling background effect on a random site I decided to put together a jQuery plug-in that does the same job.]]></description>
			<content:encoded><![CDATA[<p>A few days ago a friend approached me about an interesting background effect he has seen on a website and how he wanted to implement it into his website. I was curious about how it worked so decided to build a jQuery plug-in that does it for you; hooray for jQuery (again).</p>
<p>The effect is a scalable background image; as you expand / contract the browser window the background image scales up and down with respectively. Unfortunately it isn&#8217;t possible to do using only CSS 2.1; it&#8217;s possible using CSS3 using the <a href="http://www.css3.info/preview/background-size/">background-size</a> property, though not yet widely supported. The technique doesn&#8217;t use a background image, it uses an absolutely positioned image to achieve the same effect; so it could be considered a hack. If you&#8217;re not sure what I mean, here&#8217;s a <a href="http://nooshu.com/explore/scalable-background/">demo</a>. It&#8217;s quite simple to use; here&#8217;s the basic HTML:</p>
<div class="codecolorer-container html4strict default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Content here --&gt;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- This Image will resize with every window resize --&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imageID&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/our-image.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Fake background image&quot;</span> &gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></td></tr></tbody></table></div>
<p>The plug-in is called using (with custom settings):</p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">//Plug-in usage</span><br />
jQuery<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><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#container&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">backgroundScale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; imageSelector<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;#imageID&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; centerAlign<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; containerPadding<span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The plug-in accepts an object as an argument with custom user settings:</p>
<ul>
<li><strong>imageSelector</strong>: The ID or class of the fake background image (default: &#8220;#bgImage&#8221;).</li>
<li><strong>centerAlign</strong>: Align the image in the center of the container, both vertically and horizontally (default: true).</li>
<li><strong>containerPadding</strong>: Padding in pixels that expands the image slightly in relation to it&#8217;s container to minimise seeing behind the image when scaling up and down in certain browsers (default: 80).</li>
</ul>
<p>A couple of things to note:</p>
<ol>
<li>You must have a container div for the image, using the body tag returns strange results.</li>
<li>The resize event in Firefox is a little weird, it doesn&#8217;t fire continuously as you scale up and down so you can sometimes see the container background when scaling. There are plug-ins that make the resize event consistent across browsers.</li>
<li>Since this is a JavaScript dependent effect it may be worth adding the fake background image using JavaScript</li>
<li>It&#8217;s better to use a larger image for scaling, as expanding a smaller image will look fuzzy and out of focus.</li>
</ol>
<p>Any questions / ideas for expanding this plug-in then leave a comment. View a <a href="http://nooshu.com/explore/scalable-background/">demo</a> or <a href="http://nooshu.com/wp-content/uploads/downloads/jquery.background.image.scale-0.1.zip">download</a> <small>(version 0.1 &#8211; updated 17th Feb 2010)</small>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/jquery-plug-in-scalable-background-image/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>

