<?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>TechTrouts.com &#187; development</title>
	<atom:link href="http://techtrouts.com/topics/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtrouts.com</link>
	<description>Doin' the dev dance o/</description>
	<lastBuildDate>Thu, 23 Jul 2009 10:42:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Application deployment shell script using rsync</title>
		<link>http://techtrouts.com/application-deployment-shell-script-using-rsync/</link>
		<comments>http://techtrouts.com/application-deployment-shell-script-using-rsync/#comments</comments>
		<pubDate>Thu, 07 May 2009 22:14:07 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://techtrouts.com/application-deployment-shell-script-using-rsync/</guid>
		<description><![CDATA[Hi all, here is a simple deployment shell script (.sh) using rsync to deploy your local application to a productive location. You can download it here. Follow the README file for setup and usage. Feedback comments are always welcome :)]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>here is a simple deployment shell script (.sh) using rsync to deploy your local application to a productive location.</p>
<p>You can download it <a href="http://techtrouts.com/downloads/deploy_sh.zip" title="Application deployment shell script using rsync">here</a>.</p>
<p>Follow the README file for setup and usage.</p>
<p>Feedback comments are always welcome :)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/application-deployment-shell-script-using-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mootools: how to drag through icon (two items simultaneously)</title>
		<link>http://techtrouts.com/mootools-how-to-drag-through-icon-two-items-simultaneously/</link>
		<comments>http://techtrouts.com/mootools-how-to-drag-through-icon-two-items-simultaneously/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 15:44:16 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mootools-how-to-drag-through-icon-two-items-simultaneously/</guid>
		<description><![CDATA[If you have a box (div) and a dragging icon (a anchor) on it, and you want to drag the box by clicking on the icon you just have to make the box draggable and set the handle of the drag to the icon. Here it is, for: 1 2 3 &#60;div id=&#34;example&#34;&#62; &#60;a id=&#34;drag_button&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a box (div) and a dragging icon (a anchor) on it, and you want to drag the box by clicking on the icon you just have to make the box draggable and set the handle of the drag to the icon.</p>
<p>Here it is, for:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><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;example&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;drag_button&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cursor:pointer;cursor:hand;&quot;</span>&gt;</span>Drag<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Just use:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'example'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">makeDraggable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>handle<span style="color: #339933;">:</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'drag_button'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Notes on IE:<br />
The drag button element &#8220;&lt;a&gt;&#8221; can&#8217;t take href=&#8221;#&#8221; and can&#8217;t contain an image, as it will make it draggable by windows and will not work as supposed.<br />
If you require to insert an image into it then use it as a background image for the drag button element, and set the element&#8217;s height and width according to the image for proper appearance:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;example&quot;</span>&gt;</span>
<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;example&quot;</span>&gt;</span>
	<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;drag_button&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;background:url(img_location.png) no-repeat;width:15px;height:15px;cursor:pointer;cursor:hand;&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mootools-how-to-drag-through-icon-two-items-simultaneously/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rot13 Email Protection for WordPress</title>
		<link>http://techtrouts.com/rot13-email-protection-for-wordpress/</link>
		<comments>http://techtrouts.com/rot13-email-protection-for-wordpress/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 19:27:08 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress-plugins]]></category>

		<guid isPermaLink="false">http://techtrouts.com/rot13-email-protection-for-wordpress/</guid>
		<description><![CDATA[Rot13 Email Protection for WordPress, protects all email addresses and mailto: links on your blog from email harvesters using rot13 encryption and/or text mode. Inspired by ROT13 encryption on Textmate; I&#8217;ve developed this plugin a while ago, i&#8217;ve now updated it to a releasable version, already working up to wordpress 2.5.1 ROT13 Email Protection at [...]]]></description>
			<content:encoded><![CDATA[<p>Rot13 Email Protection for <a href="http://wordpress.org/" title="WordPress › Blog Tool and Weblog Platform" target="_blank">WordPress</a>, protects all email addresses and mailto: links on your blog from email harvesters using rot13 encryption and/or text mode.<br />
Inspired by ROT13 encryption on <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X" target="_blank">Textmate</a>;</p>
<p>I&#8217;ve developed this plugin a while ago, i&#8217;ve now updated it to a releasable version, already working up to wordpress 2.5.1</p>
<p><a href="http://wordpress.org/extend/plugins/rot13-email-protection/" target="_blank" title="ROT13 Email Protection v0.1 plugin for Worpress">ROT13 Email Protection at Worpress Plugins</a></p>
<p><a href="http://downloads.wordpress.org/plugin/rot13-email-protection.zip" title="Download ROT13 Email Protection v0.1">Download ROT13 Email Protection Plugin v0.1! </a></p>
<p>In order to install it, as most wordpress plugins, just put the rot13_email_protection.php file  inside your <em>/wp-content/plugins</em> folder.</p>
<p>Any bugs, give me a comment, i&#8217;ll check on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/rot13-email-protection-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Mootools: nice portfolio by 9tree using kwicks (Fx.Elements) and slides</title>
		<link>http://techtrouts.com/mootools-nice-portfolio-by-9tree-using-kwicks-fxelements-and-slides/</link>
		<comments>http://techtrouts.com/mootools-nice-portfolio-by-9tree-using-kwicks-fxelements-and-slides/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:05:26 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mootools-nice-portfolio-by-9tree-using-kwicks-fxelements-and-slides/</guid>
		<description><![CDATA[Hello, I&#8217;m just finishing our new website and i&#8217;ve been posting here the effects i&#8217;ve created for it. This one is a little more &#8220;show off&#8221;; It&#8217;s the way we&#8217;ve set up our portfolio using Fx.Elements for the togglers and Slides for the presentation images. You can check how it works here. Using this html: [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I&#8217;m just finishing <a href="http://9tree.net" title="9tree - Natural Revolution for the Web" target="_blank">our new website </a>and i&#8217;ve been posting here the effects i&#8217;ve created for it.<br />
This one is a little more &#8220;show off&#8221;;<br />
It&#8217;s the way we&#8217;ve set up our portfolio using Fx.Elements for the togglers and Slides for the presentation images.<br />
You can check how it works <a href="http://9tree.net/portfolio/" title="9tree, Portfolio" target="_blank">here</a>.</p>
<p>Using this html:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>	
	<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;kwicks_pics&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://4hsa.pt&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwicks_pic&quot;</span>&gt;</span>
		    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/4hsa_big.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
		  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://techtrouts.com&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwicks_pic&quot;</span>&gt;</span>
		    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/techtrouts_big.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
		  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://webandcookies.com&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwicks_pic&quot;</span>&gt;</span>
		    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/wac_big.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
		  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<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;kwicks&quot;</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://4hsa.pt&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwick&quot;</span>&gt;</span>
	    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/4hsa1.png&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4HSA - Qualidade e Seguran&amp;ccedil;a Alimentar&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4HSA - Qualidade e Seguran&amp;ccedil;a Alimentar&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://techtrouts.com&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwick&quot;</span>&gt;</span>
	    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/techtrouts1.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://webandcookies.com&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;kwick&quot;</span>&gt;</span>
	    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/portfolio/webandcookies1.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
	  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>This css:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#kwicks_pics</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">880px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
	<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>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#kwicks_pics</span> <span style="color: #6666ff;">.kwicks_pic</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#kwicks</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">180px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#kwicks</span> <span style="color: #6666ff;">.kwick</span> <span style="color: #00AA00;">&#123;</span>
	<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>
	<span style="color: #808080; font-style: italic;">/*width should be the same as javascript's var szNormal*/</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>And this Javascript:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</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>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> sequential <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//changed to true requires to pass every intermediate image on slide</span>
	<span style="color: #003366; font-weight: bold;">var</span> szNormal <span style="color: #339933;">=</span> <span style="color: #CC0000;">55</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//should be the same as css #kwicks .kwick{width}</span>
	<span style="color: #003366; font-weight: bold;">var</span> szSmall  <span style="color: #339933;">=</span> <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span> szFull <span style="color: #339933;">=</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span> selected<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> kwicks <span style="color: #339933;">=</span> $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#kwicks .kwick&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> fx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Elements</span><span style="color: #009900;">&#40;</span>kwicks<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>wait<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">350</span><span style="color: #339933;">,</span> transition<span style="color: #339933;">:</span> Fx.<span style="color: #660066;">Transitions</span>.<span style="color: #000066;">Back</span>.<span style="color: #660066;">easeOut</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> kwickspics<span style="color: #339933;">=</span>$$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#kwicks_pics .kwicks_pic&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> kwickspics_obj<span style="color: #339933;">=</span><span style="color: #009900;">&#123;</span>
		movingTo<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>kwickspics.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		selected<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>kwickspics.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		next_i<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		checking<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		on_move<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		wait_delay_move<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		the_fxs<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		init<span style="color: #339933;">:</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>
			kwickspics.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>kwickspic<span style="color: #339933;">,</span> i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				kwickspics_obj.<span style="color: #660066;">the_fxs</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Slide</span><span style="color: #009900;">&#40;</span>kwickspic<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
					duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span>
					<span style="color: #006600; font-style: italic;">//transition: Fx.Transitions.Back.easeOut,  -- transitions here return error on IE7, no idea why :/</span>
					onComplete<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>kwickspics_obj.<span style="color: #660066;">wait_delay_move</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
						kwickspics_obj.<span style="color: #660066;">wait_delay_move</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
						setTimeout<span style="color: #009900;">&#40;</span>kwickspics_obj.<span style="color: #660066;">checkStep</span><span style="color: #339933;">,</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>kwickspics_obj.<span style="color: #660066;">next_i</span><span style="color: #339933;">!==</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
						kwickspics_obj.<span style="color: #660066;">wait_delay_move</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
						kwickspics_obj.<span style="color: #660066;">the_fxs</span><span style="color: #009900;">&#91;</span>kwickspics_obj.<span style="color: #660066;">next_i</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">slideIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #339933;">=</span>kwickspics_obj.<span style="color: #660066;">next_i</span><span style="color: #339933;">;</span>
						kwickspics_obj.<span style="color: #660066;">on_move</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				kwickspics_obj.<span style="color: #660066;">the_fxs</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'kwicks_pics'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">visibility</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'visible'</span><span style="color: #339933;">;</span>
			kwickspics_obj.<span style="color: #660066;">the_fxs</span><span style="color: #009900;">&#91;</span>kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">slideIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		moveTo<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			kwickspics_obj.<span style="color: #660066;">movingTo</span><span style="color: #339933;">=</span>i<span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>kwickspics_obj.<span style="color: #660066;">checking</span><span style="color: #009900;">&#41;</span> kwickspics_obj.<span style="color: #660066;">checkStep</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		checkStep<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>kwickspics_obj.<span style="color: #660066;">on_move</span> <span style="color: #339933;">||</span> kwickspics_obj.<span style="color: #660066;">movingTo</span><span style="color: #339933;">==</span>kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				kwickspics_obj.<span style="color: #660066;">checking</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			kwickspics_obj.<span style="color: #660066;">checking</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			kwickspics_obj.<span style="color: #660066;">on_move</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>sequential<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">//requires to pass every image</span>
				kwickspics_obj.<span style="color: #660066;">next_i</span> <span style="color: #339933;">=</span> kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>kwickspics_obj.<span style="color: #660066;">movingTo</span> <span style="color: #339933;">?</span>  kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">:</span> kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
				<span style="color: #006600; font-style: italic;">//go directly to final image</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> kwickspics_obj.<span style="color: #660066;">next_i</span><span style="color: #339933;">=</span>kwickspics_obj.<span style="color: #660066;">movingTo</span><span style="color: #339933;">;</span>
			kwickspics_obj.<span style="color: #660066;">the_fxs</span><span style="color: #009900;">&#91;</span>kwickspics_obj.<span style="color: #660066;">selected</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">slideOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
	kwickspics_obj.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
	kwicks.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>kwick<span style="color: #339933;">,</span> i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		kwick.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;mouseenter&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
			o<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>kwick.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> szFull<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span>
			kwicks.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>other<span style="color: #339933;">,</span> j<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">!=</span> j<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> other.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>w <span style="color: #339933;">!=</span> szSmall<span style="color: #009900;">&#41;</span> o<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>w<span style="color: #339933;">,</span> szSmall<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			fx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			kwickspics_obj.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;kwicks&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;mouseleave&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		kwicks.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>kwick<span style="color: #339933;">,</span> i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			o<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>kwick.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> szNormal<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		fx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Hope you&#8217;ll put it to good work ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mootools-nice-portfolio-by-9tree-using-kwicks-fxelements-and-slides/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MooTools: smoothscroll highlight element id and highlight anchor onload</title>
		<link>http://techtrouts.com/mootools-on-complete-smoothscroll-highlight-element-id/</link>
		<comments>http://techtrouts.com/mootools-on-complete-smoothscroll-highlight-element-id/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 23:25:04 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mootools-on-complete-smoothscroll-highlight-element-id/</guid>
		<description><![CDATA[Hi, i&#8217;ve created a little script for highlighting an element onComplete of the Mootools&#8217; SmoothScroll. I&#8217;ve also added a line to highlight the selected anchor onload, in case the url already contains the anchor hash on page load. Here it is: Mootools 1.1 Version: 1 2 3 4 5 6 7 8 9 10 11 [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>i&#8217;ve created a little script for highlighting an element onComplete of the Mootools&#8217; SmoothScroll.<br />
I&#8217;ve also added a line to highlight the selected anchor onload, in case the url already contains the anchor hash on page load.</p>
<p>Here it is:</p>
<p>Mootools 1.1 Version:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</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> 
&nbsp;
	<span style="color: #006600; font-style: italic;">//default colors - if 'background-color' or 'color' aren't defined in css</span>
	<span style="color: #003366; font-weight: bold;">var</span> default_bg_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#fff'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> default_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#000'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//highlight colors</span>
	<span style="color: #003366; font-weight: bold;">var</span> h_bg_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#eeeebb'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> h_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#999'</span><span style="color: #339933;">;</span>
&nbsp;
	highlight_anchors<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> $$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">||</span> <span style="color: #000066; font-weight: bold;">typeof</span> $$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> item_id<span style="color: #339933;">=</span>$$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #003366; font-weight: bold;">var</span> fx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Styles</span><span style="color: #009900;">&#40;</span>item_id<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>duration<span style="color: #339933;">:</span><span style="color: #CC0000;">400</span><span style="color: #339933;">,</span> wait<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> has_bg_color <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'transparent'</span><span style="color: #339933;">?</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> has_color <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'inherit'</span><span style="color: #339933;">?</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cur_bg_color<span style="color: #339933;">=</span> has_bg_color <span style="color: #339933;">?</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> default_bg_color<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cur_color<span style="color: #339933;">=</span> has_color <span style="color: #339933;">?</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> default_color<span style="color: #339933;">;</span>
		fx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">:</span> h_bg_color<span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'color'</span><span style="color: #339933;">:</span> h_color
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">chain</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">:</span> cur_bg_color<span style="color: #339933;">,</span>
					<span style="color: #3366CC;">'color'</span><span style="color: #339933;">:</span> cur_color
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">chain</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>has_bg_color<span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'transparent'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>has_color<span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'inherit'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//if anchor hash already exists, highlight onload</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> highlight_anchors<span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//setup smoothscroll</span>
	<span style="color: #003366; font-weight: bold;">new</span> SmoothScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">,</span> onComplete<span style="color: #339933;">:</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>
		highlight_anchors<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">anchor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Mootools 1.2 version:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</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> 
&nbsp;
	<span style="color: #006600; font-style: italic;">//default colors - if 'background-color' or 'color aren't defined in css</span>
	<span style="color: #003366; font-weight: bold;">var</span> default_bg_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#fff'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> default_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#000'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//highlight colors</span>
	<span style="color: #003366; font-weight: bold;">var</span> h_bg_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#eeeebb'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> h_color<span style="color: #339933;">=</span><span style="color: #3366CC;">'#999'</span><span style="color: #339933;">;</span>
&nbsp;
	highlight_anchors<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>item_id<span style="color: #339933;">==</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> $$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">||</span> <span style="color: #000066; font-weight: bold;">typeof</span> $$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">||</span> $$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #339933;">==</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> item_id<span style="color: #339933;">=</span>$$<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> fx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Morph</span><span style="color: #009900;">&#40;</span>item_id<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>duration<span style="color: #339933;">:</span><span style="color: #CC0000;">400</span><span style="color: #339933;">,</span> wait<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> has_bg_color <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'transparent'</span><span style="color: #339933;">?</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> has_color <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'inherit'</span><span style="color: #339933;">?</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cur_bg_color<span style="color: #339933;">=</span> has_bg_color <span style="color: #339933;">?</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> default_bg_color<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cur_color<span style="color: #339933;">=</span> has_color <span style="color: #339933;">?</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> default_color<span style="color: #339933;">;</span>
		fx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">:</span> h_bg_color<span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'color'</span><span style="color: #339933;">:</span> h_color
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">chain</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">:</span> cur_bg_color<span style="color: #339933;">,</span>
					<span style="color: #3366CC;">'color'</span><span style="color: #339933;">:</span> cur_color
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">chain</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>has_bg_color<span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'background-color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'transparent'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>has_color<span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span>item_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'inherit'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//if anchor hash already exists, highlight onload</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> highlight_anchors<span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//setup smoothscroll</span>
	<span style="color: #003366; font-weight: bold;">new</span> SmoothScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">,</span> onComplete<span style="color: #339933;">:</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>
		highlight_anchors<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">anchor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You can check it working <a href="http://9tree.net/services/#optimizacao_seo" title="9Tree, Web Design And Development Services" target="_blank">here</a>.<br />
Hope it will get useful for someone ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mootools-on-complete-smoothscroll-highlight-element-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What about backward compatibility modules?</title>
		<link>http://techtrouts.com/what-about-backward-compatibility-modules/</link>
		<comments>http://techtrouts.com/what-about-backward-compatibility-modules/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 18:32:53 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://techtrouts.com/what-about-backward-compatibility-modules/</guid>
		<description><![CDATA[Hi again, being working a lot with mootools, dojo, wordpress and some other frameworks and toolkits lately, my question today is this: Why, most of the times, don&#8217;t frameworks and toolkits developers launch any backward compatibility modules at all? It might seem pretty complicated getting old deprecated funcionalities working  on newer, better versions, but, apart [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again,</p>
<p>being working a lot with <a href="http://mootools.net/" title="MooTools - a compact javascript framework">mootools</a>, <a href="http://dojotoolkit.org/" title="The Dojo Toolkit" target="_blank">dojo</a>, <a href="http://wordpress.org/" title="WordPress › Blog Tool and Weblog Platform" target="_blank">wordpress</a> and some other frameworks and toolkits lately, my question today is this:<br />
Why, most of the times, don&#8217;t frameworks and toolkits developers launch any <a href="http://en.wikipedia.org/wiki/Backward_compatibility" title="Backward compatibility - Wikipedia, the free encyclopedia" target="_blank">backward compatibility</a> modules at all?</p>
<p>It might seem pretty complicated getting old deprecated funcionalities working  on newer, better versions, but, apart from some real specific embembed funcionalities, it really shouldn&#8217;t be that hard.</p>
<p>For the following example i&#8217;ll use Mootools as an explanatory example:</p>
<p>All you need is a nicely designed dynamic version transitioning system.<br />
One that allows you to, anytime on the execution, define which version will the following code run on.</p>
<p>Imagine you design a backward compatibility plugin from version B to version A.<br />
On version C you&#8217;ll design a backward compatibility plugin to version B.</p>
<p>So now, on a page running &#8220;mootools-C.js&#8221; you should include the backward compatibility modules &#8220;mootools-back-C-B.js&#8221; and &#8220;mootools-back-B-A.js&#8221;, or a compiled version (having just a copy paste of both previous files content) &#8220;mootools-back-C-to-A.js&#8221;.</p>
<p>So if you run something like &#8220;Mootools.use_version(&#8216;A&#8217;);&#8221; the dynamic version transitioning system would automatically look for it&#8217;s previous version compatilities execution for version B at, let&#8217;s suppose, &#8220;MootoolsBack_C_B();&#8221; and then rerun the same command (&#8220;Mootools.use_version(&#8216;A&#8217;);&#8221;) while already running on version B to travel back to version A (the dynamic version transitioning system, already on version B would run something like &#8220;MootoolsBack_B_A();&#8221;).</p>
<p>This method would, in theory, work for multiple version transitions without having to design a specific plugin for each version to version compatibility. It would save developers hours in trying to put two different tools, based on two different framework/toolkit versions, together on the same execution &#8211; like using both <a href="http://www.e-magine.ro/web-dev-and-design/41/moodalbox_1_3_b2/" title="MOOdalBox 1.3 is now cooking (Beta 2 is here)" target="_blank">MOOdalbox 1.3 beta 2</a> and <a href="http://www.outcut.de/MooFlow/" title="Mooflow (aka Coverflow)" target="_blank">mooflow v0.2</a> in the same page.</p>
<p>The system would work both ways, as you could &#8220;Mootools.version_reset();&#8221; or &#8220;Mootools.use_version(&#8216;C&#8217;);&#8221; to travel back to version C on the rest of the execution, the system would run the consecutive version travel functions eg. &#8220;MootoolsBack_A_B();&#8221; and &#8220;MootoolsBack_B_C();&#8221; and the rest of the code would be running on Mootools version C.</p>
<p>This &#8220;dynamic version transitioning system&#8221; will be used for every release transition on <a href="http://naturephp.org/" title="NaturePhp - An Open Source Natural PHP Toolkit" target="_blank">NaturePhp</a>.<br />
It might not work perfectly at first, but it will certainly relieve many developers&#8217; headaches.</p>
<p>I hope in the future more and more projects start using a system like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/what-about-backward-compatibility-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mozilla Firefox 3 for Mac is awesome</title>
		<link>http://techtrouts.com/mozilla-firefox-3-for-mac-is-awesome/</link>
		<comments>http://techtrouts.com/mozilla-firefox-3-for-mac-is-awesome/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 11:53:52 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mozilla-firefox-3-for-mac-is-awesome/</guid>
		<description><![CDATA[Hi there, i&#8217;ve used firefox for development for quite some time now, but on a mac i&#8217;ve always liked Safari better for regular web browsing, as it always been much faster and cute. But the recently released Firefox 3 for Mac really changed my mind. It is, without a doubt, awesome. Runs perfectly smoothly, really [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>i&#8217;ve used firefox for development for quite some time now, but on a mac i&#8217;ve always liked Safari better for regular web browsing, as it always been much faster and cute.</p>
<p>But the recently released Firefox 3 for Mac really changed my mind. It is, without a doubt, awesome. Runs perfectly smoothly, really nice design, fastest browser ever.</p>
<p>Firefox 2 versions really dragged around with heavy Javascript applications such as <a href="http://gmail.com" title="Gmail: Email from google" target="_blank">Gmail</a> or our upcoming <a href="http://fallforwardgame.com" title="FallForward: A google maps based multiplayer strategy game" target="_blank">FallForward</a>, but this new version handles javascript even better than Safari 3.<br />
This release has been a really nice boost for my web browsing as i&#8217;ve not been much into the latest beta versions of Firefox 3.</p>
<p>The bad part is <a href="http://getfirebug.com/" title="Firebug - Web Development Evolved" target="_blank">Firebug</a> still hasn&#8217;t come out on it&#8217;s official release for Firefox 3. However, i&#8217;m using the <a href="http://getfirebug.com/releases/" title="Firebug Releases" target="_blank">beta</a> and it works really nice &#8211; and everything is perfect again.</p>
<p>A &#8220;must have&#8221; indeed.</p>
<p>Great work for the guys at <a href="http://www.mozilla.com/en-US/about/" title="About Mozilla" target="_blank">Mozilla</a>!!<br />
By the way, great website design for <a href="http://www.mozilla.com" title="Mozilla | Firefox web browser &amp; Thunderbird email client" target="_blank">http://www.mozilla.com</a> ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mozilla-firefox-3-for-mac-is-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NaturePhp 0.1 now waiting for php 5.3.0 &#8230;</title>
		<link>http://techtrouts.com/naturephp-now-waiting-for-php-530/</link>
		<comments>http://techtrouts.com/naturephp-now-waiting-for-php-530/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 17:43:06 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://techtrouts.com/naturephp-now-waiting-for-php-530/</guid>
		<description><![CDATA[Because it requires a few of the upcoming PHP features, naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230; - ok, so it&#8217;s a biased [...]]]></description>
			<content:encoded><![CDATA[<p>Because it requires a few of the upcoming PHP features,  naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230;</p>
<p>- ok, so it&#8217;s a biased opinion&#8230; :/</p>
<p>NaturePhp itself is basically a plug-in system for the coolest functionalities  around &#8211; most of the upcoming functionalities are either gathered from <a href="http://wordpress.org" title="WordPress &gt; Blog Tool and Weblog Platform" target="_blank">wordpress</a>, <a href="http://joomla.org" title="Joomla! - Content Management System and Web Application Framework" target="_blank">joomla!</a>, <a href="http://codeigniter.com" title="CodeIgniter - Open source PHP web application framework" target="_blank">CodeIgniter</a> and others, as well as a few of our own &#8211; *and a few <a href="http://rubyonrails.org" title="Ruby on Rails - Web application framework optimized for sustainable programming productivity" target="_blank">RubyOnRails</a> original ideas implemented in php ;)</p>
<p>The functionalities are organized into classes, and the classes are organized into <em>namespaces</em>, providing a great deal of &#8220;space&#8221; for future plug-in developments.<br />
It uses <em>__autoload()</em> for all classes, meaning it is just as fast no matter how many plug-ins you have installed.<br />
NaturePhp does not aim being labeled as a framework, but, being a pluggable toolkit itself, it allows future developers to build their own frameworks as plug-ins. &#8211; The idea is to provide a stable ground for common development and lot&#8217;s of easy to use functionalities for developers &#8211; much like Phyton&#8217;s libraries.</p>
<p>We are currently using <em>Namespace_Class::method()</em> instead of <em>Namespace::Class::method()</em> and <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> instead of <em>Class::func_name([$arg1, $arg2... $argN])</em> to workaround the lack of &#8220;<em>Namespaces&#8221;</em> and method overloading &#8220;<em>__callStatic()&#8221;</em> support on PHP 5.2.6, as these two features are required for most of the toolkit functionalities.<br />
It&#8217;s ugly, but it keeps the toolkit usable and developed while we wait for PHP 5.3.0.</p>
<p>As soon as PHP 5.3.0 comes out we&#8217;ll implement the necessary <em>namespaces</em> and change all the  <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> calls to <em>Class::func_name([$arg1, $arg2... $argN])</em> &#8211; so probably a couple of weeks after PHP 5.3.0&#8242;s release we&#8217;ll have a NaturePhp 0.1 out ;)</p>
<p>While we wait, we&#8217;re also finishing the NaturePhp&#8217;s website at <a href="http://naturephp.org" title="NaturePhp - Open Source Natural PHP Toolkit" target="_blank">http://naturephp.org</a> ;</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/naturephp-now-waiting-for-php-530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php cycle through object properties</title>
		<link>http://techtrouts.com/php-cycle-through-object-properties/</link>
		<comments>http://techtrouts.com/php-cycle-through-object-properties/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 10:35:05 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/php-cycle-through-object-properties/</guid>
		<description><![CDATA[for the example object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class Test&#123; &#160; //public props public $var1=&#34;Value 1&#34;; public $var2=&#34;Value 2&#34;; public $var3=&#34;Value 3&#34;; &#160; //private props private $var4=&#34;Value 4&#34;; &#160; //public method public function public_function&#40;&#41;&#123; return true; &#125; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>for the example object:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Test<span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public props</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var1</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 1&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 2&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var3</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 3&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private props</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$var4</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 4&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public method</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> public_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private method</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> private_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>You can cycle  through the public object properties as you would with an array:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$test</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$prop_value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'=&amp;gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$prop_value</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The result will be:</p>
<pre>
var1=&gt;Value 1
var2=&gt;Value 2
var3=&gt;Value 3</pre>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/php-cycle-through-object-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using MySQL Stored Procedures in PHP ( MySQL error #1312 )</title>
		<link>http://techtrouts.com/using-mysql-stored-procedures-in-php/</link>
		<comments>http://techtrouts.com/using-mysql-stored-procedures-in-php/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 11:31:32 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/using-mysql-stored-procedures-in-php/</guid>
		<description><![CDATA[Hello again, in order to use Stored Procedures in MySQL through PHP you usually either use pdo or mysqli connections. However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the 65536 ( CLIENT_MULTI_STATEMENTS ) internal magic [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<p>in order to use Stored Procedures in MySQL through PHP you usually either use <em>pdo</em> or <em>mysqli</em> connections.<br />
However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the <em>65536</em> ( <code>CLIENT_MULTI_STATEMENTS</code> ) internal magic constant. But you can make only one stored procedure call per connection, and there is no support for <code>OUT</code> parameters. It is not currently documented, but can be found in the php header file.</p>
<p>If you do not use this connection method, you&#8217;ll get a  &#8220;#1312 &#8211; PROCEDURE <em>database</em>.<em>procedure</em> can&#8217;t return a result set in the given context&#8221; error whenever you CALL a procedure that returns a result set.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/using-mysql-stored-procedures-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
