<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.soupgiant.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://bigredtin.com/wp-atom.php">
	<title type="text">Big Red Tin</title>
	<subtitle type="text">Thoughts about the web and business from the large pantry</subtitle>

	<updated>2010-09-02T23:47:30Z</updated>

	<link rel="alternate" type="text/html" href="http://bigredtin.com" />
	<id>http://bigredtin.com/feed/atom/</id>
	

	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.soupgiant.com/bigredtin" /><feedburner:info uri="bigredtin" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>Josh Kinal</name>
					</author>
		<title type="html"><![CDATA[HTML5 for Web Designers]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/R3uYXMHHMAA/" />
		<id>http://bigredtin.com/?p=786</id>
		<updated>2010-09-02T23:47:30Z</updated>
		<published>2010-09-02T20:00:51Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="books" /><category scheme="http://bigredtin.com" term="html5" /><category scheme="http://bigredtin.com" term="reviews" />		<summary type="html"><![CDATA[The first release from publisher <a href="http://www.happycog.com/publish/abookapart/" title="A Book Apart: Happy Cog">A Book Apart</a> does exactly what I would hope for from the people who brought us the excellent <a href="http://www.alistapart.com/" title="A List Apart">A List Apart online magazine</a>. It simplifies a topic and gets me excited about using new web technologies.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/html5-for-web-designers-9/">&lt;p&gt;We haven&amp;#8217;t yet moved onto HTML5 at Soupgiant. We still code in strict XHTML 1.0 for reasons that &lt;a href="http://bigredtin.com/author/peter/" title="Peter Wilson  |  Big Red Tin"&gt;Peter&lt;/a&gt; knows a lot better than I, but I suspect it has something to do with familiarity and knowing that it works. There&amp;#8217;s a safety in that.&lt;/p&gt;
&lt;p&gt;We believe very strongly in semantic mark-up and getting things working as much as possible in as many places. We believe in graceful degradation. I believe in closing tags once they&amp;#8217;re opened and I didn&amp;#8217;t like how HTML5 didn&amp;#8217;t demand a trailing slash on stand alone elements. That just seemed like chaos.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://adactio.com/" title="Adactio: Jeremy Keith"&gt;Jeremy Keith&lt;/a&gt;&amp;#8216;s new book, &lt;em&gt;HTML5 for Web Designers&lt;/em&gt; is a no-nonsense 85 pages of the good and bad in the HTML5 specification. It explains how the spec is a lot more open and forgiving than previous specs. It also explains how much work was done to ensure better semantics than previous versions of HTML.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;re probably thinking exactly what I was. How can any 85 page book tell me what I need to know about the largest HTML specification thus far? Is 85 pages even a book or is it more like an extended pamphlet? How can I take this seriously?&lt;/p&gt;
&lt;p&gt;We bought the book largely because we trust the work &lt;a href="http://www.zeldman.com/" title="Jeffrey Zeldman Presents The Daily Report"&gt;Jeffrey Zeldman&lt;/a&gt; does. This is the first book he has published under Happy Cog&amp;#8217;s new &lt;a href="http://www.happycog.com/publish/abookapart/" title="A Book Apart: Happy Cog"&gt;A Book Apart&lt;/a&gt; label. I thought that if anybody can get a writer to condense all the info I need into a short read, it&amp;#8217;s Zeldman. But no pressure, JZ.&lt;/p&gt;
&lt;p&gt;The important things it explains is how HTML5 can be used to include rich media on your websites, how it improves web forms (which got me really excited) and how it improves on semantics. And yes, it does actually explain them.&lt;/p&gt;
&lt;p&gt;It explains these topics in enough detail that I could start using them today.&lt;/p&gt;
&lt;p&gt;I want to keep learning and improving my knowledge of web-based coding. At the same time, &lt;a href="http://soupgiant.com/" title="Soupgiant | Web Production"&gt;I&amp;#8217;m running a business now&lt;/a&gt; as well as continuing to produce &lt;a href="http://boxcutters.net/" title="Boxcutters - Australian Television Podcast"&gt;a weekly podcast&lt;/a&gt; and trying to have a life. It&amp;#8217;s hard to keep up with all the details of a new spec.&lt;/p&gt;
&lt;p&gt;It turns out, all I ever wanted was an 85 page book that explained everything I needed to know and cut out all the stuff I&amp;#8217;ll never use. I don&amp;#8217;t need a beginner&amp;#8217;s book but I also don&amp;#8217;t want an expert&amp;#8217;s tome. I want an executive summary and that&amp;#8217;s exactly what this book is. If that&amp;#8217;s all you need, look no further.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://books.alistapart.com/products/html5-for-web-designers" title="A Book Apart, HTML5 For Web Designers"&gt;&lt;em&gt;HTML5 for Web Designers&lt;/em&gt; by Jeremy Keith&lt;/a&gt; is available from the A List Apart store in paperback or ePub.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/R3uYXMHHMAA" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/html5-for-web-designers-9/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/html5-for-web-designers-9/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/html5-for-web-designers-9/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[JavaScript Localisation in WordPress]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/OhrkduGYt0I/" />
		<id>http://bigredtin.pressgiant.net/?p=759</id>
		<updated>2010-09-02T00:51:05Z</updated>
		<published>2010-09-01T20:00:45Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="coding" /><category scheme="http://bigredtin.com" term="JavaScript" /><category scheme="http://bigredtin.com" term="themes" /><category scheme="http://bigredtin.com" term="WordPress" /><category scheme="http://bigredtin.com" term="wp_enqueue_script" /><category scheme="http://bigredtin.com" term="wp_localize_script" />		<summary type="html"><![CDATA[I was asked on Twitter recently if it's possible to pass WordPress data to JavaScript, <code>wp_localize_script()</code> is the tool to do it with.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/javascript-localisation-in-wordpress/">&lt;p&gt;Recently on Twitter &lt;a title="@iamcracks" href="http://twitter.com/iamcracks/"&gt;@iamcracks&lt;/a&gt; asked&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Attention WordPress Wizards &amp;amp; Gurus. Is it possible to &amp;#8220;get WordPress to write a custom field into a javascript variable&amp;#8221;?&lt;/p&gt;
&lt;p&gt;&amp;#8211; &lt;a title="source" href="http://twitter.com/iamcracks/status/22658211370"&gt;source&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;While I wouldn&amp;#8217;t be so bold as to claim I&amp;#8217;m either a wizard or a guru, I happen to know the answer to @iamcracks question.&lt;/p&gt;
&lt;p&gt;A while back I wrote a two part tutorial on using &lt;a title="JavaScript the WordPress way" href="http://bigredtin.com/behind-the-websites/javascript-the-wordpress-way-part-1/"&gt;JavaScript the WordPress way&lt;/a&gt;, the code below builds on that. The first step is to load the JavaScript in functions.php using &lt;code&gt;wp_enqueue_script()&lt;/code&gt; as detailed in the earlier tutorial:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
function brt_load_scripts() {
  if (!is_admin()) {
    wp_enqueue_script(
      'brt-sample-script', //handle
      '/path/2/script.js', //source
      null, //no dependancies
      '1.0.1', //version
      true //load in html footer
    );
  }
}

add_action('wp_print_scripts', 'brt_load_scripts');
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This outputs the html required for the JavaScript when &lt;code&gt;wp_footer()&lt;/code&gt; is called in footer.php&lt;/p&gt;
&lt;p&gt;Localising the script is done using the function &lt;code&gt;wp_localize_script()&lt;/code&gt; it takes three variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$handle&lt;/strong&gt; &amp;#8211; (string) the handle defined when registering the script with wp_enqueue_script&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$javascriptObject&lt;/strong&gt; &amp;#8211; (string) name of the JavaScript object that contains the passed variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$variables&lt;/strong&gt; &amp;#8211; (array) the variables to be passed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To pass the site&amp;#8217;s home page and the theme directory, we&amp;#8217;d add this function call below the &lt;code&gt;wp_enqueue_script&lt;/code&gt; call above:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
...
wp_localize_script('brt-sample-script', 'brtSampleVars', array(
  'url' =&amp;gt; get_bloginfo('url'),
  'theme_dir' =&amp;gt; get_bloginfo('stylesheet_directory')
  )
);
...
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output html would be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;
/* &amp;lt;![CDATA[ */
var brtSampleVars = {
  url: "http://bigredtin.com",
  theme_dir: "http://bigredtin.com/wp-content/themes/bigredtin"
};
/* ]]&amp;gt; */
&amp;lt;/script&amp;gt;
&amp;lt;script type='text/javascript' src='/path/2/script.js?ver=1.0.1'&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Accessing the variables within JavaScript is done using the standard dot notation, for example &lt;code&gt;brtSampleVars.theme_dir&lt;/code&gt; to access the theme directory.&lt;/p&gt;
&lt;p&gt;Using a post&amp;#8217;s custom fields is slightly more complicated so I&amp;#8217;ll write out the code in full:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
function brt_load_scripts() {
  if (is_singular()) {
    wp_enqueue_script(
      'brt-sample-script', //handle
      '/path/2/script.js', //source
      null, //no dependancies
      '1.0.1', //version
      true //load in html footer
    );

    the_post();
    $allPostMeta = get_post_custom();
    wp_localize_script('brt-sample-script', 'brtSampleVars',
    array(
      'petersTwitter' =&amp;gt; $allPostMeta['myTwitter'][0],
      'joshsTwitter' =&amp;gt; $allPostMeta['joshsTwitter'][0]
      )
    );
    rewind_posts();
  }
}

add_action('wp_print_scripts', 'brt_load_scripts');
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Only pages and posts have custom fields so the check at the start of the function has become &lt;code&gt;is_singlular()&lt;/code&gt; to check the user is on either a post or a page, earlier we were testing if the user was anywhere on the front end. The arguments for &lt;code&gt;wp_enqueue_script&lt;/code&gt; have not changed.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;the_post()&lt;/code&gt; needs to be called to start the loop and initiate the $post object so the associated custom fields can be accessed in the following line and put in an array.&lt;/p&gt;
&lt;p&gt;With the custom fields easily available, the information can then be passed to &lt;code&gt;wp_localize_script()&lt;/code&gt; as earlier demonstrated. The final step is to rewind the loop so next time &lt;code&gt;the_post()&lt;/code&gt; is called, from either single.php or page.php, the post data is available.&lt;/p&gt;
&lt;p&gt;The html output from the sample above would be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type='text/javascript'&amp;gt;
/* &amp;lt;![CDATA[ */
var brtSampleVars = {
  petersTwitter: "@pwcc",
  joshsTwitter: "@sealfur"
};
/* ]]&amp;gt; */
&amp;lt;/script&amp;gt;
&amp;lt;script type='text/javascript' src='/path/2/script.js?ver=1.0.1'&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/OhrkduGYt0I" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/javascript-localisation-in-wordpress/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/javascript-localisation-in-wordpress/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/javascript-localisation-in-wordpress/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[Delay Print Stylesheets Plugin]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/y1yUAXUNf9g/" />
		<id>http://bigredtin.pressgiant.net/?p=739</id>
		<updated>2010-08-27T06:07:57Z</updated>
		<published>2010-08-27T02:17:29Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="CSS" /><category scheme="http://bigredtin.com" term="JavaScript" /><category scheme="http://bigredtin.com" term="plugin" /><category scheme="http://bigredtin.com" term="WordPress" />		<summary type="html"><![CDATA[A few weeks ago I wrote a post in which I adapted an idea from a zOompf article to delay the loading of print stylesheets until after a web page has fully rendered. I've decided to convert the code from the original post into a plugin and add it to the WordPress plugin directory.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/delay-print-css-plugin/">&lt;p&gt;A few weeks ago I wrote a post in which I &lt;a title="adapted an idea from a zOompf article" href="http://bigredtin.com/behind-the-websites/delay-loading-of-print-css/"&gt;adapted an idea from a zOompf article&lt;/a&gt; to delay the loading of print stylesheets until after a web page has fully rendered. I finished that post with the following point/question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Another question to ask is whether all this is actually worth the effort – even when reduced through automation. On Big Red Tin, the print.css is 595 bytes, the delay in rendering is negligible.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Chris and Jeff at &lt;a title="Digging into WordPress" href="http://digwp.com"&gt;Digging into WordPress&lt;/a&gt; picked up the article and posted it on their site. In turn it was picked up elsewhere and became the surprise hit of the summer at Big Red Tin. Not bad when one is shivering through a bitter Melbourne winter.&lt;/p&gt;
&lt;p&gt;As a result of the interest, I decided to convert the code from the original post into a plugin and add it to the WordPress plugin directory.&lt;/p&gt;
&lt;h4&gt;Further Testing&lt;/h4&gt;
&lt;p&gt;As I warned in the original article, I&amp;#8217;d tested the code in very limited circumstances and found it had worked. Fine for a code sample but not enough for a sub version-1.0-release plugin. Additional testing showed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stylesheets intended for IE, through conditional comments, were loading in all browsers&lt;/li&gt;
&lt;li&gt;When loading multiple stylesheets, the correct order was not maintained in all browsers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If jQuery was available I wanted to use it for JavaScript event management otherwise I&amp;#8217;d use purpose-written JavaScript. There&amp;#8217;s no point, after all, of worrying about the rendering delay caused by 600-1000 bytes only to load a 71KB (or 24KB &lt;a title="gzipped" href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_3.html"&gt;gzipped&lt;/a&gt;) file in its place.&lt;/p&gt;
&lt;p&gt;Other things I wanted to do included:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Put the PHP in a class to reduce the risk of clashing function/class names&lt;/li&gt;
&lt;li&gt;Put the JavaScript in its own namespace&lt;/li&gt;
&lt;li&gt;Keep the output code as small as possible&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To support conditional comments for IE required adding each stylesheet within a separate &amp;lt;script&amp;gt; tag, using this method the output HTML takes the following form:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;
  // add global print.css
&amp;lt;/script&amp;gt;
&amp;lt;!--[if IE 6]&amp;gt;
  &amp;lt;script type='text/javascript'&amp;gt;
    // add ie6 specific print.css
  &amp;lt;/script&amp;gt;
&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This violates my aim to keep output as small as possible but footprint has to take second place to bug-free. I could have translated the code to use &lt;a title="JavaScript conditional comments" href="http://en.wikipedia.org/wiki/Conditional_comment#Conditional_Comment_in_JScript"&gt;JavaScript conditional comments&lt;/a&gt; by translating the IE version to the JavaScript engine it uses but this could lead to future-proofing problems.&lt;/p&gt;
&lt;p&gt;To maintain the order of stylesheets, I added each event to an array of functions and then used a single event to loop through the array of functions. If jQuery is used, I add multiple events because jQuery runs events on a first in first out basis.&lt;/p&gt;
&lt;p&gt;Putting the PHP in a class and the JavaScript in its own namespace is fairly self-explanatory. &lt;a href="http://bit.ly/bBUXCh"&gt;Google is your friend&lt;/a&gt; if you wish to read up further on this.&lt;/p&gt;
&lt;p&gt;Minimising the footprint was also a simple step. I wrote the JavaScript out in full with friendly variable names. Once I was happy with the code, I ran the code through &lt;a href="http://refresh-sf.com/yui/"&gt;the YUI JavaScript compressor&lt;/a&gt;, commented out the original JavaScript in the plugin file and output the compressed version in its place.&lt;/p&gt;
&lt;p&gt;The JavaScript is output inline (within the HTML) to avoid additional HTTP requests. I was in two minds about this because browser caching is lost in the process. So it may change in a later version.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve worked out another way to keep the footprint small. Rather than creating a function to pass the stylesheet&amp;#8217;s URL and ID to &lt;code&gt;brt_print.add(url, id)&lt;/code&gt;, I wrote out the full function for each style sheet. I&amp;#8217;ll fix that in the next release.&lt;/p&gt;
&lt;p&gt;You can &lt;a title="download" href="http://wordpress.org/extend/plugins/delay-print-css/download/"&gt;download&lt;/a&gt; the &lt;a title="Delay Print CSS Plugin" href="http://http://wordpress.org/extend/plugins/delay-print-css/"&gt;Delay Print CSS Plugin&lt;/a&gt; from the WordPress plugin repository.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/y1yUAXUNf9g" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/delay-print-css-plugin/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/delay-print-css-plugin/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/delay-print-css-plugin/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Kinal</name>
					</author>
		<title type="html"><![CDATA[An Answer to the Twitter Question]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/VACi1IkSgaA/" />
		<id>http://bigredtin.com/?p=702</id>
		<updated>2010-08-19T07:20:44Z</updated>
		<published>2010-08-19T06:45:40Z</published>
		<category scheme="http://bigredtin.com" term="Business" /><category scheme="http://bigredtin.com" term="advertising" /><category scheme="http://bigredtin.com" term="buzz" /><category scheme="http://bigredtin.com" term="promotion" /><category scheme="http://bigredtin.com" term="publicity" /><category scheme="http://bigredtin.com" term="social networks" /><category scheme="http://bigredtin.com" term="Twitter" /><category scheme="http://bigredtin.com" term="zeitgeist" />		<summary type="html"><![CDATA[One of the questions we're often asked by clients when doing an initial consultation is "what about twitter?" After a couple of years of thinking about an answer, Josh might finally have one.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/business/an-answer-to-the-twitter-question/">&lt;p&gt;One of the questions we&amp;#8217;re often asked by clients when doing an initial consultation is &amp;#8220;what about twitter?&amp;#8221; It goes along with &amp;#8220;should we have a Facebook page?&amp;#8221; and &amp;#8220;how do I get MySpace friends?&amp;#8221;&lt;/p&gt;
&lt;p&gt;Social networking, of the web-based variety, is something that people will be writing books about for years to come. It&amp;#8217;s as hot now as it was 3 years ago and 5 years ago. That is to say, it continues to be hot because there continue to be new social networks that become popular and die out and then become popular and then die out again.&lt;/p&gt;
&lt;p&gt;The trick for a business is to be able to appropriately surf that wave of social network highs and lows and never put all eggs into a single basket.&lt;/p&gt;
&lt;p&gt;There are big businesses that do great work on Twitter. Airlines like &lt;a href="http://twitter.com/virginblue"&gt;Virgin Blue&lt;/a&gt; and &lt;a href="http://twitter.com/southwestair"&gt;Southwest&lt;/a&gt; have a team dedicated to monitoring social websites to see what people are saying about them. So do telecommunications companies like &lt;a href="http://twitter.com/optus"&gt;Optus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For customers the advantage is that they can have a direct line to vent their frustrations. Shout out on Twitter about how outrageously incorrect your bill seems to be and you can not only have friends console you or also share their experiences, but there&amp;#8217;s a fairly good chance someone from the company will be in touch to help you through your issue.&lt;/p&gt;
&lt;p&gt;For companies the advantage is largely and expectedly the reverse. It&amp;#8217;s easy to monitor exactly what people are saying about your company, your industry or your competitors. It&amp;#8217;s also really easy to reach out to a customer and make them feel a little bit special by personally helping them with their problem.&lt;/p&gt;
&lt;p&gt;Twitter, however, is not the place to try to influence customers or get them to change their habits. It is not as effective as an advertising campaign or a media release but it is a good place to see what people are saying about your latest ad campaign etc. Twitter for companies is more about measurement and accessibility than direct marketing and that&amp;#8217;s important to remember.&lt;/p&gt;
&lt;p&gt;Nobody likes to be spammed at. Nobody needs to get a direct message because they followed your company. People don&amp;#8217;t hang around with Twitter because they enjoy being bombarded with irrelevant messages. They use the service because it helps them feel connected and part of a community. That&amp;#8217;s important to remember because, while it might be hard to build up a good reputation on Twitter, it will only take minutes to be burnt and razed to the ground with no one around to sweep up your ashes.&lt;/p&gt;
&lt;p&gt;A &lt;a href="http://www.kcrw.com/etc/programs/tb/tb100809comic-con_and_hollyw"&gt;recent radio piece about Comic-Con&lt;/a&gt; featured a genre film promoter talking about changing people&amp;#8217;s opinions and excitement about a product. He told a story about going to Comic-Con to convince an audience of die-hard &lt;em&gt;Batman&lt;/em&gt; fans that the, then, new movie (1989) would not be the camp 1960s &lt;em&gt;Batman&lt;/em&gt; despite the involvement of the director of a &lt;a href="http://www.imdb.com/title/tt0089791/"&gt;Pee-Wee Herman film&lt;/a&gt; and the guy from &lt;em&gt;&lt;a href="http://www.imdb.com/title/tt0085970/"&gt;Mr Mom&lt;/a&gt;&lt;/em&gt;. Within minutes he managed to turn the audience from a booing mass to applauding fans excited with anticipation.&lt;/p&gt;
&lt;p&gt;An opinion turn-around like that could never be achieved on Twitter. The value Twitter has, though, is that if something like that were to happen today, the people in that room would tweet about it and excitement about the product would spread exponentially and almost instantly&lt;/p&gt;
&lt;p&gt;Twitter is the buzz. If our clients are on Twitter they are in a much better position to have their finger on the pulse and give them more information about the zeitgeist. They might not have a million followers but at the very least they&amp;#8217;ll be able to gauge influence.&lt;/p&gt;
&lt;p&gt;Twitter gives companies the ability to do something they&amp;#8217;ve never done before. They have a direct link into their customers&amp;#8217; thoughts and conversations. That&amp;#8217;s a very powerful tool and it needs to be approached with patience and a lot of thought.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/VACi1IkSgaA" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/business/an-answer-to-the-twitter-question/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/business/an-answer-to-the-twitter-question/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/business/an-answer-to-the-twitter-question/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Kinal</name>
					</author>
		<title type="html"><![CDATA[Use Experience to build Experience]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/ZbfL_1_dNNE/" />
		<id>http://bigredtin.com/?p=666</id>
		<updated>2010-08-12T05:28:25Z</updated>
		<published>2010-08-12T00:49:36Z</published>
		<category scheme="http://bigredtin.com" term="Design" /><category scheme="http://bigredtin.com" term="experience" /><category scheme="http://bigredtin.com" term="online stores" /><category scheme="http://bigredtin.com" term="process flow" /><category scheme="http://bigredtin.com" term="retail" />		<summary type="html"><![CDATA[Real world experience counts for a lot when developing for an online world. Sure, it sounds trite but it's frighteningly true. Working on redesigning the user interface for an online store, I found myself digging deep into my own experiences to be able to anticipate the needs of the customer.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/design/use-experience-to-build-experience/">&lt;p&gt;Working on redesigning the user interface for an online store, I found myself digging deep into my own experiences to be able to anticipate the needs of the customer.&lt;/p&gt;
&lt;p&gt;For 8 years, from the ages of 14 to 22, I worked in retail. My parents ran a couple of &lt;a href="http://en.wiktionary.org/wiki/manchester"&gt;manchester&lt;/a&gt; stores and I worked there after school and on weekends. In two of those years I also worked in a video library*.&lt;/p&gt;
&lt;p&gt;The thing about designing for the web is, we often don&amp;#8217;t take into account, not only what our audience&amp;#8217;s real-world experience is, but also our own.&lt;/p&gt;
&lt;p&gt;When laying out a &amp;#8216;brick &amp;amp; mortar&amp;#8217; retail store, there is a logical flow to entice customers further in. A clothing retailer, for example, has the changing rooms at the back of the store so you have to walk past all the racks first. Trestle tables with specials are outside the store to entice the customer to come in.&lt;/p&gt;
&lt;p&gt;&amp;#8216;Brick &amp;#038; mortar&amp;#8217; stores have their differences to online stores but customers expect a similar experience. The shopping brain has certain established neural pathways. It&amp;#8217;s easier to capitalise on those than to try to forge new pathways.&lt;/p&gt;
&lt;p&gt;When I explained the concept of the customer&amp;#8217;s journey through the store to my client I could speak with experienced knowledge of how a customer expects to be treated.&lt;/p&gt;
&lt;p&gt;I was able to draw on my knowledge and experience in working with shoppers to design and explain how an online shop needs to feel. I used parts of the screen real-estate as if they were parts of the shop floor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The shopping cart is like the cashier&amp;#8217;s counter. It needs to be visible, obvious but unobtrusive to the flow of the store. That&amp;#8217;s why it&amp;#8217;s in the top right, squarish and about one third the width of the content area.&lt;/li&gt;
&lt;li&gt;The front page is like the window-dressing. It needs to show popular, attractive, sought-after, and new items in an enticing way. It&amp;#8217;s a lot easier in a web-store because you can actually give areas of the screen titles like &amp;#8220;Popular Items&amp;#8221;, &amp;#8220;Highest Rated&amp;#8221; and &amp;#8220;Recently Added&amp;#8221;. Cookies and user history also give the opportunity to tailor the store to the visitor.&lt;/li&gt;
&lt;li&gt;There&amp;#8217;s a section of the front page that has a different coloured header and displays some heavily discounted items like the trestle tables on the footpath in front of the shop.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are plenty of times when I&amp;#8217;ve worked on websites in areas of business where I didn&amp;#8217;t have 8 years&amp;#8217; experience. In those situations I&amp;#8217;ve sat down with clients and asked them to show me every aspect of their business I can think of. I go through business processes with them for hours so that I can accurately recreate real world experiences. &lt;/p&gt;
&lt;p&gt;We have a tendency, because we work with computers, to isolate ourselves from the real world. We forget, sometimes, that people in the real world often just want to replicate their own experience with some added convenience. It&amp;#8217;s up to us to be able to capture the essence of the real world to make our audiences feel more comfortable online. Sometimes that means digging into our own past and sometimes it means distilling someone else&amp;#8217;s knowledge but the aim should always remain: Make the user&amp;#8217;s transition from real world to online as seamless as possible.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;*The older people in the audience may need to explain that concept to the young &amp;#8216;uns.&lt;/em&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/ZbfL_1_dNNE" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/design/use-experience-to-build-experience/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/design/use-experience-to-build-experience/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/design/use-experience-to-build-experience/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[Delay loading of print CSS]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/1EHY3KG-e2k/" />
		<id>http://bigredtin.pressgiant.net/?p=689</id>
		<updated>2010-08-27T05:07:48Z</updated>
		<published>2010-07-28T05:03:50Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="coding" /><category scheme="http://bigredtin.com" term="CSS" /><category scheme="http://bigredtin.com" term="JavaScript" /><category scheme="http://bigredtin.com" term="WordPress" />		<summary type="html"><![CDATA[Recently I stumbled across an article detailing browser performance with the CSS print media type. In most recent browsers the print stylesheet held up rendering.

The article suggested a solution, which I decided to automate for WordPress.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/delay-loading-of-print-css/">&lt;p&gt;Recently I stumbled across an article on zOompf &lt;a title="detailing browser performance with the CSS print media type" href="http://zoompf.com/blog/2009/12/browser-performance-problem-with-css-print-media-type"&gt;detailing browser performance with the CSS print media type&lt;/a&gt;. In most recent browsers, Safari being the exception, the print stylesheet held up rendering of the page.&lt;/p&gt;
&lt;p&gt;The zOomph article suggests a solution, to load print stylesheets using JavaScript once the page has  rendered (ie, on the &lt;code&gt;window.onload&lt;/code&gt; event), with a backup for the JavaScript impaired. You can see their code in the original article.&lt;/p&gt;
&lt;h4&gt;Automating the task for WordPress&lt;/h4&gt;
&lt;p&gt;Most sites I develop are in WordPress so I decided to automate the process. This relies on using &lt;code&gt;wp_enqueue_style&lt;/code&gt; to register the stylesheets:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function enqueue_css(){
  if (!is_admin()){
    wp_enqueue_style (
      'bigred-print', /* handle */
      '/path-to/print.css', /* source */
      null, /* no requirements */
      '1.0', /* version */
      'print' /* media type */
    );
  }
}
add_action('wp_print_styles', 'enqueue_css');&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above code will output the following HTML in the header:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;link rel='stylesheet' id='bigred-print-css'  href='/path-to/print.css?ver=1.0' type='text/css' media='print' /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first step is to wrap the above html in noscript tags, the WordPress &lt;a title="filter" href="http://codex.wordpress.org/Plugin_API#Filters"&gt;filter&lt;/a&gt; &lt;code&gt;style_loader_tag&lt;/code&gt; is ideal for this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function js_printcss($tag, $handle) {
  global $wp_styles;
  if ($wp_styles-&amp;gt;registered[$handle]-&amp;gt;args == 'print') {
    $tag = "&amp;lt;noscript&amp;gt;" . $tag . "&amp;lt;/noscript&amp;gt;";
  }
  return $tag;
}
add_filter('style_loader_tag', 'js_printcss', 5, 2);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The filter runs for all stylesheets, regardless of media type, so the function checks for print stylesheets and wraps them in the &lt;code&gt;noscript&lt;/code&gt; tag, other media types are left alone.&lt;/p&gt;
&lt;p&gt;The first two arguments are the filter and function names respectively, the third argument specifies the timing (5 is the default) and the final argument tells WordPress how many arguments to pass to the filter – two – in this case $tag and $handle.&lt;/p&gt;
&lt;p&gt;With the new filter, WordPress now outputs following HTML in the header:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;noscript&amp;gt;
&amp;lt;link rel='stylesheet' id='bigred-print-css'  href='/path-to/print.css?ver=1' type='text/css' media='print' /&amp;gt;
&amp;lt;/noscript&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The next step is to add the JavaScript to load the stylesheets, we can do this by changing our original function,  &lt;code&gt;js_printcss&lt;/code&gt;, and making use of a global variable:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$printCSS = '';

function js_printcss($tag, $handle){
  global $wp_styles, $printCSS;
  if ($wp_styles-&amp;gt;registered[$handle]-&amp;gt;args == 'print') {

    $tag = "&amp;lt;noscript&amp;gt;" . $tag . "&amp;lt;/noscript&amp;gt;";

    preg_match("/&amp;lt;\s*link\s+[^&amp;gt;]*href\s*=\s*[\"']?([^\"' &amp;gt;]+)[\"' &amp;gt;]/", $tag, $hrefArray);
    $href = $hrefArray[1];

    $printCSS .= "var cssNode = document.createElement('link');";
    $printCSS .= "cssNode.type = 'text/css';";
    $printCSS .= "cssNode.rel = 'stylesheet';";
    $printCSS .= "cssNode.href = '" . esc_js($href) . "';";
    $printCSS .= "cssNode.media = 'print';";
    $printCSS .= "document.getElementsByTagName(\"head\")[0].appendChild(cssNode);";
  }
  return $tag;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The code creates the PHP variable &lt;code&gt;$printCSS&lt;/code&gt; globally, which is then called into the function using the global command.&lt;/p&gt;
&lt;p&gt;After wrapping the tag in the &lt;code&gt;noscript&lt;/code&gt; tags, the new function uses a regular expression to extract the URL of the stylesheet from the link tag and placing it the variable &lt;code&gt;$href&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Having extracted the stylesheet&amp;#8217;s URL, the function then appends the required JavaScript to the PHP global variable &lt;code&gt;$printCSS&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The final step is to add the JavaScript to the footer of the HTML using the wp_footer action in WordPress. The PHP to do this is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function printCSS_scriptTags(){
  global $printCSS;
  if ($printCSS != '') {
    echo "&amp;lt;script type='text/javascript'&amp;gt;\n";
    echo "window.onload = function(){\n";
    echo $printCSS;
    echo "}\n&amp;lt;/script&amp;gt;";
  }
}

add_action('wp_footer', 'printCSS_scriptTags');&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above code uses &lt;code&gt;window.onload&lt;/code&gt; as dictated in the original article. A better method would be to use an event listener to do the work, for those using jQuery we would change the function to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function printCSS_scriptTags(){
  global $printCSS;
  if ($printCSS != '') {
    echo "&amp;lt;script type='text/javascript'&amp;gt;\n";
    echo "jQuery(window).ready(function(){\n";
    echo $printCSS;
    echo "});\n&amp;lt;/script&amp;gt;";
 }

}
add_action('wp_footer', 'printCSS_scriptTags');&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above solution had been tested for very limited circumstances only and found to have worked. Were I to use the function in a production environment I would undertake further testing.&lt;/p&gt;
&lt;p&gt;Another question to ask is whether all this is actually worth the effort – even when reduced through automation. On Big Red Tin, the print.css is 595 bytes, the delay in rendering is negligible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update Aug 23, 2010&lt;/strong&gt;: Fixed a type in the code block redefining &lt;code&gt;js_printcss&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update Aug 27, 2010&lt;/strong&gt;: I&amp;#8217;ve decided to release this as a plugin, get the skinny and the plugin from the &lt;a href="http://bigredtin.com/behind-the-websites/delay-print-css-plugin/"&gt;followup article&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/1EHY3KG-e2k" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/delay-loading-of-print-css/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/delay-loading-of-print-css/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/delay-loading-of-print-css/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[Thesis V WordPress, Pearson V Mullenweg]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/CyBl3t3jHzI/" />
		<id>http://bigredtin.pressgiant.net/?p=669</id>
		<updated>2010-07-19T01:23:28Z</updated>
		<published>2010-07-15T01:33:38Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="blogging" /><category scheme="http://bigredtin.com" term="Chris Pearson" /><category scheme="http://bigredtin.com" term="GPL" /><category scheme="http://bigredtin.com" term="Matt Mullenweg" /><category scheme="http://bigredtin.com" term="Movable Type" /><category scheme="http://bigredtin.com" term="themes" /><category scheme="http://bigredtin.com" term="Thesis" /><category scheme="http://bigredtin.com" term="WordPress" />		<summary type="html"><![CDATA[Mullenweg believes that, because WordPress is released under the GPLv2 license, all themes and plugins developed for WordPress must also be released under the same license. Pearson disagrees. I believe that Mullenweg is wrong. WordPress themes can operate on other blogging platforms with minimal changes.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/thesis-v-wordpress/">&lt;p&gt;Reading my WordPress feeds this-morning, it appears a &lt;a title="war of words" href="http://thenextweb.com/socialmedia/2010/07/14/wordpress-and-thesis-go-to-battle-mullenweg-may-sue/"&gt;war of words&lt;/a&gt; broke out overnight between Matt Mullenweg (the lead developer of WordPress) and Chris Pearson, the developer of the Thesis theme.&lt;/p&gt;
&lt;p&gt;In brief, Mullenweg believes that, because WordPress is released under the &lt;a title="GPLv2 license" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt"&gt;GPLv2 license&lt;/a&gt;, all themes and plugins developed for WordPress must also be released under the same license. Pearson disagrees.&lt;/p&gt;
&lt;p&gt;This situation has never affected us directly at Soupgiant so we haven&amp;#8217;t needed to, and this is important, ask our lawyer if my interpretation is correct. &lt;strong&gt;This is a layman&amp;#8217;s opinion and should be treated as such&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The battle comes down to these clauses in the GPLv2 license:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;You must cause any work that you distribute or publish, that in    whole or in part contains or is derived from the Program or any    part thereof, to be licensed as a whole at no charge to all third    parties under the terms of this License.&lt;/p&gt;
&lt;p&gt;If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.&lt;/p&gt;
&lt;p&gt;&amp;#8211;source &lt;a title="GPLv2 license" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt"&gt;GPLv2 license&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Due to the second clause quoted above, I believe that Mullenweg is wrong. WordPress themes can operate on other blogging platforms with minimal changes. This has been done before with the &lt;a title="Sandbox theme for WordPress" href="http://www.plaintxt.org/themes/sandbox/"&gt;Sandbox theme for WordPress&lt;/a&gt; which was successfully ported to &lt;a title="Movable Type" href="http://plugins.movabletype.org/sandbox/"&gt;Movable Type&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;WordPress themes output &lt;abbr&gt;HTML&lt;/abbr&gt; with a series of calls to the blogging platform. To output the post&amp;#8217;s title and contents in our base theme, we use the code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h2 class="entry-title"&amp;gt;&amp;lt;?php the_title() ?&amp;gt;&amp;lt;/h2&amp;gt;
&amp;lt;div class="entry-content"&amp;gt;
    &amp;lt;?php the_content("Continue reading " . the_title('', '', false)); ?&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To output the same &lt;abbr&gt;HTML&lt;/abbr&gt; in a Movable Type theme, we would output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h2 class="entry-title"&amp;gt;&amp;lt;$mt:EntryTitle$&amp;gt;&amp;lt;/h2&amp;gt;
&amp;lt;div class="entry-content"&amp;gt;
    &amp;lt;$mt:EntryBody$&amp;gt; &amp;lt;$mt:EntryMore$&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In terms of a page&amp;#8217;s output, the above code is a minor part of the page. &lt;em&gt;The theme&amp;#8217;s template is mostly made up of HTML and CSS, HTML and CSS operate in the browser and not in the blogging platform&lt;/em&gt;. It&amp;#8217;s for that reason that I believe that Pearson is correct in this case.&lt;/p&gt;
&lt;p&gt;I acknowledge that WordPress hooks may complicate the matter but these hooks output such a minor part of a theme&amp;#8217;s HTML, that I consider the theme &lt;em&gt;uses&lt;/em&gt; the platform but isn&amp;#8217;t &lt;em&gt;derived&lt;/em&gt; from the platform. I&amp;#8217;ve left plugins out of this discussion as these are a more complicated matter: they can output HTML or they can build on the platform.&lt;/p&gt;
&lt;p&gt;The above said, were I to release a WordPress theme I would probably release it under the GPL as a hat tip and thank you to the community that has assisted me so much. However, if the theme was as complicated as the Thesis theme, I may feel differently about the matter when it&amp;#8217;s crunch time.&lt;/p&gt;
&lt;p&gt;Again, this is a layman&amp;#8217;s opinion and should be treated as such. If you have a layman&amp;#8217;s opinion too, &lt;a title="we'd love to hear it in the comments" href="http://bigredtin.com/behind-the-websites/thesis-v-wordpress/#comments"&gt;we&amp;#8217;d love to hear it in the comments&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/CyBl3t3jHzI" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/thesis-v-wordpress/#comments" thr:count="3" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/thesis-v-wordpress/feed/atom/" thr:count="3" />
		<thr:total>3</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/thesis-v-wordpress/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[Getting the bloginfo correctly]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/kp5ZCXf8CN0/" />
		<id>http://bigredtin.pressgiant.net/?p=646</id>
		<updated>2010-07-13T07:17:16Z</updated>
		<published>2010-07-13T02:12:30Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="bloginfo" /><category scheme="http://bigredtin.com" term="coding" /><category scheme="http://bigredtin.com" term="domains" /><category scheme="http://bigredtin.com" term="plugin" /><category scheme="http://bigredtin.com" term="theme" /><category scheme="http://bigredtin.com" term="WordPress" /><category scheme="http://bigredtin.com" term="WordPress MS" />		<summary type="html"><![CDATA[One of the standout problems when using plugins with WordPress MS is when they define a constant for the plugin’s url as the script starts executing.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/getting-the-bloginfo-correctly/">&lt;p&gt;This site runs on an &lt;a title="WordPress MS" href="http://codex.wordpress.org/Create_A_Network"&gt;WordPress &lt;/a&gt;&lt;abbr title="Multi Site"&gt;&lt;a title="WordPress MS" href="http://codex.wordpress.org/Create_A_Network"&gt;MS&lt;/a&gt;&lt;/abbr&gt; install, along with a number of other small sites. You can see the full list of sites &lt;a title="on the directory page" href="http://pressgiant.net/"&gt;on the directory page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As with most WordPress sites we use plugins to enhance WordPress, including &lt;a title="Donncha O Caoimh" href="http://ocaoimh.ie/"&gt;Donncha O Caoimh&lt;/a&gt;&amp;#8216;s excellent &lt;a title="WordPress MU Domain Mapping" href="http://ocaoimh.ie/wordpress-mu-domain-mapping/"&gt;WordPress &lt;abbr&gt;MU&lt;/abbr&gt; Domain Mapping&lt;/a&gt; plugin. As the name implies, the domain mapping plugin allows us to use top level domains for each site rather than being stuck with sub-domains. In the case of this blog, without the plugin it would reside at &lt;a title="bigredtin.pressgiant.com" href="http://bigredtin.com"&gt;bigredtin.pressgiant.net&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Taking care with plugins&lt;/h4&gt;
&lt;p&gt;Many plugins are tested for the single site version of WordPress only. I don&amp;#8217;t have a problem with this as most plugins are released under the GPL and free in terms of both speech and beer. If I&amp;#8217;m not paying for software, it&amp;#8217;s up to me to test it in the fringe environment of WordPress &lt;abbr title="Multi Site"&gt;MS&lt;/abbr&gt;.&lt;/p&gt;
&lt;p&gt;Now that WordPress is WordPress &lt;abbr title="Multi Site"&gt;MS&lt;/abbr&gt; is WordPress, more developers may test in both environments but they certainly can&amp;#8217;t be expected to test with all manner of combinations of plugins.&lt;/p&gt;
&lt;h4&gt;The standout problem&lt;/h4&gt;
&lt;p&gt;One of the standout problems when using plugins with WordPress &lt;abbr title="Multi Site"&gt;MS&lt;/abbr&gt; is when they define a constant for the plugin&amp;#8217;s url as the script starts executing, the PHP code may look similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php

  define('PLUGIN_DIR', get_bloginfo('url') . "/wp-content/plugins/peters-plugin");

  function plugin_js_css(){
    wp_enqueue_script('plugin-js', PLUGIN_DIR . '/script.js');
    wp_enqueue_style('plugin-css', PLUGIN_DIR . '/style.css');
  }

  add_action('init', 'plugin_js_css');

?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above stands equally for themes mapping the stylesheet directory at the start of execution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php

  define('THEME_DIR', get_bloginfo('stylesheet_directory') );

  function theme_js_css(){
    wp_enqueue_script('theme-js', THEME_DIR . '/script.js');
    wp_enqueue_style('theme-css', THEME_DIR . '/style.css');
  }

  add_action('init', 'theme_js_css');

?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a title="get_bloginfo" href="http://codex.wordpress.org/Function_Reference/get_bloginfo"&gt;&lt;code&gt;get_bloginfo&lt;/code&gt;&lt;/a&gt; and &lt;a title="bloginfo" href="http://codex.wordpress.org/Function_Reference/bloginfo"&gt;&lt;code&gt;bloginfo&lt;/code&gt;&lt;/a&gt; functions return information about your blog and your theme settings including the site&amp;#8217;s home page, the theme&amp;#8217;s directory (as in the second code sample above) or the stylesheet url. &lt;code&gt;bloginfo&lt;/code&gt; outputs the requested information to your &lt;abbr&gt;HTML&lt;/abbr&gt;, &lt;code&gt;get_bloginfo&lt;/code&gt; returns it for use in your &lt;abbr&gt;PHP&lt;/abbr&gt;. &lt;/p&gt;
&lt;p&gt;Outside of code samples, &lt;code&gt;bloginfo&lt;/code&gt; and &lt;code&gt;get_bloginfo&lt;/code&gt; are interchangeable throughout this article.&lt;/p&gt;
&lt;p&gt;The problems occur when a subsequently loaded plugin needs to change something retrieved from &lt;code&gt;bloginfo&lt;/code&gt;. In this site&amp;#8217;s case, Domain Mapping changes all URLs obtained through &lt;code&gt;bloginfo&lt;/code&gt;, but it could be a plugin that simply changes the stylesheet url to a subdomain to speed up page load.&lt;/p&gt;
&lt;p&gt;In a recent case, a plugin – let&amp;#8217;s call it &lt;a title="Disqus" href="http://disqus.com/"&gt;Disqus&lt;/a&gt; – was defining a constant in this manner. As result an &lt;abbr title="Cross-site scripting"&gt;XSS&lt;/abbr&gt; error was occurring when attempting to use Facebook Connect. Replacing the constant with a &lt;code&gt;bloginfo&lt;/code&gt; call fixed the problem.&lt;/p&gt;
&lt;p&gt;The improved code for the first sample above is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php

  function plugin_js_css(){
    wp_enqueue_script('plugin-js', get_bloginfo('url') . '/wp-content/plugins/peters-plugin/script.js');
    wp_enqueue_style('plugin-css', Pget_bloginfo('url') . '/wp-content/plugins/peters-plugin/style.css');
  }

  add_action('init', 'plugin_js_css');

?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;bloginfo doesn&amp;#8217;t hit the database everytime&lt;/h4&gt;
&lt;p&gt;I presume the developers set their own constants because they&amp;#8217;d like to avoid hitting the database repeatedly to receive the same information.&lt;/p&gt;
&lt;p&gt;Having run some tests on my local install of WordPress, I can assure you this is not the case. Running &lt;code&gt;bloginfo('stylesheet_directory')&lt;/code&gt; triggers a db call on the first occurrence, the information is then cached for subsequent calls.&lt;/p&gt;
&lt;p&gt;I realise I sound incredibly fussy and that I&amp;#8217;m suggesting we protect against edge cases on our edge cases. You&amp;#8217;re right, and &lt;a title="it's not the first time" href="http://bigredtin.com/behind-the-websites/javascript-the-wordpress-way-part-1/"&gt;it&amp;#8217;s not the first time&lt;/a&gt;, but as developers it&amp;#8217;s the edge cases that we&amp;#8217;re employed to avoid.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/kp5ZCXf8CN0" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/getting-the-bloginfo-correctly/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/getting-the-bloginfo-correctly/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/getting-the-bloginfo-correctly/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Peter Wilson</name>
						<uri>http://peterwilson.cc</uri>
					</author>
		<title type="html"><![CDATA[&#8216;Skip to Content&#8217; Links]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/HkT25U48gxM/" />
		<id>http://bigredtin.pressgiant.net/?p=635</id>
		<updated>2010-07-08T02:03:45Z</updated>
		<published>2010-07-08T02:03:45Z</published>
		<category scheme="http://bigredtin.com" term="Behind the Websites" /><category scheme="http://bigredtin.com" term="accessibility" /><category scheme="http://bigredtin.com" term="Best Practice" /><category scheme="http://bigredtin.com" term="coding" /><category scheme="http://bigredtin.com" term="content" /><category scheme="http://bigredtin.com" term="JAWS" /><category scheme="http://bigredtin.com" term="screen readers" /><category scheme="http://bigredtin.com" term="WordPress" />		<summary type="html"><![CDATA[Josh and I were discussing the positioning of Skip to Content links on a website. In the past I've placed these in the first menu on the page, usually positioned under the header.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/behind-the-websites/skip-to-content-links/">&lt;p&gt;Big Red Tin co-author, Josh, and I were discussing the positioning of &lt;em&gt;Skip to Content&lt;/em&gt; links on a website. In the past I&amp;#8217;ve placed these in the first menu on the page, usually positioned under the header.&lt;/p&gt;
&lt;p&gt;According to the &lt;a title="fangs plugin for firefox" href="http://www.standards-schmandards.com/projects/fangs/"&gt;fangs plugin&lt;/a&gt;, the &lt;a title="JAWS" href="http://www.freedomscientific.com/products/fs/jaws-product-page.asp"&gt;JAWS&lt;/a&gt; screen reader reads the opening of &lt;a title="Soupgiant.com" href="http://soupgiant.com/"&gt;Soupgiant.com&lt;/a&gt; as:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Page has seven  headings and forty-three  links Soupgiant   vertical bar  Web Production  dash  Internet Explorer Heading level one Link Graphic Soupgiant   vertical bar  Web Production Heading level five Heat and Serve Combine  seventeen  years of web production experience, twenty  years of  television  and  radio experience,  put it all in a very large pot on a  gentle heat.  Stir regularly  and  serve. Soupgiant goes well with croutons  and  a  touch of parsley.List of five  items bullet &lt;strong&gt;This page link  Skip to Content&lt;/strong&gt; bullet Link Home bullet Link About bullet Link Contact bullet Link Folio&lt;/p&gt;
&lt;p&gt;- my emphasis&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&amp;#8217;s a lot of content to get through, on every page of the site, before the Skip to Content link. It would be much better if the skip to content link were earlier on the site.&lt;/p&gt;
&lt;p&gt;As the &lt;abbr&gt;HTML&lt;/abbr&gt; title of the page is read out by JAWS, the best position would be before the in-page title. The opening content would then read as:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Page has seven  headings and forty-three  links Soupgiant   vertical bar  Web Production  dash  Internet Explorer &lt;strong&gt;This page link Skip to Content&lt;/strong&gt; Heading level one Link Graphic Soupgiant   vertical bar  Web Production&lt;/p&gt;
&lt;p&gt;- again, the emphasis is mine&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That gives the JAWS user the title of the page and immediately allows them to skip to the page&amp;#8217;s content. I don&amp;#8217;t read the header of on every page of a site, nor should I expect screen reader users to.&lt;/p&gt;
&lt;p&gt;I realise screen readers most likely have a feature to skip around the page relatively easily, regardless of how the page is set up but our aim should not be &lt;em&gt;relative&lt;/em&gt; ease, our aim should be &lt;em&gt;absolute&lt;/em&gt; ease.&lt;/p&gt;
&lt;p&gt;As a result, we&amp;#8217;ve decided to move the skip to content links on future sites to earlier in the page.&lt;/p&gt;
&lt;p&gt;Sadly, this revelation came up as a result of what I consider to be a limitation of the WordPress 3.0+ function &lt;code&gt;&lt;a title="wp_nav_menu" href="http://codex.wordpress.org/Function_Reference/wp_nav_menu"&gt;wp_nav_menu&lt;/a&gt;&lt;/code&gt;, the inability to add items at the start of the menu. I should have considered the accessibility implications much earlier. It serves as a reminder, to all web developers, that we should constantly review our practices and past decisions.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve recently changed something you&amp;#8217;ve always done, &lt;a title="we'd love to hear about it in the comments" href="http://bigredtin.com/behind-the-websites/skip-to-content-links/#comments"&gt;we&amp;#8217;d love to hear about it in the comments&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/HkT25U48gxM" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/behind-the-websites/skip-to-content-links/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/behind-the-websites/skip-to-content-links/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/behind-the-websites/skip-to-content-links/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Kinal</name>
					</author>
		<title type="html"><![CDATA[Designing a User Interface with Caveat Emptor]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.soupgiant.com/~r/bigredtin/~3/1CKaGQeljUw/" />
		<id>http://bigredtin.com/?p=617</id>
		<updated>2010-07-06T02:04:39Z</updated>
		<published>2010-07-06T01:52:33Z</published>
		<category scheme="http://bigredtin.com" term="Design" /><category scheme="http://bigredtin.com" term="amazon" /><category scheme="http://bigredtin.com" term="communication" /><category scheme="http://bigredtin.com" term="ecommerce" /><category scheme="http://bigredtin.com" term="expectations" /><category scheme="http://bigredtin.com" term="kindle" /><category scheme="http://bigredtin.com" term="shopping" /><category scheme="http://bigredtin.com" term="usability" />		<summary type="html"><![CDATA[There are lots of elements that go into making a good online store. One of the most important is that customers have access to all the information they need to make an informed decision.]]></summary>
		<content type="html" xml:base="http://bigredtin.com/design/designing-a-user-interface-with-caveat-emptor/">&lt;p&gt;Recently an &lt;a href="http://www.amazon.com/gp/product/B0015T963C?ie=UTF8&amp;#038;tag=boxcutters-20&amp;#038;linkCode=as2&amp;#038;camp=1789&amp;#038;creative=390957&amp;#038;creativeASIN=B0015T963C"&gt;Amazon Kindle&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=boxcutters-20&amp;#038;l=as2&amp;#038;o=1&amp;#038;a=B0015T963C" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; came into my life.&lt;/p&gt;
&lt;p&gt;To test it out I obtained a free copy of &lt;a href="http://books.google.com.au/books?id=UFhlhCvQigkC&amp;#038;printsec=frontcover&amp;#038;dq=hound+of+the+baskervilles&amp;#038;source=bl&amp;#038;ots=6BDrd2XvtZ&amp;#038;sig=7gnwjXpUalRLTHxlTqvMbzKZV7w&amp;#038;hl=en&amp;#038;ei=aXkyTI2sO463cbHI2bgD&amp;#038;sa=X&amp;#038;oi=book_result&amp;#038;ct=result&amp;#038;resnum=3&amp;#038;ved=0CDIQ6AEwAg#v=onepage&amp;#038;q&amp;#038;f=false"&gt;The Hound of the Baskervilles&lt;/a&gt; from the online store and started reading. I was an instant convert. I loved the experience and I loved the concept.&lt;/p&gt;
&lt;p&gt;Until, that is , I found my way into Chapter 2 and there were vital passages missing from the text. It soiled my experience with the Kindle.&lt;/p&gt;
&lt;p&gt;There are a number of lessons here. Obviously, there&amp;#8217;s the whole &lt;em&gt;caveat emptor&lt;/em&gt;, you get what you pay for scenario. A little bit of research would have shown me &lt;a href="http://www.amazon.com/review/RX146XZB1IJWQ/ref=cm_cr_rdp_perm"&gt;this review&lt;/a&gt; that tells me up-front what to expect:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt; This edition is missing certain passages&amp;#8230; Whenever there is a point in the story where a character reads out of a newspaper or other document, that passage is missing from this Kindle edition. Spend a dollar and get a different version. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;But the other lesson is more a question for thought. Why would Amazon keep the book in their store if it&amp;#8217;s not what people are expecting? There is no obvious avenue to inform Amazon of the problem with the book and no way to ask them to remove the book so other people don&amp;#8217;t fall into the same trap.&lt;/p&gt;
&lt;p&gt;When building the user interface of an online store, there are many things to take into account. Feedback is vital for any business. Amazon and &lt;a href="http://www.zappos.com/"&gt;Zappos&lt;/a&gt; have built empires with great customer service but customer service is about a lot more than just an attentive complaints department or a good returns policy.&lt;/p&gt;
&lt;p&gt;Great customer service starts with the user interface. It&amp;#8217;s the experience a customer has when they browse or purchase a product. A bad UI is like having a rude salesperson on the shop floor. A customer should be able to trust that the seller is looking out for them. There should be a way to bring issues of faulty products to the attention of the sellers. &lt;/p&gt;
&lt;p&gt;Sometimes there are use-cases that just aren&amp;#8217;t foreseen. But when they reveal themselves it&amp;#8217;s important for an online store to be able to adapt.&lt;/p&gt;
&lt;p&gt;So there are things that Amazon could have implemented to make my experience better. A roll-over information box that showed me the start of the most helpful review, for example, could have given me the information I needed to make my decision to purchase or not.&lt;/p&gt;
&lt;p&gt;These are the small design things; the small usability things that we try to develop every day.&lt;/p&gt;
&lt;p&gt;Recently I designed some wireframes for an online store. It&amp;#8217;s hard. I had to balance the client&amp;#8217;s budget with the limited information I had, the inclusion and prioritisation of use-cases, and a degree of future-proofing to allow for unforeseen developments.&lt;/p&gt;
&lt;p&gt;There is a lot of information to include in an online store. There are lots of buttons and lots of icons to demand a customer&amp;#8217;s attention. It&amp;#8217;s important to remember, however, that customers want something very simple: They want to buy stuff and for it to behave as expected. Give them that and the rest will follow.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/bigredtin/~4/1CKaGQeljUw" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://bigredtin.com/design/designing-a-user-interface-with-caveat-emptor/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://bigredtin.com/design/designing-a-user-interface-with-caveat-emptor/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://bigredtin.com/design/designing-a-user-interface-with-caveat-emptor/</feedburner:origLink></entry>
	</feed>
