<?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>Tony Thomas</title>
	<atom:link href="http://anthonygthomas.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonygthomas.com</link>
	<description>Father to two, husband to one, web developer and musician.</description>
	<lastBuildDate>Mon, 24 May 2010 21:31:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>An Unexpected Problem with CakePHP and Email Elements</title>
		<link>http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/</link>
		<comments>http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/#comments</comments>
		<pubDate>Mon, 24 May 2010 21:27:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[email elements]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=434</guid>
		<description><![CDATA[For several months now I&#8217;ve been triggering functions in my CakePHP controllers using crontabs. It&#8217;s especially handy for summarizing data and sending out reports via email. I&#8217;m about to change jobs and I&#8217;m trying to set up as many systems as I can to help staff manage our data after I leave. Part of that [...]]]></description>
			<content:encoded><![CDATA[<p>For several months now I&#8217;ve been triggering functions in my <a title="CakePHP" href="http://cakephp.org" target="_blank" onclick="pageTracker._trackPageview('/outgoing/cakephp.org?referer=');">CakePHP</a> controllers <a href="http://www.lost-in-code.com/programming/php-code/cakephp-crontab/" onclick="pageTracker._trackPageview('/outgoing/www.lost-in-code.com/programming/php-code/cakephp-crontab/?referer=');">using crontabs</a>. It&#8217;s especially handy for summarizing data and sending out reports via email. I&#8217;m about to change jobs and I&#8217;m trying to set up as many systems as I can to help staff manage our data after I leave. Part of that means writing a few more crons to send out more emails. Today while trying to do just that, I ran into something unexpected that held me up for an hour or so until I had an epiphany on my way home. For the purposes of this post, I&#8217;m assuming you&#8217;ve already set up a cron dispatcher and know how to trigger cron jobs.</p>
<p>For one more week I&#8217;m working in a research clinic. One of the things we need to keep track of is who is late in getting us a sample. We need to check for blood and throat samples (which come from swishing some saline around in the mouth). This can be done by hand, but soon the study will grow and the number of participants will make that hard to manage. So I just want to check to see who is late and send out an email to staff to let them know.</p>
<p>This function exists in my Patient controller:<span id="more-434"></span></p>
<pre class="brush: php; highlight: [50,51,52,53];">
function cron_delinquency() {

	if (!defined('CRON_DISPATCHER')) // make sure the request comes through the cron dispatcher
	{
		$this-&gt;redirect('/'); exit('Invalid Request');
	}
	/* this looks up active patients who do not have an patient_id ending in &quot;D&quot;. &quot;D&quot; indicates they are a donor and we only need one specimen from them. */
	$active = $this-&gt;Patient-&gt;find('list', array(
		'conditions' =&gt; array(
			'Patient.id LIKE \'T%\' AND Patient.id NOT LIKE \'%D\'',
			'Patient.withdrawn != \'y\'',
			'Patient.active=&quot;1&quot;'),
		));
	$in = '\''; /* the patient_id's start with a &quot;T&quot; meaning all the patient_id's need to be enclosed in quotes */

	$in .= implode('\', \'', $active); // implode the list of patient_id's

	$in = $in . '\''; // end it all with a quote

	$blds = $this-&gt;Patient-&gt;Specimen-&gt;find('list', array( // find the blood specimens for this group of patients
		'conditions' =&gt; array(
			'Specimen.patient_id IN (' . $in .')',
			'Specimen.type' =&gt; array('BLD')
			),
		'fields' =&gt; array('patient_id', 'draw_date'),
		'order' =&gt; array('patient_id' =&gt; 'ASC', 'draw_date' =&gt; 'ASC')

		));

	$thrs = $this-&gt;Patient-&gt;Specimen-&gt;find('list', array( // find the throat samples for this group of patients
		'conditions' =&gt; array(
			'Specimen.patient_id IN (' . $in .')',
			'Specimen.type' =&gt; array('THR')
			),
		'fields' =&gt; array('patient_id', 'draw_date'),
		'order' =&gt; array('patient_id' =&gt; 'ASC', 'draw_date' =&gt; 'ASC')

		));

/* My Patient model has a function to filter arrays and return only those that are older than the proved Unix timestamp. */
	$delinquentBlood = $this-&gt;Patient-&gt;find_delinquent($blds, 2419200); // 2419200 = 4 weeks; 3628800 = 6 weeks
	$delinquentThroat = $this-&gt;Patient-&gt;find_delinquent($thrs, 3628800);

	if(count($delinquentBlood) &gt; 0 || count($delinquentThroat) &gt; 0) // if we find any who are delinquent
	{

		asort($delinquentBlood); // sort them
		asort($delinquentThroat);

		$data['delinquentBlood'] = $delinquentBlood;
		$data['delinquentThroat'] = $delinquentThroat;
		$data['bloodCounter'] = count($delinquentBlood);
		$data['throatCounter'] = count($delinquentThroat);

		$this-&gt;set('data', $data);

		$this-&gt;Email-&gt;to 	  = $to;
		$this-&gt;Email-&gt;from		= 'LCIS &lt;xxxxxxx@umn.edu&gt;';
		$this-&gt;Email-&gt;subject	= 'PPG Delinquency Report: ' . $bloodCounter .&quot; Subjects With Blood Specimens Due; &quot; . $throatCounter . &quot; With Throat Specimens Due.&quot;;
		$this-&gt;Email-&gt;sendAs	= 'html';
		$this-&gt;Email-&gt;template	= 'viptm_delinquency';
		$this-&gt;Email-&gt;send();
	}
}
</pre>
<p>It&#8217;s that highlighted bit that was really giving me trouble. Previously I had been setting those variables like so:</p>
<pre class="brush: php;">$this-&gt;set(compact('delinquentBlood', 'delinquentThroat', 'bloodCounter', 'throatCounter'));</pre>
<p>Ordinarily this would work with any other view, but the email element I have set up for this function was acting as if they variables weren&#8217;t set at all. <em>It wasn&#8217;t until I put them in an array called <code>$data</code>, that I could use them in my email element</em>. It was puzzling and it took me about an hour to figure that out, but once I did my email reports came with beautiful data.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/" rel="bookmark" title="May 24, 2010">An Unexpected Problem with CakePHP and Email Elements</a></li>
<li><a href="http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/" rel="bookmark" title="February 18, 2010">CakePHP: Containable Behavior is Your Friend</a></li>
<li><a href="http://anthonygthomas.com/2009/05/22/roll-your-own-cakephp-components/" rel="bookmark" title="May 22, 2009">Roll Your Own CakePHP Components</a></li>
<li><a href="http://anthonygthomas.com/2008/12/10/use-functions-from-other-controllers-while-maintaining-mvc-architecture-in-cakephp/" rel="bookmark" title="December 10, 2008">Use Functions from Other Controllers While Maintaining MVC Architecture in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2010/03/20/no-flash-required/" rel="bookmark" title="March 20, 2010">No Flash Required</a></li>
</ul>
<p><!-- Similar Posts took 9.142 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baseline WordPress Theme Version 1.0.2</title>
		<link>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/</link>
		<comments>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 17:34:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Baseline Theme]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[baseline theme]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=430</guid>
		<description><![CDATA[I&#8217;ve uploaded a new version of the Baseline theme for WordPress development. The only change this time around is that I&#8217;m using wp_enqueue_script() to include WordPress&#8217; existing copy of JQuery. (Hat tip to Chris Coyier.) This seems like a significant enough change to merit a small version bump. I used the Baseline theme as a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded a new version of the <a href="http://baseline.truetoneenterprises.com/" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com/?referer=');">Baseline theme for WordPress development</a>. The only change this time around is that I&#8217;m using <code><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" onclick="pageTracker._trackPageview('/outgoing/codex.wordpress.org/Function_Reference/wp_enqueue_script?referer=');">wp_enqueue_script()</a></code> to include WordPress&#8217; existing copy of JQuery. (<a href="http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/" onclick="pageTracker._trackPageview('/outgoing/digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/?referer=');">Hat tip to Chris Coyier</a>.) This seems like a significant enough change to merit a small version bump.</p>
<p>I used the Baseline theme as a launching pad for this website. At least for me, it serves as a good starting point when you begin developing a brand new theme.</p>
<p>If you find this useful, you might be interested in checking out <a href="http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/" onclick="pageTracker._trackPageview('/outgoing/digwp.com/2010/03/wordpress-functions-php-template-custom-functions/?referer=');">Jeff Star’s functions.php template</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/" rel="bookmark" title="March 22, 2010">Baseline WordPress Theme Version 1.0.2</a></li>
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/04/14/access-to-free-music-and-emotional-connections/" rel="bookmark" title="April 14, 2008">Access to Free Music and Emotional Connections</a></li>
<li><a href="http://anthonygthomas.com/2008/04/16/apml/" rel="bookmark" title="April 16, 2008">APML</a></li>
</ul>
<p><!-- Similar Posts took 8.369 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Flash Required</title>
		<link>http://anthonygthomas.com/2010/03/20/no-flash-required/</link>
		<comments>http://anthonygthomas.com/2010/03/20/no-flash-required/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 17:30:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web develop]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=421</guid>
		<description><![CDATA[I just added a pretty sweet bit of eye candy to my nav menu using strictly CSS &#38; JQuery. The method is here. The code is here. You do need to have a either a webKit or Mozilla browser for it to work properly. The point is that there are fewer and fewer things that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-422" title="Navigation" src="http://anthonygthomas.com/wp-content/uploads/2010/03/nav.jpg" alt="JPEF of the nav menu from anthonygthomas.com" width="284" height="95" />I just added a pretty sweet bit of eye candy to my nav menu using strictly CSS &amp; JQuery. <a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/" onclick="pageTracker._trackPageview('/outgoing/net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/?referer=');">The method is here</a>. <a href="http://github.com/JeffreyWay/SpasticNav" onclick="pageTracker._trackPageview('/outgoing/github.com/JeffreyWay/SpasticNav?referer=');">The code is here</a>.</p>
<p>You do need to have a either a webKit or Mozilla browser for it to work properly. The point is that there are fewer and fewer things that Flash can do that can&#8217;t be done with HTML, JavaScript and CSS. In fact, just about every single bit of animation I&#8217;ve had done in Flash over the last couple of years could be recreated with JQuery &amp; CSS3.</p>
<h3>UPDATE</h3>
<p>Since I couldn&#8217;t get the z-index to function properly in Internet Explorer, I used <a href="http://api.jquery.com/jQuery.browser/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/jQuery.browser/?referer=');">JQuery&#8217;s .browser property</a> so the function only runs in supported browsers&#8211;namely, Mozilla or WebKit. The function actually degraded fairly well, except for Internet Explorer&#8217;s buggy handling of z-index. For reference, I&#8217;ve included my version of the plug-in because it has this and other subtle variations.<span id="more-421"></span></p>
<pre class="brush: jscript;">(function($) { 
	if ($.browser.webkit || $.browser.mozilla) {

		$.fn.spasticNav = function(options) {

			options = $.extend({
				overlap : 2,
				speed : 500,
				reset : 1500,
				color : '#BDD2FF',
				easing : 'easeOutExpo'
			}, options);

			return this.each(function() {

			 	var nav = $(this),
			 		currentPageItem = $('.current_page_item', nav),
			 		blob,
			 		reset;

			 	$('&lt;li id=&quot;blob&quot;&gt;&lt;/li&gt;').css({
			 		width : currentPageItem.outerWidth(),
			 		height : currentPageItem.outerHeight() + options.overlap,
			 		left : currentPageItem.position().left,
			 		top : currentPageItem.position().top - options.overlap / 2,
			 		backgroundColor : options.color
			 	}).appendTo(this);

				$('.current_page_item a').css('z-index', 1000);

			 	blob = $('#blob', nav);

				$('li:not(#blob)', nav).hover(function() {
					// mouse over
					clearTimeout(reset);
					blob.animate(
						{
							left : $(this).position().left,
							width : $(this).width()
						},
						{
							duration : options.speed,
							easing : options.easing,
							queue : false
						}
					);
				}, function() {
					// mouse out
					reset = setTimeout(function() {
						blob.animate({
							width : currentPageItem.outerWidth(),
							left : currentPageItem.position().left
						}, options.speed)
					}, options.reset);

				});

			}); // end each

		};

	}

})(jQuery);</pre>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/20/no-flash-required/" rel="bookmark" title="March 20, 2010">No Flash Required</a></li>
<li><a href="http://anthonygthomas.com/2009/11/09/blueprint-taking-a-close-look-at-grid-css/" rel="bookmark" title="November 9, 2009">Blueprint: Taking a Close Look at grid.css</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/" rel="bookmark" title="March 14, 2010">Display Form Fields Based on Selection Using JQuery</a></li>
<li><a href="http://anthonygthomas.com/2008/12/16/when-using-a-grid-layout-css-framework-do-the-math/" rel="bookmark" title="December 16, 2008">When Using a Grid Layout CSS Framework, Do the Math</a></li>
</ul>
<p><!-- Similar Posts took 6.313 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/20/no-flash-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Form Fields Based on Selection Using JQuery</title>
		<link>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/</link>
		<comments>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 02:59:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[html forms jquery]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=395</guid>
		<description><![CDATA[This is a simple method of showing and hiding form elements based on the user&#8217;s selection. It&#8217;s based on this article with a couple of very minor changes. (Dare I say, improvements?) I&#8217;m going to assume you&#8217;ve already included the JQuery library so I won&#8217;t cover that here. I want to go straight to the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple method of showing and hiding form elements based on the user&#8217;s selection. <a href="http://minneapolis.craigslist.org/ram/tag/1642880912.html" onclick="pageTracker._trackPageview('/outgoing/minneapolis.craigslist.org/ram/tag/1642880912.html?referer=');">It&#8217;s based on this article</a> with a couple of very minor changes. (Dare I say, improvements?) I&#8217;m going to assume you&#8217;ve already included the JQuery library so I won&#8217;t cover that here. I want to go straight to the code. (<a href="http://anthonygthomas.com/examples/jquery-display-forms.html">View the example page here</a>.)<span id="more-395"></span></p>
<p>First, the form:</p>
<pre class="brush: xml;">&lt;form id=&quot;ExampleForm&quot; method=&quot;post&quot; action=&quot;#&quot;&gt;
	&lt;fieldset&gt;
		&lt;legend&gt;Questionnaire&lt;/legend&gt;
		&lt;div class=&quot;input select&quot;&gt;
			&lt;label for=&quot;select1&quot;&gt;Choose 1 to make the next select list appear.&lt;/label&gt;
			&lt;select name=&quot;select1&quot; id=&quot;select1&quot;&gt;
				&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
				&lt;option value=&quot;0&quot;&gt;0&lt;/option&gt;
				&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
				&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
				&lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
				&lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;
				&lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;
				&lt;option value=&quot;6&quot;&gt;6&lt;/option&gt;
				&lt;option value=&quot;7&quot;&gt;7&lt;/option&gt;
			&lt;/select&gt;
		&lt;/div&gt;
		&lt;div class=&quot;hide&quot; id=&quot;hide1&quot;&gt;&lt;!-- this select box will be hidden at first --&gt;
			&lt;div class=&quot;input select&quot;&gt;
				&lt;label for=&quot;select2&quot;&gt;Select &quot;Yes&quot; to make the next option appear.&lt;/label&gt;
				&lt;select name=&quot;select2&quot; id=&quot;select2&quot;&gt;
					&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
					&lt;option value=&quot;1&quot;&gt;Yes&lt;/option&gt;
					&lt;option value=&quot;0&quot;&gt;No&lt;/option&gt;
					&lt;option value=&quot;3&quot;&gt;Don&amp;#039;t Know&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class=&quot;hide&quot; id=&quot;hide2&quot;&gt; &lt;!-- this one will also be hidden at first. --&gt;
			&lt;div class=&quot;input select&quot;&gt;
				&lt;label for=&quot;select3&quot;&gt;This is the last question.&lt;/label&gt;
				&lt;select name=&quot;select3&quot; id=&quot;select3&quot;&gt;
					&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
					&lt;option value=&quot;0&quot;&gt;0&lt;/option&gt;
					&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
					&lt;option value=&quot;2&quot;&gt;2 to 5&lt;/option&gt;
					&lt;option value=&quot;3&quot;&gt;6 to 10&lt;/option&gt;
					&lt;option value=&quot;4&quot;&gt;&amp;gt;10&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/fieldset&gt;
	&lt;div class=&quot;submit&quot;&gt;
		&lt;input type=&quot;submit&quot; value=&quot;Save Answers&quot; /&gt;
	&lt;/div&gt;
&lt;/form&gt;</pre>
<p>Now make sure your &#8220;hide&#8221; css class is hidden:</p>
<pre class="brush: css;">.hide
{

	display:none;

}</pre>
<p>Now with the wonderful elegance of JQuery, we&#8217;ll tell the browser to display the hidden divs based on the user&#8217;s selection:</p>
<pre class="brush: jscript;">$(document).ready(function(){
	$(&quot;#select1&quot;).change(function(){

		if ($(this).val() == &quot;1&quot; ) {

			$(&quot;#hide1&quot;).slideDown(&quot;fast&quot;); //Slide Down Effect

		} else {

			$(&quot;#hide1&quot;).slideUp(&quot;fast&quot;);	//Slide Up Effect

		}
	});

	$(&quot;#select2&quot;).change(function(){

		if ($(this).val() == &quot;1&quot; ) {

			$(&quot;#hide2&quot;).slideDown(&quot;fast&quot;); //Slide Down Effect

		} else {

			$(&quot;#hide2&quot;).slideUp(&quot;fast&quot;);	//Slide Up Effect

		}
	});
});</pre>
<p>Let&#8217;s look at what&#8217;s happening here. First, we have a form with select boxes with ids &#8220;select1&#8243;, &#8220;select2&#8243; and &#8220;select3&#8243;. The last two are hidden by enclosing them in a div with our &#8220;hide&#8221; class. (Incidentally, Blueprint provides a &#8220;hide&#8221; class for you if you use that framework.)</p>
<p>Next we tell JQuery that as soon as &#8220;select1&#8243; is changed, we need to evaluate the new value. In this case, if the new value is &#8220;1&#8243;, we want to display the div with the id &#8220;hide1&#8243; <a href="http://api.jquery.com/slideDown/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideDown/?referer=');">using JQuery&#8217;s slideDown effect</a>. We do this with <a href="http://api.jquery.com/change/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/change/?referer=');">JQuery&#8217;s change event</a>.</p>
<pre class="brush: jscript;">$(&quot;#select1&quot;).change(function(){ // when #select1 changes

		if ($(this).val() == &quot;1&quot; ) { // see if the new value is &quot;1&quot;

			$(&quot;.hide1&quot;).slideDown(&quot;fast&quot;); // if it is &quot;1&quot;, display the .hide1 div with the slideDown effect

		} else {

			$(&quot;.hide1&quot;).slideUp(&quot;fast&quot;);	//otherwise, hide it with the slideUp effect

		}
	});</pre>
<p>Once &#8220;select2&#8243; is displayed, we can evaluate it to see if we need to display &#8220;select3&#8243; which is in a div with a &#8220;hide&#8221; class and &#8220;hide2&#8243; id.</p>
<pre class="brush: jscript;">$(&quot;#select2&quot;).change(function(){ // once select2 is changed

		if ($(this).val() == &quot;1&quot; ) { // see if the new value is &quot;1&quot;

			$(&quot;.hide2&quot;).slideDown(&quot;fast&quot;); // if it is, display the hide2 div using slideDown

		} else {

			$(&quot;.hide2&quot;).slideUp(&quot;fast&quot;);	// otherwise hide it using slideUp

		}
	});</pre>
<p>Remarkably simple really. <a href="http://anthonygthomas.com/examples/jquery-display-forms.html">Review the working example and code here</a>.</p>
<p><strong>Update (March 15, 2010)</strong></p>
<p>You also could show/hide a single form element by id rather than enclose them in a div. I enclosed them in a div 1.) so I could hide the label and 2.) because in my application where I use this solution, I&#8217;m actually hiding a whole group of fields.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://api.jquery.com/change/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/change/?referer=');">JQuery change() Event</a></li>
<li><a href="http://api.jquery.com/val/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/val/?referer=');">JQuery val()</a></li>
<li><a href="http://api.jquery.com/slideDown/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideDown/?referer=');">JQuery slideDown Effect</a></li>
<li><a href="http://api.jquery.com/slideUp/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideUp/?referer=');">JQuery slideUp Effect</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/" rel="bookmark" title="March 14, 2010">Display Form Fields Based on Selection Using JQuery</a></li>
<li><a href="http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/" rel="bookmark" title="February 14, 2010">Why Use Blueprint and the 960 Grid System in the Baseline Theme?</a></li>
<li><a href="http://anthonygthomas.com/2009/07/22/simple-security-in-cakephp/" rel="bookmark" title="July 22, 2009">Simple Security in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2010/03/20/no-flash-required/" rel="bookmark" title="March 20, 2010">No Flash Required</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-tutorial-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Tutorial File</a></li>
</ul>
<p><!-- Similar Posts took 7.848 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP: Containable Behavior is Your Friend</title>
		<link>http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/</link>
		<comments>http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 16:21:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[containable behavior]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[behaviors]]></category>
		<category><![CDATA[containable]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=369</guid>
		<description><![CDATA[When it comes to optimizing your CakePHP queries, you need to abandon Recursive and adopt Containable. In the example below I have the following models: Patient Specimen Result ResultType The associations in the model are: Result belongsTo ResultType hasMany Result Patient hasMany Result Specimen Specimen belongsTo Patient hasMany Result $paginate in the Result Controller Original [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to optimizing your CakePHP queries, you need to abandon Recursive and adopt Containable.</p>
<p>In the example below I have the following models:</p>
<ul>
<li>Patient</li>
<li>Specimen</li>
<li>Result</li>
<li>ResultType</li>
</ul>
<p>The associations in the model are:</p>
<ul>
<li>Result
<ul>
<li>belongsTo
<ul>
<li>ResultType
<ul>
<li>hasMany
<ul>
<li>Result</li>
</ul>
</li>
</ul>
</li>
<li>Patient
<ul>
<li>hasMany
<ul>
<li>Result</li>
<li>Specimen</li>
</ul>
</li>
</ul>
</li>
<li>Specimen
<ul>
<li>belongsTo
<ul>
<li>Patient</li>
</ul>
</li>
<li>hasMany
<ul>
<li>Result</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><span id="more-369"></span></p>
<h3>$paginate in the Result Controller</h3>
<h4>Original version</h4>
<pre class="brush: php; highlight: [12];">var $paginate = array(
		'fields' =&gt; array(
			'ResultType.type',
			'Specimen.draw_date',
			'Result.id',
			'Result.patient_id',
			'Result.specimen_id',
			'Result.result',
			'Result.created',
			'Result.modified'
			),
		'recursive' =&gt; 0,
		'limit' =&gt; 50);</pre>
<h4>The Same Thing Using Containable</h4>
<pre class="brush: php; highlight: [11,12,13,14,15,16,17,18,19,20,21,22,23];">var $paginate = array(
		'fields' =&gt; array(
			'id',
			'patient_id',
			'specimen_id',
			'result',
			'created',
			'modified'
			),
		'limit' =&gt; 50,
		'contain' =&gt; array(
			'ResultType' =&gt; array(
				'fields' =&gt; array(
					'ResultType.type',
					'ResultType.id'
					)
				),
			'Specimen' =&gt; array(
				'fields' =&gt; array(
					'Specimen.id',
					'Specimen.draw_date'
					)
				)
			)
		);</pre>
<h3>The SQL</h3>
<h4>SQL Generated from the Original $paginate var</h4>
<pre class="brush: sql; highlight: [7,8,19,20];">SELECT COUNT(*) AS `count`
FROM `results` AS `Result`
LEFT JOIN `result_types` AS `ResultType`
ON (`Result`.`result_type_id` = `ResultType`.`id`)
LEFT JOIN `specimens` AS `Specimen`
ON (`Result`.`specimen_id` = `Specimen`.`id`)
LEFT JOIN `patients` AS `Patient`
ON (`Result`.`patient_id` = `Patient`.`id`)
WHERE 1 = 1

/* 1879 milliseconds */

SELECT `ResultType`.`type`, `Specimen`.`draw_date`, `Result`.`id`, `Result`.`patient_id`, `Result`.`specimen_id`, `Result`.`result`, `Result`.`created`, `Result`.`modified`
FROM `results` AS `Result`
LEFT JOIN `result_types` AS `ResultType`
ON (`Result`.`result_type_id` = `ResultType`.`id`)
LEFT JOIN `specimens` AS `Specimen`
ON (`Result`.`specimen_id` = `Specimen`.`id`)
LEFT JOIN `patients` AS `Patient`
ON (`Result`.`patient_id` = `Patient`.`id`)
WHERE 1 = 1
ORDER BY `Result`.`created` desc
LIMIT 50

/* 2106 milliseconds */</pre>
<h4>SQL Generated Using Containable Behavior</h4>
<pre class="brush: sql;">SELECT COUNT(*) AS `count`
FROM `results` AS `Result`
LEFT JOIN `result_types` AS `ResultType`
ON (`Result`.`result_type_id` = `ResultType`.`id`)
LEFT JOIN `specimens` AS `Specimen`
ON (`Result`.`specimen_id` = `Specimen`.`id`)
WHERE 1 = 1

/* 10 milliseconds */

SELECT `Result`.`id`, `Result`.`patient_id`, `Result`.`specimen_id`, `Result`.`result`, `Result`.`created`, `Result`.`modified`, `ResultType`.`type`, `ResultType`.`id`, `Specimen`.`id`, `Specimen`.`draw_date`
FROM `results` AS `Result`
LEFT JOIN `result_types` AS `ResultType`
ON (`Result`.`result_type_id` = `ResultType`.`id`)
LEFT JOIN `specimens` AS `Specimen`
ON (`Result`.`specimen_id` = `Specimen`.`id`)
WHERE 1 = 1
ORDER BY `Result`.`created` desc
LIMIT 50

/* 19 milliseconds */</pre>
<h3>The Difference</h3>
<p>The first set of queries took nearly 4 seconds. The second: 29 milliseconds. Containable just gives you so much more control over what&#8217;s selected in your query. Using <code>recursive =&gt; 0</code> still joined the patients table both times because it was associated in the model&#8211;even though in this case we didn&#8217;t need it. Using the Containable Behavior in the second example removed the patients table from the queries altogether.</p>
<p>This is one of the key pitfalls of using a framework like CakePHP; You can get things running quickly, but you have to go back and optimize. Otherwise you can build a heavy load on the server.</p>
<h3>Resources</h3>
<ul>
<li><a title="CakePHP Framework" href="http://cakephp.org" onclick="pageTracker._trackPageview('/outgoing/cakephp.org?referer=');">CakePHP</a></li>
<li><a href="http://book.cakephp.org/view/474/Containable" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/474/Containable?referer=');">The Containable Behavior</a></li>
<li><a title="The Recursive Model Attribute" href="http://book.cakephp.org/view/439/recursive" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/439/recursive?referer=');">The Recursive Model Attribute</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/" rel="bookmark" title="February 18, 2010">CakePHP: Containable Behavior is Your Friend</a></li>
<li><a href="http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/" rel="bookmark" title="May 24, 2010">An Unexpected Problem with CakePHP and Email Elements</a></li>
<li><a href="http://anthonygthomas.com/2008/12/10/use-functions-from-other-controllers-while-maintaining-mvc-architecture-in-cakephp/" rel="bookmark" title="December 10, 2008">Use Functions from Other Controllers While Maintaining MVC Architecture in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2009/05/22/roll-your-own-cakephp-components/" rel="bookmark" title="May 22, 2009">Roll Your Own CakePHP Components</a></li>
</ul>
<p><!-- Similar Posts took 9.325 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baseline Theme Version 1.0.1</title>
		<link>http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/</link>
		<comments>http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:19:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[baseline theme]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=360</guid>
		<description><![CDATA[There is a new version of the Baseline Theme. In the last few days of tinkering with it and modifying it for use with this website, I noticed a small bug. The Blueprint IE reset was acting funny in conjunction with the IE8 JavaScript. I chose to make IE8.js the default with the option of [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new version of the <a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">Baseline Theme</a>. In the last few days of tinkering with it and modifying it for use with this website, I noticed a small bug. The <a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');">Blueprint</a> IE reset was acting funny in conjunction with the <a href="http://code.google.com/p/ie7-js/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/ie7-js/?referer=');">IE8 JavaScript</a>. I chose to make IE8.js the default with the option of including Blueprint&#8217;s reset instead.<span id="more-360"></span> Here is the pertinent change in header.php:</p>
<pre class="brush: php; first-line: 14; html-script: true;">&lt;?php

/*

Add this to the HTML below if you want to use Blueprint's IE reset style sheet. The IE8 JavaScript should
fix the same things so you shouldn't need both. This is here if you'd rather use it than the JavaScript.

&lt;!--[if IE]&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/ie.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;![endif] --&gt;

*/

?&gt;

&lt;!-- Remove this JavaScript link if you decide to use Blueprint's CSS reset instead. I recommend using this instead. --&gt;

&lt;!--[if lt IE 8]&gt;
&lt;script src=&quot;http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;</pre>
<p><a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">You can download the theme here</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/11/23/incorporating-blueprint-css-into-your-new-wordpress-theme/" rel="bookmark" title="November 23, 2008">Incorporating Blueprint CSS Into Your New WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-readme-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Readme File</a></li>
</ul>
<p><!-- Similar Posts took 5.888 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blueprint Optional Fancy-Type Plugin</title>
		<link>http://anthonygthomas.com/2010/02/15/blueprint-optional-fancy-type-plugin/</link>
		<comments>http://anthonygthomas.com/2010/02/15/blueprint-optional-fancy-type-plugin/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:58:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blueprint Framework]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[baseline theme]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=312</guid>
		<description><![CDATA[The Baseline Development WordPress Theme has Blueprint plugged in already. There are some optional Blueprint plugins you can take advantage of. We&#8217;ll take a look at the fancy-type plug-in. First of all, to link it in just add this to header.php: &#60;link rel=&#34;stylesheet&#34; href=&#34;&#60;?php bloginfo('stylesheet_directory'); ?&#62;/blueprint/plugins/fancy-type/screen.css&#34; type=&#34;text/css&#34; media=&#34;screen, projection&#34; /&#62; The first thing this will [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">Baseline Development WordPress Theme</a> has <a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');">Blueprint</a> plugged in already. There are some optional Blueprint plugins you can take advantage of. We&#8217;ll take a look at the fancy-type plug-in.<span id="more-312"></span></p>
<p>First of all, to link it in just add this to header.php:</p>
<pre class="brush: php; html-script: true;">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/plugins/fancy-type/screen.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;</pre>
<p>The first thing this will do for you is indent your paragraphs:</p>
<pre class="brush: css;">/* Indentation instead of line shifts for sibling paragraphs. */
   p + p { text-indent:2em; margin-top:-1.5em; }
   form p + p  { text-indent: 0; } /* Don't want this in forms. */</pre>
<p>Next up is the <code>alt</code> class for some fancy type:</p>
<pre class="brush: css; first-line: 15;">
/* For great looking type, use this code instead of asdf:
   &lt;span class=&quot;alt&quot;&gt;asdf&lt;/span&gt;
   Best used on prepositions and ampersands. */

.alt {
  color: #666;
  font-family: &quot;Warnock Pro&quot;, &quot;Goudy Old Style&quot;,&quot;Palatino&quot;,&quot;Book Antiqua&quot;, Georgia, serif;
  font-style: italic;
  font-weight: normal;
}</pre>
<p>You also get a class for fancy quote marks:</p>
<pre class="brush: css; first-line: 27;">/* For great looking quote marks in titles, replace &quot;asdf&quot; with:
   &lt;span class=&quot;dquo&quot;&gt;&amp;#8220;&lt;/span&gt;asdf&amp;#8221;
   (That is, when the title starts with a quote mark).
   (You may have to change this value depending on your font size). */

.dquo { margin-left: -.5em; } </pre>
<p>Reduced size type with incremental leading:</p>
<pre class="brush: css; first-line: 35;">/* Reduced size type with incremental leading
   (http://www.markboulton.co.uk/journal/comments/incremental_leading/)

   This could be used for side notes. For smaller type, you don't necessarily want to
   follow the 1.5x vertical rhythm -- the line-height is too much.

   Using this class, it reduces your font size and line-height so that for
   every four lines of normal sized type, there is five lines of the sidenote. eg:

   New type size in em's:
     10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)

   New line-height value:
     12px x 1.5 = 18px (old line-height)
     18px x 4 = 72px
     72px / 5 = 14.4px (new line height)
     14.4px / 10px = 1.44 (new line height in em's) */

p.incr, .incr p {
	font-size: 10px;
	line-height: 1.44em;
	margin-bottom: 1.5em;
}</pre>
<p>And finally the <code>caps</code> class:</p>
<pre class="brush: css;">/* Surround uppercase words and abbreviations with this class.
   Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */

.caps {
  font-variant: small-caps;
  letter-spacing: 1px;
  text-transform: lowercase;
  font-size:1.2em;
  line-height:1%;
  font-weight:bold;
  padding:0 2px;
}</pre>
<p><a href="http://anthonygthomas.com/articles/blueprint-fancy-type-classes/">Go here to take a look at what these classes do in practice</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/15/blueprint-optional-fancy-type-plugin/" rel="bookmark" title="February 15, 2010">Blueprint Optional Fancy-Type Plugin</a></li>
<li><a href="http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/" rel="bookmark" title="February 14, 2010">Why Use Blueprint and the 960 Grid System in the Baseline Theme?</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-tutorial-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Tutorial File</a></li>
<li><a href="http://anthonygthomas.com/2009/11/09/blueprint-taking-a-close-look-at-grid-css/" rel="bookmark" title="November 9, 2009">Blueprint: Taking a Close Look at grid.css</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-readme-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Readme File</a></li>
</ul>
<p><!-- Similar Posts took 8.573 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/15/blueprint-optional-fancy-type-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Use Blueprint and the 960 Grid System in the Baseline Theme?</title>
		<link>http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/</link>
		<comments>http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 15:55:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blueprint Framework]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[960 Grid System]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=256</guid>
		<description><![CDATA[An Inventory of Blueprint&#8217;s Style Resets and Useful Classes A friend contacted me about using the Baseline WordPress theme, but asked why I included both Blueprint and the 960 Grid System. The short answer is that Blueprint has a number of browser resets that I like to take advantage of and 960 GS offers greater [...]]]></description>
			<content:encoded><![CDATA[<h3>An Inventory of Blueprint&#8217;s Style Resets and Useful Classes</h3>
<p>A friend contacted me about using the <a title="Baseline WordPress Theme" href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">Baseline WordPress theme</a>, but asked why I included both <a href="http://www.blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/www.blueprintcss.org/?referer=');">Blueprint</a> and the <a href="http://960.gs" onclick="pageTracker._trackPageview('/outgoing/960.gs?referer=');">960 Grid System</a>. The short answer is that Blueprint has a number of browser resets that I like to take advantage of and 960 GS offers greater flexibility in terms of the width of columns and their gutter widths. Especially if you want to adhere to the <a href="http://net.tutsplus.com/tutorials/other/the-golden-ratio-in-web-design/" onclick="pageTracker._trackPageview('/outgoing/net.tutsplus.com/tutorials/other/the-golden-ratio-in-web-design/?referer=');">Golden Ratio</a> for design. 960 pixels divides very neatly into 3.</p>
<p>Let&#8217;s take a look at what Blueprint does to reset some things to establish a cross-browser baseline. <span id="more-256"></span>First of all, all browsers have their own default style sheet for styling HTML elements. For example, here is <a href="http://anthonygthomas.com/firefoxs-default-style-sheet/">Firefox&#8217;s style sheet</a> that defines how the browser will render HTML if you don&#8217;t define any styles. Unfortunately, all browser&#8217;s default style sheets vary. Blueprint resets everything to level the field. Let&#8217;s take a look at <code>src/reset.css</code> in your Blueprint directory.</p>
<pre class="brush: css; first-line: 8;">/* --------------------------------------------------------------

   reset.css
   * Resets default browser CSS.

-------------------------------------------------------------- */

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  line-height: 1.5;
}

/* Tables still need 'cellspacing=&quot;0&quot;' in the markup. */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }

/* Remove possible quote marks (&quot;) from &lt;q&gt;, &lt;blockquote&gt;. */
blockquote:before, blockquote:after, q:before, q:after { content: &quot;&quot;; }
blockquote, q { quotes: &quot;&quot; &quot;&quot;; }

/* Remove annoying border on linked images. */
a img { border: none; }
</pre>
<p>I don&#8217;t want to spend tons of time going over this except to say that the cascading nature of cascading styles means that no matter what your browser&#8217;s default style sheet is, all of the tags above have now been reset.</p>
<p>Just as important is Blueprint&#8217;s treatment of type. If we look at <code>src/typography.css</code>, we&#8217;ll find that all of the font sizes have been reset. This is very important and saves lots of time getting things to look the same across browsers. First it resets font size for the body and sets the default font families to sans-serif:</p>
<pre class="brush: css; first-line: 8;">/* Default font settings.
   The font-size percentage is of 16px. (0.75 * 16px = 12px) */
body {
  font-size: 75%;
  color: #222;
  background: #fff;
  font-family: &quot;Helvetica Neue&quot;, Arial, Helvetica, sans-serif;
}</pre>
<p>Next the headings are all reset. First the font weight (curiously) is set to &#8220;normal&#8221; and the color set to #111 (black):</p>
<pre class="brush: css; first-line: 21;">h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }</pre>
<p>Then the sizes and bottom margins are set:</p>
<pre class="brush: css; first-line: 23;">
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
h2 { font-size: 2em; margin-bottom: 0.75em; }
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
h6 { font-size: 1em; font-weight: bold; }</pre>
<p>After that, margins are removed from any images within headings:</p>
<pre class="brush: css; first-line: 30;">
h1 img, h2 img, h3 img,
h4 img, h5 img, h6 img {
  margin: 0;
}</pre>
<p>After headings, we come to the <code>p</code> tag. Zero margin on top, left and right with a 1.5 em margin at the bottom of each paragraph:</p>
<pre class="brush: css; first-line: 39;">p           { margin: 0 0 1.5em; }</pre>
<p>Next, alignment classes for images with 1.5 em margins and 0 padding:</p>
<pre class="brush: css; first-line: 40;">p img.left  { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }</pre>
<p>Anchors come after that with a default blue color and black <code>hover</code> and <code>focus</code> pseudoclasses:</p>
<pre class="brush: css; first-line: 43;">a:focus,
a:hover     { color: #000; }
a           { color: #009; text-decoration: underline; }</pre>
<p><code>blockquote</code> get&#8217;s a margin, gray color and italics:</p>
<pre class="brush: css; first-line: 47;">blockquote  { margin: 1.5em; color: #666; font-style: italic; }</pre>
<p>The <code>strong</code> tag is bold&#8211;as it should be:</p>
<pre class="brush: css; first-line: 48;">strong      { font-weight: bold; }</pre>
<p>The <code>em</code> and <code>dfn</code> tags are italicized and <code>dfn</code> is bold:</p>
<pre class="brush: css; first-line: 49;">em,dfn      { font-style: italic; }
dfn         { font-weight: bold; }</pre>
<p>The <code>sup</code> and <code>sub</code> tags get a line height of zero:</p>
<pre class="brush: css; first-line: 51;">sup, sub    { line-height: 0; }</pre>
<p>The <code>abbr</code> and <code>acronym</code> tags are gray and get a dotted bottom border (which I find a little curious):</p>
<pre class="brush: css; first-line: 53;">abbr,
acronym     { border-bottom: 1px dotted #666; }</pre>
<p><code>address</code> tags get the same margin as paragraphs but with italics:</p>
<pre class="brush: css; first-line: 55;">address     { margin: 0 0 1.5em; font-style: italic; }</pre>
<p>The <code>del</code> tag (which you should be using instead of strike) gets a gray color:</p>
<pre class="brush: css; first-line: 56;">del         { color:#666; }</pre>
<p>Preformatted (<code>pre</code>) tags get at 1.5 em top and bottom margin and a zero right and left margin. Also, <code>pre</code>, <code>code</code> &amp; <code>tt</code> are set to monospace fonts at 1 em with a line-height of 1.5 em:</p>
<pre class="brush: css; first-line: 58;">pre 				{ margin: 1.5em 0; white-space: pre; }
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }</pre>
<p>After that we move on to lists. Nested lists (<code>ol</code> &amp; <code>ul</code>) get a zero top and bottom margin with a 1.5 em right and left margin:</p>
<pre class="brush: css; first-line: 65;">li ul,
li ol       { margin:0 1.5em; }</pre>
<p>All lists get a zero top margin, 1.5 em right margin, 1.5 em bottom margin and a 1.5 em left margin:</p>
<pre class="brush: css; first-line: 67;">ul, ol      { margin: 0 1.5em 1.5em 1.5em; }</pre>
<p>Unordered lists default to a disc style and ordered lists are set to decimal for their list style:</p>
<pre class="brush: css; first-line: 69;">ul          { list-style-type: disc; }
ol          { list-style-type: decimal; }</pre>
<p>Definition list margins are set. <code>dl</code> and <code>dt</code> tags are set to bold:</p>
<pre class="brush: css; first-line: 72;">dl          { margin: 0 0 1.5em 0; }
dl dt       { font-weight: bold; }
dd          { margin-left: 1.5em;}</pre>
<p>Tables are up next. Tables themselves get a 1.4 em bottom margin and 100% width. Table headers (<code>th</code>) are bold with #c3d9ff background color. Table headings, table data (<code>td</code>) and caption get some padding. A table row (<code>tr</code>) &#8220;even&#8221; class is established with a different background color. Table footers (<code>tfoot</code>) are italicized and finally, <code>caption</code> is given a background color of #eee.</p>
<pre class="brush: css; first-line: 80;">table       { margin-bottom: 1.4em; width:100%; }
th          { font-weight: bold; }
thead th 		{ background: #c3d9ff; }
th,td,caption { padding: 4px 10px 4px 5px; }
tr.even td  { background: #e5ecf9; }
tfoot       { font-style: italic; }
caption     { background: #eee; }</pre>
<p>Finally we get to &#8220;Miscellaneous Classes&#8221;. <code>small</code>, <code>large</code> and <code>hide</code> classes are pretty self explanatory:</p>
<pre class="brush: css; first-line: 92;">.small      { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
.large      { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
.hide       { display: none; }</pre>
<p>Some useful classes are established next with <code>loud</code>, <code>highlight</code>, <code>added</code> and <code>removed</code>. The <code>quiet</code> class is simple set to gray.:</p>
<pre class="brush: css; first-line: 96;">.quiet      { color: #666; }</pre>
<p><code>loud</code> is set to black:</p>
<pre class="brush: css; first-line: 97;">.loud       { color: #000; }</pre>
<p><code>highlight</code> has a yellow background:</p>
<pre class="brush: css; first-line: 98;">.highlight  { background:#ff0; }</pre>
<p><code>added</code> has a green background with white text:</p>
<pre class="brush: css; first-line: 99;">.added      { background:#060; color: #fff; }</pre>
<p>And <code>removed</code> has a dark red background with white text:</p>
<pre class="brush: css; first-line: 100;">.removed    { background:#900; color: #fff; }</pre>
<p>Finally, there are <code>first</code>, <code>last</code>, <code>top</code> and <code>bottom</code> classes. First just makes sure there is no margin or padding on the left:</p>
<pre class="brush: css; first-line: 102;">.first      { margin-left:0; padding-left:0; }</pre>
<p><code>last</code> does the same, but on the right:</p>
<pre class="brush: css; first-line: 103;">.last       { margin-right:0; padding-right:0; }</pre>
<p><code>top</code> does what first and last did, but on the top (of course):</p>
<pre class="brush: css; first-line: 104;">.top        { margin-top:0; padding-top:0; }</pre>
<p>And <code>bottom</code> does what first, last and top did, but does it on the bottom:</p>
<pre class="brush: css; first-line: 105;">.bottom     { margin-bottom:0; padding-bottom:0; }</pre>
<p>Finally, we&#8217;re going to take a look at what Blueprint offers for forms. Let&#8217;s take a look at src/forms.css. The first thing we have is some styling for <code>label</code>, <code>fieldset</code> and <code>legend</code> tags.</p>
<p>Labels are bold, <code>fieldset</code> has a 1.4 em padding and a 1.5 em bottom margin with a gray border. <code>legend</code> is also bold with a 1.2 em font-size:</p>
<pre class="brush: css; first-line: 12;">label       { font-weight: bold; }
fieldset    { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; }
legend      { font-weight: bold; font-size:1.2em; }</pre>
<p>Next <code>text</code> and <code>title</code> classes are established for input tags and they are given the same formatting as <code>textarea</code> and <code>select</code> tags:</p>
<pre class="brush: css; first-line: 20;">input.text, input.title,
textarea, select {
  margin:0.5em 0;
  border:1px solid #bbb;
}</pre>
<p>Next pseudoclasses are formatted for <code>focus</code> on form elements to change the border to black.</p>
<pre class="brush: css; first-line: 26;">input.text:focus, input.title:focus,
textarea:focus, select:focus {
  border:1px solid #666;
}</pre>
<p>Next up <code>input</code> <code>text</code> classes are set to 300px wide with 5px padding. The <code>input</code> <code>title</code> class is also given a 1.5 em font size. <code>textarea</code> is a little wider and higher with 5px of padding:</p>
<pre class="brush: css; first-line: 31;">input.text,
input.title   { width: 300px; padding:5px; }
input.title   { font-size:1.5em; }
textarea      { width: 390px; height: 250px; padding:5px; }</pre>
<p>Last but absolutely not least are some nice form validation classes you can take advantage of. The <code>notice</code>, <code>success</code> and <code>error</code> classes function for just what their names suggest. By now I&#8217;m going to assume you can read the styles so I won&#8217;t inventory these one by one except to say that they&#8217;re nice, intuitive classes for form validation.</p>
<pre class="brush: css; first-line: 40;">.error,
.notice,
.success    { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; }

.error      { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }
.notice     { background: #FFF6BF; color: #514721; border-color: #FFD324; }
.success    { background: #E6EFC2; color: #264409; border-color: #C6D880; }
.error a    { color: #8a1f11; }
.notice a   { color: #514721; }
.success a  { color: #264409; }</pre>
<p>The point of all of this is that <em>none</em> of these are reset by the 960 grid established in the Baseline theme. Blueprint does a really nice job of resetting your styles and also includes a handful of other useful classes. What it <em>doesn&#8217;t</em> offer that the 960 Grid System <em>does</em> is flexibility with design width, column width and gutter width. <em>That&#8217;s</em> why I decided to rely on the 960 Grid System for establishing the columns and combine it with Blueprint for it&#8217;s wonderful job of resetting the styles.</p>
<p>Plus, I&#8217;ve been meaning to document all of these styles in Blueprint for a while now. If you don&#8217;t use my <a href="http://baseline.truetoneenterprises.com/" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com/?referer=');">Baseline theme</a>, this may also provide useful in terms of documenting what Blueprint is doing for you. <a href="http://anthonygthomas.com/articles/a-demo-of-some-of-blueprints-classes/">Take a look at this page to see what some of the classes like <code>error</code> or <code>success</code> look like</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/" rel="bookmark" title="February 14, 2010">Why Use Blueprint and the 960 Grid System in the Baseline Theme?</a></li>
<li><a href="http://anthonygthomas.com/2010/02/15/blueprint-optional-fancy-type-plugin/" rel="bookmark" title="February 15, 2010">Blueprint Optional Fancy-Type Plugin</a></li>
<li><a href="http://anthonygthomas.com/2009/11/09/blueprint-taking-a-close-look-at-grid-css/" rel="bookmark" title="November 9, 2009">Blueprint: Taking a Close Look at grid.css</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-tutorial-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Tutorial File</a></li>
<li><a href="http://anthonygthomas.com/2008/12/16/when-using-a-grid-layout-css-framework-do-the-math/" rel="bookmark" title="December 16, 2008">When Using a Grid Layout CSS Framework, Do the Math</a></li>
</ul>
<p><!-- Similar Posts took 8.824 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Baseline Development WordPress Theme</title>
		<link>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/</link>
		<comments>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 01:53:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blueprint Framework]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=233</guid>
		<description><![CDATA[I&#8217;ve come up with some habits that I&#8217;ve developed from building themes for WordPress over the years. One, is to start with a nearly blank style sheet. I also like to hook in several JavaScript libraries and CSS frameworks from the start to take advantage of things like JQuery, Blueprint&#8217;s CSS reset and Superfish menus. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come up with some habits that I&#8217;ve developed from building themes for WordPress over the years. One, is to start with a nearly blank style sheet. I also like to hook in several JavaScript libraries and CSS frameworks from the start to take advantage of things like JQuery, Blueprint&#8217;s CSS reset and Superfish menus.<span id="more-233"></span></p>
<p>I&#8217;ve decided to build and release an XHTML 1.0 version and release it as a springboard for others who may want to take advantage of the same sets of tools. The theme isn&#8217;t much to look at (that&#8217;s the point), but it includes:</p>
<ul>
<li><a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');">Blueprint CSS framework</a></li>
<li><a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');"></a><a href="http://960.gs/" onclick="pageTracker._trackPageview('/outgoing/960.gs/?referer=');">960 Grid System</a></li>
<li><a href="http://960.gs/" onclick="pageTracker._trackPageview('/outgoing/960.gs/?referer=');"></a><a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');">JQuery 1.4.0</a></li>
<li><a href="http://jqueryui.com/" onclick="pageTracker._trackPageview('/outgoing/jqueryui.com/?referer=');">JQuery UI 1.7.1</a></li>
<li><a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');"></a><a href="http://users.tpg.com.au/j_birch/plugins/superfish/" onclick="pageTracker._trackPageview('/outgoing/users.tpg.com.au/j_birch/plugins/superfish/?referer=');">Superfish JQuery menu</a> (with <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html" onclick="pageTracker._trackPageview('/outgoing/cherne.net/brian/resources/jquery.hoverIntent.html?referer=');">HoverIntent.js</a>)</li>
<li><a href="http://code.google.com/p/ie7-js/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/ie7-js/?referer=');">IE8 JavaScript Library</a></li>
<li><a href="http://users.tpg.com.au/j_birch/plugins/superfish/" onclick="pageTracker._trackPageview('/outgoing/users.tpg.com.au/j_birch/plugins/superfish/?referer=');"></a>Widget-enabled sidebar</li>
<li><a href="http://wpcandy.com/articles/easier-theme-development-with-the-sample-post-collection.html" onclick="pageTracker._trackPageview('/outgoing/wpcandy.com/articles/easier-theme-development-with-the-sample-post-collection.html?referer=');">Test Content file from WP-Candy</a></li>
<li><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fbaseline.truetoneenterprises.com%2F" onclick="pageTracker._trackPageview('/outgoing/validator.w3.org/check?uri=http_3A_2F_2Fbaseline.truetoneenterprises.com_2F&amp;referer=');">Valid XHTML 1.0</a></li>
</ul>
<p><a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">More information here</a>.</p>
<p>If you want to use all of these tools, you&#8217;re all set. If you want to use a few, it&#8217;s just a matter of removing them from header.php.</p>
<p>First off, I really like Blueprint&#8217;s browser reset, so I wanted to include that here. I also like the flexibility the 960 Grid System offers in terms of column width. As a result, I&#8217;ve included them both.</p>
<pre class="brush: php; first-line: 9; html-script: true;">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/screen.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/960.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;</pre>
<p>If you don&#8217;t wish to use any of these, simply remove them from header.php. Next up is the Superfish CSS:</p>
<pre class="brush: php; first-line: 12; html-script: true;">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/css/superfish.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;</pre>
<p>You must keep this if you&#8217;re using Superfish. If you&#8217;re not going to use Superfish, you should remove these lines too:</p>
<pre class="brush: php; first-line: 29; html-script: true;">&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/js/superfish.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/js/hoverIntent.js&quot;&gt;&lt;/script&gt;</pre>
<pre class="brush: jscript; first-line: 32; html-script: true;">&lt;script type=&quot;text/javascript&quot;&gt;

    $(document).ready(function() {
        $('ul.sf-menu').superfish();
    });

&lt;/script&gt;</pre>
<p>Next is Blueprint&#8217;s Internet Explorer CSS reset:</p>
<pre class="brush: php; first-line: 13; html-script: true;">&lt;!--[if IE]&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/ie.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;![endif] --&gt;</pre>
<p>I&#8217;ve also had good luck using the IE8 JavaScript library, so that&#8217;s included next:</p>
<pre class="brush: xml; first-line: 17;">&lt;!--[if lt IE 8]&gt;
&lt;script src=&quot;http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;</pre>
<p>Then JQuery and JQuery UI libraries:</p>
<pre class="brush: xml; first-line: 21;">&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre>
<p>That&#8217;s it. All the frameworks and libraries are loaded. If you don&#8217;t think you&#8217;ll need any one of them, you can just take them out. WARNING: The layout of the columns does rely on the 960 Grid System CSS file. If you take that out of the head the columns won&#8217;t work and you&#8217;ll break the layout.</p>
<p>Otherwise this should give you a good start that will allow you to take advantage of tons of cool JQuery stuff and leverages a very popular CSS Grid System for laying out columns. It should be easy to modify this theme to fit your own design.</p>
<p><a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">Download the theme here</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/11/23/incorporating-blueprint-css-into-your-new-wordpress-theme/" rel="bookmark" title="November 23, 2008">Incorporating Blueprint CSS Into Your New WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-readme-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Readme File</a></li>
</ul>
<p><!-- Similar Posts took 6.515 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Mind Mapping Software to Develop Data Models</title>
		<link>http://anthonygthomas.com/2010/01/08/using-mind-mapping-software-to-develop-data-models/</link>
		<comments>http://anthonygthomas.com/2010/01/08/using-mind-mapping-software-to-develop-data-models/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 21:08:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[data modeling]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mind mapping]]></category>
		<category><![CDATA[data]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=217</guid>
		<description><![CDATA[I've been using mind mapping software recently to work out data models, with some success. The Mindmeister example below is a simple database of a few related tables. 

Most folks who have done much work with relational databases won't need a mind map for simple relationships like the example above where tables are simple has-many or belongs-to relationships. But, it can come in very handy for getting your head around has-and-belongs-to-many relationships where join tables are involved.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using mind mapping software recently to work out data models, with some success. The Mindmeister example below is a simple database of a few related tables.<span id="more-217"></span></p>
<p>Most folks who have done much work with relational databases won&#8217;t need a mind map for simple relationships like the example above where tables are simple has-many or belongs-to relationships. But, it can come in very handy for getting your head around has-and-belongs-to-many relationships where join tables are involved.</p>
<ul>
<li><a href="http://www.mindmeister.com/" onclick="pageTracker._trackPageview('/outgoing/www.mindmeister.com/?referer=');">Mindmeister</a></li>
<li><a href="http://freemind.sourceforge.net/wiki/index.php/Main_Page" onclick="pageTracker._trackPageview('/outgoing/freemind.sourceforge.net/wiki/index.php/Main_Page?referer=');">FreeMind</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/01/08/using-mind-mapping-software-to-develop-data-models/" rel="bookmark" title="January 8, 2010">Using Mind Mapping Software to Develop Data Models</a></li>
<li><a href="http://anthonygthomas.com/2008/12/10/use-functions-from-other-controllers-while-maintaining-mvc-architecture-in-cakephp/" rel="bookmark" title="December 10, 2008">Use Functions from Other Controllers While Maintaining MVC Architecture in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/" rel="bookmark" title="February 18, 2010">CakePHP: Containable Behavior is Your Friend</a></li>
<li><a href="http://anthonygthomas.com/2009/07/22/simple-security-in-cakephp/" rel="bookmark" title="July 22, 2009">Simple Security in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2010/05/24/an-unexpected-problem-with-cakephp-and-email-elements/" rel="bookmark" title="May 24, 2010">An Unexpected Problem with CakePHP and Email Elements</a></li>
</ul>
<p><!-- Similar Posts took 7.633 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/01/08/using-mind-mapping-software-to-develop-data-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
