<?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; snipplr Archives </title>
	<atom:link href="http://nooshu.com/tag/snipplr/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 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>
	</channel>
</rss>

