<?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>Galen Grover - Connecticut Web Developer</title>
	<atom:link href="http://www.galengrover.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.galengrover.com</link>
	<description>Sometimes I write things</description>
	<lastBuildDate>Sun, 18 Jul 2010 18:17:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Making wordpress parent navigation items unclickable with jquery</title>
		<link>http://www.galengrover.com/web-development/making-wordpress-parent-navigation-items-unclickable-with-jquery/</link>
		<comments>http://www.galengrover.com/web-development/making-wordpress-parent-navigation-items-unclickable-with-jquery/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 18:15:51 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=667</guid>
		<description><![CDATA[I&#8217;m developing a new site that has a navigation that is built dynamically via wordpress&#8217; wp_list_pages function


&#60;?php  wp_list_pages&#40;'sort_column=menu_order&#38;title_li=&#38;exclude=6'&#41;; ?&#62;




Navigation items that have submenus (css dropdowns) are still clickable, but for this website they have no content. I wanted a way to make those items unclickable. I was unable to find any way with wordpress&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m developing a new site that has a navigation that is built dynamically via wordpress&#8217; <a href="http://codex.wordpress.org/Function_Reference/wp_list_pages">wp_list_pages</a> function</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>  wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort_column=menu_order&amp;title_li=&amp;exclude=6'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>Navigation items that have submenus (css dropdowns) are still clickable, but for this website they have no content. I wanted a way to make those items unclickable. I was unable to find any way with wordpress&#8217; api, but I did find a way with jquery.</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;">'#navigation_ul &gt; li &gt; a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</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;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">siblings</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'href'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'#'</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'onClick'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'return false'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>This sets the href to &#8216;#&#8217;, and onClick to &#8216;return false&#8217; of all navigation links that have submenus</p>]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/making-wordpress-parent-navigation-items-unclickable-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect non-www to www in django</title>
		<link>http://www.galengrover.com/web-development/python/redirect-non-www-to-www-in-django/</link>
		<comments>http://www.galengrover.com/web-development/python/redirect-non-www-to-www-in-django/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 16:57:31 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=661</guid>
		<description><![CDATA[In your settings file add


PREPEND_WWW = True




Then run syncdb


python manage.py syncdb




]]></description>
			<content:encoded><![CDATA[<p>In your settings file add</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">PREPEND_WWW = <span style="color: #008000;">True</span></pre></div></div>




<p>Then run syncdb</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">python manage.<span style="color: black;">py</span> syncdb</pre></div></div>




]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/python/redirect-non-www-to-www-in-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing dictionaries inside lists with Django templates</title>
		<link>http://www.galengrover.com/web-development/python/accessing-dictionaries-inside-lists-with-django-templates/</link>
		<comments>http://www.galengrover.com/web-development/python/accessing-dictionaries-inside-lists-with-django-templates/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 04:16:35 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=646</guid>
		<description><![CDATA[Click here to skip the story and straight to the code

Today while working on the new SVO i ran into an issue with the coding of breadcrumbs. I wanted to pull the breadcrumb code out of each page template and put it into the header template.

This is what i had originally in each template:


&#60;p id=&#34;breadcrumbs&#34;&#62;
 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="#dict_in_list">Click here to skip the story and straight to the code</a></p>

<p>Today while working on the new <a href="http://www.skatevideosonline.net">SVO</a> i ran into an issue with the coding of breadcrumbs. I wanted to pull the breadcrumb code out of each page template and put it into the header template.</p>

<p>This is what i had originally in each template:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;p id=&quot;breadcrumbs&quot;&gt;
    &lt;a href=&quot;/&quot;&gt;Home&lt;/a&gt;&lt;span class=&quot;bc_sep&quot;&gt;&gt;&lt;/span&gt;
    &lt;a href=&quot;{% url videos %}&quot;&gt;Videos&lt;/a&gt;&lt;span class=&quot;bc_sep&quot;&gt;&gt;&lt;/span&gt;
    &lt;a href=&quot;{% url company video.company.id video.company.name|slugify %}&quot;&gt;{{ video.company.name }}&lt;/a&gt;&lt;span class=&quot;bc_sep&quot;&gt;&gt;&lt;/span&gt;
    &lt;strong&gt;{{ video.name }}&lt;/strong&gt;
&lt;/p&gt;</pre></div></div>




<p>This quickly became annoying, repeating this code in every pag&#8217;es template. I decided to create a list of dictionaries inside each view to represent the breadcrumbs:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">breadcrumbs = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
breadcrumbs.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#123;</span> <span style="color: #483d8b;">'home'</span>:reverse<span style="color: black;">&#40;</span> <span style="color: #483d8b;">'home'</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#125;</span> <span style="color: black;">&#41;</span>
breadcrumbs.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#123;</span> <span style="color: #483d8b;">'skaters'</span>:reverse<span style="color: black;">&#40;</span> <span style="color: #483d8b;">'skaters'</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#125;</span> <span style="color: black;">&#41;</span>
breadcrumbs.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#123;</span> index:<span style="color: #483d8b;">''</span> <span style="color: black;">&#125;</span> <span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">return</span> render_to_response<span style="color: black;">&#40;</span><span style="color: #483d8b;">'index.html'</span>, <span style="color: black;">&#123;</span>...<span style="color: #483d8b;">'breadcrumbs'</span>:breadcrumbs<span style="color: black;">&#125;</span><span style="color: black;">&#41;</span></pre></div></div>




<p>Then in my template i loop the list and extract the dictionary:</p>
<a name="dict_in_list"></a>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>p <span style="color: #008000;">id</span>=<span style="color: #483d8b;">&quot;breadcrumbs&quot;</span><span style="color: #66cc66;">&gt;</span>
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">for</span> breadcrumb <span style="color: #ff7700;font-weight:bold;">in</span> breadcrumbs <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span> <span style="color: #808080; font-style: italic;">#this loops the list</span>
	<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">for</span> text, link <span style="color: #ff7700;font-weight:bold;">in</span> breadcrumb.<span style="color: black;">items</span> <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span> <span style="color: #808080; font-style: italic;">#this extracts the dictionary inside each list</span>
		<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">if</span> link <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
			<span style="color: #66cc66;">&lt;</span>a href=<span style="color: #483d8b;">&quot;{{ link }}&quot;</span><span style="color: #66cc66;">&gt;</span><span style="color: black;">&#123;</span><span style="color: black;">&#123;</span> text|capfirst <span style="color: black;">&#125;</span><span style="color: black;">&#125;</span><span style="color: #66cc66;">&lt;</span>/a<span style="color: #66cc66;">&gt;&lt;</span>span <span style="color: #ff7700;font-weight:bold;">class</span>=<span style="color: #483d8b;">&quot;bc_sep&quot;</span><span style="color: #66cc66;">&gt;&gt;&lt;</span>/span<span style="color: #66cc66;">&gt;</span>
		<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> <span style="color: #ff7700;font-weight:bold;">else</span> <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
			<span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span><span style="color: black;">&#123;</span><span style="color: black;">&#123;</span> text|capfirst <span style="color: black;">&#125;</span><span style="color: black;">&#125;</span><span style="color: #66cc66;">&lt;</span>/strong<span style="color: #66cc66;">&gt;</span>
		<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endif <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
	<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endfor <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
<span style="color: black;">&#123;</span><span style="color: #66cc66;">%</span> endfor <span style="color: #66cc66;">%</span><span style="color: black;">&#125;</span>
<span style="color: #66cc66;">&lt;</span>/p<span style="color: #66cc66;">&gt;</span></pre></div></div>




<p>The for loop seems like an &#8220;ugly&#8221; way to access the inner dictionary but i was unable to find a better method.</p>]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/python/accessing-dictionaries-inside-lists-with-django-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flush cache in Windows, Mac, and Ubuntu</title>
		<link>http://www.galengrover.com/web/flush-cache-in-windows-mac-and-ubuntu/</link>
		<comments>http://www.galengrover.com/web/flush-cache-in-windows-mac-and-ubuntu/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 20:02:37 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=640</guid>
		<description><![CDATA[Windows: Open a cmd prompt. Type:


ipconfig /flushdns




Mac: Open a terminal. Type:


dscacheutil -flushcache




Ubuntu: Open a terminal. Type:


sudo /etc/init.d/networking restart


]]></description>
			<content:encoded><![CDATA[<p>Windows: Open a cmd prompt. Type:</p>


<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">ipconfig /flushdns</pre></div></div>




<p>Mac: Open a terminal. Type:</p>


<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">dscacheutil -flushcache</pre></div></div>




<p>Ubuntu: Open a terminal. Type:</p>


<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">sudo /etc/init.d/networking restart</pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web/flush-cache-in-windows-mac-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &amp; Javascript image preloader</title>
		<link>http://www.galengrover.com/web-development/css-javascript-image-preloader/</link>
		<comments>http://www.galengrover.com/web-development/css-javascript-image-preloader/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 07:28:30 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=605</guid>
		<description><![CDATA[While building a photo gallery for a client I ran into an issue where the photos took too long to load and clicking thumbnails before all the photos loaded resulted in ugly transitions.

My solution was to put a semi-transparent &#8220;shield&#8221; (containing a loading animation) over the gallery. The user will be able to see the [...]]]></description>
			<content:encoded><![CDATA[<p>While building a photo gallery for a client I ran into an issue where the photos took too long to load and clicking thumbnails before all the photos loaded resulted in ugly transitions.</p>

<p>My solution was to put a semi-transparent &#8220;shield&#8221; (containing a loading animation) over the gallery. The user will be able to see the images loading, but will be unable to click anything until all images are loaded and the shield is hidden. <a href="http://dev.jtallman.com/portfolio/view/12/colonial_new_construction_westport_ct/#photo12">Here&#8217;s</a> the finished product.</p>

<p>Explanation follows the code.</p>

<p>Here&#8217;s the html. This goes inside the div that contains your gallery.</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gallery_loader&quot;&gt; &lt;!-- wrapper for shield --&gt;
    &lt;div&gt;&lt;/div&gt; &lt;!-- this is the actual shield --&gt;
    &lt;img src=&quot;animated_loader.gif&quot;&gt;&lt;!-- image preloader --&gt;
&lt;/div&gt;</pre></div></div>




<p>&#8230;and the CSS:</p>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#gallery_loader</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Position the wrapper at the top left corner */</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* cover the entire width of your gallery */</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* cover the entire height of your gallery */</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* hide anything that might overflow */</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">999</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* make sure the shield is on top over everything */</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#gallery_loader</span> div <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* the actual shield */</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Position the shield at the top left corner of the wrapper */</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Take up the entire wrapper */</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Take up the entire wrapper */</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
    opacity<span style="color: #00AA00;">:</span> .8<span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* .8 = 80% opacity for all non-ie browsers*/</span>
    -ms-filter<span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=80)&quot;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* This and the next style are for IE */</span>
    filter<span style="color: #00AA00;">:</span> alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">80</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#gallery_loader</span> img <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</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: #808080; font-style: italic;">/* Need this so we can center the image */</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span> <span style="color: #993333;">auto</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Set this to whatever looks good */</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Adjust to your needs */</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
    -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Round corners in mozilla browsers */</span>
    -webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Round corners for webkit browsers */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>




<p>Put this inside an included javascript file. This will wait until the page is loaded entirely (images and all) and then fade the loader out. Requires jquery.</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;load&quot;</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>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#gallery_loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</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></pre></div></div>




<p>#gallery_loader is positioned absolutely and placed on top of everything else (z-index:999). It&#8217;s set to take up the entire width/height of its parent.  Next comes the shield that will actually do the &#8220;blocking&#8221; of everything in the gallery. The shield is opacited and set to take up the entire width/height of the wrapper. Finally the animated loading image is loaded and centered.</p>

<p>As you can tell from the HTML, the actual shield is not the container of the loading animation gif. This is because the children of transparent elements can&#8217;t be more opaque than their parents. In other words if we put the loading image inside the transparent &#8220;shield&#8221; (which has an opacity of 80%) it would have a max opacity of 80%. To fix this we put the &#8220;shield&#8221; underneath the loading image and opacitate it. <a href="http://www.quirksmode.org/css/opacity.html">Here&#8217;s</a> a good page on opacity.</p>



<p>Note: If you&#8217;re having issues where the loading gif isn&#8217;t loading immediately add this right after the opening of your body element</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;body&gt;
&lt;img src=&quot;animated_loader.gif&quot; style=&quot;display:none&quot;&gt;
...</pre></div></div>




<p>This will cause the loading gif to load first.</p>

<p><a href="http://www.ajaxload.info/">Here</a> is where i obtained my loading gif</p>]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/css-javascript-image-preloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a category to your magento homepage</title>
		<link>http://www.galengrover.com/web-development/magento/add-a-category-to-your-magento-homepage/</link>
		<comments>http://www.galengrover.com/web-development/magento/add-a-category-to-your-magento-homepage/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 00:22:52 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Magento]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=582</guid>
		<description><![CDATA[In the admin menu navigate to CMS -> Manage pages.
Click Home page to edit it.
Enter this code substituting The category id of the category you want to show for CATEGORY_ID



&#123;&#123;block type=&#34;catalog/product_list&#34; category_id=&#34;CATEGORY_ID&#34; template=&#34;catalog/product/list.phtml&#34;&#125;&#125;




To get the category id go to Catalog -> Manage Categories and click the category you wish to add to your homepage. The [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>In the admin menu navigate to CMS -> Manage pages.</li>
<li>Click Home page to edit it.</li>
<li>Enter this code substituting The category id of the category you want to show for CATEGORY_ID</li>
</ol>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#123;</span>block type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;catalog/product_list&quot;</span> category_id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;CATEGORY_ID&quot;</span> template<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;catalog/product/list.phtml&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>




<p>To get the category id go to Catalog -> Manage Categories and click the category you wish to add to your homepage. The category id will be in parenthesis at the top (ID: XX)</p>]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/magento/add-a-category-to-your-magento-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding custom text message sounds to your iphone</title>
		<link>http://www.galengrover.com/iphone/custom-tex-message-sounds-for-iphones/</link>
		<comments>http://www.galengrover.com/iphone/custom-tex-message-sounds-for-iphones/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 05:40:34 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=572</guid>
		<description><![CDATA[For this work your phone must be jailbroken.


	Open itunes and go into preferences.
	Under the general tab click the import settings button and change import using to aiff encoder.
	Right click your text message sound (add the sound to your library if you haven&#8217;t already) and go to create aiff version.
	Rename the file to sms-received6.caf (if you [...]]]></description>
			<content:encoded><![CDATA[<p>For this work your phone must be <a href="http://www.blackra1n.com">jailbroken</a>.</p>

<ol>
	<li>Open itunes and go into preferences.</li>
	<li>Under the general tab click the import settings button and change <em>import using</em> to aiff encoder.</li>
	<li>Right click your text message sound (add the sound to your library if you haven&#8217;t already) and go to <em>create aiff version</em>.</li>
	<li>Rename the file to sms-received6.caf (<a href="http://www.google.com/search?hl=en&#038;safe=off&#038;client=firefox-a&#038;rls=org.mozilla%3Aen-US%3Aofficial&#038;hs=4dW&#038;q=change+file+extension&#038;aq=f&#038;aqi=g10&#038;oq=">if you need it</a>).</li>
	<li>Using whatever method you want put the file into your iphone under /System/Library/Audio/UISounds/ (i use <a href="http://www.iphone-explorer.com/">iphone explorer</a>). Overwrite the old file.</li>
	<li>On your phone go to your text message sound settings and click the last text message sound. You should recognize it.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/iphone/custom-tex-message-sounds-for-iphones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Button 1px &#8220;bug&#8221; in firefox</title>
		<link>http://www.galengrover.com/web-development/button-1px-bug-in-firefox/</link>
		<comments>http://www.galengrover.com/web-development/button-1px-bug-in-firefox/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 18:40:13 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=562</guid>
		<description><![CDATA[When styling a button using the sliding doors technique i found that firefox shifted the span down 1px, thus foiling the entire idea of sliding doors.

To fix it use this:


button::-moz-focus-inner &#123; border: none;&#125;



]]></description>
			<content:encoded><![CDATA[<p>When styling a button using the sliding doors technique i found that firefox shifted the span down 1px, thus foiling the entire idea of sliding doors.</p>

<p>To fix it use this:</p>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">button<span style="color: #00AA00;">:</span><span style="color: #3333ff;">:-moz-focus-inner </span><span style="color: #00AA00;">&#123;</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></div></div>



]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/button-1px-bug-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a mac pandora dashboard widget</title>
		<link>http://www.galengrover.com/mac/creating-a-mac-pandora-dashboard-widget/</link>
		<comments>http://www.galengrover.com/mac/creating-a-mac-pandora-dashboard-widget/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:50:25 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[pandora]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=557</guid>
		<description><![CDATA[In safari (must use safari) go to pandora.com and login or signup
Go to file->Open in dashboard
Select the main pandora window and adjust the edges to fit the area you want
Click Add on the top right of your screen
On the widget click the i on the bottom right and uncheck the only play audio in dashboard [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>In safari (must use safari) go to <a href="http://www.pandora.com">pandora.com</a> and login or signup</li>
<li>Go to file->Open in dashboard</li>
<li>Select the main pandora window and adjust the edges to fit the area you want</li>
<li>Click Add on the top right of your screen</li>
<li>On the widget click the <em>i</em> on the bottom right and uncheck the <em>only play audio in dashboard option</em></li>
</ul>

<p>Tip: To refresh the widget press CMD+R</p>]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/mac/creating-a-mac-pandora-dashboard-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualHost *:80 &#8212; mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results</title>
		<link>http://www.galengrover.com/web-development/virtualhost-80-mixing-ports-and-non-ports-with-a-namevirtualhost-address-is-not-supported-proceeding-with-undefined-results/</link>
		<comments>http://www.galengrover.com/web-development/virtualhost-80-mixing-ports-and-non-ports-with-a-namevirtualhost-address-is-not-supported-proceeding-with-undefined-results/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 03:15:21 +0000</pubDate>
		<dc:creator>Galen</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[virtual hosts]]></category>

		<guid isPermaLink="false">http://www.galengrover.com/?p=546</guid>
		<description><![CDATA[Today while setting up an ssl certificate i obtained for my new installation of activecollab i ran into this error:


VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results




To fix this add this to the beginning of your virtual host


NameVirtualHost *:443




Also change


&#60;VirtualHost *&#62;



to


&#60;VirtualHost *:443&#62;




Then restart [...]]]></description>
			<content:encoded><![CDATA[<p>Today while setting up an ssl certificate i obtained for my new installation of activecollab i ran into this error:</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">VirtualHost</span> *:<span style="color: #ff0000;">80</span> -- mixing * ports and non-* ports with a <span style="color: #00007f;">NameVirtualHost</span> address is not supported, proceeding with undefined results</pre></div></div>




<p>To fix this add this to the beginning of your virtual host</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">NameVirtualHost</span> *:<span style="color: #ff0000;">443</span></pre></div></div>




<p>Also change</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *&gt;</pre></div></div>



<p>to</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">443</span>&gt;</pre></div></div>




<p>Then restart apache</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galengrover.com/web-development/virtualhost-80-mixing-ports-and-non-ports-with-a-namevirtualhost-address-is-not-supported-proceeding-with-undefined-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
