<?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>Tequila Fish &#187; Programming</title>
	<atom:link href="http://www.tequilafish.com/category/tech/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Thu, 26 Jan 2012 23:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installing Bundler for Ruby in Ubuntu 10.04</title>
		<link>http://www.tequilafish.com/2012/01/26/installing_ruby_bundler_ubuntu_10-04/</link>
		<comments>http://www.tequilafish.com/2012/01/26/installing_ruby_bundler_ubuntu_10-04/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:20:34 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=573</guid>
		<description><![CDATA[When attempting to install Bundler for Ruby on Ubuntu 10.04, I got the following error: shell&#62; sudo gem install bundler ERROR: Error installing bundler: bundler requires RubyGems version >= 1.3.6 Running sudo gem -v I saw that I had 1.3.5. To get around this, simply install the available updater gem, then run it: shell&#62; sudo [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2012%2F01%2F26%2Finstalling_ruby_bundler_ubuntu_10-04%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2012%2F01%2F26%2Finstalling_ruby_bundler_ubuntu_10-04%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When attempting to install <a href="http://gembundler.com/" title="Bundler" target="_blank">Bundler</a> for Ruby on Ubuntu 10.04, I got the following error:</p>
<p><code>shell&gt; sudo gem install bundler<br />
ERROR:  Error installing bundler:<br />
	bundler requires RubyGems version >= 1.3.6<br />
</code></p>
<p>Running <code>sudo gem -v</code> I saw that I had 1.3.5.  To get around this, simply install the available updater gem, then run it:</p>
<p><code>shell&gt; sudo gem install rubygems-update<br />
shell&gt; sudo /var/lib/gems/1.8/bin/update_rubygems<br />
</code></p>
<p>Now running <code>gem -v</code> I see that I have 1.8.15 and I am able to install bundler:</p>
<p><code>shell&gt; gem install bundler<br />
Fetching: bundler-1.0.21.gem (100%)<br />
Successfully installed bundler-1.0.21<br />
1 gem installed<br />
Installing ri documentation for bundler-1.0.21...<br />
Installing RDoc documentation for bundler-1.0.21...<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2012/01/26/installing_ruby_bundler_ubuntu_10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eAccelerator and open_basedir: open_basedir restriction in effect. File() is not within the allowed path(s):</title>
		<link>http://www.tequilafish.com/2010/07/22/eaccelerator-and-open_basedir-open_basedir-restriction-in-effect-file-is-not-within-the-allowed-paths/</link>
		<comments>http://www.tequilafish.com/2010/07/22/eaccelerator-and-open_basedir-open_basedir-restriction-in-effect-file-is-not-within-the-allowed-paths/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 22:48:46 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=417</guid>
		<description><![CDATA[After installing eAccelerator on a CentOS 5.5 server running PHP 5.2.10, a bunch of websites began failing with open_basedir errors like so: [Fri Jul 16 17:53:50 2010] [error] [client XX.XX.XXX.XXX] PHP Warning: require() [function.require]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/) in /home/username/public_html/wp-settings.php on line 19, referer: http://www.server.com/ After doing [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2010%2F07%2F22%2Feaccelerator-and-open_basedir-open_basedir-restriction-in-effect-file-is-not-within-the-allowed-paths%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2010%2F07%2F22%2Feaccelerator-and-open_basedir-open_basedir-restriction-in-effect-file-is-not-within-the-allowed-paths%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After installing <a href="http://eaccelerator.net/">eAccelerator</a> on a CentOS 5.5 server running PHP 5.2.10, a bunch of websites began failing with open_basedir errors like so:</p>
<p><code>[Fri Jul 16 17:53:50 2010] [error] [client XX.XX.XXX.XXX] PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/) in /home/username/public_html/wp-settings.php on line 19, referer: http://www.server.com/</code></p>
<p>After doing some research it turns out that a default option that is compiled into eAccelerator is incompatible with open_basedir.  The fix is easy enough, simply re-compile with the <strong>--without-eaccelerator-use-inode</strong> option like so:</p>
<p><code>make clean<br />
phpize<br />
./configure --without-eaccelerator-use-inode<br />
make<br />
make install</code></p>
<p>After re-compiling and installing, make sure you clear out the existing eAccelerator files before restarting Apache:</p>
<p><code>rm -rf /var/cache/eaccelerator/*<br />
apachectl restart</code></p>
<p>eAccelerator states that the next version will have this compile option set by default.</p>
<p>Reference:</p>
<ul>
<li><a href="http://eaccelerator.net/ticket/414">http://eaccelerator.net/ticket/414</a></li>
<li><a href="http://eaccelerator.net/ticket/104">http://eaccelerator.net/ticket/104</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2010/07/22/eaccelerator-and-open_basedir-open_basedir-restriction-in-effect-file-is-not-within-the-allowed-paths/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dojo: How to get the ID of an element.</title>
		<link>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/</link>
		<comments>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 04:12:55 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dojo javascript id]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=312</guid>
		<description><![CDATA[To get the ID of an element using Dojo Framework, you need to use the dojo.attr function. Given the following HTML: &#60;img src=&#34;/path/to/imageA.jpg&#34; id=&#34;myImage1&#34; /&#62; &#60;img src=&#34;/path/to/imageB.jpg&#34; id=&#34;myImage2&#34; /&#62; &#60;img src=&#34;/path/to/imageC.jpg&#34; id=&#34;myImage3&#34; /&#62; You can get the IDs of each image in Dojo like so: dojo.query(&#34;img&#34;).forEach(function(currentNode) { &#160;&#160;&#160;&#160;var theElementId = dojo.attr(currentNode, &#34;id&#34;); &#160;&#160;&#160;&#160;console.log(&#34;id: &#34;, theElementId); [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F18%2Fdojo-how-to-get-the-id-of-an-element%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F06%2F18%2Fdojo-how-to-get-the-id-of-an-element%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>To get the ID of an element using Dojo Framework, you need to use the <strong>dojo.attr</strong> function.</p>
<p>Given the following HTML:</p>
<p><code>&lt;img src=&quot;/path/to/imageA.jpg&quot; id=&quot;myImage1&quot; /&gt;<br />
&lt;img src=&quot;/path/to/imageB.jpg&quot; id=&quot;myImage2&quot; /&gt;<br />
&lt;img src=&quot;/path/to/imageC.jpg&quot; id=&quot;myImage3&quot; /&gt;</code></p>
<p>You can get the IDs of each image in Dojo like so:</p>
<p><code>dojo.query(&quot;img&quot;).forEach(function(currentNode) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var theElementId = <strong>dojo.attr(currentNode, &quot;id&quot;)</strong>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;id: &quot;, theElementId); // debug<br />
});</code></p>
<p>If you have debugging on and something like Firebug, the console output would be like so:</p>
<p><code>id: myImage1<br />
id: myImage2<br />
id: myImage3</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/06/18/dojo-how-to-get-the-id-of-an-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: Removing extra space underneath an image.</title>
		<link>http://www.tequilafish.com/2009/04/29/css-removing-extra-space-underneath-an-image/</link>
		<comments>http://www.tequilafish.com/2009/04/29/css-removing-extra-space-underneath-an-image/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 02:29:07 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[descender]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[space]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=272</guid>
		<description><![CDATA[If you've ever tried to wrap an image in a div, you've surely came across the layout issue where an extra couple pixels of blank space are inserted underneath the image. Trying to get rid of this extra space has caused me to pull my hair out many times, but the fix is rather easy. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F29%2Fcss-removing-extra-space-underneath-an-image%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F29%2Fcss-removing-extra-space-underneath-an-image%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you've ever tried to wrap an image in a div, you've surely came across the layout issue where an extra couple pixels of blank space are inserted underneath the image.  Trying to get rid of this extra space has caused me to pull my hair out many times, but the fix is rather easy.  All it takes is a basic understanding of the type of element that images are, and how they interact with the layout around them.  First, some sample code:</p>
<p><code>&lt;div style=&quot;border: 1px solid #000;&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;someimage.jpg&quot; width=&quot;270&quot; height=&quot;184&quot; alt=&quot;yo&quot; /&gt;<br />
&lt;/div&gt;<br />
</code></p>
<p>This will result in something like this:</p>
<p><img src="http://www.tequilafish.com/wp-content/uploads/2009/04/css_image_space.jpg" alt="css_image_space" title="css_image_space" width="272" height="190" style="float: none;" /></p>
<p>Notice the 3 pixels of whitespace underneath the image.  The reason this happens is because images are by default <strong>inline</strong> elements.  Inline elements of course do not force new lines and act like text flowing along a line.  The most well-known inline element is of course plain text -- such as this very paragraph that you are reading now.  The fonts that make up text have attributes named <a href="http://en.wikipedia.org/wiki/Descender">descenders</a>, which are basically the part of a font that extends below the <a href="http://en.wikipedia.org/wiki/Baseline_%28typography%29">baseline</a> on characters such as y, g, and j.  Even though images aren't like fonts and don't have descenders, when your browser is rendering an image it treats it as an inline element and adds some space under the baseline to compensate for descenders.  The easiest way to get rid of the space underneath an image is to convert it to a block element so that the browser doesn't add extra room for descenders like so:</p>
<p><code>&lt;div style=&quot;border: 1px solid #000;&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;someimage.jpg&quot; width=&quot;270&quot; height=&quot;184&quot; alt=&quot;yo&quot; style=&quot;display: block;&quot; /&gt;<br />
&lt;/div&gt;</code></p>
<p>If for some reason you're unable to convert your image to block mode, another way to fix it is to hard-code the height of the wrapper div to match the height of the image like so:</p>
<p><code>&lt;div style=&quot;border: 1px solid #000; height: 184px;&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;someimage.jpg&quot; width=&quot;270&quot; height=&quot;184&quot; alt=&quot;yo&quot; /&gt;<br />
&lt;/div&gt;</code></p>
<p>Either of these methods will tightly and correctly wrap your image without the descender space below it like so:</p>
<p><img src="http://www.tequilafish.com/wp-content/uploads/2009/04/css_image_space_fixed.jpg" alt="css_image_space_fixed" title="css_image_space_fixed" width="272" height="186" style="float: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/04/29/css-removing-extra-space-underneath-an-image/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thickbox 3.1 with jQuery 1.3 &#8211; Stuck on loading image.</title>
		<link>http://www.tequilafish.com/2009/04/22/thickbox-31-with-jquery-13-stuck-on-loading-image/</link>
		<comments>http://www.tequilafish.com/2009/04/22/thickbox-31-with-jquery-13-stuck-on-loading-image/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 03:55:18 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=263</guid>
		<description><![CDATA[Thickbox hasn't been updated in a while, and it is now incompatible with recent versions of jQuery (1.3+). What happens is that when you click the thickboxed element, the screen goes gray and the the loading "barber pole" image loads as expected, but then nothing happens... it just hangs on the loading image. The reason [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F22%2Fthickbox-31-with-jquery-13-stuck-on-loading-image%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F22%2Fthickbox-31-with-jquery-13-stuck-on-loading-image%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Thickbox hasn't been updated in a while, and it is now incompatible with recent versions of jQuery (1.3+).  What happens is that when you click the thickboxed element, the screen goes gray and the the loading "barber pole" image loads as expected, but then nothing happens... it just hangs on the loading image.  The reason why is because Thickbox uses '@' in jQuery, which is now deprecated.  </p>
<p>To fix, simply open up the un-compressed thickbox.js file and go to <strong>line 79</strong> and change the following:</p>
<p><code>TB_TempArray = $(&quot;a[@rel="+imageGroup+"]&quot;).get();</code></p>
<p>... into ...</p>
<p><code>TB_TempArray = $(&quot;a[rel="+imageGroup+"]&quot;).get();</code></p>
<p>Once you make that change, Thickbox should work as expected!</p>
<p>Reference: <a href="http://codylindley.com/thickboxforum/comments.php?DiscussionID=1791&#038;page=1#Item_0">http://codylindley.com/thickboxforum/comments.php?DiscussionID=1791&#038;page=1#Item_0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/04/22/thickbox-31-with-jquery-13-stuck-on-loading-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS: How to pin an image to the bottom of a DIV</title>
		<link>http://www.tequilafish.com/2009/04/22/css-how-to-pin-an-image-to-the-bottom-of-a-div/</link>
		<comments>http://www.tequilafish.com/2009/04/22/css-how-to-pin-an-image-to-the-bottom-of-a-div/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 00:47:17 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=255</guid>
		<description><![CDATA[If you'd like to pin an image to the bottom of a DIV, it is a bit tricky. There is an relatively un-known property of an absolutely positioned element -- if you wrap it in a relatively positioned element, the absolute positioning of the wrapped element will be positioned relative to the wrapper rather than [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F22%2Fcss-how-to-pin-an-image-to-the-bottom-of-a-div%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F04%2F22%2Fcss-how-to-pin-an-image-to-the-bottom-of-a-div%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you'd like to pin an image to the bottom of a DIV, it is a bit tricky.  There is an relatively un-known property of an absolutely positioned element -- if you wrap it in a relatively positioned element, the absolute positioning of the wrapped element will be positioned relative to the wrapper rather than absolutely in the browser window.  Below is an example of how to pin an image (or any other element) to the bottom of a DIV.  Note that the height on the imageWrapper is only there to illustrate that the image will attach to the bottom of the taller wrapper and is not required.</p>
<p>HTML:<br />
<code>&lt;div id=&quot;imageWrapper&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;image.jpg&quot; width=&quot;100&quot; height=&quot;100&quot; id=&quot;bottomImage&quot; alt=&quot;Some Image&quot; /&gt;<br />
&lt;/div&gt;</code></p>
<p>CSS:<br />
<code>#imageWrapper { position: relative; height: 500px; } /* height is for display purposes only */<br />
#bottomImage { position: absolute; bottom: 0; }</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/04/22/css-how-to-pin-an-image-to-the-bottom-of-a-div/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP: How to capture output of echo into a local variable.</title>
		<link>http://www.tequilafish.com/2009/02/10/php-how-to-capture-output-of-echo-into-a-local-variable/</link>
		<comments>http://www.tequilafish.com/2009/02/10/php-how-to-capture-output-of-echo-into-a-local-variable/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 02:53:40 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[print]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=209</guid>
		<description><![CDATA[I've been customizing a WordPress install and have been needing to capture the output of the bloginfo() function, which simply echo's a string. I wanted to capture the echo into a variable without actually echo'ing the string. You can do so by leveraging PHP's output buffering functions. Here's how you do it: ob_start(); echo 'Hello [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F02%2F10%2Fphp-how-to-capture-output-of-echo-into-a-local-variable%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2009%2F02%2F10%2Fphp-how-to-capture-output-of-echo-into-a-local-variable%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've been customizing a WordPress install and have been needing to capture the output of the <tt>bloginfo()</tt> function, which simply echo's a string.  I wanted to capture the echo into a variable without actually echo'ing the string.  You can do so by leveraging PHP's output buffering functions.  Here's how you do it:</p>
<p><code>ob_start();<br />
echo 'Hello World';<br />
$myStr = ob_get_contents();<br />
ob_end_clean();</code></p>
<p><tt>$myStr</tt> will now contain '<tt>Hello World</tt>' without actually outputting it to the screen.</p>
<p>Reference:</p>
<ul>
<li><a href="http://www.php.net/ob_start">ob_start()</a></li>
<li><a href="http://www.php.net/ob_get_contents">ob_get_contents()</a></li>
<li><a href="http://www.php.net/ob_end_clean">ob_end_clean()</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2009/02/10/php-how-to-capture-output-of-echo-into-a-local-variable/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>FCKEditor: Remove &amp; prevent &lt;p&gt; tags from wrapping your content.</title>
		<link>http://www.tequilafish.com/2008/09/12/fckeditor-remove-p-tags-from-wrapping-your-content/</link>
		<comments>http://www.tequilafish.com/2008/09/12/fckeditor-remove-p-tags-from-wrapping-your-content/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 19:54:02 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=139</guid>
		<description><![CDATA[For some reason, FCKEditor automatically wraps any content entered into the textbox with a &#60;p&#62; tag. This can cause for some problems in your layout when you're actually displaying the content. Instead of trying to fix this in your layout with CSS, there is a quick and easy way to turn the auto-wrap off in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F09%2F12%2Ffckeditor-remove-p-tags-from-wrapping-your-content%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F09%2F12%2Ffckeditor-remove-p-tags-from-wrapping-your-content%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>For some reason, <a href="http://www.fckeditor.net/">FCKEditor</a> automatically wraps any content entered into the textbox with a &lt;p&gt; tag.  This can cause for some problems in your layout when you're actually displaying the content.  Instead of trying to fix this in your layout with CSS, there is a quick and easy way to turn the auto-wrap off in FCKEditor: Change the <strong><tt>FCKConfig.EnterMode</tt></strong> setting from <strong>'p'</strong> to <strong>'br'</strong>.  There are a few ways to handle this:</p>
<ul>
<li>Edit <tt>fckconfig.js</tt>:<br />Change <strong><tt>FCKConfig.EnterMode = 'p';</tt></strong> to <strong><tt>FCKConfig.EnterMode = 'br';</tt></strong></li>
<li>Change the setting programatically when you instantiate the object, like so (in PHP):<br />
<code>&lt;?php<br />
		include_once('fckeditor/fckeditor.php');<br />
		$oFCKeditor = new FCKeditor('description');<br />
		$oFCKeditor->BasePath = '/fckeditor/';<br />
		$oFCKeditor->Value = 'some text';<br />
		<strong>$oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto &lt;p&gt; tags wrapping content</strong><br />
		$oFCKeditor->Create();<br />
		?&gt;</code></li>
</ul>
<p>I prefer the latter way because you can do it on a page by page basis, and there's no messing with FCK's core JavaScript files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2008/09/12/fckeditor-remove-p-tags-from-wrapping-your-content/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery: using jquery.autocomplete.js plugin in noConflict mode</title>
		<link>http://www.tequilafish.com/2008/03/09/jquery-using-autocompletejs-plugin-in-noconflict-mode/</link>
		<comments>http://www.tequilafish.com/2008/03/09/jquery-using-autocompletejs-plugin-in-noconflict-mode/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 00:48:06 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[jquery javascript autocomplete noconflict]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2008/03/09/jquery-using-jqueryautocompletejs-plugin-in-noconflict-mode/</guid>
		<description><![CDATA[When attempting to implement Dylan Verheul's excellent auto-complete jQuery plugin on a project, I ran into problems due to the fact that we are using noConflict mode for jQuery by calling noConflict(); A few quick minutes poking around jquery.autocomplete.js and I had updated it to work in both noConflict and standard modes. For those of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F03%2F09%2Fjquery-using-autocompletejs-plugin-in-noconflict-mode%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F03%2F09%2Fjquery-using-autocompletejs-plugin-in-noconflict-mode%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When attempting to implement <a href="http://www.dyve.net/jquery/?autocomplete">Dylan Verheul's excellent auto-complete jQuery plugin</a> on a project, I ran into problems due to the fact that we are using <a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries">noConflict mode</a> for jQuery by calling <strong>noConflict();</strong>  A few quick minutes poking around jquery.autocomplete.js and I had updated it to work in both noConflict and standard modes.  For those of you looking to use jquery.autocomplete.js in noConflict mode, I've made it available for download here: <a href='http://www.tequilafish.com/wp-content/uploads/2008/03/jquery.autocomplete.js' title='jquery.autocomplete.js'>jquery.autocomplete.js</a></p>
<p><strong>UPDATE</strong>: Dylan has updated jquery.autocomplete.js to be compatible with noConflict mode.  It also contains additional bug-fixes and improvements.  You can download it at: <a href="http://code.google.com/p/jquery-autocomplete/source/browse/trunk/jquery.autocomplete.js">http://code.google.com/p/jquery-autocomplete/source/browse/trunk/jquery.autocomplete.js</a></p>
<p>----------------<br />
Now playing: <a href="http://www.foxytunes.com/artist/afx/track/steppingfilter+101">AFX - SteppingFilter 101</a><br />
via <a href="http://www.foxytunes.com/signatunes/">FoxyTunes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2008/03/09/jquery-using-autocompletejs-plugin-in-noconflict-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &amp; ionCube Loader: &#8216;The Loader must appear as the first entry in the php.ini file in Unknown on line 0&#8242;</title>
		<link>http://www.tequilafish.com/2008/02/18/php-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0/</link>
		<comments>http://www.tequilafish.com/2008/02/18/php-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 23:00:29 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[ioncube]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[optimizer]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2008/02/18/php-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0/</guid>
		<description><![CDATA[I received the following in my Apache error_log when attempting to load the ionCube loader in my php.ini file: PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0 This is because ionCube must be loaded before any of the Zend extensions are. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F02%2F18%2Fphp-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2008%2F02%2F18%2Fphp-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I received the following in my Apache error_log when attempting to load the ionCube loader in my php.ini file:</p>
<p><code>PHP Fatal error:  [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0</code></p>
<p>This is because ionCube must be loaded before any of the Zend extensions are.  So if you have the Zend extension/optimizer loaded, your php.ini should look like this to get ionCube to work:</p>
<p><code>[Zend]<br />
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.1.so<br />
zen_extension_ts=/usr/local/ioncube/ioncube_loader_lin_5.1_ts.so<br />
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0<br />
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0<br />
zend_optimizer.version=3.3.0a<br />
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so<br />
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so</code></p>
<p>----------------<br />
Now playing: <a href="http://www.foxytunes.com/artist/tommy+mccook+%26+the+aggrovators/track/a+loving+melody">Tommy McCook &#038; The Aggrovators - A Loving Melody</a><br />
via <a href="http://www.foxytunes.com/signatunes/">FoxyTunes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2008/02/18/php-ioncube-loader-the-loader-must-appear-as-the-first-entry-in-the-phpini-file-in-unknown-on-line-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

