<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Wes Ray</title>
	
	<link>http://www.wessray.com</link>
	<description>Just another idiot with a blog</description>
	<lastBuildDate>Wed, 04 Apr 2012 14:36:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/wessray" /><feedburner:info uri="wessray" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>30.17202</geo:lat><geo:long>-97.822657</geo:long><feedburner:emailServiceId>wessray</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>PHP 5.4 Source Code Released on Github</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/WNaKNpSphqU/</link>
		<comments>http://www.wessray.com/php/php-5-4-source-code-released-on-github/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 04:19:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=138</guid>
		<description><![CDATA[
		
		
		
		Looks like PHP 5.4 has finally made it&#8217;s way to Github.  Without a doubt, this will spawn some heavy traffic into the source code, possibly giving more insight to the community due to it&#8217;s ease of access.  Looking forward to checking out some of the forks with improvements and changes.    [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/php-5-4-source-code-released-on-github/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "PHP+5.4+Source+Code+Released+on+Github";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Looks like PHP 5.4 has finally made it&#8217;s way to <a href="https://github.com/php/php-src" title="php on github">Github</a>.  Without a doubt, this will spawn some heavy traffic into the source code, possibly giving more insight to the community due to it&#8217;s ease of access.  Looking forward to checking out some of the forks with improvements and changes.    </p>
<p>The source is 13 years old and has 80,000 commits.  Pretty impressive. Welcome to Github</p>

<p><a href="http://feedads.g.doubleclick.net/~a/vOlNm8InXi01c4VvXvIE_hoLg3s/0/da"><img src="http://feedads.g.doubleclick.net/~a/vOlNm8InXi01c4VvXvIE_hoLg3s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vOlNm8InXi01c4VvXvIE_hoLg3s/1/da"><img src="http://feedads.g.doubleclick.net/~a/vOlNm8InXi01c4VvXvIE_hoLg3s/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=WNaKNpSphqU:3T7Ifpm6nnU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/php-5-4-source-code-released-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wessray.com/php/php-5-4-source-code-released-on-github/</feedburner:origLink></item>
		<item>
		<title>Configuring Google’s Mod_pagespeed for Apache in Fedora or Ubuntu</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/LQmlzz-QX94/</link>
		<comments>http://www.wessray.com/linux/configuring-googles-mod_pagespeed-with-fedora-or-ubuntu/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 00:26:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=127</guid>
		<description><![CDATA[
		
		
		
		I recently have been on an incredible optimization kick server and application side and tonight I came across a module for Apache written by Google.  Its actually freaking amazing and its running on this site right now.  Right now its combining and minifying my css (had a problem with the js and one [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/linux/configuring-googles-mod_pagespeed-with-fedora-or-ubuntu/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Configuring+Google%26%238217%3Bs+Mod_pagespeed+for+Apache+in+Fedora+or+Ubuntu";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>I recently have been on an incredible optimization kick server and application side and tonight I came across a module for Apache written by Google.  Its actually freaking amazing and its running on this site right now.  Right now its combining and minifying my css (had a problem with the js and one of these shitty wordpress modules so I left it out), removing whitespace, and caching (yes, awesome.) the list goes on and it improved performance quite a bit (fuck ya?). It&#8217;s all done automagically with just a bit of configuration (takes like what, 2 fucking minutes?).</p>
<h2>My Speed Improvments</h2>
<p>Now I have APC, and Memcache doing some dirty work for me and believe me those two make a HUGE difference already, but after installing this I saw about an average of <strong>33%</strong>ish speed improvments.  from about <strong>4-5 second</strong> page loads (have a lot of external shit on here that im about to get rid of).  to about <strong>1.8-3</strong> second page loads.  Believe me it makes a huge difference, and I hope this Google Gold helps you out.</p>
<p>
If you view the source of this page you&#8217;ll notice that there is a lack of whitespace, just one of the optimizations.
</p>
<h2>Lets install mod_pagespeed</h2>
<p>
<strong><a href="http://code.google.com/speed/page-speed/download.html" target="_blank">Download it.</a></strong> The commands below are straight from Google&#8217;s site where the download is located.  But I&#8217;m going to give you a quickstart to configure it, down and dirty, even simple.
</p>
<p>
From what Google says on their page, the Google repository will be added to your system to keep mod_pagespeed upt o date.  If you dont want that, just run the following code before you install</p>
<pre class="brush: bash;">
sudo touch /etc/default/mod-pagespeed
</pre>
</p>
<p>As root run these if you are in a <strong>Debian/Ubuntu</strong> Enviornment.</p>
<pre class="brush: bash;">
dpkg -i mod-pagespeed-*.deb
apt-get -f install
</pre>
</p>
<p>If you are using <strong>Fedora/CentOS</strong></p>
<pre class="brush: bash;">
yum install at
rpm -i mod-pagespeed-*.rpm
</pre>
</p>
<h2>Now lets configure this sucker.</h2>
<p><strong>Debian/Ubuntu Linux distributions</strong></p>
<pre class="brush: bash;">
sudo nano /etc/apache2/mods-available/pagespeed.conf
</pre>
<p>On <strong>CentOS/Fedora</strong>:</p>
<pre class="brush: bash;">
sudo nano /etc/httpd/conf.d/pagespeed.conf
</pre>
</p>
<p>Now that we&#8217;re in the file, just paste this configuration in and restart apache and you&#8217;re good to go, the automagic happens and it fucking works. Place the code below right before the </IfModule> closing tag so you have your own block of configurations.</p>
<p><pre class="brush: bash;">
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters rewrite_css,rewrite_javascript
ModPagespeedEnableFilters inline_css,inline_javascript
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_img_dimensions
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters remove_quotes
ModPagespeedDomain http://www.whateveryoursiteis.com
</pre>
<p>Save the file, and restart apache and notice the huge improvement.</p>
<p>If you want more options, and believe me there are some go to Google <a href="http://code.google.com/speed/page-speed/docs/using_mod.html" target="_blank">directly</a> and read a bit.</p>
<p>Enjoy.</p>
<p>-Wes</p>

<p><a href="http://feedads.g.doubleclick.net/~a/N50gBUlV6AV4ielif_FMod0MB3o/0/da"><img src="http://feedads.g.doubleclick.net/~a/N50gBUlV6AV4ielif_FMod0MB3o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/N50gBUlV6AV4ielif_FMod0MB3o/1/da"><img src="http://feedads.g.doubleclick.net/~a/N50gBUlV6AV4ielif_FMod0MB3o/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=LQmlzz-QX94:laNpnuHtwxk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/linux/configuring-googles-mod_pagespeed-with-fedora-or-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wessray.com/linux/configuring-googles-mod_pagespeed-with-fedora-or-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Configuring Fedora 13 PHP/ MySQL Server with Nginx and reverse proxy to Apache</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/uQRuWQ61IwM/</link>
		<comments>http://www.wessray.com/php/configuring-fedora-13-php-mysql-server-with-nginx-and-reverse-proxy-to-apache/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 00:04:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=120</guid>
		<description><![CDATA[
		
		
		
		Ok so I&#8217;m going to make this article quick, simple and to the point.  Fuck the bullshit, lets get ya&#8217;ll setup with nginx with a  reverse proxy to apache in less than an hour.   Now this article is made for VPS type system such as linode or slicehost.  We&#8217;re starting at the point in which [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/configuring-fedora-13-php-mysql-server-with-nginx-and-reverse-proxy-to-apache/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Configuring+Fedora+13+PHP%2F+MySQL+Server+with+Nginx+and+reverse+proxy+to+Apache";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Ok so I&#8217;m going to make this article quick, simple and to the point.  Fuck the bullshit, lets get ya&#8217;ll setup with <strong>nginx </strong>with a  reverse proxy to <strong>apache </strong>in less than an hour.   Now this article is made for VPS type system such as linode or slicehost.  We&#8217;re starting at the point in which you have Fedora 13 actually installed, base system.  So lets get started.</p>
<h2>Install Nginx</h2>
<p>Lets start by installing nginx, start the service and configure it to start at boot.</p>
<pre class="brush: bash;">
yum install nginx
service nginx start
chkconfig nginx on
</pre>
<h2>Now lets install php, mysql and some dependencies.</h2>
<p>Was going to use fast-cgi but it crashes so often, so I created a reverse proxy into apache.</p>
<pre class="brush: bash;">
yum install httpd httpd-devel php php-cli php-devel mysql php-mysql mysql-server php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy sendmail
</pre>
<h2>Configuring nginx</h2>
<pre class="brush: bash;">
nano /etc/nginx/nginx.conf
</pre>
<p>Once inside the file, change these two values</p>
<pre class="brush: bash;">
worker_processes  5;
keepalive_timeout  2;
</pre>
<p>Similar to apache you can set virtual hosts.  First lets start by editing the example in the nginx.conf file.</p>
<p>You can define the vhost in server {} containers. Now lets modify the default vhost:</p>
<p>server_name _; makes this a default vhost ( so lets change this to specify a certain domain e.g. www.something.com).</p>
<p>In the location / part, add index.php to the index line. root <strong>/usr/share/nginx/html;</strong>
<p>
This is your DocumentRoot in an apache virtual host, so you can change it to whatever you want..I prefer the /var/www/ directories.
<p>The important part for PHP is the location <strong>~ \.php$ {}</strong> container. You need to uncomment it to enable it. Change the root line to the web site&#8217;s document root (e.g. root /usr/share/nginx/html; or whatever you directory you chose.).  Be sure to pass .php to <strong>127.0.0.1:8080</strong> to proxy php files to apache (we&#8217;ll edit httpd.conf later).</p>
<h2>Apache as proxy</h2>
<pre class="brush: bash;">
nano /etc/httpd/conf/httpd.conf
</pre>
<p>Pass through to apache port 8080</p>
<pre class="brush: bash;">
Listen 127.0.0.1:8080
</pre>
<p>configure the virtualhost to reflect the same path as the nginx vhost.</p>
<h2>Install and configure MySQL</h2>
<p>Make sure its ready for startup and start it up</p>
<pre class="brush: bash;">
chkconfig mysqld on
/etc/init.d/mysqld start
</pre>
<h3>Now lets install MySQL securely</h3>
<pre class="brush: bash;">
mysql_secure_installation
</pre>
<p>
>Enter Current Root Password : <strong>Hit Enter</strong><br />
>Set Root Password : </strong>Hit Enter</strong><br />
Now enter your password twice<br />
The rest are your choice, I hit enter all the way through.
</p>
<h2>Install APC and other Dev Tools</h2>
<p>Lets install some dependencies, most are just needed on a dev server anyway, so group install.  Fail2ban is to keep users from attacking your site, they will be banned after 5 failed attemps to login for 10 mins.  You can change the configuration in /etc/fail2ban/</p>
<pre class="brush: bash;">
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'
yum install php-pecl-apc
yum install fail2ban
yum install mlocate

chkconfig fail2ban on
chkconfig httpd on
chkconfig nginx on
chkconfig mysqld on
updatedb
</pre>
<p> In the fail2ban configuration file you can change additional settings, they are very self explanatory. To edit fail2ban configuration go to:</p>
<pre class="brush: bash;">
nano /etc/fail2ban/jail.conf
</pre>
<p><strong>Now guess what, you&#8217;re done.  If you have any questions, just leave a comment and I&#8217;ll be sure to answer it, enjoy the nginx server.</strong></p>
<h2> Feeling Generous??</h2>
<p>Sign up for a linode VPS, I pay $20 a month and it fucking rocks</p>
<p>My <a href="http://www.linode.com/?r=2bf9ae77ecd8e759a2b79bf1011e1c3147d93525" target="_blank">Linode.com</a> Referral Code <strong>2bf9ae77ecd8e759a2b79bf1011e1c3147d93525</strong></p>
<p>-<strong>Wes</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/8cRklXOAh28-Hu7RR3eJy0ie3Oc/0/da"><img src="http://feedads.g.doubleclick.net/~a/8cRklXOAh28-Hu7RR3eJy0ie3Oc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/8cRklXOAh28-Hu7RR3eJy0ie3Oc/1/da"><img src="http://feedads.g.doubleclick.net/~a/8cRklXOAh28-Hu7RR3eJy0ie3Oc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=uQRuWQ61IwM:IwRpmIzqqNE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/configuring-fedora-13-php-mysql-server-with-nginx-and-reverse-proxy-to-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wessray.com/php/configuring-fedora-13-php-mysql-server-with-nginx-and-reverse-proxy-to-apache/</feedburner:origLink></item>
		<item>
		<title>Kohana 3 Name Spacing with Underscores in Controller Classes</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/kL7jjXM6BSQ/</link>
		<comments>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/#comments</comments>
		<pubDate>Sun, 02 May 2010 22:44:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ko3]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=111</guid>
		<description><![CDATA[
		
		
		
		So, I&#8217;ve been working with Kohana 2.3.4 lately and its absolutely beautiful.  A much improved version of what Codeigniter should have been.  Now they released Kohana 3 which is similar, yet very different.  One of the &#8220;gotchas&#8221; I noticed in KO3 (Kohana 3) is the auto loading of controller classes and the [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Kohana+3+Name+Spacing+with+Underscores+in+Controller+Classes";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So, I&#8217;ve been working with Kohana 2.3.4 lately and its absolutely beautiful.  A much improved version of what Codeigniter should have been.  Now they released Kohana 3 which is similar, yet very different.  One of the &#8220;gotchas&#8221; I noticed in KO3 (Kohana 3) is the auto loading of controller classes and the name spacing with underscores.  Here is an example of what I&#8217;m talking about.</p>
<h1>All underscores are converted to slashes</h1>
<p>In Kohana 2 you could name a class with underscores and there would be no problem</p>
<p>now the underscores are converted to slashes</p>
<p>
notice the <strong>Controller_</strong> is in the front now which translates to controller/
</p>
<p>
Within the classes folder in application you notice there is classes/controllers to keep for instance a file extending off template.
</p>
<p>
So a template in controllers would need to be named <strong>defaulttemplate.php</strong> which would become <strong>Controller_DefaultTemplate</strong>, BUT if you wanted it to be Controller_Default_Template it would have to be in a sub folder called Default in controllers then <strong>template.php</strong>
</p>
<p>
Its a bit confusing in the beginning but you&#8217;ll get used to it.  The entire system is a helluva improvement.  Look forward to a few articles i&#8217;ll be writing on using the ORM.
</p>
<p>Cheers,<br />
<strong>-Wes</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/ZnL62-y20dw0ndYwBGACKX1QFqw/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZnL62-y20dw0ndYwBGACKX1QFqw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZnL62-y20dw0ndYwBGACKX1QFqw/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZnL62-y20dw0ndYwBGACKX1QFqw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=kL7jjXM6BSQ:xPZAvOHcLG0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/</feedburner:origLink></item>
		<item>
		<title>Wufoo Style jQuery form Tutorial with focus / active state</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/ILSleaSEBXA/</link>
		<comments>http://www.wessray.com/jquery/wufoo-style-jquery-form-focus-active-state/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 00:56:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=80</guid>
		<description><![CDATA[
		
		
		
		So you like how Wufoo looks do you?  Well you can make your form look just like their&#8217;s.  I have a DEMO you can check out to test the functionality of what the hell I&#8217;m talking about in this tutorial.   But I would much rather show you in code than ramble [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/jquery/wufoo-style-jquery-form-focus-active-state/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Wufoo+Style+jQuery+form+Tutorial+with+focus+%2F+active+state";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So you like how Wufoo looks do you?  Well you can make your form look just like their&#8217;s.  I have a <a href="/labs/wufooish.php">DEMO</a> you can check out to test the functionality of what the hell I&#8217;m talking about in this tutorial.   But I would much rather show you in code than ramble about something that doesn&#8217;t need much explaining.  SO, here is the breakdown of this tutorial on how to focus a form field state with jQuery . GO!<br />
<h2>jQuery</h2>
<p>This is the <a href="http://www.jquery.com" target="_blank">jQuery</a>, which is a javascript framework that makes coding this crap SO much easier.  and it must be included on the page for this to work.  You can view the source of the <a href="view-source:http://www.wessray.com/labs/wufooish.php">DEMO</a> and get an idea about exactly what is going on.  Its commented for your understanding.</p>
<pre class="brush: jscript;">
	//Wesified.
		$(document).ready(function() {
	//On input focus (tabbed or clicked)..it will..
			$(&quot;input,textarea,select&quot;).focus(function () {
	//grab the parent nested LI of that input and add the bg color
		        	$(this).parents('li').css('background-color','#FFFFDD');
				}).blur(function() {
	//Then get rid of it
			$(this).parents('li').css('background-color','#FFFFFF');
	});
});
</pre>
<h2>HTML</h2>
<p>So this is the structure of the form. nuff&#8217; said</p>
<pre class="brush: xml;">
&lt;form id=&quot;contact_form&quot; class=&quot;contact_form&quot;&gt;
  &lt;div&gt;
    &lt;ul&gt;
      &lt;li&gt; &lt;span class=&quot;left_half&quot;&gt;
        &lt;label for=&quot;first_name&quot;&gt;First Name &lt;span class=&quot;required&quot;&gt; *&lt;/span&gt;&lt;/label&gt;
        &lt;input class=&quot;required&quot; type='text' name='first_name' value=''&gt;
        &lt;/span&gt; &lt;span class=&quot;right_half&quot;&gt;
        &lt;label for=&quot;last_name&quot;&gt;Last Name &lt;span class=&quot;required&quot;&gt; *&lt;/span&gt;&lt;/label&gt;
        &lt;input class=&quot;required&quot; type='text' name='last_name' value=''&gt;
        &lt;/span&gt; &lt;/li&gt;
      &lt;li&gt; &lt;span class=&quot;left_half&quot;&gt;
        &lt;label for=&quot;other_stuff&quot;&gt;Other Stuff&lt;span class=&quot;required&quot;&gt; *&lt;/span&gt;&lt;/label&gt;
        &lt;input class=&quot;required&quot; type='text' name='other_stuff' value=''&gt;
        &lt;/span&gt; &lt;span class=&quot;right_half&quot;&gt;
        &lt;label for=&quot;expand_more&quot;&gt;Expand More &lt;span class=&quot;required&quot;&gt; *&lt;/span&gt;&lt;/label&gt;
        &lt;input class=&quot;required&quot; type='text' name='expand_mores' value=''&gt;
        &lt;/span&gt; &lt;/li&gt;
      &lt;li&gt; &lt;span class=&quot;full&quot;&gt;
        &lt;label for=&quot;company&quot;&gt;Company &lt;span class=&quot;required&quot;&gt; *&lt;/span&gt;&lt;/label&gt;
        &lt;input class=&quot;required&quot; type='text' name='company' value=''&gt;
        &lt;/span&gt; &lt;/li&gt;
      &lt;li class=&quot;button&quot;&gt;
        &lt;button type=&quot;submit&quot;&gt;Submit Form&lt;/button&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/form&gt;
</pre>
<h2>CSS</h2>
<p>This is what makes it look badass.</p>
<pre class="brush: css;">
form ul {
	list-style-type:none;
	width: 450px;
}
form li {
	clear:both;
	display:block;
	margin:0;
	padding:6px 9px 9px 9px;
	font-size: small;
	width:500px;
	overflow: hidden;
}
form li input, textarea {
	border-color:#7C7C7C #C3C3C3 #DDDDDD;
	border-style:solid;
	border-width:1px;
	color:#333333;
	margin:0;
	padding:2px 0;
	font-family:Tahoma, Arial, sans-serif;
	width:100%;
}
form li label {
	border:medium none;
	color:#222222;
	display:block;
	font-size:95%;
	font-weight:bold;
	line-height:150%;
	margin:0;
	padding:0 0 3px;
	font-family:Tahoma, Arial, sans-serif;
}
form li span label.sub {
	padding-bottom:0px;
	font-weight:normal;
}
form li label, form li span label {
	clear:both;
	color:#444444;
	display:block;
	font-size:85%;
	margin:0;
	padding-top:6px;
}
.left_half {
	float:left;
	width:250px;
}
.right_half {
	float:right;
	width:230px;
}
.full {
	width:460px;
}
li.left_half {
	clear:left !important;
	float:left;
}
form li:hover {
	background-color:#FFFFDD;
}
form li.section {
	border-top:1px dotted #CCCCCC;
}
form li.button:hover {
	background-color:#FFFFFF;
}
label.error, span.required {
	color:#DF0000;
}
h2.form_title {
	border-bottom:1px dotted #CCCCCC;
	width:460px;
	margin-bottom:10px;
}
</pre>
<p>All in all, this is a pretty easy concept and I hope it helps a few of you out there.  If you have any questions just leave a comment and I&#8217;ll do my best to help you out.  </p>
<p>Cheers,</p>
<h1>Wes</h1>

<p><a href="http://feedads.g.doubleclick.net/~a/hKdGARROH42LdwKB-itdRdCNTfM/0/da"><img src="http://feedads.g.doubleclick.net/~a/hKdGARROH42LdwKB-itdRdCNTfM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/hKdGARROH42LdwKB-itdRdCNTfM/1/da"><img src="http://feedads.g.doubleclick.net/~a/hKdGARROH42LdwKB-itdRdCNTfM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=ILSleaSEBXA:wqV1boJM2ec:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/jquery/wufoo-style-jquery-form-focus-active-state/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.wessray.com/jquery/wufoo-style-jquery-form-focus-active-state/</feedburner:origLink></item>
		<item>
		<title>Google Analytics Asynchronous Tracking, Finally!</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/CCGByha1FGI/</link>
		<comments>http://www.wessray.com/random/google-analytics-asynchronous-tracking-finally/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 21:30:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=75</guid>
		<description><![CDATA[
		
		
		
		Unlike the regular tracking code google analytics has, this snippet directly from google, this optimizes the way the page loads&#8230;SO if some of you have noticed on sites they get hung up and won&#8217;t load because its waiting on analytics loading in the header..Well fuck that.
here is the snipper


&#60;script type=&#34;text/javascript&#34;&#62;

  var _gaq = _gaq [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/random/google-analytics-asynchronous-tracking-finally/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Google+Analytics+Asynchronous+Tracking%2C+Finally%21";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Unlike the regular tracking code google analytics has, this snippet directly from google, this optimizes the way the page loads&#8230;SO if some of you have noticed on sites they get hung up and won&#8217;t load because its waiting on analytics loading in the header..Well fuck that.</p>
<p>here is the snipper</p>
<pre class="brush: jscript;">

&lt;script type=&quot;text/javascript&quot;&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();

&lt;/script&gt;
</pre>
<p>It inserts the ga.js into the page, it specified the page&#8217;s web property ID and then calls _trackPageview to send the data back.  Just Replace the <strong>UA-XXXXX-X</strong> with your web property ID.  Visit <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" target="_blank">this</a> page from google for more details!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/-TMdIze7eR3zgZ7VncJpdEVQ7TE/0/da"><img src="http://feedads.g.doubleclick.net/~a/-TMdIze7eR3zgZ7VncJpdEVQ7TE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-TMdIze7eR3zgZ7VncJpdEVQ7TE/1/da"><img src="http://feedads.g.doubleclick.net/~a/-TMdIze7eR3zgZ7VncJpdEVQ7TE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=CCGByha1FGI:e88o8lxQdio:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/random/google-analytics-asynchronous-tracking-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wessray.com/random/google-analytics-asynchronous-tracking-finally/</feedburner:origLink></item>
		<item>
		<title>Remove Non Ascii Characters using PHP and Regular Expressions</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/z-gImeORd3k/</link>
		<comments>http://www.wessray.com/php/strip-and-remove-non-ascii-characters-using-php-regular-expressions/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:12:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=66</guid>
		<description><![CDATA[
		
		
		
		So there I was taking forever to fix content from a Word Perfect document converted to Word then pasted as HTML.  I was spending a while removing all the bullshit non Ascii Characters and I thought to myself and said&#8230;Wes, you idiot, you are a programmer, do this the right way and filter it [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/strip-and-remove-non-ascii-characters-using-php-regular-expressions/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Remove+Non+Ascii+Characters+using+PHP+and+Regular+Expressions";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So there I was taking forever to fix content from a Word Perfect document converted to Word then pasted as HTML.  I was spending a while removing all the bullshit non Ascii Characters and I thought to myself and said&#8230;Wes, you idiot, you are a programmer, do this the right way and filter it out.  So I did and here is a simple way of doing it through regular expressions and php.</p>
<pre class="brush: php;">

&lt;?php
//Your nasty string of word and non ascii chars
$Contentz = &quot;These are shitty chars â€ž and we dont like them nor want them.&quot;;

//Array of content I want to make a space
$badContent = array(&quot;&amp;nbsp;&quot;);

//Replace the bad arrays with a space
$Contentz = trim(str_replace($badContent,&quot; &quot;,$Contentz));

//Specific string replaces for ellipsis, etc that you dont want removed but replaced
$theBad = 	array(&quot;“&quot;,&quot;”&quot;,&quot;‘&quot;,&quot;’&quot;,&quot;…&quot;,&quot;—&quot;,&quot;–&quot;);
$theGood = array(&quot;\&quot;&quot;,&quot;\&quot;&quot;,&quot;'&quot;,&quot;'&quot;,&quot;...&quot;,&quot;-&quot;,&quot;-&quot;);
$Contentz = str_replace($theBad,$theGood,$Contentz);

//Whatever might be left over...
//Remove all non ascii chars (aka: bad Microsoft Word and Word Perfect Shit shit)
$Contentz = preg_replace('/[^(\x20-\x7F)\x0A]*/','', $Contentz);

echo $Contentz;
?&gt;
</pre>
<p><strong>$Contentz will show up removing the characters.</strong></p>
<p>Cheers,<br />
 <strong>Wes S .Ray</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Jjx_SGUaMBWQ6hTXJUw7WostDvE/0/da"><img src="http://feedads.g.doubleclick.net/~a/Jjx_SGUaMBWQ6hTXJUw7WostDvE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Jjx_SGUaMBWQ6hTXJUw7WostDvE/1/da"><img src="http://feedads.g.doubleclick.net/~a/Jjx_SGUaMBWQ6hTXJUw7WostDvE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=z-gImeORd3k:C_-8bs9oChM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/strip-and-remove-non-ascii-characters-using-php-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.wessray.com/php/strip-and-remove-non-ascii-characters-using-php-regular-expressions/</feedburner:origLink></item>
		<item>
		<title>Configuring PHP Web server on Fedora 11</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/SLMiJgplpnM/</link>
		<comments>http://www.wessray.com/php/configuring-php-mysql-web-server-on-fedora-11/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:25:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wessray.com/?p=19</guid>
		<description><![CDATA[Creating a Fedora 11 Web server for php, mysql, apache, ]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/configuring-php-mysql-web-server-on-fedora-11/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Configuring+PHP+Web+server+on+Fedora+11";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>This is going to be a quick and simple tutorial on how to setup a Fedora 11 Linux Server with PHP, MySQL, Apache and phpmyadmin.  Now I&#8217;m assuming you already have the OS installed on your machine.  Most of you will be using cloud servers, mine is from <a href="http://www.linode.com/?r=2bf9ae77ecd8e759a2b79bf1011e1c3147d93525" target="_blank"><em><strong>Linode.com</strong></em></a>.  You will need to have shell access to your server.  If you have very little experience with linux I suggest you brush up and learn a <strong><a href="http://howtoforge.com/" target="_blank"><em>little syntax</em></a></strong> so you aren&#8217;t shooting in the dark.</p>
<p>Ok, so lets get started with the actual configuration of the server.   At this point I AM ASSUMING you have the operating system installed and its just a bare canvas.</p>
<h3>Here we go, hold on kids.</h3>
<p>The first step that is needed to taken is open up your terminal, I personally use <strong><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank"><em>PuTTY</em></a></strong>, a free telnet/ssh client.  One you are logged in make sure you have full access to the system, whether it be <strong>root </strong>or <strong>sudo</strong>.</p>
<p>Now lets install PHP and MySQL. These will be commands you type in the terminal.  We will be installing the apache, mysql and php and configuring them.</p>
<ul> <code> </code></p>
<li><strong>yum -y install httpd php mysql mysql-server php-mysql</strong></li>
</ul>
<p>We set chkconfig so that when rebooted the servers will start automatically, and we do this like so.</p>
<ul> <code> </code></p>
<li><strong>chkconfig httpd on</strong></li>
<li><strong>chkconfig mysqld on</strong></li>
</ul>
<p>Now that Apache and MySQL are starting with the server, we can configure MySQL</p>
<ul>
<li><strong>mysqladmin -u root &#8216;root_pw_of_your_choice&#8217;</strong></li>
</ul>
<p>Now lets install phpMyAdmin, a mysql database management tool.</p>
<ul> <code> </code></p>
<li><strong>yum install phpMyAdmin.noarch</strong></li>
</ul>
<p>Since that has been taken care of let, lets open up the phpmyadmin config.</p>
<ul>
<li><strong>nano /etc/httpd/conf.d/phpMyAdmin.conf</strong></li>
</ul>
<p>At this point what we need to do is comment out a certain section. Notice that I have a # which denotes comment out</p>
<p><strong>#&lt;Directory /usr/share/phpMyAdmin/&gt;<br />
#   order deny,allow<br />
#   deny from all<br />
#   allow from 127.0.0.1<br />
#&lt;/Directory&gt;</strong></p>
<p>Next we are going to jump into the httpd.conf, otherwise known as the Apache Config File</p>
<ul>
<li><strong>nano /etc/httpd/conf/httpd.conf</strong></li>
</ul>
<p>Once in there you are going to want to change a section</p>
<p><strong>&lt;Directory /&gt;<br />
Options FollowSymLinks<br />
<span style="color: #000000; background-color: #00ff00;">AllowOverride All</span><br />
&lt;/Directory&gt;</strong></p>
<p>You will want to set it to AllowOverride All, by default it should be set to none, but we dont want that.</p>
<p>Now at the end of the file add these to make your IP address directly or URL go directly to phpMyAdmin unless you set a virtualhost otherwise.  You need to put all of this at the bottom of your<strong> httpd.conf</strong> file</p>
<p><strong>&lt;VirtualHost your.ip:80&gt;<br />
ServerAdmin youremail@server.com<br />
DocumentRoot /usr/share/phpMyAdmin/</p>
<p>ServerName yourIP<br />
ServerAlias yourIP</p>
<p>ErrorLog logs/home-error_log<br />
CustomLog logs/home-access_log common<br />
&lt;/VirtualHost&gt;</p>
<p>Include /etc/httpd/conf/sites-production/*<br />
Include /etc/httpd/conf/sites-development/*</strong></p>
<p>Save and close the conf file and finally create your folders than you included, e.g</p>
<ul>
<li><strong>mkdir /etc/httpd/conf/sites-production</strong></li>
<li><strong>mkdir /etc/httpd/conf/sites-development</strong></li>
</ul>
<p>Now that the config file directories are made, lets make the place holders for the actual website content</p>
<ul>
<li><strong>/var/www/sites-production</strong></li>
<li><strong>/var/www/sites-development</strong></li>
</ul>
<p>That about sums it up for the base server setup on fedora 11 for a linode VPS.  If you want more PHP Packages just run this command and you should have everything you need.</p>
<p><strong>yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel</strong></p>
<p>If you need any MySQL help for setting up users, I reccomend this site</p>
<p><a href="http://www.databasef1.com/tutorial/mysql-create-user.html" target="_blank"> http://www.databasef1.com/tutorial/mysql-create-user.html</a></p>
<p>If any help is needed feel free to leave comments and I will respond.  Good luck!</p>
<h2> Feeling Generous??</h2>
<p>Sign up for a linode VPS, I pay $20 a month and it fucking rocks</p>
<p>My <a href="http://www.linode.com/?r=2bf9ae77ecd8e759a2b79bf1011e1c3147d93525" target="_blank">Linode.com</a> Referral Code <strong>2bf9ae77ecd8e759a2b79bf1011e1c3147d93525</strong></p>
<p>-<strong>Wes</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/RTbaK9K3rmFZCc_5VVjo3vWvKKo/0/da"><img src="http://feedads.g.doubleclick.net/~a/RTbaK9K3rmFZCc_5VVjo3vWvKKo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RTbaK9K3rmFZCc_5VVjo3vWvKKo/1/da"><img src="http://feedads.g.doubleclick.net/~a/RTbaK9K3rmFZCc_5VVjo3vWvKKo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=SLMiJgplpnM:LBBdmRWcXWY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/configuring-php-mysql-web-server-on-fedora-11/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.wessray.com/php/configuring-php-mysql-web-server-on-fedora-11/</feedburner:origLink></item>
		<item>
		<title>jQuery Accordion for Wordpress</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/m68wSxdhmQc/</link>
		<comments>http://www.wessray.com/jquery/jquery-accordion-for-wordpress/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:43:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=39</guid>
		<description><![CDATA[
		
		
		
		So I was working on a site with a vertical navigation today and the previous developer working on it made the entire navigation static&#8230;.Well thats pretty much worthless for a CMS like Wordpress.  So I took it upon myself to create an accordion script for Wordpress (it can be used wtihout Wordpress just as [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/jquery/jquery-accordion-for-wordpress/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "jQuery+Accordion+for+Wordpress";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So I was working on a site with a vertical navigation today and the previous developer working on it made the entire navigation static&#8230;.Well thats pretty much worthless for a CMS like Wordpress.  So I took it upon myself to create an accordion script for Wordpress (it can be used wtihout Wordpress just as easily).  I commented the code nicely and you can essentially paste this directly into wordpress and it will work.</p>
<p><strong>The File Structure is as follows</strong></p>
<pre class="brush: xml;">
&lt;ul&gt;
   &lt;li&gt;&lt;a href=&quot;http://link&quot;&gt;&lt;/a&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href=&quot;http://subnavlink&quot;&gt;LINK&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
   &lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><strong> The CSS You will need</strong></p>
<pre class="brush: css;">
#navigation ul li ul { display:none; }
#navigation .displayMe { display:block; }
</pre>
<p><strong> Now for the Javascript. This one is for all your Wordpress Developers who need a custom jQuery Accordion</strong></p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

$(document).ready(function() {	

//If its a page parent (based off wordpress), add the class &quot;displayMe&quot;
//This way the accordion will be opened up on the page you are on.
if ($('#navigation ul li').hasClass(&quot;current_page_parent&quot;)) {
	$('#navigation .current_page_parent ul').addClass(&quot;displayMe&quot;); }

//Hide the submenus
$('#navigation ul li ul').hide();

//Add a class to the parent li IF it has sub UL's
$(&quot;#navigation ul li:has(ul)&quot;).addClass(&quot;theDon&quot;);

//Da henchman
$(&quot;#navigation ul li ul li:has(a)&quot;).addClass(&quot;henchmen&quot;);

//Remove the link if it has a submenu
$('#navigation .theDon &gt; a').attr('href', '#');

//When you click it, toggle bitch.
$('#navigation ul li a').click(
function() {

//Onclick Remove the class dipslay me which is only display:block;
//This way they can close it if they click it or it will glitch
$(this).next().slideToggle('slow').removeClass(&quot;displayMe&quot;);

//return false so the # doenst move view to the top of the page
if ($(this).attr('href') == '#') { return false; }

//Close it all out
	});
 });

&lt;/script&gt;

&lt;div id=&quot;navigation&quot;&gt;
&lt;ul&gt;
&lt;?php wp_list_pages('title_li='); ?&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>Hope this jQuery Accordion with an emphasis for Wordpress helps!</p>
<p>Cheers,<br />
  -<strong style="font-size:14px;">Wes</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/3q_jmVHAmGoW3BbeXEcbWsx0vAk/0/da"><img src="http://feedads.g.doubleclick.net/~a/3q_jmVHAmGoW3BbeXEcbWsx0vAk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3q_jmVHAmGoW3BbeXEcbWsx0vAk/1/da"><img src="http://feedads.g.doubleclick.net/~a/3q_jmVHAmGoW3BbeXEcbWsx0vAk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=m68wSxdhmQc:rTXCxPo8Pu4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/jquery/jquery-accordion-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.wessray.com/jquery/jquery-accordion-for-wordpress/</feedburner:origLink></item>
		<item>
		<title>Dell Inspiron 1501 Sound Issue Fix</title>
		<link>http://feedproxy.google.com/~r/wessray/~3/8KdbZcwGjdg/</link>
		<comments>http://www.wessray.com/random/dell-inspiron-1501-sound-issue-fix/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:32:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://wessray.com/?p=10</guid>
		<description><![CDATA[
		
		
		
		So if you have a Dell Inspiron 1501 its safe to say you fucking hate Dell and this computer.  SO here&#8217;s the underlying issue with this machine&#8230;.  The sound card is not shielded correctly from the high frequency of the wireless-N (5GHz).  As an example, have you ever been in a car or near computer [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/random/dell-inspiron-1501-sound-issue-fix/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Dell+Inspiron+1501+Sound+Issue+Fix";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So if you have a Dell Inspiron 1501 its safe to say you fucking hate Dell and this computer.  SO here&#8217;s the underlying issue with this machine&#8230;.  The sound card is not shielded correctly from the high frequency of the wireless-N (5GHz).  As an example, have you ever been in a car or near computer speakers when someones cell phone goes off.  It makes a weird noise, something similar to a damn 9600 baud modem trying to make its way to the internet.  SO, lets give you guys a taste of how to fix this computer ruining issue that Dell has never fucking acknowledged (hate those bastards).</p>
<p>(I&#8217;m not going to spoon feed you, if you can&#8217;t get to places like &#8220;my computer&#8221; you should just leave my site and never return.  <img src='http://www.wessray.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</p>
<ul>
<li>First, right click on my computer go to system properties.</li>
<li>Next, click the hardware tab and go to device manager.</li>
<li>Find network adapters and click on the &#8220;Dell Wireless 1501 Draft&#8230;etc&#8221; and go to properties.</li>
<li>Now that the card properties are up click on the advanced tab.</li>
<li>Go to the <strong>&#8220;Disable Bands&#8221;</strong> property and disable the 802.11a band.</li>
<li>DONE.</li>
</ul>
<p>From here on out, your issues with a &#8220;crackling&#8221; or &#8220;popping&#8221; noise with your Dell Inspiron 1501 will cease.  Sometimes it will tend to revert itself because..well, Windows sucks.   Hope this saves you people from wanting to rip your eyes out.  Probably one of the most annoying issues I&#8217;ve ever dealt with.</p>
<p>-Wes</p>

<p><a href="http://feedads.g.doubleclick.net/~a/ox-BusCpAZ6t_qM3oSKDL2MoAe8/0/da"><img src="http://feedads.g.doubleclick.net/~a/ox-BusCpAZ6t_qM3oSKDL2MoAe8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ox-BusCpAZ6t_qM3oSKDL2MoAe8/1/da"><img src="http://feedads.g.doubleclick.net/~a/ox-BusCpAZ6t_qM3oSKDL2MoAe8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wessray?a=8KdbZcwGjdg:D0vGckVJ-tc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wessray?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/random/dell-inspiron-1501-sound-issue-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.wessray.com/random/dell-inspiron-1501-sound-issue-fix/</feedburner:origLink></item>
	</channel>
</rss>

