<?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>Dwight Jack Diary &#187; Mootools</title>
	<atom:link href="http://www.dwightjack.com/diary/tag/mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dwightjack.com/diary</link>
	<description>Diary of music, design and code</description>
	<lastBuildDate>Tue, 13 Jul 2010 20:46:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>On the Bookshelf: MooTools 1.2 Beginner&#8217;s Guide</title>
		<link>http://www.dwightjack.com/diary/2010/02/10/mootools-12-beginners-guide/</link>
		<comments>http://www.dwightjack.com/diary/2010/02/10/mootools-12-beginners-guide/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 20:12:13 +0000</pubDate>
		<dc:creator>Dwight Jack</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[beginners guide]]></category>
		<category><![CDATA[Mootools]]></category>

		<guid isPermaLink="false">http://www.dwightjack.com/diary/?p=250</guid>
		<description><![CDATA[In nowadays frontend development JavaScript spans from rich interactions to animations, however we cannot rely on the native language's methods to implement everything we need in a smart and time-effective way.]]></description>
			<content:encoded><![CDATA[<p>In nowadays frontend development JavaScript spans from rich interactions to animations, however we cannot rely on the native language&#8217;s methods to implement everything we need in a smart and time-effective way.</p>
<p><a href="http://www.packtpub.com/mootools-1-2-beginners-guide/book?utm_source=dwightjack.com&amp;utm_medium=link&amp;utm_content=blog&amp;utm_campaign=mdb_002378"><img class="size-medium wp-image-252   alignright" style="float: right; margin-left: 10px;" title="MooTools" src="http://www.dwightjack.com/diary/wp-content/uploads/2010/02/MOOTOOLS1-243x300.jpg" alt="" width="146" height="180" /></a>The best solution for our coding needs is to adopt a JS framework as backbone for our scripts. One of the very first framework I&#8217;ve worked with is <strong><a title="Mootools" href="http://mootools.net/" target="_blank">Mootools</a></strong>, since it&#8217;s very developer friendly and fulfils lots of JavaScript&#8217;s &#8220;holes&#8221;.</p>
<p>In the next few days i&#8217;m going to receive a copy of:  <a href="http://www.packtpub.com/mootools-1-2-beginners-guide/book?utm_source=dwightjack.com&amp;utm_medium=link&amp;utm_content=blog&amp;utm_campaign=mdb_002378" target="_blank"><strong>MooTools 1.2 Beginner&#8217;s Guide</strong></a>, which I&#8217;m going to review for the sake of some of my followers and friends which are in need of a good starting point to learn how to improve their interfaces.</p>
<p>If you are interested you can check the details of the guide at the <a href="http://www.packtpub.com/mootools-1-2-beginners-guide/book?utm_source=dwightjack.com&amp;utm_medium=link&amp;utm_content=blog&amp;utm_campaign=mdb_002378" target="_blank">publisher website</a>.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwightjack.com/diary/2010/02/10/mootools-12-beginners-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update: Use MooTools v1.2.x in Joomla! 1.5</title>
		<link>http://www.dwightjack.com/diary/2009/06/07/use-mootools-122-in-joomla-15/</link>
		<comments>http://www.dwightjack.com/diary/2009/06/07/use-mootools-122-in-joomla-15/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 14:39:40 +0000</pubDate>
		<dc:creator>Dwight Jack</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[Joomla 1.5]]></category>
		<category><![CDATA[Mootools]]></category>

		<guid isPermaLink="false">http://www.dwightjack.com/diary/?p=167</guid>
		<description><![CDATA[This is an updated version of the code to switch Mootools from 1.11 to 1.2 in Joomla 1.5]]></description>
			<content:encoded><![CDATA[<p>Since i&#8217;ve fixed some bugs and issues on the files to switch core MooTools v1.11 to v1.2.x and following the release of version <span style="text-decoration: line-through;">1.2.2</span> 1.2.3 of <strong>MooTools Core and More</strong>, i&#8217;m posting here an updated version of<a title="Upgrade Mootools to v1.2.x in Joomla! 1.5" href="http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/"> <strong>this workaround</strong></a> to which you could refer for details on how this code works.</p>
<p>Changes in this new version are:</p>
<ol>
<li>Updated MooTools Core to<span style="text-decoration: line-through;"> <strong>1.2.2</strong></span><strong> 1.2.3</strong> and MooTools More to<span style="text-decoration: line-through;"> </span><strong><span style="text-decoration: line-through;">1.2.2.2</span> 1.2.3.1<br />
 </strong></li>
<li>Added <code>.getValue()</code> to the compatibility file</li>
<li>Added <code>.getSelected()</code> to the compatibility file to fix some issues under IE</li>
<li>Added <code>Json</code> support to the compatibility file</li>
<li>Added <code>window.onDomReady</code> shortcut for DOM ready event</li>
<li>Changed <code class="php">MY_Behavior::mootoolsFix();</code> to handle new MooTools files <code class="php"></code></li>
<li>Changed <code class="php">MY_Behavior::mootoolsFix();</code> to correctly render old tooltips format <code>title::text</code> for items with <code>hasTip</code> class (anyway, remember that classes to style the tooltip <a href="http://mootools.net/docs/more/Interface/Tips#Tips:constructor" target="_blank">have changed</a>!)</li>
<li><span style="text-decoration: line-through;">Added a <strong>validate.js</strong> replacement to fix an issue with <a href="http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/comment-page-1/#comment-167" target="_blank">changed namespaces</a>.</span> ( this replacement is no more needed)<span style="text-decoration: line-through;"><br />
 </span></li>
</ol>
<p>The source code is released in the form of patch: unzip it and upload files in your Joomla root, eventually overwriting files. MooTools library is uncompressed to allow for a quicker debug. Anyway you may minify it with your tool of choice.</p>
<p><span style="text-decoration: line-through;">Here is the code: <a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=10>Mootools 1.11 to 1.2.2 (71.68 kB)</a></span></p>
<p><strong>Update (again):</strong> Sometimes i can&#8217;t get if MooTools team is too vital or library milestones are not well defined&#8230; anyway here is an update to use <strong>latest MooTools</strong><strong> 1.2.3</strong>. No major changes have been made to the fix library, anyway keep reporting compatibility issues. Here is the zipped  file: <span style="text-decoration: line-through;"><a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=13>Mootools 1.11 to 1.2.3 for Joomla 1.5 (72.06 kB)</a></span></p>
<p><strong>Update (09/20/09): </strong>New version available. Corrected some bugs in the compatibility file and added a loop check to replace MooTools 1.11 when called from a component as custom script. Now the validation core script doesn&#8217;t need to be replaced. Get source here (carries the original validate.js as in Joomla 1.5.14:  <a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=15>MooTools 1.11 to 1.2.x (72.88 kB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwightjack.com/diary/2009/06/07/use-mootools-122-in-joomla-15/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>Upgrade Mootools to v1.2.x  in Joomla! 1.5</title>
		<link>http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/</link>
		<comments>http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 21:10:21 +0000</pubDate>
		<dc:creator>Dwight Jack</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Joomla 1.5]]></category>
		<category><![CDATA[Mootools]]></category>

		<guid isPermaLink="false">http://www.dwightjack.com/diary/?p=101</guid>
		<description><![CDATA[A test case on adding Mootools 1.2 support to current Joomla 1.5.9 release.]]></description>
			<content:encoded><![CDATA[<p>Joomla 1.5 is for sure a great CMS: it features lot of extensions, a rather clean XHTML output and its framework API is really powerfull. Moreover it&#8217;s built with MVC logic in mind, enabling web designers to use template overrides in their themes.</p>
<p>Despite all these advanced features Joomla 1.5 is still stuck at JS framework <strong>Mootools 1.11</strong>. The latest version of this framework, 1.2.x, introduced many new features and a complete re-engineered code. Due to these changes, Joomla developers plan to upgrade Mootools in the 1.6 release, to be able to spread code changes to all plugins, modules and components. Until that release we&#8217;ll be stuck at outdated, unsupported and often undocumented code.</p>
<p>This is an attempt to add <strong><a href="http://mootools.net/">Mootools 1.2</a></strong> support to current Joomla 1.5.9 release. Let&#8217;s start:</p>
<p><strong>Update:</strong> A new version of files presented in this post is available <strong><a href="http://www.dwightjack.com/diary/2009/06/07/use-mootools-122-in-joomla-15/" target="_blank">here</a></strong>!</p>
<h3>Requirements:</h3>
<ol>
<li>Nearly full compatibility with Mootools 1.11 to avoid errors</li>
<li>Upgrade of Mootools plugins where possibile</li>
<li>None or minimal Joomla core hacks</li>
<li>Implementation of Mootools in legacy (1.0.x) components</li>
</ol>
<h3>1. Smooth Mootools upgrade.</h3>
<p>First of all let&#8217;s download the latest version of <strong>Mootools Core and Mootools More</strong> (right now 1.2.1):<a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=4>Mootools 1.2.1 Full (28.51 kB)</a></p>
<p>Unzip the archive and place the two files in <code>media/system/js/</code></p>
<p>Then download this compatibility file, which will make old 1.11 scripts work rather smoothly with the new framework, and place it in the same folder as above (<em>update 05/22/09 added getValue, Json and window.onDomReady compatibility, thanx <a href="http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/comment-page-1/#comment-163">Toopixel</a></em>):</p>
<a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=9>Mootools 1.11 to 1.2.1 Compatibility File (1.97 kB)</a>
<h3>2. Plugins Upgrade.</h3>
<p>One of the more usefull plugin shipped with Mootools is <strong><a href="http://digitarald.de/project/squeezebox/">Squeezebox</a></strong>, used for the modal windows, here is the 1.2 Compatible version, ready to be placed in the above mentioned folder <code>media/system/js/</code>:</p>
<a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=6>Sqeezebox for Mootools 1.2.x (3.37 kB)</a>
<h3>3-4. Let&#8217;s try some PHP</h3>
<p>Since i want to touch Joomla Core files as less as possible, im going to use some little tricks to be able to <strong>use Mootools 1.2 just in the Frontend</strong> and <em>on-demand</em> from the template&#8217;s main <code>index.php</code> file.</p>
<p>Joomla is based on several PHP libraries placed in the <code>libraries/</code> folder; one of them is the <strong>Joomla API</strong>, but we can find <strong>ezSQL</strong> (a database lib), <strong>PHPMailer</strong> (a mailing system) and <strong>phpgacl</strong> (an access list system). To take advantage of Joomla&#8217;s built-in libraries loading system and, at the same time, prevent overwrites by future releases, i created a folder called <code>my_libs</code> in <code>libraries/</code> containing a class file: <a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=7>my_behavior class for Joomla 1.5.9 (1.13 kB)</a></p>
<p>Basically the class provides a static function which recalls the head part of Joomla document object, looks for Mootools and replaces it with the 1.2 version we uploaded before.</p>
<p>If Mootools is not found, then it&#8217;s simply loaded, extending it&#8217;s presence in the head of legacy 1.0.x components.</p>
<p>You can call this newly added class in your Joomla theme <code>index.php</code> by placing these lines of code before the head template tag:</p>
<pre><code>&lt;?php
JLoader::import( 'my_libs.behavior' );
MY_Behavior::mootoolsFix();
?&gt;
&lt;jdoc:include type="head" /&gt;</code></pre>
<p>If you need to switch back to v1.11 you can pass <code>false</code> as first argument to the function like this:</p>
<pre><code>MY_Behavior::mootoolsFix(false);</code></pre>
<h3>Note this!</h3>
<p>This is just a test, <strong>it should work on a basic Joomla installation</strong>, anyway feel free to report errors and issues to improve the code.</p>
<p>Untill now, I&#8217;ve experienced that <strong>Virtuemart</strong> uses it&#8217;s own logic to load libraries, so it&#8217;s <strong>excluded by default</strong>.</p>
<p>Optionally you can exclude specific components by passing an array with their option value as second argument:</p>
<pre><code>MY_Behavior::mootoolsFix(true,array("com_sobi2","com_comprofiler"));</code></pre>
<p>In <strong>SOBI2</strong> an error will be issued on search form unless you set the registry option <code>use_own_mootools</code> to <code>0</code>.</p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dwightjack.com/diary/2009/02/23/upgrade-mootools-to-v12x-in-joomla-15/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>
