<?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>fusi0n &#187; php</title>
	<atom:link href="http://fusi0n.org/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://fusi0n.org</link>
	<description>pL&#039;s blog on tech/mobile</description>
	<lastBuildDate>Wed, 29 Feb 2012 20:19:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Big Commerce API PHP Wrapper</title>
		<link>http://fusi0n.org/coding/big-commerce-api-php-wrapper</link>
		<comments>http://fusi0n.org/coding/big-commerce-api-php-wrapper#comments</comments>
		<pubDate>Fri, 29 Jul 2011 22:48:24 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1965</guid>
		<description><![CDATA[Big Commerce is a hosted e-commerce platform. You are given FTP credentials to access the few static files you are allowed to manipulate... and you have an API. For various reasons, I had to interact with the Big Commerce API and since there was a serious lack of code (and decent documentation), I figured I'd [...]]]></description>
			<content:encoded><![CDATA[<p>Big Commerce is a hosted e-commerce platform. You are given FTP credentials to access the few static files you are allowed to manipulate... and you have an API. For various reasons, I had to interact with the Big Commerce API and since there was a serious lack of code (and decent documentation), I figured I'd put together my own little wrapper. Should be pretty self-explanatory if you're here. Needless to say, this code comes as-is with no support from me whatsoever.<span id="more-1965"></span></p>
<pre class="brush: php; title: ; notranslate">
define('BIG_COMMERCE_DEBUG', false);
define('BIG_COMMERCE_SUCCESS', 'SUCCESS');
define('BIG_COMMERCE_FAILURE', 'FAILED');
define('BIG_COMMERCE_USERNAME', 'YOUR_USERNAME');
define('BIG_COMMERCE_TOKEN', 'YOUR_TOKEN');
define('BIG_COMMERCE_URL', 'https://YOUR_STORE_URL/xml.php');
function bc($type, $criteria) {
  $xml = new SimpleXMLElement('');
  $xml-&gt;addChild('username', BIG_COMMERCE_USERNAME);
  $xml-&gt;addChild('usertoken', BIG_COMMERCE_TOKEN);
  switch (strtolower($type)) {
    case 'product':
    case 'products':
      $xml-&gt;addChild('requesttype', 'products');
      $xml-&gt;addChild('requestmethod', 'Get'.ucfirst($type));
      $fields =  is_array($criteria)? $criteria : array('productId' =&gt; (int)$criteria);
      break;
    case 'customer':
    case 'customers':
      $xml-&gt;addChild('requesttype', 'customers');
      $xml-&gt;addChild('requestmethod', 'Get'.ucfirst($type));
      $fields =  is_array($criteria)? $criteria : array('customerId' =&gt; (int)$criteria);
      break;
    case 'order':
    case 'orders':
      $xml-&gt;addChild('requesttype', 'orders');
      $xml-&gt;addChild('requestmethod', 'Get'.ucfirst($type));
      $fields = is_array($criteria)? $criteria : array('orderId' =&gt; (int)$criteria);
      break;
  }
  $details = $xml-&gt;addChild('details');
  foreach ($fields as $k=&gt;$v) $details-&gt;addChild($k, $v);
  $stream = stream_context_create(array('http' =&gt; array('method' =&gt; 'POST','header' =&gt; 'Content-Type: text/xml', 'content' =&gt; $xml-&gt;saveXML())));
  $response = new SimpleXMLElement(file_get_contents(BIG_COMMERCE_URL, false, $stream));
  switch ($response-&gt;status) {
    case BIG_COMMERCE_SUCCESS:
      return $response-&gt;data;
      break;
    case BIG_COMMERCE_FAILURE:
    default:
      return BIG_COMMERCE_DEBUG? $response-&gt;errormessage : false;
      break;
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/big-commerce-api-php-wrapper/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grey Hat Programming on Big Commerce</title>
		<link>http://fusi0n.org/coding/grey-hat-programming-on-big-commerce</link>
		<comments>http://fusi0n.org/coding/grey-hat-programming-on-big-commerce#comments</comments>
		<pubDate>Fri, 15 Jul 2011 07:21:25 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1873</guid>
		<description><![CDATA[One of my clients has a website constituting of two platforms: WordPress and Big Commerce. I was mandated to, among other things, create a symbiosis between the two platforms so that users didn't have to register twice. The only problem with that is being a commercial platform, Big Commerce doesn't want you messing around in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1875" title="bigc" src="http://fusi0n.org/wp-content/uploads/2011/07/bigc.png" alt="" width="180" height="180" />One of my clients has a website constituting of two platforms: WordPress and Big Commerce. I was mandated to, among other things, create a symbiosis between the two platforms so that users didn't have to register twice. The only problem with that is being a commercial platform, Big Commerce doesn't want you messing around in their proprietary database - their API really is only for <em>read</em> stuff, you never <em>write</em> anywhere. Understandable... but my client still wants user synchronicity, and to be honest I don't think he's exaggerating.</p>
<p>So... how do we remotely create users on a platform that doesn't let you create users with their API? After a bit of looking around for solution, I stumbled upon my client's store registration form (which is hosted, like everything related to Big Commerce, on a server you don't control). Different domains, different servers, no API methods... but I have a form. Have you ever heard of <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Cross-site_scripting">XSS</a>? In the world of developers, it's a real annoyance. Essentially, if you fail to secure your forms properly, anyone can grab your form, put it somewhere else on the internet and submit bogus data (because the form still sends to <em>you</em>, get it?). Anyway, it's usually really only a security concern, but for this particular project, it became a feature.<span id="more-1873"></span></p>
<p>Big Commerce does not validate their registration form, so you can submit it from anywhere... like right after a WordPress (or in my case, BuddyPress) user is created for example! A simple cURL request with the proper data set and we've got ourselves a relatively easy bridge. Now, there are cons to this method... for example, if Big Commerce ever realizes that their lack of respect for good practices is used <em>as a feature</em>, I'm not sure they'll keep it up for long. Notice how this post doesn't have a single link...? Yeah.</p>
<p>If this reaches their ears, can we please make a compromise? You pull the non-feature in exchange for a user creation method in your API. Deal?</p>
<p>On to other things..</p>
<p>That wasn't the only thing I was tasked with doing. My client also wanted the ability to use the header from his WordPress theme on his Big Commerce site. Again, Big Commerce doesn't let you put <em>any</em> code on their servers (except static files like HTML and CSS) even though that's where your store resides. Not hating, it's a business model... it's just not a very convenient one. So I have a WordPress header (including a carousel and a drop-down menu of WordPress-centric items) and a lousy API. I initially tried to use BC's <em>%%Include%%</em> "feature", but as you can guess, it fails for remote resources.</p>
<p>Long story short, I created a new file at the root of my client's WordPress site and tossed this in:</p>
<pre class="brush: php; title: ; notranslate">
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
get_header('store');
</pre>
<p>With that, I can essentially be <em>inside</em> WordPress while remaining outside of its scope. Notice the <em>get_header()</em> parameter that allows you to use specific files (such as, in my case, header-store.php). Alright, so I have a decent looking header (that's a few lines of random HTML, JavaScript and CSS) but I still can't fetch it from the store. So I had to get creative. After a fair amount of digging around, I found that I could upload files to Big Commerce - but only static (HTML, CSS, JS, etc) and only in a very specific location (that's <em>/content</em> by the way). With that, I can build something:</p>
<pre class="brush: php; title: ; notranslate">
#!/usr/bin/php
$ch = curl_init('http://secret.url/headerForBC.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$header = curl_exec($ch);
$file = tempnam('/tmp', 'bc2wp');
file_put_contents($file, $header);

$context = stream_context_create(array('ftp' =&amp;gt; array('overwrite' =&amp;gt; true)));
// Big Commerce requires a secure connection
$ftp = ftp_ssl_connect('server2600.bigcommerce.com');
$login_result = ftp_login($ftp, 'duh', 'ohai');
echo ftp_put($ftp, '/content/wpheader.html', $file, FTP_ASCII)? 'success' : 'fail';
ftp_close($ftp);
</pre>
<p>Then toss it in a cron that'll run it every 24 hours and use <em>%%Include.http://my.store-url.com/content/wpheader.html%%</em> to render it. That wasn't so bad, was it?</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/grey-hat-programming-on-big-commerce/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic DNS Updater: dynDNS.Namecheap</title>
		<link>http://fusi0n.org/coding/dynamic-dns-updater-dyndns-namecheap</link>
		<comments>http://fusi0n.org/coding/dynamic-dns-updater-dyndns-namecheap#comments</comments>
		<pubDate>Wed, 08 Jun 2011 04:46:24 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1810</guid>
		<description><![CDATA[I found out earlier this week that my favourite registrar, Namecheap, has a nifty little tool you can use to dynamically update the Namecheap-hosted domain A records. There's very little documentation available, despite the awesomeness and usefulness of such a tool, Namecheap doesn't really advertise it. The only piece of information related specifically to the [...]]]></description>
			<content:encoded><![CDATA[<p>I found out earlier this week that my favourite registrar, <a title="Namecheap" href="http://www.namecheap.com?aff=19677" target="_blank">Namecheap</a>, has a nifty little tool you can use to dynamically update the Namecheap-hosted domain A records. There's very little documentation available, despite the awesomeness and usefulness of such a tool, Namecheap doesn't really advertise it. The only piece of information related specifically to the dynamic DNS update manually is buried in Namecheap's knowledge base under "<a title="How to use the browser to dynamically update host's IP" href="http://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-to-use-the-browser-to-dynamically-update-hosts-ip">How to use the <em>browser</em> to dynamically update host's IP</a>" and, after some Googling, a 5 years old non-exhaustive <a href="http://www.ipcops.com/phpbb3/viewtopic.php?p=43046#p43046">list of returned XML values</a> on some obscure forum.</p>
<p>In order to ensure this works, however, there are a few dependencies:</p>
<ul>
<li>You need to have a domain registered with <a href="https://www.namecheap.com/domains/domain-name-search.aspx?aff=19677" target="_blank">Namecheap</a>;</li>
<li>That domain needs to use Namecheap's nameservers (<a href="https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=&amp;type=backtous&amp;rkey=NC">https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=<strong>domain</strong>&amp;type=backtous&amp;rkey=NC</a>);</li>
<li>You must've enabled "Dynamic DNS" in your domain settings (<a href="https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=&amp;type=ddns&amp;rkey=NC">https://manage.www.namecheap.com/myaccount/modsingle.asp?domain=<strong>domain</strong>&amp;type=ddns&amp;rkey=NC</a>)</li>
<li>This script is CLI-oriented, meaning it's meant to be executed via the command line. Regardless of your OS, you will need:
<ul>
<li>php5-cli php5-curl;</li>
<li>A working Internet connection;</li>
</ul>
</li>
</ul>
<p>That being said, it's relatively simple to understand. Most of the job is done server-side, so all you really need to do is hit a specific URL and let Namecheap do the rest:</p>
<pre class="brush: xml; gutter: false; title: Dynamic DNS Update URL:; notranslate">https://dynamicdns.park-your-domain.com/update?host=&amp;domain=&amp;password=</pre>
<p>Once you know that URL, it's pretty easy to implement something around it. Here's my little <em>facilitator</em> built in PHP:</p>
<p><a title="Namecheap-dynDNS" href="http://svn.eratech.ca/public.namecheap-dyndns/?op=dl&amp;isdir=1&amp;">Download it</a> or <a href="http://svn.eratech.ca/public.namecheap-dyndns">browse the source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/dynamic-dns-updater-dyndns-namecheap/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Direct Messages Bulk Deleter</title>
		<link>http://fusi0n.org/coding/twitter-direct-messages-bulk-deleter</link>
		<comments>http://fusi0n.org/coding/twitter-direct-messages-bulk-deleter#comments</comments>
		<pubDate>Wed, 08 Jun 2011 04:40:16 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1804</guid>
		<description><![CDATA[If you're a Twitter user and a organisation freak, you're certainly aware that Twitter doesn't give you the ability to bulk-delete direct messages. Back in the days, Damon Cortesi had built a nifty bookmarklet that allowed you to stick it to the man. Problem is, that bookmarklet is now deprecated, due to Twitter's change of [...]]]></description>
			<content:encoded><![CDATA[<p>If you're a Twitter user and a organisation freak, you're certainly aware that Twitter doesn't give you the ability to bulk-delete direct messages. Back in the days, <a href="http://dcortesi.com/" target="_blank">Damon Cortesi</a> had <a href="http://dcortesi.com/tools/dm-deleter/" target="_blank">built a nifty bookmarklet</a> that allowed you to stick it to the man. Problem is, that bookmarklet is now deprecated, due to Twitter's change of layout - most of the stuff just doesn't work the way it used to, so the infamous DM Whacker was laid to rest.</p>
<p>Until I got really fucking tired of all the direct messages. Here's a reboot of Damon Cortesi's DM Whacker: <strong>DMDelete-v2.0</strong>. It's fast, uses Twitter-specific resources (such as their jQuery and dialogs), and is merciless. Give it a try, all you have to do is drag the link blow to your bookmark toolbar (or wherever you want really), go to <a href="https://twitter.com/#!/messages">your Twitter inbox</a> and click it!</p>
<p><strong>This is beta software!</strong> Feel free to <a href="http://fusi0n.org/contact">relay any feedback</a> you might have after using - it's rather challenging to thoroughly test this piece of code on my own, so there may be random hiccups.</p>
<p><a href="javascript:(function(){if(!location.href.match(/^http(s)?:\/\/twitter\.com(\/#!)?\/messages$/)) {location.href='https://twitter.com/#!/messages';return false;};var e=document.createElement('script');e.charset='utf-8';e.type='text/javascript';e.src='http://fusi0n.org/dmdelete-v2.0-min.js';document.body.appendChild(e);})();void(0);">DMDeleter-v2.0</a></p>
<p><a href="http://svn.eratech.ca/public.dmdelete?">Browse the source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/twitter-direct-messages-bulk-deleter/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 of the Best WordPress Plugins</title>
		<link>http://fusi0n.org/coding/10-of-the-best-wordpress-plugins</link>
		<comments>http://fusi0n.org/coding/10-of-the-best-wordpress-plugins#comments</comments>
		<pubDate>Fri, 12 Nov 2010 03:23:07 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP-prettyPhoto]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1452</guid>
		<description><![CDATA[WordPress is an extremely powerful and popular blogging platform. There are over 27 million WordPress publishers as of September 2010: 13.9 million blogs hosted on WordPress.com plus 13.8 million active installations of the WordPress.org software (source). If that's not enough, there are 17,428 registered plugins to extend its functionality and 4,406 registered themes to modify [...]]]></description>
			<content:encoded><![CDATA[<p><a title="WordPress.org" href="http://www.wordpress.org" target="_blank"></a>WordPress is an extremely powerful and popular blogging <a title="WordPress.com" href="http://www.wordpress.com" target="_blank">platform</a>. There are over <strong>27 million</strong> WordPress publishers as of September 2010: <strong> 13.9 million</strong> blogs hosted on <a title="WordPress.com" href="http://www.wordpress.com" target="_blank">WordPress.com</a> plus <strong>13.8 million</strong> active  installations of the <a title="WordPress.org" href="http://www.wordpress.org" target="_blank">WordPress.org software</a> (<a title="WordPress Stats" href="http://en.wordpress.com/stats/" target="_blank">source</a>). If that's not enough, there are <strong>17,428</strong> registered <a title="WordPress Plugins" href="http://wordpress.org/extend/plugins/" target="_blank">plugins</a> to extend its functionality and <strong>4,406</strong> registered <a title="WordPress Themes" href="http://wordpress.org/extend/themes/" target="_blank">themes</a> to modify its look. With all that, it can get complicated to choose the best plugins to achieve what you want. Here's a list of my personal favourites.  <span id="more-1452"></span></p>
<h3><a title="Disqus Comment System" href="http://wordpress.org/extend/plugins/disqus-comment-system/" target="_blank">Disqus Comment System</a></h3>
<p><a title="Disqus" href="http://www.disqus.com" target="_blank">Disqus</a> is a third-party commenting platform that facilitates user interaction by providing a single log in for every Disqus-enabled site. They also offer various login options (Twitter, Facebook, etc) as well as content appreciation features. Essentially, it's a very simple comment system that doesn't require local registrations or theming. One of its great feature is the ability to export all the local WordPress-based comments into their database for a smooth transition.</p>
<h3><a title="Google Analytics for WordPress" href="http://wordpress.org/extend/plugins/google-analytics-for-wordpress/" target="_blank">Google Analytics for WordPress</a></h3>
<p>I'm not much of an SEO person, but I'm still aware it has a definitive importance and impact to have a properly indexed website. There's a bunch of options that I don't understand, but luckily I have friends who make a living of <a title="AOD Marketing" href="http://www.aodmarketing.com" target="_blank">SEO and Analytics</a> and they insist <a title="Joost de Valk" href="http://yoast.com/" target="_blank">Joost de Valk</a>'s <a title="Google Analytics for WordPress" href="http://yoast.com/wordpress/google-analytics/" target="_blank">Google Analytics for WordPress</a> is there best option available.</p>
<h3><a title="Google XML Sitemaps" href="http://wordpress.org/extend/plugins/google-sitemap-generator/" target="_blank">Google XML Sitemaps</a></h3>
<p>In June 2005, Google announced a new service called <a href="https://www.google.com/webmasters/sitemaps">Google Sitemaps</a>.  This plugin allows webmasters to submit an index of URLs which they  want to have included in Googles web search. It's free to use and helps  Google to get a <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/sitemaps.png', 'Google XML Sitemaps', 'Google Webmaster Tool Sitemaps');return false;">more complete overview</a> of your website. More information regarding Google Sitemaps and how this plugin implements it over at <a title="Google Sitemaps FAQ (Sitemap Issues And Errors)" href="http://www.arnebrachhold.de/2006/04/07/google-sitemaps-faq-sitemap-issues-errors-and-problems/" target="_blank">Arne Brachhold's FAQ</a></p>
<h3><a title="SyntaxHighlighter Evolved" href="http://wordpress.org/extend/plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter Evolved</a></h3>
<p>My blog can get somewhat <a title="Coding" href="http://fusi0n.org/category/coding" target="_self">technical</a> when I write about <a title="WordPress" href="http://fusi0n.org/tag/wordpress" target="_self">WordPress</a>, <a title="PHP" href="http://fusi0n.org/tag/php" target="_self">PHP</a>, <a title="Linux" href="http://fusi0n.org/tag/linux" target="_self">Linux</a> or <a title="JavaScript" href="http://fusi0n.org/tag/javascript" target="_self">JavaScript</a>. <a title="SyntaxHighlighter Evolved" href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter Evolved</a> allows code to be highlighted and formatted nicely using a predefined set of language-based shortcodes.</p>
<h3><a title="Widget Logic" href="http://wordpress.org/extend/plugins/widget-logic/" target="_blank">Widget Logic</a></h3>
<p>This one is kind of complicated to get your head around. Essentially, Widget Logic will <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/widgets.png', 'Widget Logic', 'Widget Logic');return false;">add an input box</a> inside every widget that allows you to use WordPress template tags to conditionally display (or not) the widget's content.</p>
<h3><a title="WordPress Admin Bar" href="http://wordpress.org/extend/plugins/wordpress-admin-bar/" target="_blank">WordPress Admin Bar</a></h3>
<p>I have to admit I found this little gem only today, and I don't know how I was able to live without it before. <a title="WordPress Admin Bar" href="http://www.viper007bond.com/wordpress-plugins/wordpress-admin-bar/" target="_blank">WordPress Admin Bar</a> will, if configured to do so, add a nice little bar at the top your WordPress content <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/adminbar.png', 'WordPress Admin Bar', 'WordPress Admin Bar');return false;">like this</a> giving you easy access to all your administrative functions while surfing the non-admin part of your blog. It's worth noting that WordPress Admin Bar is made by the same developer who makes SyntaxHighlighter Evolved (and who works for <a title="Automattic" href="http://automattic.com/" target="_blank">Automattic</a>). For more of Alex's plugins, check out the full list <a title="Viper007Bond's WordPress Plugins" href="http://www.viper007bond.com/wordpress-plugins/" target="_blank">on his website</a></p>
<h3><a title="WPtouch" href="http://wordpress.org/extend/plugins/wptouch/" target="_blank">WPtouch</a></h3>
<p>The guys at <a title="BraveNewCode" href="http://www.bravenewcode.com/" target="_blank">BraveNewCode</a> have been around ever since there was an interest for mobile-friendly versions of standard websites. It was the first mobile-rendering plugin that WordPress had, and as far as I'm concerned, it's still the very best. The only downside is that it lacks a design modification aspect - but then again, how else are you going to render if not <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/wptouch.png', 'WPtouch', 'WPtouch render of fusi0n.org');return false;">this way</a>? In today's mobile-crazed world, it's a pretty good idea to use <a title="WPtouch" href="http://www.bravenewcode.com/products/wptouch-pro/" target="_blank">WPtouch</a> to render a mobile-friendly version to known mobile browsers.</p>
<h3><a title="WP Super Cache" href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP Super Cache</a></h3>
<p>WordPress <a title="WordPress Optimization/Caching" href="http://codex.wordpress.org/WordPress_Optimization/Caching" target="_blank">does not come</a> with a file caching system by default. If your blog has high pageviews, using <a title="WP Super Cache" href="http://ocaoimh.ie/wp-super-cache/" target="_blank">WP Super Cache</a> will significantly reduce the load on your server, which can then stay responsive longer because it doesn't have to call and process the files queued for serving.</p>
<h3><a title="Akismet" href="http://wordpress.org/extend/plugins/akismet/" target="_blank">Akismet</a></h3>
<p>One of the very few plugin that comes bundled with WordPress by default, <a title="Akismet" href="http://akismet.com/" target="_blank">Akismet</a> is a merciless spam filter for your comments. It's been <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/akismet.png', 'Akismet Stats', 'Akismet');return false;">pretty good</a> to me since I've started using it. It can also be used in various independent user-input-based plugins like <a title="Contact Form 7" href="http://wordpress.org/extend/plugins/contact-form-7/" target="_blank">Contact Form 7</a>.</p>
<h3><a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto/" target="_blank">WP-prettyPhoto</a></h3>
<p>Obligatory self-promotion, yes, but I genuinely believe it my plugin deserves a spot on this list. <a title="StÃ©phane Caron" href="http://www.no-margin-for-errors.com/" target="_blank">StÃ©phane Caron</a> did a fantastic job with his <a title="prettyPhoto" href="http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/" target="_blank">prettyPhoto jQuery plugin</a>, (<a title="StÃ©phane Caron's Projects" href="http://www.no-margin-for-errors.com/projects/" target="_blank">more StÃ©phane projects</a>) even more so with the <a title="prettyPhoto 3.0" href="http://www.no-margin-for-errors.com/blog/2010/09/15/prettyphoto-3-0-is-live/" target="_blank">3.0 release</a> which will be implemented in <a title="WP-prettyPhoto" href="http://fusi0n.org/category/wp-prettyphoto" target="_blank">WP-prettyPhoto</a> soon. This plugin automatically makes all self-linked images open in a cute <a href="#" onclick="$.prettyPhoto.open('/wp-content/uploads/2010/11/prettyphoto.png', 'prettyPhoto Gallery', 'prettyPhoto Window');return false;">prettyPhoto inline window</a> that supports multiple media formats, YouTube, Vimeo, QuickTime and Flash videos, external sites and even inline (textual!) content. Read up on the <a title="WP-prettyPhoto Technical Information and Usage Instructions" href="http://fusi0n.org/wp-prettyphoto/technical-information-and-usage-instructions" target="_blank">current version's usage instructions </a>to get an idea of what it's capable of!</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/10-of-the-best-wordpress-plugins/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thoughts on Diaspora</title>
		<link>http://fusi0n.org/coding/thoughts-on-diaspora</link>
		<comments>http://fusi0n.org/coding/thoughts-on-diaspora#comments</comments>
		<pubDate>Thu, 16 Sep 2010 16:44:32 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://fusi0n.org/?p=1313</guid>
		<description><![CDATA[Diaspora, the open-source Facebook clone, was publicly released yesterday, September 15th. All technical stuff aside, it's interesting to see their strategy. They're a very small group of people, releasing a clone of something that literally revolutionized the Internet. Facebook is a weird target to go after, all things considered. The only motive anyone has of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.joindiaspora.com/" target="_blank">Diaspora</a>,  the open-source Facebook clone, was publicly released yesterday,  September 15th. All technical stuff aside, it's interesting to see their  strategy. They're a very small group of people, releasing a clone of  something that literally revolutionized the Internet. Facebook is a  weird target to go after, all things considered. The only motive anyone  has of hating them all started from that whole <a href="http://techcrunch.com/2009/12/09/facebook-privacy/" target="_blank">privacy fiasco</a> a few months ago. It all went down from there, to numerous privacy  redrafting to compromising IM conversation Zuckerberg had years ago.  Facebook had a decently good rep before that. Diaspora aims to be  another Facebook, without the whole "we own your data and we can sell it  to whoever we want" philosophy. Question is will they succeed? Aside  from privacy-related mistakes (or rather bad moves), Facebook is (or  should be) very respected in the open-source community. These guys <a href="http://developers.facebook.com/opensource/" target="_blank">have collaborated</a> to several open-source projects such as Apache (with <a href="http://cassandra.apache.org/" target="_blank">Cassandra</a>, <a href="http://hadoop.apache.org/hive/" target="_blank">Hive</a> and <a href="http://hadoop.apache.org/" target="_blank">Hadoop</a>) and PHP (with <a href="http://wiki.github.com/facebook/hiphop-php/" target="_blank">HipHop</a>, <a href="http://github.com/facebook/phpembed" target="_blank">phpEmbed</a>, <a href="http://www.phpsh.org/" target="_blank">phpsh</a>, <a href="http://github.com/facebook/xhp" target="_blank">XHP</a> &amp; <a href="http://pecl.php.net/package/xhprof" target="_blank">XHProf</a>), it'll be hard to eclipse that much contribution.<span id="more-1313"></span></p>
<p>First off, Diaspora is in Ruby - a favorite of the open-source  community. Speculate at will on why they decided to code it in Ruby, but  let's assume it's just programmer preference seeing as Facebook is  mostly coded in PHP. The Ruby guys usually don't like PHP, calling it an  ugly language with very specific caveats.</p>
<p>Second, Diaspora will be content-agnostic, which means you can  install it wherever you want and it can store its (your) data wherever  you tell it to. It also means that it will be extendable - that anyone  will be able to build their own social platform on top of it. Is that  significant? Yes and no. See, Diaspora's launch has been very public and  since they announced development <em>right</em> in the time Facebook was  struggling with a bunch of criticism over its privacy rules, they have a  decent audience listening. However, I can't see how ten million  Diaspora instances (since they're independant) will rival any of  Facebook feature. On the other hand, with its extensibility, Diaspora  may well become the center of a few big social platforms. Pretend you're  CNN and want to build an in-house social network that's available to  your users. You have <a href="http://status.net/" target="_blank">StatusNet</a> to emulate Twitter and now <a href="http://github.com/diaspora/diaspora" target="_blank">Diaspora</a> to emulate Facebook - thus reducing the development costs significantly.</p>
<p>There's a few things that I find weird at this point. The Diaspora people have been branding every platform they're on "<a href="http://twitter.com/joindiaspora" target="_blank">Join</a> <a href="http://www.facebook.com/pages/Join-Diaspora/118635234836351" target="_blank">Diaspora</a>"  which, to me, implies that they were the ones that were going to launch  something. Maybe it's too soon and they will, but it's still pretty  weird to offer to everyone to create their own fork or implementation of  Diaspora at this point. What if CNN decides to just fork it? It's a  very real open-source risk, and if their code's worth it, you can bet  you'll see a third-party implementation somewhere soon. Won't that  defeat the purpose? If FOX News decides it wants its own FOX-branded  social network and builds on top of Diaspora, won't there be the very  same privacy concerns Facebook had? I don't understand that part.  Diaspora is released under the AGPL which basically lets anyone fork  your project - with credit. What's to prevent FOX from turning Diaspora  into another data-mongering Facebook clone?</p>
<p><em>Edit: Apparently, there is a central platform for Diaspora codebase: <a href="http://openspora.com/login" target="_blank">OpenSpora</a>. Thanks to <a href="http://mashable.com/2010/09/16/diaspora-source/" target="_blank">this article</a> from Mashable.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/thoughts-on-diaspora/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hacking WordPress: Introduction to custom plugins and advanced templating</title>
		<link>http://fusi0n.org/fusi0n/hacking-wordpress-introduction-to-custom-plugins-and-advanced-templating</link>
		<comments>http://fusi0n.org/fusi0n/hacking-wordpress-introduction-to-custom-plugins-and-advanced-templating#comments</comments>
		<pubDate>Sat, 04 Jul 2009 00:37:23 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[fusi0n]]></category>
		<category><![CDATA[montreal]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[WordCamp Montreal]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.fusi0n.org/?p=1003</guid>
		<description><![CDATA[For those of you who don't know (which may very well be all of you right now), I will be presenting a talk at WordCamp Montreal July 12th. The title of the presentation, if you haven't guessed, is "Hacking WordPress: Introduction to custom plugins and advanced templating". I'll explain how you can use your own [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordcampmontreal.org" target="_blank"><img class="alignright" title="Im Speaking at WordCamp Montreal - Jul 11-12" src="https://fusi0n.org/wp-content/uploads/2009/07/wcmtl-badge-presenter-en-150.gif" alt="" width="150" height="57" /></a>For those of you who don't know (which may very well be all of you right now), I will be presenting a talk at WordCamp Montreal July 12th. The title of the presentation, if you haven't guessed, is "<strong>Hacking WordPress: Introduction to custom plugins and advanced templating</strong>". I'll explain how you can use your own plugins and functions to make your WordPress site sing. In other words, it will basically be a relatively improvised primer on the following things:</p>
<ul>
<li>Introduction to creating <a title="WordPress Plugins" href="http://wordpress.org/extend/plugins/" target="_blank">WordPress plugins</a></li>
<li>Managing your <a title="WordPress Sidebars" href="http://wordpress.org/extend/plugins/tags/sidebar" target="_blank">sidebars</a> and <a title="WordPress Widgets" href="http://wordpress.org/extend/plugins/tags/widget" target="_blank">widgets</a></li>
<li>Using WordPress' <a title="WordPress Codex" href="http://codex.wordpress.org/Main_Page" target="_blank">Codex</a> and <a title="WordPress API Documentation" href="http://codex.wordpress.org/Plugin_API" target="_blank">API documentation</a></li>
<li>Hacking up your <a title="WordPress Themes" href="http://wordpress.org/extend/themes/" target="_blank">templates</a> to use all the power provided by WordPress</li>
</ul>
<p>If you're not registered yet, you have until July 9th to do so on <a title="WordCamp Montreal 2009 Registration" href="http://wcmtl.eventbrite.com/" target="_blank">EventBrite</a>. For more information regarding WordPress Montreal 2009, check out the <a title="WordCamp Montreal 2009" href="http://wordcampmontreal.org/" target="_blank">official site</a>, <a title="WordCamp Montreal Mailing List" href="https://groups.google.com/group/wordcampmtl" target="_blank">mailing list</a>, <a title="WordCamp Montreal Blog" href="http://wordcampmontreal.org/blog/" target="_blank">blog</a>, <a title="Facebook | WordCamp Montreal 2009" href="http://www.facebook.com/group.php?gid=199180685044" target="_blank">Facebook group</a> and <a title="WordCamp Montreal on Twitter" href="http://twitter.com/wordcampmtl" target="_blank">Twitter account</a> or see what's going on by <a title="Twitter Search: #wcmtl" href="http://twitter.com/#search?q=#wcmtl" target="_blank">looking up</a> the #wcmtl tag.</p>
<p><span id="more-1003"></span></p>
<p>This will be my first talk on WordPress. I started working with WordPress as a platform not too long ago, when working at <a title="CloudRaker" href="http://www.cloudraker.com" target="_blank">CloudRaker</a> with <a title="StÃ©phane Caron" href="http://www.no-margin-for-errors.com/" target="_blank">StÃ©phane Caron</a>, who happened to have a really nice jQuery plugin to replicate the behavior of the famous Lightbox, called <a title="prettyPhoto" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/" target="_blank">prettyPhoto</a>. Since WordPress uses jQuery (and so do most of its plugins), I figured it'd be a good idea to <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto/" target="_blank">integrate his plugin in WordPress</a> while adding flexibility. That's how it all started. I still can't believe I'll be telling anyone my take on how to do things, but it's happening!</p>
<p>I'll probably be using this post to mark my progress in the elaboration of my talk. I'd love to get feedback and comments on what I'm doing since this is a first for me. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/fusi0n/hacking-wordpress-introduction-to-custom-plugins-and-advanced-templating/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-prettyPhoto Technical Information and Usage Instructions</title>
		<link>http://fusi0n.org/wp-prettyphoto/technical-information-and-usage-instructions</link>
		<comments>http://fusi0n.org/wp-prettyphoto/technical-information-and-usage-instructions#comments</comments>
		<pubDate>Sun, 24 May 2009 09:34:16 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[WP-prettyPhoto]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.fusi0n.org/?p=966</guid>
		<description><![CDATA[Lots has changed since the last article I made about WP-prettyPhoto usage, and so it is time to revamp the instructions, explain new features and hopefully be a bit more thorough. First off, let me first mention the following thing:Â  prettyPhoto is written by StÃ©phane Caron. Here are some related links to avoid repeating them [...]]]></description>
			<content:encoded><![CDATA[<p>Lots has changed since the last article I made about WP-prettyPhoto usage, and so it is time to revamp the instructions, explain new features and hopefully be a bit more thorough. First off, let me first mention the following thing:Â   prettyPhoto is written by StÃ©phane Caron. Here are some related links to avoid repeating them throughout this article: <a title="StÃ©phane Caron" href="http://www.no-margin-for-errors.com/" target="_blank">StÃ©phane's blog</a>, <a title="jQuery lightbox for images, YouTube, iframes - by StÃ©phane Caron" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/" target="_blank">prettyPhoto's project page</a>, <a title="prettyPhoto on GitHub" href="http://github.com/scaron/prettyphoto/tree/master" target="_blank">prettyPhoto on GitHub</a>, <a title="Stephane Caron on Twitter" href="http://twitter.com/scaron" target="_blank">StÃ©phane on Twitter</a>, <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto/" target="_blank">WP-prettyPhoto at WordPress Extend</a>, <a title="WP-prettyPhoto Support Forum" href="http://forums.no-margin-for-errors.com/?CategoryID=8" target="_blank">WP-prettyPhoto Support Forum</a>.</p>
<div class="alignright" style="padding-left: 20px;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=pL%40fusi0n%2eorg&amp;lc=CA&amp;item_name=Pier%2dLuc%20Petitclerc%20%2d%20Code%20Support&amp;currency_code=CAD&amp;bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img src="https://fusi0n.org/wp-content/uploads/2009/05/btn_donate_LG2.gif" border="0" alt="PayPal - The safer, easier way to pay online!" /></a></div>
<p>Revision History: This article is intended to document the <em>current</em> WP-prettyPhoto (<strong>1.5.1</strong>) &amp; prettyPhoto (<strong>2.5.2</strong>) versions.<br />
<span id="more-966"></span><br />
Now for some organization, here are the topics that will be discussed in this article:</p>
<ul>
<li>1. <a href="#technical-information">Technical Information</a></li>
<li>2. <a href="#installing">Installing WP-prettyPhoto</a></li>
<li>3. <a href="#using">Using WP-prettyPhoto</a>
<ul>
<li>3.1. <a href="#using-on-images">On Images</a></li>
<li>3.2. <a href="#using-on-videos-and-flash">On Videos (MOV) and Flash (SWF)</a></li>
<li>3.3. <a href="#using-on-youtube">On YouTube Videos</a></li>
<li>3.4. <a href="#using-on-external-sites">On External Sites (iFrame)</a></li>
<li>3.5. <a href="#shortcode-api-calls">Shortcode API Calls</a></li>
</ul>
</li>
<li>4. <a href="#examples">Examples</a></li>
</ul>
<h4><a name="technical-information"></a>1. Technical Information</h4>
<p>The idea behind WP-prettyPhoto is to avoid having to use Lightbox to display pictures. Lightbox is based on the Prototype JavaScript library, and most WordPress plugins tend to use jQuery. Using WP-prettyPhoto thus allows you to avoid loading multiple libraries to perform a single task. Stephane Caron developed prettyPhoto because the jQuery Lightbox clones, at the time, were close enough to the real Lightbox.</p>
<p>prettyPhoto uses attribute hooks to bind itself on elements to display. In other words, if prettyPhoto finds a <a title="Links in HTML documents" href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-rel" target="_blank">rel attribute</a> inside a link pointing to one of its supported format (bmp, gif, jpg, jpeg, png, swf, mov), and that rel attribute matches the one prettyPhoto looks for, it will know that link is meant to be displayed within a prettyPhoto box. Since prettyPhoto 2.4, it also looks for simple text links with the configured rel attribute and the string "iframes=true" within the target URL. Since prettyPhoto 2.5, an API is available.</p>
<h4><a name="installing"></a>2. Installing WP-prettyPhoto</h4>
<p>The installation of WP-prettyPhoto is pretty straightforward, as with most WordPress plugins. Once you have <a title="Download WP-prettyPhoto at WordPress Extend" href="http://wordpress.org/extend/plugins/wp-prettyphoto/" target="_blank">downloaded the current version of WP-prettyPhoto</a>, you have two options:</p>
<ol>
<li>Use WordPress' builtin plugin installation system located in your WordPress admin panel, labeled as the "Add New" options in the "Plugins" menu to upload the zip file you downloaded</li>
<li>Extract the zip file and upload the resulting "wp-prettyphoto" folder on your server under "wp-content/plugins/".</li>
</ol>
<p>All you need to do after that is navigate to your blog's administration panel, go in the plugins section and enable WP-prettyPhoto.</p>
<p>For more information, see the <a title="Installing Plugins" href="http://codex.wordpress.org/Managing_Plugins#Installing_Plugins" target="_blank">"Installing Plugins" article from the WordPress Codex</a>.</p>
<h4><a name="using"></a>3. Using WP-prettyPhoto</h4>
<p>There are several ways to use WP-prettyPhoto on your blog. All of them can be automatically achieved by enabling the "All Formats" option in the "Automate" section of the WP-prettyPhoto settings, located inside WordPress' Media settings page. All of the "Automate" options will trigger automatic activation of the specific format. That is how to use WP-prettyPhoto automatically. However, some of prettyPhoto's formats require specific instructions. For all formats, you will need to do the following: Insert the media you want prettyPhoto to bind itself on in your post or page, surround it by a link and make the <a title="HREF" href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-href" target="_blank">HREF attribute</a> point to the original media Then, simply add WP-prettyPhoto's configurable REL string to the link.</p>
<p>It is important to note that there is also a way to exclude specific elements from being displayed in prettyPhoto. To do so, simply make the link point to a new window using "_blank" as the value of the link's TARGET attribute.</p>
<h5><a name="using-on-images"></a>3.1. On images</h5>
<p>Manually using prettyPhoto on images is simple.Â  If you want to display a title inside the prettyPhoto box, make sure the "Display title" setting is activated. When active, prettyPhoto will use whatever is inside the image's <a title="ALT" href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-alt" target="_blank">ALT attribute</a>. To display a description, use the link's <a title="TITLE" href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-title" target="_blank">TITLE attribute</a>.</p>
<p>To manually insert a prettyPhoto gallery, the process is similar. All you need to do is make sure all your images have the same REL attribute with a slight modification. The REL attribute should define the gallery's unique name between [square brackets]. Doing so will allow prettyPhoto to display next/previous links as well as display the current picture count and the total pictures found in the gallery.</p>
<h5><a name="using-on-videos-and-flash"></a>3.2. On videos and flash</h5>
<p>The process of linking prettyPhoto to your video files is the same as images. Link to the .swf or .mov file, then specify the width and height. In the case your flash needs specifics parameters, add &amp;flashparams to the URL specify the parameters.</p>
<h5><a name="using-on-youtube"></a>3.3. On YouTube Videos</h5>
<p>To load a YouTube video, simply link to the YouTube video url. You can also add "&amp;width" and "&amp;height" to specify the sizes, if not provided, default dimensions will be applied.</p>
<h5><a name="using-on-external-sites"></a>3.4. On External Sites</h5>
<p>To load sites in an iframe inside prettyPhoto, link to the desired website and add the following params. "?iframe=true", to tell prettyPhoto to open the page in an iframe and "&amp;width=300" "&amp;height=300", to specify the iframe dimensions.</p>
<h5><a name="shortcode-api-calls"></a>3.5. Shortcode API Calls</h5>
<p>Since WP-prettyPhoto 1.5 and prettyPhoto 2.5, API calls are supported through WordPress <a href="http://codex.wordpress.org/Shortcode_API" target="_blank">shortcodes</a>. There are two distinct shortcodes available to users, please note that shortcode usage must first be enabled in WP-prettyPhoto settings.</p>
<ul>
<li><a href="#" onclick="$.prettyPhoto.open('', '', '');return false;"><em>Text</em></a>: Opens a prettyPhoto box using <em>img</em> value for image source, <em>title</em> value for title, <em>desc</em> value for description. If you want to display a button instead of a link, set the button parameter to <em>true</em>.</li>
<li><a href="#" onclick="$.prettyPhoto.open([''], [''], ['']);return false;">Text</a>: Opens a prettyPhoto gallery using <em>files</em> values for images, <em>titles</em> value for image titles and <em>desc</em> values for descriptions. All values should be comma-separated and ordered properly. The second <em>desc</em> item corresponds to the description of the second <em>files</em> item. Here again, you can output a button instead of a link using button="true".</li>
</ul>
<h4><a name="examples"></a>4. Examples</h4>
<ul>
<li><a title="Simple image hook with no title and with description." href="https://fusi0n.org/wp-content/uploads/2009/05/avatar-trans1.png" rel="wp-prettyPhoto[g966]">Simple image hook with no title and with description.</a>
<pre class="brush: xml; title: ; notranslate">&lt;a title=&quot;Simple image hook with no title and with description.&quot; href=&quot;http://blog.fusi0n.org/wp-content/uploads/2009/05/avatar-trans.png&quot;&gt;Simple image hook with no title and with description.&lt;/a&gt;</pre>
</li>
<li><a rel="wp-prettyPhoto" href="http://www.youtube.com/watch?v=oHg5SJYRHA0" rel="wp-prettyPhoto[g966]"">YouTube video</a>
<pre class="brush: xml; title: ; notranslate">&lt;a href=&quot;http://www.youtube.com/watch?v=oHg5SJYRHA0&quot; rel=&quot;wp-prettyPhoto&quot;&gt;YouTube video&lt;/a&gt;</pre>
</li>
<li><a rel="wp-prettyPhoto" href="http://movies.apple.com/movies/weinstein/nine/nine-tlr1_h.480.mov?width=480&amp;height=204">Flash Movie</a>
<pre class="brush: xml; title: ; notranslate">&lt;a href=&quot;http://movies.apple.com/movies/weinstein/nine/nine-tlr1_h.480.mov?width=480&amp;height=204&quot; rel=&quot;wp-prettyPhoto&quot;&gt;Flash Movie&lt;/a&gt;</pre>
</li>
<li><a rel="wp-prettyPhoto" href="http://m.reddit.com/?iframe=true">External Site</a>
<pre class="brush: xml; title: ; notranslate">&lt;a href=&quot;http://m.reddit.com/?iframe=true&quot; rel=&quot;wp-prettyPhoto&quot;&gt;External Site&lt;/a&gt;</pre>
</li>
</ul>
<p>[plugin_downloads]</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/wp-prettyphoto/technical-information-and-usage-instructions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://movies.apple.com/movies/weinstein/nine/nine-tlr1_h.480.mov?width=480&amp;amp" length="78" type="video/quicktime" />
		</item>
		<item>
		<title>WP-prettyPhoto 1.2 released!</title>
		<link>http://fusi0n.org/wp-prettyphoto/wp-prettyphoto-12-released</link>
		<comments>http://fusi0n.org/wp-prettyphoto/wp-prettyphoto-12-released#comments</comments>
		<pubDate>Sat, 09 May 2009 21:03:21 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[WP-prettyPhoto]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.fusi0n.org/?p=924</guid>
		<description><![CDATA[It's been a while since any activity has happened with prettyPhoto and WP-prettyPhoto. I was waiting for some changes to the prettyPhoto code to release a new version, and StÃ©phane Caron has released version 2.3 of his prettyPhoto jQuery plugin recently, so it was time to roll out a new WP-prettyPhoto version, 1.2, with all [...]]]></description>
			<content:encoded><![CDATA[<div class="alignright" style="padding-left:20px;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=pL%40fusi0n%2eorg&amp;lc=CA&amp;item_name=Pier%2dLuc%20Petitclerc%20%2d%20Code%20Support&amp;currency_code=CAD&amp;bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img src="https://fusi0n.org/wp-content/uploads/2009/05/btn_donate_LG.gif" border="0" alt="PayPal - The safer, easier way to pay online!" /></a></div>
<p>It's been a while since any activity has happened with prettyPhoto and WP-prettyPhoto. I was waiting for some changes to the prettyPhoto code to release a new version, and StÃ©phane Caron has <a title="prettyPhoto 2.3" href="http://www.no-margin-for-errors.com/2009/05/08/prettyphoto-23/" target="_blank">released version 2.3</a> of his prettyPhoto jQuery plugin recently, so it was time to roll out a new WP-prettyPhoto version, 1.2, with all the changes and features that have been suggested since the last release. To skip the blah blah and go straight to downloading, head over to <a title="WP-prettyPhoto on WordPress Extend" href="http://wordpress.org/extend/plugins/wp-prettyphoto/">WordPress Extend</a>.<span id="more-924"></span></p>
<p>What's new in this version? There's quite a lot! First off, let's talk of the changes made by StÃ©phane to prettyPhoto:</p>
<ul>
<li><strong>Video and flash support</strong> has been reinstated! prettyPhoto can now handle prettifying links to MOV (Apple QuickTime) and SWF (Shockwave Flash/Small Web Format). There is a specific format you need to respect when linking to those media types. More information can be obtained on the <a title="jQuery Lightbox Clone - How To Use" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/#howtouse" target="_blank">prettyPhoto project page</a> (near the bottom)</li>
<li>Code has been <strong>optimized</strong> and design tweaked</li>
<li>More information on the 2.3 release of prettyPhoto can be obtained on the <a title="prettyPhoto version history" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/#history" target="_blank">project page</a>.</li>
</ul>
<p>As for WP-prettyPhoto, I have obviously integrated the changes from prettyPhoto inside this release, that means:</p>
<ul>
<li><strong>Video and flash support</strong> for links pointing to .mov and .swf media files. Again, be aware there's a specific format to respect if you want your movies and animations to be hooked correctly. More info on this on the <a title="prettyPhoto How To Use" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/#howtouse" target="_blank">prettyPhoto project page</a>.</li>
<li>Added an option to <strong>toggle media hooks</strong> (disabling it will disable WP-prettyPhoto prettifying your video and animations)</li>
</ul>
<p>There's also a few new features that will improve usability and user-friendliness such as...</p>
<ul>
<li>There's now an option to <strong>disable jQuery substitution</strong>. prettyPhoto relies on version 2.3.1 of jQuery. WordPress bundles a jQuery version that was inadequate to use with prettyPhoto, so to solve that problem, WP-prettyPhoto removes the JavaScript library that is shipped with WordPress and substitutes it for an adequate version that's shipped with WP-prettyPhoto, namely 2.3.1. More info on how to do that here, should you find yourself wondering. Thanks to StÃ©phane Caron for suggesting this feature.</li>
<li>There's a new feature to <strong>exclude prettyPhoto hooking</strong> on certain links. In order to do so, all you need to do is set the link of your image, flash animation or QuickTime video to a new window (<em>target="_blank"</em>) and WP-prettyPhoto will skip prettifying it. Thanks to <a title="Tommy Jones" href="http://www.standonyourbrand.com" target="_blank">Tommy Jones</a> for suggesting this feature.</li>
<li><strong>Upgraded bundled <a title="jQuery" href="http://www.jquery.com" target="_blank">jQuery</a></strong> from 1.3.1 to 1.3.2. Not really something that's necessary for the plugin, but I figured that since I substitute it, it might as well be the version that users might want, namely the most current at the time of the release. You can always disable substitution and include the version you desire by some other means.</li>
<li><strong>Switched prettyPhoto version type</strong> from uncompressed (17.5kb) to compressed (11.5kb), more fitting to production environments. Should you want to hack it up, there's an uncompressed version over at the <a title="prettyPhoto" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/#download" target="_blank">prettyPhoto project</a>.</li>
<li>Obviously with the new changes, <strong>English and French localizations</strong> have been updated.</li>
<li>Fixed a bug where DD_belatedPNG (PNG transparency hack for IE6) would be included even if the selected theme wasn't dark, which made it useless.</li>
</ul>
<p>That's enough for now, isn't it? As always, if you have feature suggestions do not hesitate to contact me, they might make it to the next release! Now that you're educated as to what and how, feel free to head over to <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto/">WordPress Extend</a> to download this new version. Enjoy!</p>
<p><em>Note: Version 1.2 pretty much hit a wall.. I made the mistake not to add jQuery 1.3.2 in the package.. so yeah.. nothing worked. It's fixed in 1.2.0.1. Sorry about that.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/wp-prettyphoto/wp-prettyphoto-12-released/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Make your WordPress plugins use a different version of a bundled JavaScript library</title>
		<link>http://fusi0n.org/coding/make-your-wordpress-plugins-use-a-different-version-of-a-bundled-javascript-library</link>
		<comments>http://fusi0n.org/coding/make-your-wordpress-plugins-use-a-different-version-of-a-bundled-javascript-library#comments</comments>
		<pubDate>Fri, 13 Feb 2009 05:45:10 +0000</pubDate>
		<dc:creator>pluc</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP-prettyPhoto]]></category>

		<guid isPermaLink="false">http://blog.fusi0n.org/?p=575</guid>
		<description><![CDATA[I've recently coded my first WordPress plugin, for the fun of it. I've been using WordPress for some time, and I know PHP quite well, so I figured it'd be fun. WordPress has a weird/interesting way of being extendable. I won't go into too much technical details about that, but suffices to say that it's [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently coded my first <a href="http://codex.wordpress.org/Plugins" target="_blank">WordPress plugin</a>, for the fun of it. I've been using <a href="http://wordpress.org/" target="_blank">WordPress</a> for some time, and I know <a title="PHP" href="http://www.php.net" target="_blank">PHP</a> quite well, so I figured it'd be fun. WordPress has a <a href="http://codex.wordpress.org/Developer_Documentation" target="_blank">weird/interesting</a> way of being <em>extendable</em>. I won't go into too much technical details about that, but suffices to say that it's easy yet complicated to perform tasks you want to. Yeah, <em>that</em> weird.</p>
<p>All that being said, I upgraded my WordPress from 2.7 to <a href="http://wordpress.org/download/" target="_blank">2.7.1</a> in the middle of coding some new features for the latest release of <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto" target="_blank">WP-prettyphoto</a>, 1.1. That made me realize that updating WordPress' core also <em>updates</em> the installed JavaScript modules, namely <a href="http://jquery.com/" target="_self">jQuery</a> (among <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Parameters" target="_blank">many others</a>). When I first coded <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto" target="_blank">WP-prettyphoto</a>, when things weren't working I just replaced the <a href="http://jquery.com" target="_blank">jQuery</a> I had with the <a href="http://docs.jquery.com/Downloading_jQuery" target="_blank">latest official stable releas</a>e and things worked fine. I didn't give it much thought. So when I updated WordPress,  all hell broke loose and <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto" target="_blank">WP-prettyphoto</a> was metaphorically crying in agony because jQuery wasn't man enough for it. I then tried performing the same manual updating procedure, and without really surprising anyone -- I was alone anyway -- <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto" target="_blank">WP-prettyphoto</a> was back prettyfying my stuff like a starving fat kid eats a cheesecake.</p>
<p><span id="more-575"></span></p>
<p>Morale of the story, I needed to code a jQuery version check in my <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto" target="_blank">WP-prettyphoto</a> code, and if jQuery's version wasn't matching what I wanted, I had to replace the script with one that would make <a title="WP-prettyPhoto" href="http://wordpress.org/extend/plugins/wp-prettyphoto/" target="_blank">WP-prettyPhoto</a> work the way it's supposed to. The goal's clear, the execution, however, was somewhat more obscure. Obviously, not being a WordPress plugin genius, I googled for solutions or anything that could help me achieve what I wanted. I didn't find much on how to replace a bundled script loaded by default. I found what I was looking for in a competing (and I use that term very, very loosely!) plugin for a jQuery Lightbox clone cleverly called <a href="http://wordpress.org/extend/plugins/jquery-lightbox-balupton-edition/" target="_blank">jQuery Lightbox</a> by <a href="http://www.pedrolamas.com/" target="_blank">Pedro Lamas</a>. It's basically de-registering the default WordPress jQuery plugin and replacing it with one bundled with the plugin. Using native functions. Nice. Here's the code:</p>
<pre class="brush: php; title: ; notranslate">// jQuery - removing to make sure we're using 1.3.1
//Deregister bundled jQuery (1.2.6 as of WP 2.7.1)
wp_deregister_script('jquery');
//Registering our up to date jQuery
//$wppp_url is WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
wp_register_script('jquery', (&quot;$wppp_url/js/jquery-1.3.1.min.js&quot;), false, '1.3.1');
//Giving WordPress our new jQuery script to enqueue (display)
wp_enqueue_script('jquery');</pre>
<p>So there you have it. That's how to replace the version of a bundled WordPress JavaScript library.</p>
]]></content:encoded>
			<wfw:commentRss>http://fusi0n.org/coding/make-your-wordpress-plugins-use-a-different-version-of-a-bundled-javascript-library/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

