<?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>The Flicker Fade</title>
	<atom:link href="http://www.flickerfade.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flickerfade.com</link>
	<description>by Chris Mavricos</description>
	<lastBuildDate>Thu, 11 Mar 2010 17:46:03 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Override the Default Date Picker in Pods CMS</title>
		<link>http://www.flickerfade.com/wordpress/how-to-override-the-default-date-picker-in-pods-cms/</link>
		<comments>http://www.flickerfade.com/wordpress/how-to-override-the-default-date-picker-in-pods-cms/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 17:12:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Date Picker]]></category>
		<category><![CDATA[datepicker]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Pods]]></category>
		<category><![CDATA[Pods CMS]]></category>
		<category><![CDATA[Timepicker]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=235</guid>
		<description><![CDATA[I love Pods.  It makes building content management systems simple in WordPress, and I find it to be an invaluable plugin.
Of course, Pods is a rapidly developing plugin with a lot of ground to cover given its broad aims.  Unfortunately, this means that some things haven&#8217;t been completely refined yet, and one of [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://podscms.org">Pods</a>.  It makes building content management systems simple in <a class="zem_slink" href="http://wordpress.org" title="WordPress" rel="homepage">WordPress</a>, and I find it to be an invaluable plugin.</p>
<p><div id="attachment_238" class="wp-caption alignright" style="width: 260px"><a href="http://www.flickerfade.com/wp-content/uploads/2010/03/pods-datepicker.jpg"><img src="http://www.flickerfade.com/wp-content/uploads/2010/03/pods-datepicker.jpg" alt="Pods Date Picker" title="Pods Date Picker" width="250" height="253" class="size-full wp-image-238" /></a><p class="wp-caption-text">The Default Pods Date Picker</p></div><br />
Of course, Pods is a rapidly developing plugin with a lot of ground to cover given its broad aims.  Unfortunately, this means that some things haven&#8217;t been completely refined yet, and one of these minor deficiencies comes in the form of the Pods Date Picker.  It looks like this:</p>
<p>It looks decent, and it does work.  However, it&#8217;s not very user-friendly.  The main issue is that clicking a date on the calendar is like clicking a &#8220;Set&#8221; button.  Times won&#8217;t be set unless you also click the date button again.  While a web designer will easily recognize this and work around it (hey, we can&#8217;t complain about minor details of free plugins that provide such robust functionality as Pods does), it may pose a bigger problem for average users: i.e. clients.  Not to mention, they wonder why we need to deal with seconds (that should be optional), and a 60-option dropdown is a bit cumbersome.</p>
<p>I recently designed an application for a client using WordPress and the Pods CMS.  They loved the system, but absolutely hated the Date Picker.  What&#8217;s worse, in their determination, the Date Picker &#8220;didn&#8217;t work&#8221; (!) rather than was &#8220;hard to use&#8221;.  The issue here is not that the default Pods Date Picker doesn&#8217;t work, but that it it doesn&#8217;t work the way the average user expects it to.  For those with less patience with technology, the widget might as well not work at all.</p>
<p>So, I needed to replace the Pods Date Picker with a more user-friendly Date Picker.  Unfortunately, this part of Pods is not easily extensible in the normal Wordpress fashion of using hooks (of course, you can override the entire Date field with an Input Helper, but I really just wanted to swap out the Date Picker widget rather than rewrite the entire field).  It&#8217;d be great to have a pods_date_picker hook that allowed the removal of the current JS and addition of your own, but again, these are nice-to-have details that are less important than the current development of the CMS functionality.  </p>
<p><div id="attachment_239" class="wp-caption alignright" style="width: 385px"><a href="http://www.flickerfade.com/wp-content/uploads/2010/03/timepicker.png"><img src="http://www.flickerfade.com/wp-content/uploads/2010/03/timepicker.png" alt="Timepicker" title="Timepicker" width="375" height="304" class="size-full wp-image-239" /></a><p class="wp-caption-text">Martin Milesich's Timepicker</p></div><br />
First thing to do was to find a new Date Picker.  After checking out a few, I settled on the jQuery-based <a href="http://milesich.com/timepicker/">Timepicker</a> created by Martin Milesich.  It extends the jQuery UI Datepicker, which is always a good thing to build on.  It looks like this:</p>
<p>Here&#8217;s how I went about replacing the original Date Picker with the more user-friendly Timepicker:</p>
<p><strong>1. Prepare a Javascript file within your theme</strong></p>
<p>We&#8217;ll need a js file (let&#8217;s call it <code>myadmin.js</code>, which should be somewhere in your theme directory) that&#8217;s introduced in the admin section of WordPress.  To do this you&#8217;ll need to include that file in the admin section of the site in your <code>functions.php</code> file.  Something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//this will only load the file in the administrative section of the site -</span>
<span style="color: #666666; font-style: italic;">//that is, the part that you have to log in to in order to see</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
  <span style="color: #666666; font-style: italic;">//include admin files here (either js or php)</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>To include a js file, you use <code>wp_enqueue_script</code>.  This could be done right from functions.php or from an include admin-specific php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myadmin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/my/theme/js/myadmin.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We also need to include the required jQuery scripts.  First, <a href="http://milesich.com/timepicker/">download the Timepicker</a> jQuery plugin and extract it into your theme somewhere.  Then, include the scripts in <code>functions.php</code> or your custom admin php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> admin_head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">//load jQuery</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery-ui-core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #666666; font-style: italic;">//load jQuery UI Core (required for DatePicker)</span>
&nbsp;
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jq-datepicker'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/js/jquery-ui-1.7.2.custom.min.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">//The jQuery UI DatePicker (required for Timepicker)</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery-timepicker'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/js/timepicker.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//The jQuery Timepicker extension that we'll be using</span>
  wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jq-datepicker-style'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/css/ui-lightness/jquery-ui-1.7.2.custom.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//CSS Styling for Timepicker</span>
&nbsp;
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myadmin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/my/theme/js/myadmin.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//our script gets loaded last</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'admin_head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>2. Kill the Old Date Picker</strong></p>
<p>Again, if you&#8217;d like to get rid of the default Date Picker entirely, you can use a helper and override the entire Date field.  This solution is quicker, but a bit of a hack.  The only real downside I see is that we end up loading an extra javascript file that we don&#8217;t need (the default Date Picker&#8217;s js).  On the site I&#8217;m creating, this is a non-issue.</p>
<p>As there&#8217;s no hook or simple way to remove the lines in <code>pods/core/input_fields.php</code> that includes the Date Picker code</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">/* Excerpt from pods/core/input_fields.php */
/*
==================================================
Date picker
==================================================
*/
elseif ('date' == $coltype)
{
    if (empty($coltype_exists[$coltype]))
    {
?&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> PODS_URL<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/js/date_input.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(function() {
    jQuery(&quot;.pods_form input.date&quot;).date_input();
});
&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;input type=&quot;text&quot; class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$css_classes</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$css_id</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>we&#8217;ll just override the date_input function:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* Goes in myadmin.js */</span>
$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">date_input</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: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>That&#8217;ll kill the old Date Picker.  Why not just delete the lines from <code>pods/core/input_fields.php</code>?  Because next time we update the Pods plugin, we&#8217;ll have to do this all over again.</p>
<p><strong>3. Insert the new Timepicker</strong></p>
<p>This code is taken from the timepicker site and only updated slightly:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* Goes in myadmin.js */</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.pods_form input.date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">datepicker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        duration<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>  
        showTime<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        constrainInput<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>  
        stepMinutes<span style="color: #339933;">:</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span>  
        stepHours<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>  
        altTimeField<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>  
        time24h<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>  
        dateFormat<span style="color: #339933;">:</span> <span style="color: #3366CC;">'yy-mm-dd'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The important change here is the <code>dateFormat</code> parameter.  The default date format won&#8217;t conform with the date format expected by the Pods engine.  This takes care of reformatting the date correctly, but we still need to change the time to military time to get this right.</p>
<p><strong>4. Convert to expected military time</strong></p>
<p>The Timepicker prints times in the form <code>hh:mm am/pm</code>, but Pods expects a 24 hour (military) time.  I still want my users to be able to see AM/PM in the Timepicker, otherwise I think I could just change the <code>time24h</code> option to &#8220;true&#8221; and be done with it.  Instead, we need to override or change the Timepicker&#8217;s <code>update()</code> method like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">update<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>fd<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #003366; font-weight: bold;">var</span> hours <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragHours'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #006600; font-style: italic;">//get the hours</span>
    	<span style="color: #003366; font-weight: bold;">var</span> mins <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragMinutes'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">//get the minutes</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">this</span>._time24h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">//if we're in the pm, add 12 to the hours</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragAmpm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'pm'</span><span style="color: #009900;">&#41;</span> hours <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">*</span>hours<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #006600; font-style: italic;">//set the curTime in the right format (no am/pm)</span>
        <span style="color: #003366; font-weight: bold;">var</span> curTime <span style="color: #339933;">=</span> hours <span style="color: #339933;">+</span> <span style="color: #3366CC;">':'</span> <span style="color: #339933;">+</span> mins <span style="color: #339933;">+</span> <span style="color: #3366CC;">':00'</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">//the rest remains the same</span>
        <span style="color: #003366; font-weight: bold;">var</span> curDate <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._inputId<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._inputId<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>fd <span style="color: #339933;">+</span> <span style="color: #3366CC;">' '</span> <span style="color: #339933;">+</span> curTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>._altTimeField<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>._altTimeField<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</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;">val</span><span style="color: #009900;">&#40;</span>curTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p><strong>5. Put it all together and what do you got?</strong></p>
<p>That&#8217;s it!  In the end we&#8217;ve touched 3 files:</p>
<p>1. <code>functions.php</code><br />
<em>(Load the administrative js file and the required jquery files)</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*functions.php*/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> admin_head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">//load jQuery</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery-ui-core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #666666; font-style: italic;">//load jQuery UI Core (required for DatePicker)</span>
&nbsp;
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jq-datepicker'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/js/jquery-ui-1.7.2.custom.min.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">//The jQuery UI DatePicker (required for Timepicker)</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery-timepicker'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/js/timepicker.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//The jQuery Timepicker extension that we'll be using</span>
  wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jq-datepicker-style'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/timepicker/css/ui-lightness/jquery-ui-1.7.2.custom.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//CSS Styling for Timepicker</span>
&nbsp;
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myadmin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'path/to/my/theme/js/myadmin.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//our script gets loaded last</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'admin_head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>2. <code>myadmin.js</code><br />
<em>(Remove the default Date Picker and add the Timepicker)</em></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</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: #009966; font-style: italic;">/** DATE PICKER */</span>
  $.<span style="color: #660066;">fn</span>.<span style="color: #660066;">date_input</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: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>      <span style="color: #006600; font-style: italic;">//remove old Date Picker</span>
&nbsp;
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.pods_form input.date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">datepicker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>   <span style="color: #006600; font-style: italic;">//add Timepicker</span>
        duration<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>  
        showTime<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>  
        constrainInput<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>  
        stepMinutes<span style="color: #339933;">:</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span>  
        stepHours<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>  
        altTimeField<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>  
        time24h<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>  
        dateFormat<span style="color: #339933;">:</span> <span style="color: #3366CC;">'yy-mm-dd'</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>3. <code>timepicker.js</code> (or an overriding function file)<br />
<em>(Override the Timepicker&#8217;s default time settings)</em></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//Timepicker.prototype = {....</span>
update<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>fd<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #003366; font-weight: bold;">var</span> hours <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragHours'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	<span style="color: #003366; font-weight: bold;">var</span> mins <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragMinutes'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">this</span>._time24h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._mainDivId <span style="color: #339933;">+</span> <span style="color: #3366CC;">' span.fragAmpm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'pm'</span><span style="color: #009900;">&#41;</span> hours <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">*</span>hours<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> curTime <span style="color: #339933;">=</span> hours <span style="color: #339933;">+</span> <span style="color: #3366CC;">':'</span> <span style="color: #339933;">+</span> mins <span style="color: #339933;">+</span> <span style="color: #3366CC;">':00'</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> curDate <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._inputId<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>._inputId<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>fd <span style="color: #339933;">+</span> <span style="color: #3366CC;">' '</span> <span style="color: #339933;">+</span> curTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>._altTimeField<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>._altTimeField<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</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;">val</span><span style="color: #009900;">&#40;</span>curTime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>That&#8217;s it!  Now the Date Picker has a much more user-friendly interface.  Clients happy.  Awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/wordpress/how-to-override-the-default-date-picker-in-pods-cms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to remove or hide the &#8216;Preview&#8217; button in Drupal 6</title>
		<link>http://www.flickerfade.com/web-design/how-to-remove-or-hide-the-preview-button-in-drupal-6/</link>
		<comments>http://www.flickerfade.com/web-design/how-to-remove-or-hide-the-preview-button-in-drupal-6/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:46:44 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[Drupal 6]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[hide]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=213</guid>
		<description><![CDATA[Sometimes you just don&#8217;t want to have the &#8220;Preview&#8221; option on when you&#8217;re creating new nodes in Drupal 6.  Either it confuses your users or it just gets in the way.  One way or another, if you want to get rid of that pesky feature, here&#8217;s how to do it.
One common solution is [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you just don&#8217;t want to have the &#8220;Preview&#8221; option on when you&#8217;re creating new nodes in Drupal 6.  Either it confuses your users or it just gets in the way.  One way or another, if you want to get rid of that pesky feature, here&#8217;s how to do it.</p>
<p>One common solution is to use CSS and set the button to <code>display:none;</code>.  That&#8217;s a quick and dirty fix that your average user will likely never notice.  However, that&#8217;s really a band-aid solution.  Why not just fix the issue in the first place instead?  Plus, search engines really don&#8217;t like it if you&#8217;re hiding content from your users, no matter what it is.</p>
<p>If you know all about Drupal hooks and modules and just want to get the code, you should <a href="#d6-preview-step4">skip to step 4</a>.</p>
<h3>1. Create a module.</h3>
<p>First off, you&#8217;ll need a module to take advantage of Drupal&#8217;s hook system.  If you already have a module and it makes logical sense, you can add this hook to that module.  Let&#8217;s assume the module name is <code>mymodule</code>.  This means your directory structure will have, at a minumum:</p>
<pre>sites/all/modules/custom/mymodule
sites/all/modules/custom/mymodule/mymodule.module
sites/all/modules/custom/mymodule/mymodule.info</pre>
<p>Don&#8217;t forget to activate your module!</p>
<h3>2. Implement Drupal&#8217;s <code>hook_form_alter</code></h3>
<p>Using the <code>hook_form_alter</code> function, you can mess with the node creation form however much you want. </p>
<p>Replace <code>mymodule</code> with whatever your module name is to create the function name.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mymodule_form_alter<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$form</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_state</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">//Here's where the good stuff goes</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>3. Find the right form</h3>
<p>Figure out what node types you want to remove the &#8216;Preview&#8217; button from.  The <code>$form_id</code> of that form will be <code>[node-type]_node_form</code>.  For example, if you have an <code>article</code> node type, your <code>$form_id</code> is <code>article_node_form</code>.  If you&#8217;d like to remove this programmatically for comments, you can use the form ID  <code>comment_form</code>.  We&#8217;ll check for this form ID in the hook so that we can target the exact form we want.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mymodule_form_alter<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$form</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_state</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form_id</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;article_node_form&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//Make the magic happen</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3><a name="d6-preview-step4"></a>4. Nip that pesky &#8220;Preview&#8221; button in the bud</h3>
<p>Now we just have to remove the &#8220;Preview&#8221; button from the <code>$form</code> array.  Note that the form is passed by reference (that&#8217;s what the ampersand means in front of the <code>$form</code> parameter), so when you change <code>$form</code>, the actual <code>$form</code> object from which the node form will be rendered is altered.  That&#8217;s the beauty of <code>hook_form_alter</code>.  There&#8217;s a very simple function to remove any part of the <code>$form</code>, and it&#8217;s called <code>unset()</code></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mymodule_form_alter<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$form</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_state</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form_id</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;article_node_form&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">unset</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'buttons'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'preview'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>5. That&#8217;s it!</h3>
<p>It&#8217;s that easy to remove a preview button.  Keep in mind this technique can be extrapolated to all sorts of different alterations using <code>hook_form_alter</code>.  Here are some additional tips:</p>
<ul>
<li>Want to remove the &#8220;Preview&#8221; button from multiple node creation forms?  Try this structure:

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form_id</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;article_node_form&quot;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$form_id</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;nodetype2_node_form&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></pre></div></div>

</li>
<li>Can&#8217;t figure out what form you&#8217;re trying to target?  Add the following to the beginning of your function and the reload the page:

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;This is the form id: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$form_id</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>Don&#8217;t want to remove the button, but just want to change the text from &#8220;Preview&#8221; to something else, like &#8220;Preview before submit&#8221;?  Try the following:

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'buttons'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'preview'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'#value'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Preview before submit&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>  That&#8217;ll work for the submit button, too.</li>
<li>Want to figure out what else you can remove or alter?  Add this code to the beginning of your function (you&#8217;ll need to be logged in as an admin to see the output, as well as the <a href="http://drupal.org/project/devel">Devel</a> module installed):

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">dpm<span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;ll show you all the form components.  To disable a certain section use</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>element<span style="color: #339933;">-</span>name<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>subelement<span style="color: #339933;">-</span>name<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If you don&#8217;t have the Devel module installed, you can print the <code>$form</code> with</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;pre&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/pre&gt;'</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ul>
<p>I hope this technique comes in handy!</p>
<p>For even more great information on more general form modifications, check out <a href="http://www.lullabot.com/articles/modifying-forms-5-and-6">Modifying Forms in Drupal 5 and 6</a> from the great people over at Lullabot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/web-design/how-to-remove-or-hide-the-preview-button-in-drupal-6/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fighting the Shopping Essentials+ Scam: MVQ*SHOPESSPLUS or MVQ*VPCLUBUS</title>
		<link>http://www.flickerfade.com/general-musings/tirades/fighting-the-shopping-essentials-scam-mvqshopessplus-or-mvqvpclubus/</link>
		<comments>http://www.flickerfade.com/general-musings/tirades/fighting-the-shopping-essentials-scam-mvqshopessplus-or-mvqvpclubus/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 15:42:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Tirades]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[fraudulent charges]]></category>
		<category><![CDATA[MVQ*SHOPESSPLUS]]></category>
		<category><![CDATA[MVQ*VPCLUBUS]]></category>
		<category><![CDATA[refund]]></category>
		<category><![CDATA[scam]]></category>
		<category><![CDATA[Shopping Essentials]]></category>
		<category><![CDATA[Vista Print]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=188</guid>
		<description><![CDATA[This post chronicles my dealings with Shopping Essentials+ in an attempt to get refunds for two unauthorized transactions of my credit card in October and November 2009.  Eventually, I was able to get my refund in full through the Shopping Essentials customer service web site.  I will continue to update this post as [...]]]></description>
			<content:encoded><![CDATA[<p>This post chronicles my dealings with Shopping Essentials+ in an attempt to get refunds for two unauthorized transactions of my credit card in October and November 2009.  Eventually, I was able to get my refund in full through the Shopping Essentials customer service web site.  I will continue to update this post as necessary.</p>
<p>Also, check out the list of <a href="#shopesslist">Confirmed and Suspected Sites</a> that parter with Shopping Essentials for a list of what to avoid.</p>
<p>Or, read links to <a href="#shopessrelatednews">related news</a>.</p>
<p>Current Status: <strong>Resolved</strong></p>
<h3>The Story</h3>
<p>On the morning of November 19th I was checking over my credit card statement when I noticed a charge that I couldn&#8217;t account for.  </p>
<p><img src="http://www.flickerfade.com/wp-content/uploads/2009/11/BankOfAmerica_Shopessplus02.jpg" alt="First BS Transaction" title="First BS Transaction" width="512" height="195" class="aligncenter size-full wp-image-190" /></p>
<p>MVQ*SHOPESSPLUS ?  That means nothing to me.  Searching through my newer transactions, I found another one from the same company.</p>
<p><img src="http://www.flickerfade.com/wp-content/uploads/2009/11/BankOfAmerica_Shopessplus01.jpg" alt="Second BS Transaction" title="Second BS Transaction" width="512" height="183" class="aligncenter size-full wp-image-189" /></p>
<p>So I start searching for &#8220;MVQ*SHOPESSPLUS&#8221; to see if I can figure out what this thing is.  Top result?  http://www.mvq-shopessplus.com/  Okay then.  It says:</p>
<blockquote><p>Welcome to the MVQ*SHOPESSPLUS information website!</p>
<p>If you&#8217;re wondering about billing descriptor MVQ SHOPESSPLUS, you&#8217;ve come to the right place.</p>
<p>The MVQSHOPESSPLUS that showed up on a recent credit or debit card statement of yours is a billing descriptor associated with Shopping Essentials PlusSM, a discount shopping program that offers members significant savings on essential purchases for their homes and families.</p>
<p>To access your member login information or to cancel your membership, visit MembershipCenter.com.</p></blockquote>
<p>Hmm okay, yeah I never signed up for anything like that.  Visiting the &#8220;membership center&#8221; at <a href='http://www.membershipcenter.com/?linkpage=/&#038;linkdesc=MCHomePage&#038;linkloc=mvq-shoppingessentialsplus'>http://www.membershipcenter.com/</a>, I realize that this is definitely a scam &#8211; any company that expects you to come searching for the ID on your credit card statement is well aware that its customers have NO CLUE that they&#8217;ve &#8220;signed up&#8221; for their services. </p>
<p>The rest of the Google search results are all complaints about the company.  The domain names pretty much say it all:</p>
<ul>
<li><a href="http://www.complaintsboard.com/complaints/mvq-shopessplus-c247512.html">complaintsboard.com</a></li>
<li><a href="http://mvq-shop-essentials.pissedconsumer.com/shop-essentials-is-a-predator-company-20090730151601.html">pissedconsumer.com</a></li>
<li><a href='http://www.ripoffreport.com/Telemarketers/Shopessplus/shopessplus-unauthorized-charg-cme72.htm'>ripoffreport.com</a></li>
</ul>
<p>From what I gathered from these boards, Shopping Essentials+ is a scam that piggy backs on other sites &#8211; users have claimed they&#8217;ve gotten their credit card information through VistaPrint and Restaurant.com, but I haven&#8217;t verified that.  I used Restaurant.com around the time these charges started, so I&#8217;m even more suspicious now.  In any event, enough said.  Time to contact them and get my money back from these scam artists.</p>
<p>First stop: the company provides a customer service contact form on their site, so I decided to utilize it.  Let&#8217;s see how they respond.</p>
<p><strong>November 19</strong></p>
<p>I sent their customer service the following message:</p>
<blockquote><p>Hi,</p>
<p>I have two unauthorized charges to my credit card from your company.  One on 10/19/2009, listed as MVQ*SHOPESSPLUS &#8211; 4324705342470534, and one on 11/16/2009 just listed as MVQ*SHOPESSPLUS, each for $19.95 ($39.90 total).  I have no idea what these charges are for, but I have not authorized them, and as such would like them removed and my credit card refunded immediately.  </p>
<p>Using your &#8220;account tool&#8221;, my account number is supposedly 432470534, though I never actually created an account with your company.</p>
<p>Please let me know how soon my card will be credited.  Once this is done, please cancel my account, as I do not wish to receive any additional charges.</p>
<p>Thank you,</p>
<p>Chris Mavricos</p></blockquote>
<p><img src="http://www.flickerfade.com/wp-content/uploads/2009/11/ShopEssContact-300x222.jpg" alt="ShopEssContact" title="ShopEssContact" width="300" height="222" class="aligncenter size-medium wp-image-192" /></p>
<p>Oh no, thank you.</p>
<p><strong>November 20</strong></p>
<p>No response.  Okay, it&#8217;s only been 24 hours, that&#8217;s understandable.</p>
<p><strong>Update: November 23</strong></p>
<p>Still nothing, not even a confirmation email.  Getting a bit frustrated.</p>
<p><strong>Update: November 24</strong></p>
<p>I just received the following email from membersavings@a.shoppingessentialsplus.com:</p>
<blockquote><p>Dear Christopher Mavricos,</p>
<p>This email confirms that your cancel request for your membership in Shopping Essentials+ has been processed on 11/24/2009. Your cancellation confirmation number is 432470534-20091124. You do not need to do anything else to cancel your membership.</p>
<p>We thank you for your interest in Shopping Essentials+, and we hope your membership experience was a positive one.</p>
<p>If you have any comments or suggestions that might help us better serve our members, please feel free to email us at membersavings@shoppingessentialsplus.com.</p>
<p>Sincerely,<br />
Shopping Essentials+<br />
Member Savings</p></blockquote>
<p>They almost entirely ignored the content of my first email.  I requested that two unauthorized charges be removed from my card, and they did not even acknowledge the request, let alone do anything about it.  I immediately sent them the following response:</p>
<blockquote><p>Hi,</p>
<p>You ignored my main request in my original message.  This is what I wrote:</p>
<blockquote><p>Hi,</p>
<p>I have two unauthorized charges to my credit card from your company.  One on 10/19/2009, listed as MVQ*SHOPESSPLUS &#8211; 4324705342470534, and one on 11/16/2009 just listed as MVQ*SHOPESSPLUS, each for $19.95 ($39.90 total).  I have no idea what these charges are for, but I have not authorized them, and as such would like them removed and my credit card refunded immediately.  </p>
<p>Using your &#8220;account tool&#8221;, my account number is supposedly 432470534, though I never actually created an account with your company.</p>
<p>Please let me know how soon my card will be credited.  Once this is done, please cancel my account, as I do not wish to receive any additional charges.</p>
<p>Thank you,</p>
<p>Chris Mavricos</p></blockquote>
<p>Clearly, my main request was for a refund.  You cancelled my account but there is no indication that I&#8217;ll be getting a refund.  I never signed up for an account with your company, nor did I authorize any charges to be made on my credit card.  Your actions are clearly illegal, and I would appreciate an immediate refund rather than having to make a bigger deal out of this.  </p>
<p>Please send your response promptly, and this time please address my actual concerns.</p>
<p>Thank you,</p>
<p>Chris Mavricos</p></blockquote>
<p>I&#8217;ll be interested to see what their response is, or if they respond at all.  If not, I&#8217;ll be calling them.  I expected to have to do this all along, but I wanted to be able to record their responses if they gave any, so I figured I&#8217;d try email first.</p>
<p><strong>Update: November 26</strong></p>
<p>Happy Thanksgiving!  Today I received the following response from Shopping Essentials:</p>
<blockquote><p>Dear Christopher Mavricos,</p>
<p>This email confirms that a refund/credit of $39.90 was processed for your Shopping Essentials+ membership. Please note that you will see your refund on one of your next two statements, depending on your billing cycle.</p>
<p>We thank you for your interest in Shopping Essentials+, and we hope your membership experience was a positive one.</p>
<p>If you have any comments or suggestions that might help us better serve our members, please feel free to email us at membersavings@shoppingessentialsplus.com.</p>
<p>Sincerely,<br />
Shopping Essentials+<br />
Member Savings</p></blockquote>
<p>Okay, crossing my fingers.</p>
<p><strong>Update: November 27</strong></p>
<p>Today I checked my account and two refunds have been issued by ShopEssPlus.</p>
<p><img src="http://www.flickerfade.com/wp-content/uploads/2009/11/BankOfAmerica_Shopessplus_refund.jpg" alt="Shopessplus refund" title="Shopessplus refund" width="418" height="55" class="aligncenter size-full wp-image-201" /></p>
<p>Looks like they made good on their promise.  *update: as of November 30th these transactions have been successfully received (no longer pending)*</p>
<p>So, that pretty much resolves things.  I&#8217;ve spent about 3 hours total to retrieve this money, but in the end I got it back.  What a waste.  Of course, the loss in productivity cost me closer to $200. </p>
<p><em>If anyone has <strong>concrete</strong> information about how Shopping Essentials+ got their credit card information, please post it in the comments section.  I&#8217;ll continue to update a list of verified sites to avoid.  Perhaps being outed will help convince those companies to drop the practice of sharing with scam sites like Shopping Essentials.</em></p>
<p>Good luck to everyone!</p>
<p><center><a name="shopesslist">* * *</a></center></p>
<p>Here is a list of data collected about the Shopping Essentials+ scam.  The following sites are either confirmed or suspected of sharing information with Shopping Essentials+, generally without the user&#8217;s knowledge.  In some cases, this is disclosed in the &#8220;fine print&#8221; that no one reads, apparently.  Further research leads me to believe that this practice has been going on for some time by the parent company Vertue, Inc.</p>
<table>
<tr>
<td>Confirmed Sites</td>
<td>Suspected Sites</td>
</tr>
<tr>
<td>
<ul>
<li>vistaprint.com</li>
<li>vitacost.com</li>
<li>chadwicks.com</li>
<li>metrostyle.com</li>
</ul>
</td>
<td>
<ul>
<li>restaurant.com</li>
<li>classmates.com</li>
</ul>
</td>
</tr>
</table>
<p>If any of these sites would like to make a statement as to whether they are aware of their partner&#8217;s (Shopping Essentials+) activities, and why they partner with them, I&#8217;d be interested to hear it and would be happy to post it here.</p>
<p><strong><a name="shopessrelatednews">Other News</a></strong></p>
<p><a href="http://www.lakinlaw.com/CM/NewsFlash/Vertrue_Class_Action_Article.asp">Vertue Deceptive Billing &#8211; Law Suit Filed</a></p>
<p><a href="http://classactionblog.mdpcelaw.com/2008/08/articles/unauthorized-online-billing/class-action-filed-against-vertrue-inc-adaptive-marketing-llc-vistaprint-usa-inc-and-vistaprint-ltd/">Class Action Filed Against Vertrue, Inc., Adaptive Marketing LLC, VistaPrint USA, Inc. and VistaPrint Ltd.</a></p>
<p><a href="http://www.ripoffreport.com/Credit-Card-Fraud/Vitacost-Shopping-Es/vitacost-shopping-essentials-5e93e.htm">An account of how one customer was ensnared via VitaCost.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/general-musings/tirades/fighting-the-shopping-essentials-scam-mvqshopessplus-or-mvqvpclubus/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Running WordPress and Symfony on the same server</title>
		<link>http://www.flickerfade.com/how-to/running-wordpress-and-symfony-on-the-same-server/</link>
		<comments>http://www.flickerfade.com/how-to/running-wordpress-and-symfony-on-the-same-server/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:47:49 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=176</guid>
		<description><![CDATA[Recently I started to learn the very cool symfony framework.  I&#8217;ve been running through their Practical Symfony tutorial, which has been great.
Symfony is an MVC framework, and for security everything but the files that are directly accessed by the browser (stylesheets and javascript, for example) are kept outside of the web root directory.  [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I started to learn the very cool <a href="http://www.symfony-project.org/">symfony</a> framework.  I&#8217;ve been running through their <a href="http://www.symfony-project.org/jobeet/1_2/Propel/en/">Practical Symfony</a> tutorial, which has been great.</p>
<p>Symfony is an <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> framework, and for security everything but the files that are directly accessed by the browser (stylesheets and javascript, for example) are kept outside of the web root directory.  This makes use of some Apache niftyness in the form of defining <a href="http://httpd.apache.org/docs/1.3/vhosts/name-based.html">Virtual Hosts</a>.  The following is added to httpd.conf (from Day 1 of the Practical Symfony Tutorial):</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Be sure to only have this line once in your configuration</span>
<span style="color: #00007f;">NameVirtualHost</span> 127.0.0.1:<span style="color: #ff0000;">80</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># This is the configuration for Jobeet</span>
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> 127.0.0.1:<span style="color: #ff0000;">80</span>&gt;
  <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/home/sfprojects/jobeet/web&quot;</span>
  <span style="color: #00007f;">DirectoryIndex</span> index.php
  &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/home/sfprojects/jobeet/web&quot;</span>&gt;
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">All</span>
  &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&nbsp;
  <span style="color: #00007f;">Alias</span> /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf&quot;</span>&gt;
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">All</span>
  &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>Great!  Now the server references a folder outside of the web directory and my PHP backend is safe(r) from attack.</p>
<p>This morning I went back to do some WordPress theme development and &#8211; oops! &#8211; I get Symfony error pages in my WordPress projects.  Not cool.  It seems that when Symfony and WordPress are running on the same server they don&#8217;t play nice together, and some additional configuration is required.</p>
<p>Here&#8217;s the thing, Symfony: you are very cool, but I don&#8217;t want to use you for everything.  I&#8217;m just not a one-development-framework kinda guy.  It&#8217;s not you, it&#8217;s me&#8230;  okay, so it&#8217;s you.</p>
<p>What&#8217;s going on is that Symfony has butted in and is now handling all the requests on my development server, not just the jobeet.localhost requests.  And of course, it doesn&#8217;t know what to make of WordPress URLs, so it throws an error.  WordPress never even had a chance to see the request.  Poor little guy.  </p>
<p>Considering that I will continue to install WordPress projects directly in my web directory, and access them as http://localhost/wordpress-project, and I will install Symfony projects outside the web (www) directory as http://symfony-project.localhost, I want to tell apache to default to its usual ways and only pass the buck to Symfony on those special subdomains.  Once I figured out what was going on (I&#8217;ve never configured a server this way before), the solution is pretty straightforward:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Be sure to only have this line once in your configuration</span>
<span style="color: #00007f;">NameVirtualHost</span> 127.0.0.1:<span style="color: #ff0000;">80</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># This is the configuration for Jobeet</span>
&nbsp;
<span style="color: #adadad; font-style: italic;">#add a Virtual Host to take care of the default behavior</span>
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> 127.0.0.1:<span style="color: #ff0000;">80</span>&gt;
  <span style="color: #00007f;">ServerName</span> localhost
  <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;C:<span style="color: #000099; font-weight: bold;">\D</span>ev<span style="color: #000099; font-weight: bold;">\w</span>amp<span style="color: #000099; font-weight: bold;">\w</span>ww&quot;</span>
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> 127.0.0.1:<span style="color: #ff0000;">80</span>&gt;
  <span style="color: #00007f;">ServerName</span> jobeet.localhost
&nbsp;
  <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;C:<span style="color: #000099; font-weight: bold;">\D</span>ev<span style="color: #000099; font-weight: bold;">\J</span>obeet/web&quot;</span>
  <span style="color: #00007f;">DirectoryIndex</span> index.php
  &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;C:<span style="color: #000099; font-weight: bold;">\D</span>ev<span style="color: #000099; font-weight: bold;">\J</span>obeet/web&quot;</span>&gt;
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">All</span>
  &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&nbsp;
  <span style="color: #00007f;">Alias</span> /sf <span style="color: #7f007f;">&quot;C:<span style="color: #000099; font-weight: bold;">\D</span>ev<span style="color: #000099; font-weight: bold;">\J</span>obeet<span style="color: #000099; font-weight: bold;">\l</span>ib<span style="color: #000099; font-weight: bold;">\v</span>endor<span style="color: #000099; font-weight: bold;">\s</span>ymfony<span style="color: #000099; font-weight: bold;">\d</span>ata<span style="color: #000099; font-weight: bold;">\w</span>eb<span style="color: #000099; font-weight: bold;">\s</span>f&quot;</span>
  &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;C:<span style="color: #000099; font-weight: bold;">\D</span>ev<span style="color: #000099; font-weight: bold;">\J</span>obeet<span style="color: #000099; font-weight: bold;">\l</span>ib<span style="color: #000099; font-weight: bold;">\v</span>endor<span style="color: #000099; font-weight: bold;">\s</span>ymfony<span style="color: #000099; font-weight: bold;">\d</span>ata<span style="color: #000099; font-weight: bold;">\w</span>eb<span style="color: #000099; font-weight: bold;">\s</span>f&quot;</span>&gt;
    <span style="color: #00007f;">AllowOverride</span> <span style="color: #00007f;">All</span>
    <span style="color: #00007f;">Allow</span> <span style="color: #00007f;">from</span> <span style="color: #00007f;">All</span>
  &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>I just added another <a href="http://httpd.apache.org/docs/1.3/vhosts/name-based.html">VirtualHost</a> before the jobeet VirtualHost so that the default localhost-to-www-directory mapping occurs.  It seems like that should be the default behavior anyway, given that the jobeet servername was only defined as a sub-domain, but I guess not.</p>
<p>If there&#8217;s a better way to do this then I&#8217;m all ears, but I&#8217;ve never encountered this problem before myself.  I figured this solution might help some other developer who, like myself, is courting both Symfony and WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/how-to/running-wordpress-and-symfony-on-the-same-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ChrisMavricos.com Launch</title>
		<link>http://www.flickerfade.com/announcements/chrismavricos-com-launch/</link>
		<comments>http://www.flickerfade.com/announcements/chrismavricos-com-launch/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:32:33 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[chrismavricos.com]]></category>
		<category><![CDATA[freelance design]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=165</guid>
		<description><![CDATA[Yesterday I launched my new freelance web and graphic design site, chrismavricos.com.  It&#8217;s basically an online portfolio, pseudo-resume, and contact form, but it looks pretty cool.  


If you need a web site created, please contact me through this new site!
]]></description>
			<content:encoded><![CDATA[<p>Yesterday I launched my new freelance web and graphic design site, <a href='http://www.chrismavricos.com'>chrismavricos.com</a>.  It&#8217;s basically an online portfolio, pseudo-resume, and contact form, but it looks pretty cool.  </p>
<p><a href='http://www.chrismavricos.com'><img src="http://www.flickerfade.com/wp-content/uploads/2009/10/screenshot_CJM_540.jpg" alt="chrismavricos.com" title="chrismavricos.com" width="540" height="331" class="aligncenter size-full wp-image-169" /><br />
</a></p>
<p>If you need a web site created, please contact me through this new site!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/announcements/chrismavricos-com-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress IE6 Detection and Targeted CSS</title>
		<link>http://www.flickerfade.com/wordpress/wordpress-ie6-detection-and-targeted-css/</link>
		<comments>http://www.flickerfade.com/wordpress/wordpress-ie6-detection-and-targeted-css/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 23:21:35 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[body tag]]></category>
		<category><![CDATA[body_class]]></category>
		<category><![CDATA[browser detection]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Internet Explorer 6]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[thesis_body_classes]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=146</guid>
		<description><![CDATA[Today I needed to fix up a few things on a new site I&#8217;m publishing due mainly to the Internet Explorer 6 PNG transparency issue.  Previously I&#8217;ve had success with at least one of the fixes provided by Adam Erstelle&#8217;s HITS- IE6 PNGFix plugin.  Unfortunately, none of them really did the trick this [...]]]></description>
			<content:encoded><![CDATA[<p>Today I needed to fix up a few things on a <a href='http://www.chrismavricos.com'>new site</a> I&#8217;m publishing due mainly to the Internet Explorer 6 PNG transparency issue.  Previously I&#8217;ve had success with at least one of the fixes provided by <a href="http://www.homeitsolutions.ca/">Adam Erstelle&#8217;s</a> <a href="http://www.homeitsolutions.ca/websites/wordpress-plugins/ie6-png-fix">HITS- IE6 PNGFix</a> plugin.  Unfortunately, none of them really did the trick this time with the various ways in which I&#8217;d used PNGs on the page.  The site looked great in Firefox 3, Chrome, Safari, IE8, and IE7, but, oh wait, the infamous IE6 really screwed the pooch again.</p>
<p>I decided that I wanted to use CSS styles and specifically target the divs and PNGs that were giving me problems.  Of course, to do this without Internet Explorer hacks, this meant manually detecting IE6.</p>
<p>Now, I could do this either server side or client side.  I think client side may be more reliable (using jQuery), but server side (PHP) is more efficient &#8211; that is, by taking care of the problem server side we cut it out at the root.  My goal was to add a new class to the <code>body</code> tag depending on the browser and then target the HTML elements using that class only when the browser was IE6.</p>
<p>I found several solutions that came close, mostly based on Nathan Rice&#8217;s <a title="WordPress Browser Detection" href="http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/" target="_blank">browser detection</a> trick.  This was a great start for me.  Basically, you can plug this function into your theme&#8217;s <code>functions.php</code> file (I use the <a title="Thesis WordPress Theme" href="http://diythemes.com/?a_aid=cjm" target="_blank">Thesis</a> WordPress theme, so it&#8217;s actually <code>custom_functions.php</code> for Thesis users), and it will add a filter which adds new classes to your <code>body</code> tag based on the browser.  This is Nathan&#8217;s solution, which leverages WordPress&#8217;s global variables already in place:</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>
   add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'body_class'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'browser_body_class'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">function</span> browser_body_class<span style="color: #009900;">&#40;</span><span style="color: #000088;">$classes</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$is_lynx</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_gecko</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_IE</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_opera</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_NS4</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_safari</span><span style="color: #339933;">,</span> 
               <span style="color: #000088;">$is_chrome</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_iphone</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_lynx</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'lynx'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_gecko</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'gecko'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_opera</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'opera'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_NS4</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ns4'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_safari</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'safari'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_chrome</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'chrome'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_IE</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ie'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">else</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'unknown'</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_iphone</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'iphone'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Great!  Now I know what browser I&#8217;m dealing with.  But IE7 and IE8 work without any problems with my cross-browser compatible CSS, and I don&#8217;t want to mess with those &#8211; I want to specifically target IE6.  So after I determine that we&#8217;re dealing with IE, let&#8217;s check the version.</p>
<p>You may be able to use the php <a href="http://us2.php.net/get_browser">get_browser</a> function, but only if your server is properly configured (if it&#8217;s not, and you don&#8217;t have access to your own server configuration, you&#8217;re SOL).  That function basically parses everything out neatly for you, but we don&#8217;t need to get that complicated.  A less finicky way is just to rely on PHP&#8217;s <code>$_SERVER['HTTP_USER_AGENT']</code> variable.</p>
<p>Now, this thing is a beast.  This is what it looks like for IE6:</p>
<pre>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR
2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
</pre>
<p>Nasty.  But all we really care about is the &#8220;MSIE 6&#8243; string.  So let&#8217;s check for that.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//if the browser contains 'MSIE 6'...</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'MSIE 6'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>So I updated the original code in order to specifically give me a class for IE6 so I can catch that sucker.</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>
   <span style="color: #000000; font-weight: bold;">function</span> browser_body_class<span style="color: #009900;">&#40;</span><span style="color: #000088;">$classes</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$is_lynx</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_gecko</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_IE</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_opera</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_NS4</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_safari</span><span style="color: #339933;">,</span> 
               <span style="color: #000088;">$is_chrome</span><span style="color: #339933;">,</span> <span style="color: #000088;">$is_iphone</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_lynx</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'lynx'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_gecko</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'gecko'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_opera</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'opera'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_NS4</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ns4'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_safari</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'safari'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_chrome</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'chrome'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_IE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ie'</span><span style="color: #339933;">;</span>
         <span style="color: #666666; font-style: italic;">//if the browser is IE6</span>
         <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'MSIE 6'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ie6'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//add 'ie6' class to the body class array</span>
         <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">else</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'unknown'</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$is_iphone</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$classes</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'iphone'</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
   <span style="color: #666666; font-style: italic;">//this is for Thesis.  For basic WordPress use 'body_class' instead.</span>
   add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thesis_body_classes'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'browser_body_class'</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>Now, I could have just used my own code without all the WordPress variables, considering all I really care about is IE6, but this way I&#8217;ll have classes to detect other browsers if I need to in the future.  Note that for IE6 there will be two classes &#8211; &#8216;ie&#8217; and &#8216;ie6&#8242;.  The function needs to be set up as a filter for the body tag.  If you use Thesis like me, use &#8216;thesis_body_classes&#8217; as the hook for the add_filter function.  If you&#8217;re using basic WordPress use &#8216;body_class&#8217; as the hook, as Nathan describes in his original article (see <a href="http://www.nathanrice.net/blog/wordpress-2-8-and-the-body_class-function/">here</a> for a more in-depth explanation).</p>
<p>So now my body tag looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'custom portfolio ie ie6'</span>&gt;</span></pre></div></div>

<p>And I can write CSS styles like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.headline_area</span> h2<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#422506</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/wood_headline.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
body<span style="color: #6666ff;">.ie6</span> <span style="color: #6666ff;">.headline_area</span> h2<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/*Get rid of the PNG I was using as the bkg*/</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Sweet!  Now I can fix just the problems that IE6 was having without messing with my good, clean, valid CSS.  Awesome.  No IE Hacks needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/wordpress/wordpress-ie6-detection-and-targeted-css/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Third Eye Blind &#8211; About to Break Tab/Chords</title>
		<link>http://www.flickerfade.com/guitar-tabs/third-eye-blind-about-to-break-tabchords/</link>
		<comments>http://www.flickerfade.com/guitar-tabs/third-eye-blind-about-to-break-tabchords/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 22:47:55 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Guitar Tabs]]></category>
		<category><![CDATA[chords]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[song]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[tablature]]></category>
		<category><![CDATA[Third Eye Blind]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=139</guid>
		<description><![CDATA[I couldn&#8217;t find a version of this online anywhere, so I put this together.  It&#8217;s pretty simple.  Post corrections in the comments.  I also submitted it at Ultimate Guitar.
I believe this is tuned a half step down, but you can play it in standard tuning and it sounds fine.  Simple tune, [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find a version of this online anywhere, so I put this together.  It&#8217;s pretty simple.  Post corrections in the comments.  I also submitted it at <a href='http://www.ultimate-guitar.com/tabs/t/third_eye_blind/about_to_break_crd.htm'>Ultimate Guitar</a>.</p>
<p>I believe this is tuned a half step down, but you can play it in standard tuning and it sounds fine.  Simple tune, sounds good acoustic.  </p>
<pre>
Chords
G   320033
D   xx0232
Am  x02210
C   x32010
Em  022000

[Intro Verse] (quiet)
       G                    D         Am
I was walking along on the ocean,
          G               D           Am
I felt a fever burning up all I am,
          G                      D
'Cause if there's one thing that I can't stand,
      Am                  C        G
It's standing next to my fellow man.
        D         Am
Ah-ah-ah. Ah-ah-ah.
              Am      D
It's about to break.  Oh.

[Verse]
        G                    D                  Am
For the social worker at the needle exchange.
        G                      D                Am
For the self-medicated and the hard deranged.
        G               D                       Am
For the lesbians at the bakery,
        G              D                        Am
Saying, "Do you really hate me?"

              G       D Am
It's about to break.

[Chorus] (loud)
             G        D Am
Break like a fever.
              G       D Am
It's about to break.
             G        D Am
Break like a fever.

[Verse 2] (loud)
       Em                       D                 Am
People looking for themselves inside of mirrors.
    Em          D                                 Am
For not knowing why you're here.
    Em                        D                   Am
The public appearances on the verge of tears.
            Em                  D                 Am
When you're all played out from weed and beer.

[Bridge]
Am
Stand up let me get a look at you.
D
Can't we all take a wider view?
(x2)

[Verse 3] (starts quiet, grows)
        G                 D                 Am
For the evangelist with a stinger-missile,
G            D                              Am
Weapons hot, thinking this will,
         G                D                 Am
We won't make them follow orders,
    G               D                       Am
For Doctors Without Borders.
(Am)
About to break.
              D
It's about to break.

[Chorus] (loud)
(Break Like a fever.)
G               D                Am           C
When I see your face, I wanna be in the human race.
(Break like a fever)

G              D                  Am             C
You're beautiful it's true, I want to be beautiful like you.
(Break like a fever)

G               D                Am           C
When I see your face, I wanna be in the human race.
(Break like a fever)

G              D                  Am             C
You're beautiful it's true, I want to be beautiful like you.
(Break like a fever)

      G                       D               Am
For a teenage mother with the baby asleep,
(Break like a fever)

    G             D                           Am
For Africa, where life is cheap.

[End] (quiet)
    G                          D              Am
For losing faith in who you're going with,
G             D                               Am
America fades into myth.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/guitar-tabs/third-eye-blind-about-to-break-tabchords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your Computer is At Risk! &#8211; Love, McAfee (or the McAfee Sneak Attack)</title>
		<link>http://www.flickerfade.com/general-musings/tirades/your-computer-is-at-risk-love-mcafee-or-the-mcafee-sneak-attack/</link>
		<comments>http://www.flickerfade.com/general-musings/tirades/your-computer-is-at-risk-love-mcafee-or-the-mcafee-sneak-attack/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 23:37:04 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Tirades]]></category>
		<category><![CDATA[absurd]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[Avast]]></category>
		<category><![CDATA[McAfee]]></category>
		<category><![CDATA[ridiculous]]></category>
		<category><![CDATA[unethical]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=130</guid>
		<description><![CDATA[Today I received the following desktop alert from McAfee:

It reads:
McAfee Security Scan
Your computer is at risk [Fix Now] [Rescan]
Anti-Virus Protection: You have more than one anti-virus protection product installed.  This slows down your PC and makes it unreliable.  Uninstall your current anti-virus protection products and upgrade to McAfee complete protection right now.
Well, this is good [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received the following desktop alert from McAfee:</p>
<p><img class="aligncenter size-full wp-image-131" title="McAfee Alert" src="http://www.flickerfade.com/wp-content/uploads/2009/09/mcafee_alert.png" alt="McAfee Alert" width="518" height="340" /></p>
<p>It reads:</p>
<blockquote><p>McAfee Security Scan</p>
<p>Your computer is at risk [Fix Now] [Rescan]</p>
<p>Anti-Virus Protection: You have more than one anti-virus protection product installed.  This slows down your PC and makes it unreliable.  Uninstall your current anti-virus protection products and upgrade to McAfee complete protection right now.</p></blockquote>
<p>Well, this is good advice to begin with.  Yeah, you should only have one anti-virus running at a time.  I personally run <a title="avast! Home" href="http://www.avast.com">Avast!</a>, and I&#8217;ve found it to be excellent.  So it&#8217;s great that McAfee is detecting this issue and pointing this out to me&#8230; right?</p>
<p><a title="avast! Home" href="http://www.avast.com/eng/avast_4_home.html"><img src="http://www.avast.com/eng/images/home-logo.gif" border="0" alt="avast! Home" width="100" height="41" /></a></p>
<p>Wait a second&#8230; <strong>I never installed McAfee</strong>.  So how is it giving me warnings?  A quick look at my desktop reveals a new icon: McAfee Security Scan.  Go figure, I&#8217;ve never seen it before.  Checking into my programs, I see that this program was installed 3 days ago, on the 14th, so it&#8217;s not something that came with my year-old computer.</p>
<p>At first I thought this might be something loaded through Windows Automatic Updates (I hate those things), but my computer hasn&#8217;t updated in about a week.  I did, however, install a new FireFox version on the 14th.  When I upgraded, it also prompted me to update Adobe Flash.  My best guess is that McAfee was downloaded and installed with the Flash update.</p>
<p>Granted, I could have missed it (maybe it&#8217;s a default-checked box?), but I never actively or knowingly gave my consent to install this thing.  I don&#8217;t recall ever having the program announce itself (e.g. &#8220;Welcome to/Thanks for installing McAfee Security Scan!&#8221;) once it was loaded.  It just installed itself on my system and then started making suggestions that I disrupt the perfectly good software I&#8217;m running.  Hmmm&#8230; that sounds kind of like the spyware and malware that McAfee ostensibly protects us from.  Maybe McAfee could use an irony-scanner.</p>
<p>Regardless, I understand that McAfee is not malware, and, while they may have used some sneaky subterfuge to install their product on my machine, I know it&#8217;s not actually harming me.  I do, however, strongly disagree with their methods, and I&#8217;ll never use their product again after they pull this kind of crap (not that I was likely to anyway).</p>
<p>The real danger here, and the thing that really pisses me off, is their exploitation of users in general.  The fact that this message exists indicates that McAfee is targeting users who currently opt to use another virus protection program.  This tells me that they have specifically targeted Avast!, their free competition (among how many other anti-virals, who knows).  For those who don&#8217;t know any better, they see an official-looking message and proceed to uninstall their perfectly good (and in Avast!&#8217;s case, free and superior) anti-virus software, and install McAfee&#8217;s POS expensive &#8220;complete protection.&#8221;</p>
<p>So, McAfee installs itself without the user&#8217;s knowledge, then detects other anti-virus programs, alerts the user that the <em>other </em>program is causing problems, and prompts them to remove it and pay for their service instead.  They exploit their brand reputation (which, among the less-well-informed, still carries some weight) and the fear of less-than-savvy computer users over the risk of viruses with a big red &#8220;AT RISK&#8221; notification in order to promote their product and regain a little of their quickly evaporating market.  Classy, McAfee.  Ethical and classy as hell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/general-musings/tirades/your-computer-is-at-risk-love-mcafee-or-the-mcafee-sneak-attack/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thesis Navigation Menu Parent/Ancestor Highlighting</title>
		<link>http://www.flickerfade.com/how-to/thesis-navigation-menu-parentancestor-highlighting/</link>
		<comments>http://www.flickerfade.com/how-to/thesis-navigation-menu-parentancestor-highlighting/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 22:21:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ancestor]]></category>
		<category><![CDATA[highlighting]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[navigation menu]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Thesis]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=115</guid>
		<description><![CDATA[I&#8217;ve been using the Thesis WordPress Theme for a while now (no, not on this site yet), and I think it&#8217;s great.  I&#8217;ll probably write a full review of it eventually.
One annoyance that I&#8217;ve had is that Thesis doesn&#8217;t fully support highlighting parent/ancestor links in the navigation menu when a child page is selected. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the <a href="http://diythemes.com/?a_aid=cjm">Thesis</a> WordPress Theme for a while now (no, not on this site yet), and I think it&#8217;s great.  I&#8217;ll probably write a full review of it eventually.</p>
<p>One annoyance that I&#8217;ve had is that Thesis doesn&#8217;t fully support highlighting parent/ancestor links in the navigation menu when a child page is selected.  For example, consider the following site structure:</p>
<ul>
<li>Home</li>
<li>Sports
<ul>
<li>Baseball</li>
<li>Basketball</li>
<li>Soccer</li>
</ul>
</li>
<li>Fruit
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Guava</li>
</ul>
</li>
</ul>
<p>Under normal use, when you click on the &#8220;Sports&#8221; link, you expect &#8220;Sports&#8221; to end up highlighted (or marked in some fashion) in order to indicate the user&#8217;s current position in the site.  In CSS terms, this link is given the class &#8220;current_page_item&#8221;.</p>
<div>When we click on &#8220;Basketball,&#8221; we still expect &#8220;Sports&#8221; to be highlighted, because &#8220;Basketball&#8221; is a subpage of the &#8220;Sports&#8221; menu.  However, <a href="http://diythemes.com/?a_aid=cjm">Thesis</a> does not do this by default.  Instead, we end up with none of the menu items highlighted.  The customary way for this to be done in WordPress, by the way, is by using the &#8220;current_page_ancestor&#8221; or &#8220;current_page_parent&#8221; CSS class.</p>
<p>By the way, Thesis supposedly supports this functionality if you select &#8216;Use old Thesis nav style&#8217; under Thesis Options &gt; Navigation Menu.  But then you lose the ability to reorder the pages and rename them using the slick Thesis interface.  That&#8217;s no fun.  I like that ability (hell, it&#8217;s part of what I paid for), so I&#8217;m going to find another way.</p>
<p>I hunted down where Thesis builds the navigation menu, in lib/functions/nav_menu.php.  The function thesis_nav_menu() is responsible for building the list and assigning CSS classes.   Thesis loops through each link in the menu and prints them with their classes, which are determined by the following gem:</p>
<p><code>$class = (is_page($id) ||<br />
($wp_query-&amp;gt;is_posts_page &amp;amp;&amp;amp; get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_for_posts') == $id) ||<br />
(get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_on_front') == $id))<br />
? $page_item . ' current_page_item' : $page_item;</code></p>
<p>Basically, we just need to add an extra case &#8211; that case being when the displayed page is a child of the menu link currently being built (that line above is executed for each item in the navigation menu).  The simplest way I found of doing this is to check:</p>
<p><code>$post-&amp;gt;post_parent == $id;</code></p>
<p>Which would result in the following change in the code:</p>
<p><code>$class = (is_page($id) ||<br />
($wp_query-&amp;gt;is_posts_page &amp;amp;&amp;amp; get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_for_posts') == $id) ||<br />
(get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_on_front') == $id)) ||<br />
<strong> ($post-&amp;gt;post_parent == $id)</strong><br />
? $page_item . ' current_page_item' : $page_item;</code></p>
<p>Also, if you are having problems with both the &#8216;home&#8217; link and a secondary page being highlighted as current at the same time, remove the third condition, i.e.:</p>
<p><code>$class = (is_page($id) ||<br />
($wp_query-&amp;gt;is_posts_page &amp;amp;&amp;amp; get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_for_posts') == $id) ||<br />
<del datetime="2009-09-3T22:13:06+00:00">(get_option('show_on_front') == 'page' &amp;amp;&amp;amp; get_option('page_on_front') == $id) ||</del><br />
<strong> ($post-&amp;gt;post_parent == $id)</strong>)<br />
? $page_item . ' current_page_item' : $page_item;</code></p>
<p>Some caveats: First off, I only had two levels of pages (i.e. &#8220;Sports&#8221; and &#8220;Basketball&#8221;), so it&#8217;s easy to just check the parent.  If you have more than 2 levels, you need to deal with ancestors (rather than parents), and you&#8217;ll likely need something more complicated &#8211; either a different WordPress function, if one already exists, or else some fun recursive stuff you can write on your own.  Second, for my purposes, I was happy to simply set the class for the related menu item to &#8216;current_page_item&#8217; and be on my way.  If you want different styles for your menu links depending on whether you&#8217;re on the exact page or a child page, you can break the suggested code out into a separate conditional and add the class &#8220;current_page_parent&#8221; or &#8220;current_page_ancestor&#8221;.</p>
<p>Moreover, this edit shouldn&#8217;t be done in the Thesis code (never change the Thesis code!) itself.  If you do, you&#8217;re just asking for it next time there&#8217;s an upgrade.  Instead, we&#8217;ll add some code to /custom/custom_functions.php using hooks.</p>
<ol>
<li>Copy the function thesis_nav_menu() from nav_menu.php into custom_functions.php.</li>
<li>Rename the function to cust_thesis_nav_menu() (or whatever you like).</li>
<li>Make the edits to the function as described above</li>
<li>Replace the Thesis default function with your shiny new custom function.  i.e. Add the following lines of code:<br />
<code>remove_action('thesis_hook_before_header', 'thesis_nav_menu');<br />
add_action('thesis_hook_after_header', 'cust_thesis_nav_menu');</code></li>
<li>Don&#8217;t forget to make sure you&#8217;ve defined classes in your custom.css file for whatever classes you use above.</li>
</ol>
<p>That should do it!  Now when you select &#8220;Basketball&#8221; everyone will be damn sure it&#8217;s a sport and not a fruit.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/how-to/thesis-navigation-menu-parentancestor-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Lazy Roommate</title>
		<link>http://www.flickerfade.com/photography/my-lazy-roommate/</link>
		<comments>http://www.flickerfade.com/photography/my-lazy-roommate/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 05:56:25 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.flickerfade.com/?p=127</guid>
		<description><![CDATA[
Single exposure.  White balance corrected using UFRaw.
My roommate&#8217;s cat had a lazy morning (as usual).  I captured her making herself comfortable in a sunny spot on a rug in our apartment.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/36371079@N08/3862420614/" title="Lazy Morning by cmav, on Flickr"><img src="http://farm3.static.flickr.com/2616/3862420614_988964f138.jpg" width="500" height="333" alt="Lazy Morning" /></a></p>
<p>Single exposure.  White balance corrected using UFRaw.</p>
<p>My roommate&#8217;s cat had a lazy morning (as usual).  I captured her making herself comfortable in a sunny spot on a rug in our apartment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flickerfade.com/photography/my-lazy-roommate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
