<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Book and the Cover</title>
	
	<link>http://benjaminsterling.com</link>
	<description>Ok, you did not judge the book by it's cover, great.  Now, read the whole thing before passing judgment.</description>
	<lastBuildDate>Mon, 16 Jan 2012 21:58:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/benjaminsterling" /><feedburner:info uri="benjaminsterling" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Pagination and Backbone.js</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/6dl785mUPpQ/</link>
		<comments>http://benjaminsterling.com/pagination-and-backbone-js/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 18:28:43 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[backbone.js]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[underscore.js]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=285</guid>
		<description><![CDATA[I recently had to create some pagination for a backbone.js project I&#8217;ve been working on.  What I created has been working quite well but was not 100% happy with what I did.  Since I had a week off I figured I&#8217;d rewrite it as a mixin and clean up the approach.  Will have to work [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to create some pagination for a backbone.js project I&#8217;ve been working on.  What I created has been working quite well but was not 100% happy with what I did.  Since I had a week off I figured I&#8217;d rewrite it as a mixin and clean up the approach.  Will have to work it back into the project somehow but that is something to worry about later.</p>
<p>Let&#8217;s just jump right in there.  Some caveats: I am sure there is probably a better approach to some of the code, so please give some guidance on how it should be improved.  This code assumes that all the data is already loaded into the collection.  The set of data I was working with had a record count of about 28,000 items.  I&#8217;ve gone back and both on if having that much data loaded is a good or bad thing.  Of all the articles I&#8217;ve read there doesn&#8217;t seem to be a consensus.</p>
<p>The folder structure I am using is:</p>

<p>The JSON structure I am dealing with:</p>
<script src="https://gist.github.com/1531733.js?file=tags_all.php"></script><noscript><pre><code class="language-php php">{
	&quot;status&quot;:true,
	&quot;tags&quot;:[
		{
			&quot;id&quot;:1,
			&quot;name&quot;:&quot;A&quot;
		},...
	]
}</code></pre></noscript>
<p>The model, nothing too special going on here:</p>
<script src="https://gist.github.com/1531733.js?file=models_tag.js"></script><noscript><pre><code class="language-javascript javascript">(function (models) {
	models.Tag = Backbone.Model.extend({});
})(App.models);</code></pre></noscript>
<p>The collection, again, is a pretty basic set up.  I&#8217;ve set to model to map to App.models.Tag, our url to point to tags_all.php and overridden the parse method to return a cleaned up tags array.</p>
<p>The last line <em>_.extend(collections.Tags.prototype, pagination); </em>is where we mixin in our Pagination module(?: not sure what its proper name is actually. Module, Class?).</p>
<script src="https://gist.github.com/1531733.js?file=collections_tags.js"></script><noscript><pre><code class="language-javascript javascript">(function (collections, pagination, model) {
	collections.Tags = Backbone.Collection.extend({
		model : model,
		url : 'tags_all.php',
		
		/**
		 * @param resp the response returned by the server
		 * @returns (Array) tags
		 */
		parse : function (resp) {
			var tags = resp.tags;
			
			return tags;
		}
	});
	
	_.extend(collections.Tags.prototype, pagination);
})(App.collections, App.mixins.Pagination, App.models.Tag);</code></pre></noscript>
<p>Next up is the Pagination mixin code, have a read of it and I&#8217;ll comment after the code.</p>
<script src="https://gist.github.com/1531733.js?file=mixins_pagination.js"></script><noscript><pre><code class="language-javascript javascript">(function (mixins) {
	/**
	 * @class
	 * Pagination
	 */
	mixins.Pagination = {
		/**  how many items to show per page */
		perPage : 20,
		
		/** page to start off on */
		page : 1,
	
		/**
		 *
		 */
		nextPage : function () {
			var self = this;
			
			self.page = ++self.page;
			self.pager();
		},
		
		previousPage : function () {
			var self = this;
			
			self.page = --self.page || 1;
			self.pager();
		},
		
		goTo : function (page) {
			var self = this;
			
			self.page = parseInt(page,10);
			self.pager();
		},
		
		howManyPer : function (perPage) {
			var self = this;
			self.page = 1;
			self.perPage = perPage;
			self.pager();
		},
		
		setSort : function (column, direction) {
			var self = this;
			
			self.pager(column, direction);
		},
		
		pager : function (sort, direction) {
			var self = this,
				start = (self.page-1)*this.perPage,
				stop  = start+self.perPage;
			
			if (self.orgmodels === undefined) {
				self.orgmodels = self.models;
			}
			
			self.models = self.orgmodels;
			
			if (sort) {
				self.models = self._sort(self.models, sort);
			}

			self.reset(
				self.models.slice(start,stop)
			);
		},
		
		_sort : function (models, sort) {
			models = models.sort(function(a,b) {
				var a = a.get(sort),
					b = b.get(sort);
					
				if (direction === 'desc') {
					if (a &gt; b) {
						return -1;
					}
					
					if (a &lt; b) {
						return 1;
					}
				}
				else {
					if (a &lt; b) {
						return -1;
					}
					
					if (a &gt; b) {
						return 1;
					}
				}
				
				return 0;
			});
			
			return models;
		},
		
		info : function () {
			var self = this,
				info = {},
				totalRecords = (self.orgmodels) ? self.orgmodels.length : self.length,
				totalPages = Math.ceil(totalRecords/self.perPage);
			
			info = {
				totalRecords  : totalRecords,
				page          : self.page,
				perPage       : self.perPage,
				totalPages    : totalPages,
				lastPage      : totalPages,
				lastPagem1    : totalPages-1,
				previous      : false,
				next          : false,
				page_set      : [],
				startRecord   : (self.page - 1) * self.perPage + 1,
				endRecord     : Math.min(totalRecords, self.page * self.perPage)
			};
			
			if (self.page &gt; 1) {
				info.prev = self.page - 1;
			}
			
			if (self.page &lt; info.totalPages) {
				info.next = self.page + 1;
			}
			
			info.pageSet = self.setPagination(info);
			
			self.information = info;
			return info;
		},
		
		setPagination : function (info) {
			var pages = [];
			// How many adjacent pages should be shown on each side?
			var ADJACENT = 3;
			var ADJACENTx2 = ADJACENT*2;
			var LASTPAGE = Math.ceil(info.totalRecords/info.perPage);
			var LPM1 = -1;
			
			if (LASTPAGE &gt; 1) {
				//not enough pages to bother breaking it up
				if (LASTPAGE &lt; (7 + ADJACENTx2)) {
					for (var i=1,l=LASTPAGE; i &lt;= l; i++) {
						pages.push(i);
					}
				}
				// enough pages to hide some
				else if (LASTPAGE &gt; (5 + ADJACENTx2)) {

					//close to beginning; only hide later pages
					if (info.page &lt; (1 + ADJACENTx2)) {
						for (var i=1, l=4+ADJACENTx2; i &lt; l; i++) {
							pages.push(i);				
						}
					}

					//in middle; hide some front and some back
					else if(LASTPAGE - ADJACENTx2 &gt; info.page &amp;&amp; info.page &gt; ADJACENTx2) {
						for (var i = info.page - ADJACENT; i &lt;= info.page + ADJACENT; i++) {
							pages.push(i);				
						}	
					}
					//close to end; only hide early pages
					else{
						for (var i = LASTPAGE - (2 + ADJACENTx2); i &lt;= LASTPAGE; i++) {
							pages.push(i);					
						}
					}
				}
			}

			return pages;
		}
	};
	
})(App.mixins);</code></pre></noscript>
<p>Most of the code is pretty self-explanatory, so I won&#8217;t dig into every line.  There are some methods you will see in the code, <em>setSort</em> and <em>_sort</em>, that are actually not in use for this discussion but will follow up on them in another post.</p>
<p>The first four methods are the ones that get triggered to start the ball rolling on the pagination.  Each of them call the <em>pager</em> method.</p>
<p>The page method makes a backup copy of the models the first pass through.  Resets models with said backup.  Ignore the sort for this post.  And lastly we pass in the start and stop points into the <a href="http://www.w3schools.com/jsref/jsref_slice_array.asp" target="_blank">Array slice</a> method, which we in turn pass to the Backbone.js reset method.  This will trigger a reset event and any view that is watching it will execute.</p>
<p>The last two methods to concern yourself with is the <em>info</em> and <em>setPagination</em> methods.  The info method does some base variable set up that will be used in views that need that info, our pagination view for-instance.  The <em>setPagination</em> method is called by <em>info</em> and at this point I must add two things.  The first is that I more or less borrowed the code from a PHP pagination script and can&#8217;t find it again, otherwise I&#8217;d give credit.  The second is that the purpose of <em>setPagination</em> is to allow for custom pagination structure and I was not clear I how I should make this more straight forward.  Any suggestions would be great.</p>
<p>So, what does <em>setPagination</em> do?  Basically it returns an array of what pages you want in your pagination &#8212; this will become a bit clearer what you see the pagination view below/in action, but let me try to explain.  In the code that is there, if we are on page 8 of our recordset, the pages that show will look something like this: 5 6 7 8 9 10 11.   But you are not limited to that structure.  In the project I will be merging this into, it will have a structure like, assuming I am on page 8 again: 1-5 6 7 8 9 10 11-15.</p>
<p>Hopefully that is clear.</p>
<p>Next two up are the pagination view and template/index page themselves.  The final structure will look something like: <em> &#8220;<span style="text-decoration: underline;">First</span> <span style="text-decoration: underline;">Previous</span> <span style="text-decoration: underline;">5</span> <span style="text-decoration: underline;">6</span> <span style="text-decoration: underline;">7</span> 8 <span style="text-decoration: underline;">9</span> <span style="text-decoration: underline;">10</span> <span style="text-decoration: underline;">11</span> <span style="text-decoration: underline;">Next</span> <span style="text-decoration: underline;">Last</span> Show <span style="text-decoration: underline;">20</span> | <span style="text-decoration: underline;">50</span> | <span style="text-decoration: underline;">100</span> 141 &#8211; 160 of 28091 shown&#8221;</em>.  Again, everything should be pretty self-explanatory, each method is named to do what it is supposed to do.</p>
<script src="https://gist.github.com/1531733.js?file=views_pagination.js"></script><noscript><pre><code class="language-javascript javascript">(function (views) {
	views.Pagination = Backbone.View.extend({
		
		events : {
			'click a.first'        : 'gotoFirst',
			'click a.prev'         : 'gotoPrev',
			'click a.next'         : 'gotoNext',
			'click a.last'         : 'gotoLast',
			'click a.page'         : 'gotoPage',
			'click .howmany a'     : 'changeCount'
		},
		
		tagName : 'aside',
		initialize : function () {
			_.bindAll (this, 'render');
			var self = this;

			self.tmpl = _.template($('#tmpPagination').html());
			self.collection.bind('reset', this.render);
			$(self.el).appendTo('body');
		},
		render : function () {
            var self;
            self = this;

			var html = this.tmpl(self.collection.info());
			$(this.el).html(html);
		},
		
		gotoFirst : function (e) {
			e.preventDefault();
			
			var self = this;
			
			self.collection.goTo(1);
		},
		
		gotoPrev : function (e) {
			e.preventDefault();
			
			var self = this;
			
			self.collection.previousPage();
		},
		
		gotoNext : function (e) {
			e.preventDefault();
			
			var self = this;
			
			self.collection.nextPage();
		},
		
		gotoLast : function (e) {
			e.preventDefault();
			
			var self = this;
			
			self.collection.goTo(self.collection.information.lastPage);
		},
		
		gotoPage : function (e) {
			e.preventDefault();
			
			var self = this;
			var page = $(e.target).text();
			
			self.collection.goTo(page);
		},
		
		changeCount : function (e) {
			e.preventDefault();
			
			var self = this;
			var per = $(e.target).text();
			
			self.collection.howManyPer(per);
		}
	});
})(App.views);</code></pre></noscript>
<p>I am using underscore.js&#8217; <em>template</em> function.  Only real thing to note is the <em>_.each</em> loop.  This is where the &#8220;pages&#8221;, e.g. &#8220;<em>5 6 7 8 9 10 11</em>&#8220;, will get parsed out.</p>
<script src="https://gist.github.com/1531733.js?file=index.html"></script><noscript><pre><code class="language-html html">&lt;!DOCTYPE HTML&gt;
&lt;html lang=&quot;en-US&quot;&gt;
	&lt;head&gt;
		&lt;meta charset=&quot;UTF-8&quot;&gt;
		&lt;title&gt;&lt;/title&gt;
		&lt;script src=&quot;jquery-1.7.1.min.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;underscore.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;json2.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;backbone.js&quot;&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;
			var App = {
				collections : {},
				models : {},
				views : {},
				mixins : {},
				init : function () {
					var collection = new App.collections.Tags();
					App.views.tags = new App.views.Tags({collection:collection});
					new App.views.Pagination({collection:collection});
				}
			};
		&lt;/script&gt;
		&lt;script src=&quot;assets/app/mixins/pagination.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;assets/app/models/tag.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;assets/app/collections/tags.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;assets/app/views/tags.js&quot;&gt;&lt;/script&gt;
		&lt;script src=&quot;assets/app/views/pagination.js&quot;&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;
			$(App.init);
		&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;
		
		&lt;script type=&quot;text/html&quot; id=&quot;tmpPagination&quot;&gt;
			&lt;span class=&quot;cell last pages&quot;&gt;
				&lt;% if (page != 1) { %&gt;
					&lt;a href=&quot;#&quot; class=&quot;first&quot;&gt;First&lt;/a&gt;
					&lt;a href=&quot;#&quot; class=&quot;prev&quot;&gt;Previous&lt;/a&gt;
				&lt;% } %&gt;
				&lt;% _.each (pageSet, function (p) { %&gt;
					&lt;% if (page == p) { %&gt;
						&lt;span class=&quot;page selected&quot;&gt;&lt;%= p %&gt;&lt;/span&gt;
					&lt;% } else { %&gt;
						&lt;a href=&quot;#&quot; class=&quot;page&quot;&gt;&lt;%= p %&gt;&lt;/a&gt;
					&lt;% } %&gt;
				&lt;% }); %&gt;
				&lt;% if (lastPage != page) { %&gt;
					&lt;a href=&quot;#&quot; class=&quot;next&quot;&gt;Next&lt;/a&gt;
					&lt;a href=&quot;#&quot; class=&quot;last&quot;&gt;Last&lt;/a&gt;
				&lt;% } %&gt;
			&lt;/span&gt;
			
			&lt;span class=&quot;cell howmany&quot;&gt;
				Show
				&lt;a href=&quot;#&quot; class=&quot;selected&quot;&gt;20&lt;/a&gt;
				|
				&lt;a href=&quot;#&quot; class=&quot;&quot;&gt;50&lt;/a&gt;
				|
				&lt;a href=&quot;#&quot; class=&quot;&quot;&gt;100&lt;/a&gt;
			&lt;/span&gt;
			
			&lt;span class=&quot;cell first records&quot;&gt;
				&lt;span class=&quot;current&quot;&gt;&lt;%= startRecord %&gt;&lt;/span&gt;
				-
				&lt;span class=&quot;perpage&quot;&gt;&lt;%= endRecord %&gt;&lt;/span&gt;
				of
				&lt;span class=&quot;total&quot;&gt;&lt;%= totalRecords %&gt;&lt;/span&gt;
							shown
			&lt;/span&gt;
		&lt;/script&gt;
	&lt;/body&gt;
&lt;/html&gt;</code></pre></noscript>
<p>This last bit is the view that helps parses out the tags.</p>
<script src="https://gist.github.com/1531733.js?file=views_tags.js"></script><noscript><pre><code class="language-javascript javascript">(function (views) {
	views.Tags = Backbone.View.extend({
		tagName : 'ul',
		initialize : function () {
			_.bindAll (this, 'render', 'addAll', 'addOne');
			var self = this;
			self.collection.fetch({
				success : function () {
					self.collection.pager();
				},
				silent:true
			});
			self.collection.bind('reset', self.addAll);
			$(self.el).appendTo('body');
		},
		addAll : function () {
			var self = this;
			
			$(self.el).empty();
			self.collection.each (self.addOne);
		},
		
		addOne : function (model) {
			var self = this;
			
			var view = new Tag({model:model});
			view.render();
			$(self.el).append(view.el);
		}
	});
	
	var Tag = Backbone.View.extend({
		tagName : 'li',
		render : function () {
			$(this.el).html(this.model.get('name'));
		}
	});
})(App.views);</code></pre></noscript>
<h2>Closing</h2>
<p>Like anything else, there are a hundred ways to do things and this is just one.  My example goes off the assumption that all the data is available but I am sure it can be re-written to only fetch a certain number of records from the server on an as needed basis.</p>
<p>What would you do differently?  Did you see anything wrong with my implementation?</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/pagination-and-backbone-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/pagination-and-backbone-js/</feedburner:origLink></item>
		<item>
		<title>jQuery UI Checkbox/Radio Buttons</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/oh_sy6R2kgA/</link>
		<comments>http://benjaminsterling.com/jquery-ui-checkboxradio-buttons/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 03:11:29 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=273</guid>
		<description><![CDATA[Recently I&#8217;ve had the good fortune to getting back into using jQuery and jQuery UI on a new and exciting project after a year and a half of using DOJO and MooTools &#8211; both are very good languages in their own right but not my cup of tea.  And one the things I think are [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve had the good fortune to getting back into using jQuery and jQuery UI on a new and exciting project after a year and a half of using DOJO and MooTools &#8211; both are very good languages in their own right but not my cup of tea.  And one the things I think are really missing with jQuery UI are form controls.  There is progress being made. For instance with the <a href="https://github.com/fnagel/jquery-ui/wiki/Selectmenu">select menu</a>, still some holes from a styling perspective, but solid.  There is also the <a href="http://jqueryui.com/demos/button/">buttons</a> widget that help with getting buttons &#8211; whether you are talking about &lt;A&gt;, &lt;BUTTON&gt; or &lt;INPUT&gt; &#8211; to function correctly cross browser.  And although the button widget has some &#8220;checkbox/radiobutton&#8221; type interactions it does not pass 508 testing on the project I am working on.</p>
<p>So, one of the bigger holes in opinion is with checkboxes and radio buttons and since I&#8217;ve had the benefit of working with <a href="http://dojotoolkit.org/reference-guide/dijit/index.html" target="_blank">Dijit</a> and having it pass a very rigorous 508 testing process I figured the best approach is to mimic, in a much less-code kinda way, what Dijit was doing.</p>
<p>So, with out much more blabbering on, below are a few examples of the checkboxes and radio buttons:</p>
<h3>First we have the checkboxes:</h3>

<!-- iframe plugin v.2.6 wordpress.org/extend/plugins/iframe/ -->
<iframe width="100%" height="150" src="/experiments/checkbox" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<h3>Then we have the radio buttons:</h3>

<!-- iframe plugin v.2.6 wordpress.org/extend/plugins/iframe/ -->
<iframe width="100%" height="175" src="/experiments/radiobutton" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<h3>Some thoughts</h3>
<p>So it&#8217;s basic and it works and keeps all the basic functionality that comes with standard radio buttons and checkboxes.  This is, in my opinion, what any widget that overrides a form control should do.</p>
<p>What probably needs to be taking into account is, what if styles are turned off? What happens if images are disabled?  Do we check for these and if styles are off or images are off don&#8217;t build?  Not sure, maybe that is something to deal with on a per project basis?</p>
<p><del>Currently if you do something like<em> $( &#8220;input[type=radio]:eq(2)&#8221; ).prop( &#8216;checked&#8217;, true );</em> or even <em>$( &#8220;input[type=radio]:eq(2)&#8221; ).get(0).checked = true;</em> and you are not using the widget the radio button will change accordingly, but not if you are using the widget.  The change event is not being triggered.  Will need to look into this a bit more.  Thoughts?</del> Not longer an issue, put a setInterval in to check for the change of the checked property and seems to be working correctly.</p>
<p>The checkbox and radio button width are only supporting jQuery 1.6+, it is using the <em>.prop</em> method throughout.  If you need to use it with an earlier release of jQuery you just need to swap those <em>.prop</em> methods out for the <em>.attr</em> method.</p>
<p>As I stated before, this method of doing the radio buttons and checkboxes have been tested fairly well for 508 compliancy so I am pretty confident it should work for you.  However, with everything we do, there is always room for improvement so please let me know via <a href="https://github.com/bmsterling/jquery-ui" target="_blank">github</a> if you believe you have those improvements.</p>
<p>Lastly, I tried my best to follow the standards that were set on the jQuery UI wiki but please get with me on items I can improve.</p>
<h3>The Source</h3>
<p><a href="https://github.com/bmsterling/jquery-ui">https://github.com/bmsterling/jquery-ui</a></p>
<p>Please submit <a href="https://github.com/bmsterling/jquery-ui/issues" target="_blank">any bugs or issues you have on github</a>, I will not respond to those issues within the comments (or at least can&#8217;t effectively).</p>
<h3>Update</h3>
<p>06/25/2011 : Updated the code to allow for onchange to trigger when the checked property has changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/jquery-ui-checkboxradio-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/jquery-ui-checkboxradio-buttons/</feedburner:origLink></item>
		<item>
		<title>Some Quick Tips for Getting started With Titanium</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/yYghavAUMhA/</link>
		<comments>http://benjaminsterling.com/some-quick-tips-for-getting-started-with-titanium/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 15:04:51 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=216</guid>
		<description><![CDATA[Another week, another set of ah-ha moments, here is just a quick list of things I&#8217;ve picked up on this week that might be of help: Titanium won&#8217;t launch emulator For what ever reason, when first getting everything going, installing the Android SDK and Titanium that you could not launch your Android project on a [...]]]></description>
				<content:encoded><![CDATA[<p>Another week, another set of ah-ha moments, here is just a quick list of things I&#8217;ve picked up on this week that might be of help:</p>
<h3>Titanium won&#8217;t launch emulator</h3>
<p>For what ever reason, when first getting everything going, installing the Android SDK and Titanium that you could not launch your Android project on a Windows machine.  After some trial and error apparently you need to set the permissions on the Android folder to get it to work.  To fix, I simply gave Users &#8220;Read &amp; Execute&#8221; permission to the C:\Program Files (x86)\Android\ folder.  After that, all was fine.</p>
<h3>Titanium is not seeing my attached Andoid phone</h3>
<p>Another issue was that I could not install KitchenSink onto my droid even though it was connected, registering and downloading the drivers from <a href="https://developer.motorola.com/">https://developer.motorola.com/</a> and installing them addressed this issue.  Another plus in registering at motorola is the other phone and tablet emulators you can download from them.</p>
<h3>Launching KitchenSink to see how things work</h3>
<p>Do install the KitchenSink on your phone so that you don&#8217;t have to recompile it everything you want to see an example in action.  My basic process atm goes like this, realize I need to do something, pull up my phone to find that something, locate the appropriate code in KitchenSink\Resources\examples and boom, done.</p>
<h3>Compiling takes for ever</h3>
<p>I usually have a ton of other apps running so compiling every two minutes can eat up some time, to speed things up I&#8217;ve set the priority level for emulator.exe to high.  This has sped up compiling a bit, if even from a false perspective.</p>
<h3>Getting undefined VS an Empty String</h3>
<p>Working with Titanium if you create a TextField and do not set a value for it &#8211; even an empty string &#8211; it will return &#8220;undefined&#8221; instead of an empty string.</p>
<div id="ig-sh-1" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">var tf1 = Titanium.UI.createTextField({</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">value : ''</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">});</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">var tf2 = Titanium.UI.createTextField();</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">(tf1.value == '') returns true</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">(tf2.value == '') retruns false</div></li>
</ol>	</div></div>
<p>What ah-ha moments have you had?</p>
<h4>Update:</h4>
<p>Someone started a thread on the forums that have some tips as well: <a href="http://developer.appcelerator.com/question/5291/tips-and-tricks-mobile---thread-to-share-some-experience-that-may-help-the-others">http://developer.appcelerator......the-others</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/some-quick-tips-for-getting-started-with-titanium/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/some-quick-tips-for-getting-started-with-titanium/</feedburner:origLink></item>
		<item>
		<title>List of Decent Titanium Tutorials/Videos</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/xnEv9cgMqug/</link>
		<comments>http://benjaminsterling.com/list-of-decent-titanium-tutorialsvideos/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 16:15:41 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=224</guid>
		<description><![CDATA[Here are a list of videos and tutorials that I&#8217;ve found to be of some use: iPhone App Dev with Titanium: 01 Getting Started A pretty basic &#8220;getting started&#8221; video but does cover changing the icon and splash screen so worth a watch; using Titanium SDK 1.1.2 but is nothing that can&#8217;t be translated into [...]]]></description>
				<content:encoded><![CDATA[<p>Here are a list of videos and tutorials that I&#8217;ve found to be of some use:</p>
<h3>iPhone App Dev with Titanium: 01 Getting Started</h3>
<p>A pretty basic &#8220;getting started&#8221; video but does cover changing the icon and splash screen so worth a watch; using Titanium SDK 1.1.2 but is nothing that can&#8217;t be translated into the current 1.5.1 version: <a href="http://www.youtube.com/watch?v=tX_7NGvcNk4" target="_blank">http://www.youtube.com/watch?v=tX_7NGvcNk4</a></p>
<h3>iPhone App Dev with Titanium: 02 Understanding Windows</h3>
<p>In this tutorial the author goes over creating windows and subwindows: <a href="http://www.youtube.com/watch?v=TCd-cTEb51E" target="_blank">http://www.youtube.com/watch?v=TCd-cTEb51E</a></p>
<h3>iPhone App Dev with Titanium: 05 Event Listeners</h3>
<p>Pretty good quick tutorial on events: <a href="http://www.youtube.com/watch?v=WQl0kCleDi4" target="_blank">http://www.youtube.com/watch?v=WQl0kCleDi4</a></p>
<h3>Developing Native Android Apps with Titanium</h3>
<p>A pretty good walk through on how to build a native Android application as well as the Tweetanium twitter applicaiton.  It also shows off the use of intents and events: <a href="http://vimeo.com/18541179" target="_blank">http://vimeo.com/18541179</a></p>
<h3>Titanium and the Android NDK</h3>
<p>A quick video showing of the Android NDK support: <a href="http://vimeo.com/19138717" target="_blank">http://vimeo.com/19138717</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/list-of-decent-titanium-tutorialsvideos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/list-of-decent-titanium-tutorialsvideos/</feedburner:origLink></item>
		<item>
		<title>Appcelerator Titanium for Mobile Developer From a True Newbie Perspective</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/qzK7W7GQR2M/</link>
		<comments>http://benjaminsterling.com/appcelerator-titanuim-for-mobile-developer-from-a-true-newbie-perspective/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 18:06:21 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve been trying to get into true mobile development &#8212; not just making a webpage look good on mobile devices &#8212; for some time now but have been extremely busy and I generally prefer using a language that I already know.  With that in mind I turned to Titanium since I had some initial success [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been trying to get into true mobile development &#8212; not just making a webpage look good on mobile devices &#8212; for some time now but have been extremely busy and I generally prefer using a language that I already know.  With that in mind I turned to Titanium since I had some initial success with it building a few desktop apps when Titanium first popped on the scene.  So, I&#8217;m a month into playing with Titanium for mobile development I&#8217;ve got some thoughts on it, mainly on the idea of using your webskills for native mobile functionality, lack of information and the approach of Appcelerator itself.</p>
<p>Before I go on, this is not meant as flame bait or to put down a great product by Appcelerator, it is simply meant to give my perspective as a new developer to Titanium Mobile and to hopefully show my progression in learning how to use it.  As of this writing I am working with the Titanium Developer 1.2.2 and Titanium SDK 1.5.1 on two separate Windows 7 machines.</p>
<p>When I first started reading/hearing about Titanium for mobile development one of the key phrases I&#8217;d hear was &#8220;use JavaScript to build mobile apps&#8221; and from a code syntax this is correct.  But what I&#8217;ve found is that, outside of syntax, having the notion of using JavaScript to build mobile apps in not true.  When working with the Titanium API you are working with a new language from my point of view.  You have to figure out what API functions do what and when.  I know the same can be said for learning any &#8220;framework&#8221;, ie. jQuery, Dojo, etc, but it&#8217;s a bit different in this space because a trial and error approach takes minutes to see if you were correct or not whereas in working with web based frameworks you can see if you were successful with a quick page refresh.  Basically what I am getting at is don&#8217;t come to Titanium thinking your are going to hit the ground running with your current JavaScript knowledge.</p>
<p>Something you might have picked up from the previous paragraph is the lack of information out there.  This is both in regards to tutorials and to code examples.  As of this writing doing a search for &#8220;appcelerator titanium mobile tutorials&#8221; brings up only two somewhat recent tutorials &#8212; one by <a href="http://mobile.tutsplus.com/tutorials/appcelerator/appcelerator-using-json-to-build-a-twitter-client/" target="_blank">tutsplus</a> (using Titanium SDK 1.3 but some of it is still helpful for 1.5.1) and one by <a href="http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/" target="_blank">cssgallery</a> &#8212; everything else points to old versions or are &#8220;compare&#8221; articles.  Since there is no help in the tutorial-verse, I turned to the documentation which, at first glance, is pretty good but will not help you figure out how to use the API; it is simply a reference, nothing more.  Both of these facts make starting out very frustrating so the only saving grace is the Kitchen sink application that they put out so you can see the API in action.  But again, for a new Titanium user it is still a bit hard to figure out what does what and when.</p>
<p>The last point I want to make and most likely is the root cause for the lack of information from other sources is Appcelerator&#8217;s business approach to this Open Source project.  There are a few things they do that kinda makeme feel dirty using Titanium, one being that I can&#8217;t use the developer tool offline!  I do a ton of work on the train but can&#8217;t do any mobile development because the developer tool needs to be online.  My guess, which seems to be the consensus, is that this is to track you and how you are using developer tool which I can only assume is for investor purposes.  Why else would it need to be online for me to recompile my changes every two minutes?  Next on my list is the plastering of training ads in every email I get.  This is true every time I open the dev tool, and every time I go to the <a href="http://developer.appcelerator.com/" target="_blank">developer center</a>.  And then there is the fact that Titanium does not have it&#8217;s own site but is interwoven into Appcelerator&#8217;s corporate site.  From a person that is all about the community &#8212; working with the WordPress, jQuery and Codeigniter communities for many years &#8212; having to go to what seems like a corporate site to ask for help or to give help just doesn&#8217;t sit well with me.</p>
<p>Again, this post is not meant to bash but to simply give my current perspective.  I will be working with Titanium for the foreseeable future mainly because I am not looking to learn Objective-C and am not willing to get back into writing Java.  Titanium does have a lot of interesting facets that I am looking to investigating and blogging about.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/appcelerator-titanuim-for-mobile-developer-from-a-true-newbie-perspective/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/appcelerator-titanuim-for-mobile-developer-from-a-true-newbie-perspective/</feedburner:origLink></item>
		<item>
		<title>IE6 Support</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/t7Zwutw2oIw/</link>
		<comments>http://benjaminsterling.com/ie6-support/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 19:25:03 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=142</guid>
		<description><![CDATA[With the launch of Internet Explorer 8 last week there has been a good amount of talk for support for IE6. At my company we are currently discussing the best approach that will both keep the client happy at the same time forcing people to upgrade their expectations of a browser. Some thoughts have been [...]]]></description>
				<content:encoded><![CDATA[<p>With the launch of Internet Explorer 8 last week there has been a good amount of talk for support for IE6.  At my company we are currently discussing the best approach that will both keep the client happy at the same time forcing people to upgrade their expectations of a browser.  Some thoughts have been to charge a premium to support IE6 &#8211; whether this is a percentage of total expect hours for a project or a flat rate based on the requirements , the difference being building with IE6 in mind compared to progressive enhancements after the fact.  Obviously my team has pride in our work so we most likely would be building to some extent with IE6 in mind either way.</p>
<p>The following stats are some questions I posted surveying a large group of people.</p>
<h3>What do you fall under?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="jobtype" class="datatable">
<thead>
<tr>
<th width="475">Response</th>
<th>Total</th>
<th>Percent</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Developer</td>
<td>117</td>
<td>54.93%</td>
<td></td>
</tr>
<tr>
<td>Designer</td>
<td>78</td>
<td>36.62%</td>
<td></td>
</tr>
<tr>
<td>Profession (ie. PM, Director)</td>
<td>18</td>
<td>8.45%</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td><strong>213</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
<div id="defaultChart" style="width: 600px; height: 200px;margin-bottom:2em;"></div>
<h3>What type of client do you support?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="" class="datatable">
<thead>
<tr>
<th width="475">Response</th>
<th>Total</th>
<th>Percent</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Commercial (big companies)</td>
<td>84</td>
<td>32.81%</td>
<td></td>
</tr>
<tr>
<td>Mom and Pop type clients</td>
<td>84</td>
<td>32.81%</td>
<td></td>
</tr>
<tr>
<td>Non-Profits</td>
<td>58</td>
<td>22.66%</td>
<td></td>
</tr>
<tr>
<td>Government</td>
<td>30</td>
<td>11.72%</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td><strong>256</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
<div id="defaultChart2" style="width: 600px; height: 200px;margin-bottom:2em;"></div>
<h3>How long will you/your group support IE6?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="" class="datatable">
<thead>
<tr>
<th width="475">Response</th>
<th>Total</th>
<th>Percent</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Umm&#8230; IE6 who?</td>
<td>50</td>
<td>24.27%</td>
<td></td>
</tr>
<tr>
<td>Till what seems like the end of time (or till gov&#8217;t offices update)</td>
<td>53</td>
<td>25.73%</td>
<td></td>
</tr>
<tr>
<td>Another 6 months, then progressive inhancements FTW</td>
<td>26</td>
<td>12.62%</td>
<td></td>
</tr>
<tr>
<td>Another 6 months, then not at all</td>
<td>24</td>
<td>11.65%</td>
<td></td>
</tr>
<tr>
<td>Another year, then progressive inhancements FTW</td>
<td>14</td>
<td>6.8%</td>
<td></td>
</tr>
<tr>
<td>Other Options</td>
<td>39</td>
<td>18.93%</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<ul style="display:none;">
<li>Other Text</li>
<li>We only suppport it for clients that ask for it.</li>
<li>As soon as Windows 7 OS is released to the public</li>
<li>until our internal IT team drops 6</li>
<li>when full experience is needed for ie6 clients, otherwise prog. enhancement now</li>
<li>Bare minimum now (works, may not look 100% perfect) unless there is extra budget for it.</li>
<li>As long as there is a business requirement to do so</li>
<li>As long as my damn clients still have it on their desks</li>
<li>Until enough of our client&#8217;s client&#8217;s no longer use IE6.</li>
<li>unsure, our clients are often not tech savvy</li>
<li>only when target audience uses</li>
<li>We only suppport it for clients that ask for it.</li>
<li>As soon as Windows 7 OS is released to the public</li>
<li>until our internal IT team drops 6</li>
<li>when full experience is needed for ie6 clients, otherwise prog. enhancement now</li>
<li>Bare minimum now (works, may not look 100% perfect) unless there is extra budget for it.</li>
<li>As long as there is a business requirement to do so</li>
<li>As long as my damn clients still have it on their desks</li>
<li>Until enough of our client&#8217;s client&#8217;s no longer use IE6.</li>
<li>unsure, our clients are often not tech savvy</li>
<li>only when target audience uses</li>
<li>IE7.js</li>
<li>Once our IE6 usership drops below 5%</li>
<li>Depends on user agent stats to my clients&#8217; sites</li>
<li>I detect IE6, then redirect visitor to page &#8216;gently&#8217; suggesting they upgrade to a better browser (with links to Firefox, Opera, Safari, Chrome, and IE7/8)</li>
<li>Until it holds a significantly lower Market share that we can profesionaly ignore it</li>
<li>Already stopped</li>
<li>until we replace expensive legacy apps that rely on IE6 for some reason</li>
<li>Untill ie8 becomes as involved as ie6</li>
<li>until IE6 market share drops below 5%</li>
<li>We only provide basic support as a opt-in feature.</li>
<li>Till clients stop using it.</li>
<li>we get the basics working, anything else is a bonus</li>
<li>Already dropped support</li>
<li>I simply try to ignore IE6 =)</li>
<li>I can&#8217;t say. My clients still see traffic from IE6.</li>
<li>progressive inhancements FTW already</li>
<li>ceased support 1st Jan 2009</li>
<li>No more support DIE IE6!</li>
</ul>
</td>
<td valign="top"><strong>206</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
<div id="defaultChart3" style="width: 600px; height: 200px;margin-bottom:2em;"></div>
<h3>If you have to support government agencies, how do you plan to tackle the IE6 issue?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="" class="datatable">
<thead>
<tr>
<th width="475">Response</th>
<th>Total</th>
<th>Percent</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Will support, but with a IE6 cost adjustment, ie. charge more</td>
<td>93</td>
<td>52.84%</td>
<td></td>
</tr>
<tr>
<td>Just keep doing what we do</td>
<td>75</td>
<td>42.61%</td>
<td></td>
</tr>
<tr>
<td>Other Options</td>
<td>8</td>
<td>4.55%</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<ul style="display:none">
<li>Other Text</li>
<li>Since I work for a govt agency I don&#8217;t really have a choice.  Supposedly IE7 will be released soon but they&#8217;ve been saying that forever.  Until then, its all about progressive enhancement</li>
<li>I don&#8217;t pay taxes so govt. agencies can use browsers like IE6.</li>
<li>Since I work for a govt agency I don&#8217;t really have a choice.  Supposedly IE7 will be released soon but they&#8217;ve been saying that forever.  Until then, its all about progressive enhancement</li>
<li>I don&#8217;t pay taxes so govt. agencies can use browsers like IE6.</li>
<li>n/a</li>
<li>IE MUST DIE!!!!!</li>
<li>I dont</li>
</ul>
</td>
<td><strong>176</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
<div id="defaultChart4" style="width: 600px; height: 200px;margin-bottom:2em;"></div>
<h3>How does having IE8 available effect your process?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="">
<thead>
<tr>
<th width="475">Response</th>
<th></th>
</tr>
</thead>
<tr>
<td>
<ul>
<li>How does having IE8 available effect your process?</li>
<li>Response</li>
<li>Doesn&#8217;t</li>
<li>It makes it worse. Now we have THREE versions of IE to test in!!!</li>
<li>Not at all, just one more browser to test for.</li>
<li>It doesn&#8217;t.  We don&#8217;t even have IE7 deployed across our agency.</li>
<li>definitely gives us more leverage for dropping IE6</li>
<li>not at all until mass adoption</li>
<li>We have not setup a plan yet but are planning currently</li>
<li>just another browser to debug in.Also, should be noted that IE 7 is considered &#8216;buggy&#8217; and &#8216;unsafe&#8217; by most corporate IT services including AOL and Time Warner</li>
<li>Not at all.</li>
<li>Hopefully it helps fight our cause for stopping IE6 support</li>
<li>It&#8217;ll just mean one more browser to test in.</li>
<li>Currently, not at all. The bigwigs at my company have yet to recognize it.</li>
<li>We&#8217;ll add X-UA-Compatible = Edge headers, and fix IE8 rendering issues that we might have ignored while it was still in beta.</li>
<li>None until the % of IE6 users drops below a certain threshold.</li>
<li>It&#8217;s just yet another browser to support. No difference.</li>
<li>It doesn&#8217;t</li>
<li>Doesn&#8217;t. The gov has IE6.</li>
<li>allows me to shame IE6 users more.</li>
<li>It complicates itâ€”there&#8217;s now another browser to test against. It wouldn&#8217;t be such a problem if the IEs weren&#8217;t so annoyingly different from version-to-version.</li>
<li>We told IE6 to take a hike months ago. IE8&#8242;s just another browser to test.</li>
<li>One more crappy browser to deal with.</li>
<li>It doesn&#8217;t yet.  We&#8217;ll use IE6 internally until 2056.I do internal web apps, and I wish we could code to more than IE6 though&#8230; it&#8217;s more of an impediment to professional development than anything else. I can only code/use other browsers outside of work.</li>
<li>Not much.  If it&#8217;s truly standards compliant, then we&#8217;ll still have to use IE specific stylesheets and little hacks for users who have 7 and below.</li>
<li>Not much at all, thankfully. Just one more browser to test.</li>
<li>Afraid to see how crappy it is, can not answer that</li>
<li>We are not rolling it out until after our applications have been certified for user with them. They currently are not.</li>
<li>It makes me have to test for another fucking browser. Fuck!</li>
<li>i don&#8217;t know for now, but i&#8217;m expecting for some trouble in near future</li>
<li>it doesnt</li>
<li>Other than giving me one more browser to test in, it doesn&#8217;t.</li>
<li>We don&#8217;t get to play with it because the site is adamant that they WILL deploy IE7 (and Vista) first, just to fark everything up, instead of jumping straight to Win7 and IE8 or FF.</li>
<li>Doesn&#8217;t</li>
<li>It makes it worse. Now we have THREE versions of IE to test in!!!</li>
<li>Not at all, just one more browser to test for.</li>
<li>It doesn&#8217;t.  We don&#8217;t even have IE7 deployed across our agency.</li>
<li>definitely gives us more leverage for dropping IE6</li>
<li>not at all until mass adoption</li>
<li>We have not setup a plan yet but are planning currently</li>
<li>just another browser to debug in.Also, should be noted that IE 7 is considered &#8216;buggy&#8217; and &#8216;unsafe&#8217; by most corporate IT services including AOL and Time Warner</li>
<li>Not at all.</li>
<li>Hopefully it helps fight our cause for stopping IE6 support</li>
<li>It&#8217;ll just mean one more browser to test in.</li>
<li>Currently, not at all. The bigwigs at my company have yet to recognize it.</li>
<li>We&#8217;ll add X-UA-Compatible = Edge headers, and fix IE8 rendering issues that we might have ignored while it was still in beta.</li>
<li>None until the % of IE6 users drops below a certain threshold.</li>
<li>It&#8217;s just yet another browser to support. No difference.</li>
<li>It doesn&#8217;t</li>
<li>Doesn&#8217;t. The gov has IE6.</li>
<li>allows me to shame IE6 users more.</li>
<li>It complicates itâ€”there&#8217;s now another browser to test against. It wouldn&#8217;t be such a problem if the IEs weren&#8217;t so annoyingly different from version-to-version.</li>
<li>We told IE6 to take a hike months ago. IE8&#8242;s just another browser to test.</li>
<li>One more crappy browser to deal with.</li>
<li>It doesn&#8217;t yet.  We&#8217;ll use IE6 internally until 2056.I do internal web apps, and I wish we could code to more than IE6 though&#8230; it&#8217;s more of an impediment to professional development than anything else. I can only code/use other browsers outside of work.</li>
<li>Not much.  If it&#8217;s truly standards compliant, then we&#8217;ll still have to use IE specific stylesheets and little hacks for users who have 7 and below.</li>
<li>Not much at all, thankfully. Just one more browser to test.</li>
<li>Afraid to see how crappy it is, can not answer that</li>
<li>We are not rolling it out until after our applications have been certified for user with them. They currently are not.</li>
<li>It makes me have to test for another fucking browser. Fuck!</li>
<li>i don&#8217;t know for now, but i&#8217;m expecting for some trouble in near future</li>
<li>it doesnt</li>
<li>Other than giving me one more browser to test in, it doesn&#8217;t.</li>
<li>We don&#8217;t get to play with it because the site is adamant that they WILL deploy IE7 (and Vista) first, just to fark everything up, instead of jumping straight to Win7 and IE8 or FF.</li>
<li>Sure does!</li>
<li>Frankly it&#8217;s just another pain in the ass. It just adds another browser to test on. It&#8217;s already not a short list</li>
<li>Just one more browser to test in&#8230; :(</li>
<li>Hopefully will lead us into an age where IE6 WILL be outlawed&#8230; or something like that.</li>
<li>na</li>
<li>Not yet&#8230; but we&#8217;ll likely focus on IE7 and IE8 soon and less and less on IE6.</li>
<li>Just makes it more complicated, I guess!</li>
<li>no effect.</li>
<li>We will have to start testing in it, although the priority on the fixes will be much lower that FF, IE6/7 and Safari.</li>
<li>It doesn&#8217;t. It just came out, need to wait 6 months to a year for people to update. Still can&#8217;t use some things until even IE 7 is dead.</li>
<li>We will now check in IE8</li>
<li>just another browser to test in</li>
<li>One more browser for test</li>
<li>Sigh.</li>
<li>Just one more browser to QA and tweak for.</li>
<li>Another VM with another browser to test in&#8230; more development time.</li>
<li>As we primary design for FF, not very much.</li>
<li>Not yet.</li>
<li>It hasn&#8217;t at the moment. Will now download as IE8 is out of beta</li>
<li>Adds one more browser to test once we find a machine to put it on.</li>
<li>IE8 doesn&#8217;t affect things until it becomes more popular. Then I&#8217;ll need to add it to the list of browsers to test in.</li>
<li>First of all, it&#8217;s *affect* not &#8216;effect&#8217;.  Effect means &#8216;bring about&#8217; or &#8216;make happen&#8217;.  (Sorry, my mom was an English teacher!).Second, the IE8 beta&#8217;s been around for what, a year now?  So having the actual release doesn&#8217;t make much of a difference to my development process.  Although I suppose I should pay attention now to making sure the sites I build look proper in IE8, the reality is that the vast majority of my clients&#8217; visitors won&#8217;t be using IE8 just yet, unless Microsoft forces it down their throats via a non-optional update.</li>
<li>Until the people in charge of Corporate IT networks pull their fingers out, it makes zero difference</li>
<li>not sure yet :)</li>
<li>IE8 will continue to be the worst browser. It is less bad than IE6, however.</li>
<li>I need another desktop to test for IE8, the way I already have one just for IE7 testing&#8230;can&#8217;t do some of the fancy tricks here at work to get them up side by side</li>
<li>Still renders differntly, ie7 still seems easier to deal with</li>
<li>It lengthens the time spent on IE-fixing Â¬Â¬</li>
<li>Doesn&#8217;t really effect it.  One more browser to test in but it&#8217;s the closest to standards so far.</li>
<li>we make our website the more cross browser possible. It&#8217;s just another test we must do.</li>
<li>It doesn&#8217;t. If it&#8217;s standards-compliant, it should work fine anyway. If it&#8217;s not&#8230;DIE!!!!</li>
<li>Not right now. Many of my clients are small businesses. Main focus on IE7 and some IE6 right now. But this will change soon.</li>
<li>one more effing browser to test in. and an effing Microsoft browser no less</li>
<li>It&#8217;s just another site to test it. It also means I can push a bit farther into the realm of CSS3.</li>
<li>Nothing now as everything we do already works in 8, but hopefully it effects our clients process, getting them to upgrade from 6.</li>
<li>Just another browser to test.</li>
<li>just another browser we have to test in.</li>
<li>It&#8217;s actually a kick in the pants, but not because of IE8 itself, but rather its IE7 &#8216;compatibility&#8217; mode. Since, that mode won&#8217;t render the way IE7 itself renders, it effectively adds another browser to test and support.</li>
<li>it doesn&#8217;t really yet.</li>
<li>test</li>
<li>We&#8217;ll have another browser in which to test, and another stylesheet to implement should the need arise (via conditional comments)</li>
<li>So far not at all. It seems to be working well.</li>
<li>At least it is somewhat compliant but is already behind the curve without CSS3 support. So many people that use IE don&#8217;t even know what version they are using so unless microsoft forces a change my life will still be burdened by the plagues that is know as IE. I only see a minimal change in the near term to my process.</li>
<li>it makes debugging for ie7 and 8 easier</li>
<li>Haven&#8217;t really tested in IE8. I&#8217;m fairly confident that the majority of work will be OK. Will need to look more closely at what I must do to ensure standards compliance mode.I&#8217;ve been watching site stats and I think across all the sites I manage I&#8217;ve had 2 or 3 visits from IE8</li>
<li>One more browser to test in.</li>
<li>Well. I&#8217;m hoping that with the news of IE8 some people will upgrade after realizing there has been two major versions of the browser released. In the end I hope it will keep me from spending a ton of time fixing the site for IE6.</li>
<li>Minimal</li>
<li>not sure yet</li>
<li>hmmmm. it is a microsoft product. need I really say more. I will likely have to hack on</li>
<li>It&#8217;s another browser to test again, but so far the testing process seems pretty straightforward. I expect that having implemented CSS2.1 properly will mean that it won&#8217;t impose too much change in our process. Of course, in theory.</li>
<li>Makes developing for these kind of platforms a lot easier. Less time concerning stupid errors and glitches specific to IE platform.</li>
<li>Makes more problems to deal with.</li>
<li>Doesn&#8217;t effect</li>
<li>Hope, IE6 will die.</li>
<li>Hardly at all. I mostly test in webkit and mozilla browsers then when the page is done I see if everything works okay in the IE 6-8 and include conditional stylesheets to work around the &#8216;bugs&#8217;.</li>
<li>Not at all. IE7 only recently became our officially supported browser. As much as I hate to say it, I don&#8217;t expect to see IE8 in our environment for some time.</li>
<li>Saves me and the client money</li>
<li>Yet another browser to test in.</li>
<li>Don&#8217;t know yet.</li>
<li>None really because it&#8217;s too new</li>
<li>Just one more browser to test on. Hopefully that slice of IE6 will keep shrinking. Is it worth testing for if it gets under 10%? Most of my clients audience has already moved on to IE7+</li>
<li>It has yet to affect us. I&#8217;m terrified when we start supporting it.</li>
<li>Still trying to sort that out.</li>
<li>it creates more work. IE8 compatibility view is not the same as a native IE7 client so now we have to work with even more cross-browser issues.</li>
<li>Doesn&#8217;t really.  There have always been browser inconsistencies to deal with, with IE8 there are some more.Only in my dreams do all browsers render the same.</li>
<li>I usually use the IE7 compatibility meta tag. So, IE8 is more like a pseudo-ghost to me anyways.</li>
<li>It hasn&#8217;t so far.</li>
<li>Better than IE6!</li>
<li>No</li>
<li>not at all so far&#8230;</li>
<li>Just another rushed out browser that has to be entered into the equation and bugtested for each project</li>
<li>Ugh, just another idiot browser to maintain..</li>
</ul>
</td>
<td></td>
</tr>
</table>
<h3>Are your sites working in IE8?</h3>
<table width="600" cellpadding="0" cellspacing="3" id="" class="datatable">
<thead>
<tr>
<th width="475">Response</th>
<th>Total</th>
<th>Percent</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Yes</td>
<td>133</td>
<td>63.94%</td>
<td></td>
</tr>
<tr>
<td>No</td>
<td>8</td>
<td>3.85%</td>
<td></td>
</tr>
<tr>
<td>Other Options</td>
<td>67</td>
<td>32.21%</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
<ul style="display:none">
<li>Other Text</li>
<li>dunno</li>
<li>most, but not all</li>
<li>Haven&#8217;t tested yet.</li>
<li>have not been actively qa&#8217;ing for ie8</li>
<li>Don&#8217;t know</li>
<li>untested</li>
<li>Haven&#8217;t tested yet.</li>
<li>Still checking</li>
<li>Have not checked</li>
<li>not sure</li>
<li>Haven&#8217;t even tested yet</li>
<li>Internal NO, External Yes</li>
<li>testing this week</li>
<li>have no ieda</li>
<li>I&#8217;ve not played with IE 8 much</li>
<li>dunno</li>
<li>most, but not all</li>
<li>Haven&#8217;t tested yet.</li>
<li>have not been actively qa&#8217;ing for ie8</li>
<li>Don&#8217;t know</li>
<li>untested</li>
<li>Haven&#8217;t tested yet.</li>
<li>Still checking</li>
<li>Have not checked</li>
<li>not sure</li>
<li>Haven&#8217;t even tested yet</li>
<li>Internal NO, External Yes</li>
<li>testing this week</li>
<li>have no ieda</li>
<li>I&#8217;ve not played with IE 8 much</li>
<li>Maybe</li>
<li>Don&#8217;t know</li>
<li>Don&#8217;t know yet</li>
<li>Haven&#8217;t checked yet ;)</li>
<li>Haven&#8217;t checked.</li>
<li>We haven&#8217;t even started testing yet.</li>
<li>Most of them, yes</li>
<li>for the most part</li>
<li>haven&#8217;t been able to test yet.</li>
<li>Untested&#8230;</li>
<li>Haven&#8217;t tested all yet.</li>
<li>not sure at the moment</li>
<li>Do not know yet.</li>
<li>Not Sure</li>
<li>not sure</li>
<li>I don&#8217;t know</li>
<li>not sure yet.</li>
<li>Haven&#8217;t checked</li>
<li>mostly</li>
<li>Everything renders larger</li>
<li>Haven&#8217;t checked yet</li>
<li>I should say not&#8230;!</li>
<li>the phone&#8217;s not ringing &#8230; yet</li>
<li>Haven&#8217;t tested yet.</li>
<li>have not check them yet.</li>
<li>Most are, using the meta tag for IE7 rendering</li>
<li>Don&#8217;t know. I would imagine most if not all will work.</li>
<li>havn</li>
<li>idk I&#8217;ll begin testing in it now</li>
<li>not sure</li>
<li>The ones I direclyt worked on, yes</li>
<li>haven&#8217;t checked</li>
<li>untested</li>
<li>Mostly, have to fix some float issues.</li>
<li>need to check</li>
<li>there are issues</li>
</ul>
</td>
<td><strong>208</strong></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
<div id="defaultChart4" style="width: 600px; height: 200px;margin-bottom:2em;"></div>
<p><script type="text/javascript" src="http://benjaminsterling.com/wp-content/themes/silhouette2/common/js/jquery.gchart.js"></script><br />
<script type="text/javascript" src="http://benjaminsterling.com/wp-content/themes/silhouette2/common/js/iesupportscripts.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/ie6-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/ie6-support/</feedburner:origLink></item>
		<item>
		<title>Chrome For Standalone Web Apps</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/m_Z4Ep-8ebY/</link>
		<comments>http://benjaminsterling.com/chrome-for-standalone-web-apps/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 16:00:27 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=124</guid>
		<description><![CDATA[Thanks to Seano I have been using Google Chrome to make my life easier.  How you ask?  Well, Chrome has a really nice bookmarking feature that will allow you to create a standalone instance of Chrome for what ever bookmarked site you want.  I use it religiously for Pandora , Google reader, Whos.amung.us, hulu, and [...]]]></description>
				<content:encoded><![CDATA[<p>Thanks to Seano I have been using Google Chrome to make my life easier.  How you ask?  Well, Chrome has a really nice bookmarking feature that will allow you to create a standalone instance of Chrome for what ever bookmarked site you want.  I use it religiously for <a href="http://www.pandora.com/people/benjamin.sterling">Pandora </a>, Google reader, <a href="http://whos.amung.us/stats/1cbz6ztl/">Whos.amung.us</a>, hulu, and gmail.</p>
<p>The process is pretty simple, make sure you have <a href="http://www.google.com/chrome">Chrome</a> installed, open and browse to the website you would like to bookmark.</p>
<p><img class="alignright size-full wp-image-135" title="chromeoptions" src="http://benjaminsterling.com/wp-content/uploads/2008/12/chromeoptions.jpg" alt="" width="238" height="263" /><br />
Just left of the address bar is a button, click that and you will get a drop down list of options. Click on &#8220;Create application shortcuts&#8230;&#8221; and you get the below dialog box. In my case, I am creating a &#8220;Quick launch bar shortcut for Last.fm, the other options are &#8220;Start menu&#8221; and &#8220;Desktop.&#8221;</p>
<p><img class="aligncenter size-full wp-image-136" title="chromeshortcuts" src="http://benjaminsterling.com/wp-content/uploads/2008/12/chromeshortcuts.jpg" alt="" width="367" height="336" /></p>
<p>After you hit ok you while now see you newly create shortcut:</p>
<p><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/quick.png" alt="" title="quick" width="74" height="69" class="aligncenter size-full wp-image-137" /></p>
<p><strong>Update:</strong> Rey points out that this feature has been available for Firefox in the form of a plugin for some time via the Prism add-on found here: <a href='https://addons.mozilla.org/en-US/firefox/addon/6665' rel='nofollow'>https://addons.mozilla.org/en-US/firefox/addon/6665</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/chrome-for-standalone-web-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/chrome-for-standalone-web-apps/</feedburner:origLink></item>
		<item>
		<title>Portfolio Layout Idea Using jQuery</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/6M2db5enU0E/</link>
		<comments>http://benjaminsterling.com/portolio-layout-idea-using-jquery/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 19:16:23 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=133</guid>
		<description><![CDATA[The Inspiration A few weeks back a good friend of mine needed to put together a website to display some of her drawings/portfolio pieces. And of course I decided to go with my jqGalScroll plugin but it got me thinking that there really should be a better way of displaying her work. After digging around [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/portfolio1.jpg" alt="" title="portfolio1" class="aligncenter size-full wp-image-134" /></p>
<h3>The Inspiration</h3>
<p>A few weeks back a <a href="http://subunittwo.com/">good friend of mine</a> needed to put together a website to display some of her drawings/portfolio pieces.  And of course I decided to go with my jqGalScroll plugin but it got me thinking that there really should be a better way of displaying her work.</p>
<p>After digging around I came across <a href="http://thunderfuel.com">thunderfuel&#8217;s</a> website and was like &#8220;OMG, I must make that&#8221; and well, I did, sorta.  I built the foundation and since I am really not a design person I did not make it all that pretty, so feel free to take what I did and make it pretty.</p>
<p><a href="http://www.benjaminsterling.com/wp-content/files/porfolio1/" class="example {w:850,h:450}">Demo of the Portfolio idea</a></p>
<h3>The HTML</h3>
<p>As always, I am using a definition list:</p>
<div id="ig-sh-2" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">HTML4</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="html4strict" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">dl</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;portfolio&quot;</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">dt</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;smallerImage.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cubes still life&quot;</span> &nbsp;<span style="color: #66cc66;">/</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">''</span>&gt;</span>Domain.com<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">dt</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">dd</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>Project:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span> The Project <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h4</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>Client:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span> Acme <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h4</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;biggerImage.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cubes still life&quot;</span> &nbsp;<span style="color: #66cc66;">/</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">dd</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- &nbsp;more piece adding up to an even number --&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">dl</span>&gt;</span></div></li>
</ol>	</div></div>
<h3>The CSS</h3>
<p>Nothing overly special, anything with height, width, or padding is needed, coloring and font styles are optional:</p>
<div id="ig-sh-3" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">css</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="css" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">850px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">450px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span> dd<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">250px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-455px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">330px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">430px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#666600</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span> dd h3<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span> <span style="color: #933;">15px</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span> dd h4<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span> <span style="color: #933;">13px</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span> dd p<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">11px</span> Geneva<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #cc00cc;">#portfolio</span> dd img<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6666ff;">.dt</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#808040</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">11px</span> Geneva<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6666ff;">.dt</span> img<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">55px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">55px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6666ff;">.dt</span> a<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span> <span style="color: #933;">13px</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6666ff;">.dt</span><span style="color: #6666ff;">.left</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6666ff;">.dt</span><span style="color: #6666ff;">.right</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></li>
</ol>	</div></div>
<h3>The JavaScript</h3>
<p>I am using the the <a href="http://gsgd.co.uk/sandbox/jquery/easing/">easing plugin</a> in my example so be sure to grab that also:</p>
<div id="ig-sh-4" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.min.js&quot;&gt;&lt;/script&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.easing.1.3.js&quot;&gt;&lt;/script&gt;</div></li>
</ol>	</div></div>
<p>Here is the actual code being used:</p>
<div id="ig-sh-5" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; .<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> hght <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'dt'</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'dt'</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">%</span> <span style="color: #CC0000;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<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;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>hght<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hght <span style="color: #339933;">+=</span> <span style="color: #CC0000;">75</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<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;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>hght<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <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;">'#portfolio dd:animated'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> that <span style="color: #339933;">=</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: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#portfolio dd.showing'</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>top<span style="color: #339933;">:-</span><span style="color: #CC0000;">455</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">750</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'easeOutQuad'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<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;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'showing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; that.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">750</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'easeInQuad'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'showing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">750</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'easeInQuad'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'showing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></li>
</ol>	</div></div>
<p><a href="http://www.benjaminsterling.com/wp-content/files/porfolio1/" class="example {w:850,h:450}">Demo of the Portfolio idea</a></p>
<h3>The Improvements</h3>
<p>So what else could be done to this example to give more of a WOW factor?  Of the top of my head I can think of a few.  Of course a good amount of WOW can be received from a good design instead of green on green, but what about an automatic slide show?  What about different directions of the animation, ie. one from the left, one from the right, one from top and so on?</p>
<p>Be all mean, let me know what you come up with.</p>
<p><strong>Update:</strong> Made a change to the easing methods to easeOutQuad and easeInQuad, should be less jarring.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/portolio-layout-idea-using-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/portolio-layout-idea-using-jquery/</feedburner:origLink></item>
		<item>
		<title>Separating Pings/Trackbacks from Comments in WordPress 2.7</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/3KniBuOJkPw/</link>
		<comments>http://benjaminsterling.com/separating-pingstrackbacks-from-comments-in-wordpress-27/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 17:00:35 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Comments]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=125</guid>
		<description><![CDATA[With the coming release of WordPress 2.7 we now have an easy way to separate out your pings and trackbacks from your comments. I will be using the default theme WordPress comes with to show you have to do this.  Below is the important code you should focus on: php &#60; view plain text &#62; [...]]]></description>
				<content:encoded><![CDATA[<p>With the coming release of WordPress 2.7 we now have an easy way to separate out your pings and trackbacks from your comments.</p>
<p>I will be using the default theme WordPress comes with to show you have to do this.  Below is the important code you should focus on:<br />
<span id="more-125"></span></p>
<div id="ig-sh-6" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3 id=&quot;comments&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;#8221;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;ol class=&quot;commentlist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;div class=&quot;navigation&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;!-- If comments are open, but there are no comments. --&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;!--</span> <span style="color: #b1b100;">If</span> comments are closed<span style="color: #339933;">.</span> <span style="color: #339933;">--&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nocomments&quot;</span><span style="color: #339933;">&gt;</span>Comments are closed<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
</ol>	</div></div>
<p>With WordPress 2.7, you would edit the <em>wp_list_comments();</em> function to look like <em>wp_list_comments(&#8216;type=comment&#8217;);</em> and just after line 8 (&#8249;/ol&#8250;) put:</p>
<div id="ig-sh-7" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;h3 id=&quot;pings&quot;&gt;Trackbacks/Pingbacks&lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;ol class=&quot;pinglist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;/ol&gt;</div></li>
</ol>	</div></div>
<p>That bit of code will echo out all the pings, so your final code should look like:</p>
<div id="ig-sh-8" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3 id=&quot;comments&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;#8221;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;ol class=&quot;commentlist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3 id=&quot;pings&quot;&gt;Trackbacks/Pingbacks&lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;ol class=&quot;pinglist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;div class=&quot;navigation&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;!-- If comments are open, but there are no comments. --&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;!--</span> <span style="color: #b1b100;">If</span> comments are closed<span style="color: #339933;">.</span> <span style="color: #339933;">--&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nocomments&quot;</span><span style="color: #339933;">&gt;</span>Comments are closed<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
</ol>	</div></div>
<p>Ah, but there is a problem, what if you don&#8217;t have any comments but you have pings/trackback or visa-versa?  You should now be able to wrap each H3+OL combiniation in code like:</p>
<div id="ig-sh-9" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3 id=&quot;comments&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;#8221;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;ol class=&quot;commentlist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;h3 id=&quot;pings&quot;&gt;Pingbacks/Trackbacks&lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;ol class=&quot;pinglist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
</ol>	</div></div>
<p>And that&#8217;s it, your Pingback and Comments are now separate.  Have a look at the final code below and let me know if I missed anything or if you have any questions.</p>
<div id="ig-sh-10" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;h3 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;#8221;&lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ol class=&quot;commentlist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comments_by_type</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;h3 id=&quot;pings&quot;&gt;Pingbacks/Trackbacks&lt;/h3&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ol class=&quot;pinglist&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ol&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;div class=&quot;navigation&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;/div&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &lt;!-- If comments are open, but there are no comments. --&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;!--</span> <span style="color: #b1b100;">If</span> comments are closed<span style="color: #339933;">.</span> <span style="color: #339933;">--&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nocomments&quot;</span><span style="color: #339933;">&gt;</span>Comments are closed<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
</ol>	</div></div>
<p><strong>Update:</strong> In regards to Chris&#8217; question, there is a way to separate out your comments count; after some research you can use the <em>get_comments_number</em> filter, you just need to create function and put it in your <em>functions.php</em> file.</p>
<div id="ig-sh-11" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">php</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">add_filter('get_comments_number', 'get_new_comment_count', 0);</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">function get_new_comment_count( $count ) {</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; global $wp_query;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; return count($wp_query-&gt;comments_by_type['comment']);</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">}</div></li>
</ol>	</div></div>
<p>If you don&#8217;t already have a functions.php file in your theme, just add one.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/separating-pingstrackbacks-from-comments-in-wordpress-27/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/separating-pingstrackbacks-from-comments-in-wordpress-27/</feedburner:origLink></item>
		<item>
		<title>Skribit: A tool for getting post suggestions</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/iia4hd4UOUo/</link>
		<comments>http://benjaminsterling.com/skribit-a-tool-for-getting-post-suggestions/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 15:15:45 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=132</guid>
		<description><![CDATA[When coming up with topics to write about I really struggle; I would equate it to a root canal.  I just never know what you the read would really be interested in reading about.  In my mind, everything has already been writen about and that makes it even harder.  I know I can put my [...]]]></description>
				<content:encoded><![CDATA[<p>When coming up with topics to write about I really struggle; I would equate it to a root canal.  I just never know what you the read would really be interested in reading about.  In my mind, everything has already been writen about and that makes it even harder.  I know I can put my own point of view on any topic, but is my point of view better then the next guys?  It may be, who knows.</p>
<p>Since I want your feedback on what topics you want to read about, I signed up for <a href="http://skribit.com/blogs/benjamin-sterling" target="_blank">skribit</a> and installed the widget just to the right of this post.  What I ask from you is to use it, tell me what you want to hear about.  If you see a topic already in the widget you would like to hear about, vote it up and I will make sure to make that one a priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/skribit-a-tool-for-getting-post-suggestions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/skribit-a-tool-for-getting-post-suggestions/</feedburner:origLink></item>
		<item>
		<title>Developer Tools That Don’t Get Enough Love</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/tzIS67E0eho/</link>
		<comments>http://benjaminsterling.com/developer-tools-that-dont-get-enough-love/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 06:00:46 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Jing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Virtualbox]]></category>
		<category><![CDATA[Yugma]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=127</guid>
		<description><![CDATA[Jing The concept of Jing is the always-ready program that instantly captures and shares images and video…from your computer to anywhere. Why I think this tool should get more love? Ever needed to explain something over the phone to someone and they are just not getting it? So what do you do, you take a [...]]]></description>
				<content:encoded><![CDATA[<p><a href='http://benjaminsterling.com/wp-content/uploads/2008/12/jing.png'><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/jing.png" alt="" title="jing" width="300" height="200" class="alignright size-full wp-image-128 featureImg" /></a></p>
<h3>Jing</h3>
<blockquote><p>The concept of Jing is the always-ready program that instantly captures and shares images and video…from your computer to anywhere.</p></blockquote>
<p>Why I think this tool should get more love?  Ever needed to explain something over the phone to someone and they are just not getting it?  So what do you do, you take a bunch of &#8220;print screens&#8221; and past it into a Word doc and send that over.  They get it and they still don&#8217;t get &#8220;it.&#8221;  Well, this is where jing comes in, you simply open the program &#8211; if you don&#8217;t already have it open be default like me &#8211; select a section of the screen to record, record what you are trying to explain, save and the send that SWF over and you just saved yourself hours of hassle.<br />
<a href="http://www.jingproject.com/" target="_blank">http://www.jingproject.com/</a></p>
<p><a href='http://benjaminsterling.com/wp-content/uploads/2008/12/yugma.png'><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/yugma.png" alt="" title="yugma" width="260" height="65" class="alignright size-full wp-image-129 featureImg" /></a></p>
<h3>Yugma</h3>
<blockquote><p>Yugma is the leader in affordable instant web conferencing solutions. Yugma provides Free, Professional, and Enterprise web conferencing software-as-a-service (SaaS) solutions to individuals, small businesses, and large enterprises across a diverse range of industries.</p></blockquote>
<p>Why I think this tool should get more love? Inline with Jing, using Yugma helps you take client &#8220;support&#8221; to the next level.  Sometimes a three minute video is not enough, you actually need to see what the client is seeing and the next best thing to actually sitting of the clients or co-workers shoulder is to share their screen.  Yugma&#8217;s free account, although not as feature rich as the Pro account, it gets the job done in a pinch.<br />
<a href="http://tinyurl.com/6yt5mo" target="_blank">http://www.yugma.com/</a></p>
<p><a href='http://benjaminsterling.com/wp-content/uploads/2008/12/twitter.jpg'><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/twitter-300x200.jpg" alt="" title="twitter" width="300" height="200" class="alignright size-medium wp-image-130 featureImg" /></a></p>
<h3>Twitter</h3>
<blockquote><p>Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing?</p></blockquote>
<p>Why I think this tool should get more love? Really, Twitter gets a ton of love from the average person to Steven Colbert to CNN but I don&#8217;t think it gets enough love as tool for Developers/Designers.  Imagine you work is a firm, design/development/both, and you have a problem with some code or how to make a design better, you simply call over one of your co-workers and get their advice.  But if you don&#8217;t work in an office where you can get help you alternatives are forums, mailing groups or IRC which are all ok, but not &#8211; in my experience &#8211; give off the truly &#8220;personal&#8221; help that Twitter can help provide.  If you follow and build a  rapport with other people a request for help can be fulfilled pretty quickly.<br />
<a href="http://twitter.com">http://twitter.com</a> | <a href="http://twitter.com/bmsterling">follow me</a></p>
<p><a href='http://benjaminsterling.com/wp-content/uploads/2008/12/2-empty-vm-created.png'><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/2-empty-vm-created-300x259.png" alt="" title="2-empty-vm-created" width="300" height="259" class="alignright size-medium wp-image-131 featureImg" /></a></p>
<h3>Virtualbox</h3>
<blockquote><p>VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See &#8220;About VirtualBox&#8221; for an introduction. </p></blockquote>
<p>Why I think this tool should get more love? I&#8217;ve had limited interaction with the other visualization apps but I really must say that I really like VirtualPC.  &#8220;But you are talking about VirtualBox, am I missing something?&#8221;  No, no you are not.  VirtualPC in my mind is probably the best visualization app out there but it costs $$ and if you are not making a ton of $$ the next runner up is VirtualBox which is an extremely close second.  In my development I try to test in as many environments as I can, I try to set up my VB to only have 512mb of ram running WinXp and Win2000 (don&#8217;t have Vista yet otherwise that would be my main install).  The reason for setting up weaker environments then my custom built machine is because not everyone has 3.5gb of ram with a video card that has 512mb ram and so on.  Some of the apps I build are quite JavaScript intense so I need to make sure it can still run as smoothly as possible in those systems.<br />
<a href="http://www.virtualbox.org/">http://www.virtualbox.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/developer-tools-that-dont-get-enough-love/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/developer-tools-that-dont-get-enough-love/</feedburner:origLink></item>
		<item>
		<title>Tip for weekending 12/06/08</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/ulSX1awd--c/</link>
		<comments>http://benjaminsterling.com/tip-for-weekending-120608/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 14:00:28 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[browsing]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=121</guid>
		<description><![CDATA[Backwards-Compatible Spam and Delete Buttons for WordPress Add Spam and Delete buttons right to the comments for WordPress installs below 2.6. Disabling the update nag Removes that nagging &#8220;WordPress [Version] is available! Please update now&#8221; message from your admin area. Add Your Website to Firefox’s Search Bar Using OpenSearch XML The ability to search right [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://perishablepress.com/press/2008/12/01/spam-delete-buttons-links-for-old-versions-wordpress/">Backwards-Compatible Spam and Delete Buttons for WordPress</a><br />
Add Spam and Delete buttons right to the comments for WordPress installs below 2.6.</p>
<p><a href="http://yoast.com/disable-update-nag/">Disabling the update nag</a><br />
Removes that nagging &#8220;WordPress [Version] is available! Please update now&#8221; message from your admin area.</p>
<p><a href="http://davidwalsh.name/open-search">Add Your Website to Firefox’s Search Bar Using OpenSearch XML</a></p>
<blockquote><p>The ability to search right from your browser’s address toolbar is a Godsend. No more extra Google or Yahoo page loads — simply open a new tab and roll off your search terms. Of course Firefox comes with Google, Yahoo, and other search engines by default, but what if you want to offer search for YOUR website in the address bar? Using Open Search, you can create an XML file to do just that.</p></blockquote>
<p><a href="http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/">WordPress 2.7 Comments Enhancements</a></p>
<blockquote><p>WordPress 2.7 includes a lot of new enhancements, but one of the big ones is the new comment functionality. Comments can be threaded, paged, etc. This is all built in, but unfortunately, your theme must support it. So, for theme authors, I’d suggest getting to work on making your themes compatible right away.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/tip-for-weekending-120608/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/tip-for-weekending-120608/</feedburner:origLink></item>
		<item>
		<title>WordPress: Theme Test Drive</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/IgqVmXte-pw/</link>
		<comments>http://benjaminsterling.com/wordpress-theme-test-drive/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 14:00:36 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=123</guid>
		<description><![CDATA[Have you ever needed to see what a theme looks like with your content but you did not want to have to recreate your whole site on a testing server and import all your data?  Well, Theme Test Drive to the rescue. You simply download the plugin, unzip it, upload it to your WordPress install, [...]]]></description>
				<content:encoded><![CDATA[<p><a href='http://benjaminsterling.com/wp-content/uploads/2008/12/theme_test_drive.png'><img src="http://benjaminsterling.com/wp-content/uploads/2008/12/theme_test_drive-300x264.png" alt="" title="theme_test_drive" width="300" height="264" class="alignright size-medium wp-image-126 featureImg" /></a></p>
<p>Have you ever needed to see what a theme looks like with your content but you did not want to have to recreate your whole site on a testing server and import all your data?  Well, <a href="http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive" target="_blank">Theme Test Drive</a> to the rescue.</p>
<p>You simply download the plugin, unzip it, upload it to your WordPress install, install the plugin and then select the theme you want to test.  This will allow you to go through your site as if it were live and see how it looks and works.</p>
<p>Now, have you ever need to make some changes to your current theme but did not want to shut down your site and you did not want your visitors to see a busted site?  Well, Theme Test Drive to the rescue again.</p>
<p>Follow the steps above, but instead of installing a new theme, just duplicate your current theme via your ftp of choice.  Once you have the duplicate theme, go into the dup and make a change to the style.css file and change the &#8220;Theme Name&#8221; &#8211; I just renamed the theme to have a 2 at the end of the name.</p>
<p>Reupload that style.css file and in the select menu under the Design -&gt; Theme Test Drive page select your newly named theme and click enable at the bottom.</p>
<p>After that, just work off of the duplicate theme till you have everything looking the way you want and just either copy over all the changes to the old theme folder or change your default theme to the duplicate.</p>
<p>Complete install instructions, support and download can be found on the <a href="http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive" target="_blank">plugins site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/wordpress-theme-test-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/wordpress-theme-test-drive/</feedburner:origLink></item>
		<item>
		<title>Password Strength Indicator and Generator</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/dD4ma3dkzH8/</link>
		<comments>http://benjaminsterling.com/password-strength-indicator-and-generator/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 16:00:51 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=117</guid>
		<description><![CDATA[Sometimes you want to show your user the strength of their password and although there a quite a few jQuery &#8220;plugins&#8221; that do this there are none &#8211; that I&#8217;ve found &#8211; that let you set the class of an element so that you can do a graphical representation of the strength. What I have [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes you want to show your user the strength of their password and although there a quite a few jQuery &#8220;plugins&#8221; that do this there are none &#8211; that I&#8217;ve found &#8211; that let you set the class of an element so that you can do a graphical representation of the strength.</p>
<p>What I have put together is some code that I have been using on a few projects and turned it into a rough plugin.  I say a rough plugin because it is very basic and not entirely flexible; let&#8217;s just call it a proof-of-concept.</p>
<p><a class="example {w:300,h:300}" data="" title="example" target="_blank" href="/wp-content/files/passwordstrength.htm">Live Demo of Password strength indicator and generator</a></p>
<p>In the example about you will see two password boxes and with them you have a generate password link and an icon showing you the strength of your password.</p>
<p>The first example you notice that I have a basic indicator showing the strength is the form a colors blocks going from green to red with red being the strongest indicator. (I got these images from the cpanel password changer)</p>
<p><img class="aligncenter" src="http://www.benjaminsterling.com/wp-content/files/passwordstrength/progressImg1.png" alt="" /></p>
<p>This is what you would normally see and it is fine, but what if your design is much like my current design where you are featuring trees?</p>
<p>In the second example we simply swap out the icon for a tree that has four levels and when the password is real strong the tree is completely filled in with red.</p>
<p><img class="aligncenter" src="http://www.benjaminsterling.com/wp-content/files/passwordstrength/progressImg2.png" alt="tree strength indicator" /></p>
<p>Have a look at the code:</p>
<p><a class="thecode {w:600,h:400}" data="" title="code" target="_blank" href="/wp-content/files/passwordstrength.txt">The Code for Password strength indicator and generator</a></p>
<p>By default the plugin will work off of ten default classes that you can set the css for which you can do an image sprite like I did above. Or maybe just a DIV with specific colors and widths that will illustrate a growing strength of a password.</p>
<h3>Final Thoughts</h3>
<p>The point of this post is to show you that you don&#8217;t need to limit yourself to what is already out there, expand your thinking to include all possibilities and not just prepackaged ones.</p>
<p>With that said, what other possibilities do we have for a simple thing like a password strength indicator?  Hmm&#8230; maybe doing a meter type thing that goes from zero to a hundred and just rotate the pointer much like the <a href="http://css-tricks.com/css3-clock/" target="_blank">clock example</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/password-strength-indicator-and-generator/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/password-strength-indicator-and-generator/</feedburner:origLink></item>
		<item>
		<title>Really Simple History: Ajax history and bookmarking library</title>
		<link>http://feedproxy.google.com/~r/benjaminsterling/~3/xEseFh5s7EI/</link>
		<comments>http://benjaminsterling.com/really-simple-history-ajax-history-and-bookmarking-library/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 16:00:51 +0000</pubDate>
		<dc:creator>Benjamin Sterling</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://benjaminsterling.com/?p=119</guid>
		<description><![CDATA[For some time now I have been using Really Simple History for my applications that use a good amount of AJAX. RSH is exactly what it sounds like, it is a really simple way of adding history and bookmarking to your AJAXified apps.  To see it in action have a look at the Mason&#8217;s Graduate [...]]]></description>
				<content:encoded><![CDATA[<p>For some time now I have been using <a href="http://code.google.com/p/reallysimplehistory/" target="_blank">Really Simple History </a>for my applications that use a good amount of <abbr title="asynchronous JavaScript and XML">AJAX</abbr>.  <abbr title="Really Simple History">RSH</abbr> is exactly what it sounds like, it is a really simple way of adding history and bookmarking to your AJAXified apps.  To see it in action have a look at the <a href="http://admissions.gmu.edu/grad/matrix/" target="_blank">Mason&#8217;s Graduate Requirements</a> site where it is being used to handle bookmarking for four separate parameters.</p>
<p>What I want to cover in the article is what I have learned and what steps I took when coding with RSH for the Mason project and for some other on going projects.</p>
<p>First thing you should do is download the <a href="http://reallysimplehistory.googlecode.com/files/RSH0.6FINAL.zip" target="_blank">Really Simple History code</a>.</p>
<p>Secondly, I have been using a modified version of <a href="http://adamv.com/dev/javascript/querystring" target="_blank">Adam Vandenberg&#8217;s Querystring</a> functions which has only one modification to it.</p>
<div id="ig-sh-12" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">if (qs == null) qs = location.search.substring(1, location.search.length);</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">// changed to</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">if (qs == null) qs = location.hash.replace(/^.*#/, '');</div></li>
</ol>	</div></div>
<p>You will need to set up your script is a particular way so that the history script is created first, and then initialized, at least the way I do it, when DOM is ready.  You can get away with doing it on Window.onload but since most likely your code will be minipulating the DOM, initializing on DOM ready is probably better for you.</p>
<p>I set up my inital code like below:</p>
<div id="ig-sh-13" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">var initail = false;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">var qs = null;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">window.dhtmlHistory.create();</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$(document)</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">.ready(function(){</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; dhtmlHistory.initialize();</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; dhtmlHistory.addListener(theListener);</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; if(!initail){</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; theListener();</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; };</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">});</div></li>
</ol>	</div></div>
<p>Lines 1 and 2 we set up some globals we will be reusing later on and line 4 we create the history object.  Lines 5 and 6 should be familiar to you, here we just check to see if the DOM is ready, if so, we run the code in the containing function.  Line 8 we initialize the history script and at line 9 we set the listener to &#8220;theListener&#8221; which is a function I will point out further down the page.  You will see that I also have an IF statement that is checking to see if this is the initial run.  This is because the the RSH script does not run the listener script when it is initialized.</p>
<p>The next function is just a helper function I use all the time when dealing with the hash:</p>
<div id="ig-sh-14" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">hash = function(){</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; return location.hash.replace(/^.*#/, '');</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">};</div></li>
</ol>	</div></div>
<p>The last function is the &#8220;theListener&#8221; function which I referenced at line 9 of the second group of codes.  This function will get called each and every time the hash changes.</p>
<div id="ig-sh-15" class="syntax_hilite">	<div class="toolbar">		<div class="language-name">js</div>		<a href="#" class="view-different">&lt; view <span>plain text</span> &gt;</a>	</div>	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">theListener = function(){</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; if(!initail) initail = true;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; qs = new Querystring( hash() );</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; if( typeof qs.get('cat') == 'undefined' ){</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; // run cat specific code</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; }</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">};</div></li>
</ol>	</div></div>
<p>Although the RSH script does pass back two params you will see that I don&#8217;t use them and the only real reason for this is that I felt it was too complicated and I never really figured out how I should use them.</p>
<p>At line 2 of the function we check to see if the function was already initiated.  Then at line 3 we set up a new Querystring reference &#8211; should probably change the name to hashstring or something like that at some point.  And from this point on, you can check your query string for what ever parameters you need to and run the appropriate codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminsterling.com/really-simple-history-ajax-history-and-bookmarking-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://benjaminsterling.com/really-simple-history-ajax-history-and-bookmarking-library/</feedburner:origLink></item>
	</channel>
</rss>
