<?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>Randomtype Inc. » Blog</title>
	
	<link>http://randomtype.ca</link>
	<description>STRATEGY • DESIGN • DEVELOPMENT</description>
	<lastBuildDate>Mon, 29 Apr 2013 17:57:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/rti-blog" /><feedburner:info uri="rti-blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>6 .htaccess Tips to Clean Up and Speed Up your Website</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/oVeLHHB3tYc/</link>
		<comments>http://randomtype.ca/blog/6-htaccess-tips-clean-speed-website/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 19:56:47 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=1114</guid>
		<description><![CDATA[Working with an htaccess file can be a bear. Sometimes it feels like a game of guess and check. And other times, you&#8217;re ready to pull out your hair if you see another 500 error. Yeah, you know the one &#8230; <a href="http://randomtype.ca/blog/6-htaccess-tips-clean-speed-website/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Working with an htaccess file can be a bear. Sometimes it feels like a game of guess and check. And other times, you&#8217;re ready to pull out your hair if you see another 500 error. Yeah, you know the one I&#8217;m talking about!</p>
<p><img class="aligncenter size-medium wp-image-1122" title="Example 500 page" src="http://randomtype.ca/cms/assets/500-image-500x186.jpg" alt="An example 500 page" width="500" height="186" /></p>
<p>Fear not! Today I&#8217;m going to take you through a guided tour of an example htaccess file. We&#8217;ll look at 6 different ways you can use an htaccess file to improve your website.</p>
<p>By the end of this post you&#8217;ll feel confident modifying an htaccess file. And you&#8217;ll be avoiding those 500 errors like the plague! :D</p>
<h2>1. Rewriting URLs</h2>
<p>This is one common use for an htaccess file. When I migrated my old blog to the Randomtype blog, I had a lot of pages that I needed to redirect to new urls.</p>
<p>Most of my Rewrite rules were a change to the domain name, so that when someone hit my old url: <code>http://www.thepursuitofquality.com</code> they&#8217;d get redirected to: <code>http://randomtype.ca/blog/</code></p>
<p>Here&#8217;s an example of a simple rule to do that:</p>
<pre class="brush: bash; title: ; notranslate">
  RewriteRule   ^about$   http://randomtype.ca/about-us/   [R=301]
</pre>
<p>This rule takes my old about page, and redirects to the randomtype about-us page. How about something more complicated:</p>
<pre class="brush: bash; title: ; notranslate">
  RewriteRule   ^img/(.*)$   http://randomtype.ca/cms/assets/$1  [R=301]
</pre>
<p>This rule takes a url like <code>http://www.thepursuitofquality.com/img/image-name.png</code> and redirects to the randomtype image location: <code>http://randomtype.ca/cms/assets/image-name.png</code></p>
<p>In the first part of the rule, the brackets <code>(.*)</code> &#8220;copies&#8221; anything after the <code>img/</code> and &#8220;pastes&#8221; it into the <code>$1</code> variable in the second part of the rule. This is known as a regular expression. It&#8217;s a topic too large for this post.</p>
<p>Now there&#8217;s a tricky bit at the end of both rewrites, the <code>[R=301]</code>. That simply means that all redirects are done with an HTTP status of 301, meaning that the page is a permanent redirect.</p>
<p>The examples I gave allow you to change domain names for a url, but you can also rewrite urls on your own site. Let&#8217;s say you wanted to strip the html extension off of all of your blog posts. One way to do that is with a Rewrite:</p>
<pre class="brush: bash; title: ; notranslate">
  RewriteRule   ^blog/(.*)\.html$   /blog/$1  [L,R=301]
</pre>
<p>This is just the start of the RewriteRule. There are more advanced usages for it, and in a previous post on the htaccess file, I explained <a href="http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/">how WordPress uses the htaccess file to create pretty permalinks</a>. There&#8217;s more details about RewriteRule there!</p>
<p>I&#8217;ve included all these examples (and a few more) in a downloadable htaccess example file at the end of this post.</p>
<h2>2. Redirecting URLs</h2>
<p>This sounds similar to Rewriting rules and they mostly are. There are two types of redirects to look at: <code>Redirect</code> and <code>RedirectMatch</code>.</p>
<p><code>Redirect</code> is like a 1 for 1 match. If the first part matches, redirect to the second part.</p>
<p>One way Randomtype has used a Redirect on our own site was to redirect some incorrect links to correct links on our site. About a year ago we received a couple of links that were going to 404 pages. Kind of odd. Since we were receiving traffic from them, we simply fixed them up with a Redirect to go to the correct url.</p>
<pre class="brush: bash; title: ; notranslate">
  Redirect permanent   ^/blog/incorrect-url   http://randomtype.ca/blog/correct-url
</pre>
<p>This rule says that any page loaded for <code>http://randomtype.ca/blog/incorrect-url</code> should be redirected permanently to <code>http://randomtype.ca/blog/correct-url</code>. Very simple.</p>
<p><code>RedirectMatch</code> is a bit closer to the RewriteRule in that it allows you to use regular expressions to do matching. I&#8217;ve used it when making large URL changes.</p>
<p>For example we used to have a topics section on our site. It was removed, so any links going to the topics page would get a 404. I setup the below RedirectMatch rule to fix that.</p>
<pre class="brush: bash; title: ; notranslate">
  RedirectMatch permanent   /topics(/(.*))?   http://randomtype.ca/
</pre>
<p>This rule takes any url that starts with <code>/topics</code> and redirects to the randomtype homepage. While not ideal, getting a page you weren&#8217;t looking for is better than getting a 404 page you weren&#8217;t looking for!</p>
<h2>3. Ditch Ugly Directory Pages</h2>
<p>Ever landed on a page like this?</p>
<p><img class="aligncenter size-medium wp-image-1117" title="Example directory listing" src="http://randomtype.ca/cms/assets/directory-listing-500x153.png" alt="An example directory listing page" width="500" height="153" /></p>
<p>That&#8217;s a directory listing, and it&#8217;s the fastest way to get someone to click the back button and more than likely, leave your site entirely. You don&#8217;t want that do you? You want juicy traffic, gobbling all the fresh tasties you have in store! ;)</p>
<p>Disabling the Directory Page is as simple as adding the following line to your htaccess file:</p>
<pre class="brush: bash; title: ; notranslate">
  Opitions -Indexes
</pre>
<h2>4. Speed Up your Website?</h2>
<p>Who likes a fast website. Everyone does! How about a quick and easy way to speed up your website?</p>
<p>That&#8217;s where proper HTTP headers can come in handy. I won&#8217;t bore you with the details of how cache expiry works, the gist of what you need to know is that you can tell a browser to hang on to certain files for a longer period of time. When a browser doesn&#8217;t have to re-download a file from your site your page loads faster. Cha Ching!</p>
<p>Here&#8217;s an example for all of your png images:</p>
<pre class="brush: bash; title: ; notranslate">
  ExpiresByType image/png A86400
</pre>
<p>This line is going to cause all png images to have an expiry date of 1 day from when they were download. It works on file types which is what the <code>image/png</code> part is. But how&#8217;d we get one day?</p>
<pre class="brush: bash; title: ; notranslate">
  # 60 secs * 60 mins * 24 hours * 1 day = 86400
</pre>
<p>You can setup an expiry of 1 day, 1 week, 1 month, even 1 year. The <strong>A</strong> in front of the number means it&#8217;s based on when the browser downloaded the file. Make sure that&#8217;s always there when you&#8217;re making your own htaccess.</p>
<p>But HOLD ON one second. <strong>You can do very bad things when setting this up wrong!</strong></p>
<p>Let&#8217;s say you set the expiry for 3 years on a picture of you. An eternity in internet years!</p>
<p><img class="aligncenter size-full wp-image-1119" title="A bad profile picture" src="http://randomtype.ca/cms/assets/bad.jpg" alt="A bad profile picture" width="240" height="320" /></p>
<p>But then you realize it&#8217;s time for a new picture.</p>
<p><img class="aligncenter size-full wp-image-1120" title="A good profile picture" src="http://randomtype.ca/cms/assets/good.jpg" alt="A good profile picture" width="240" height="320" /></p>
<p>You delete the old picture, and save the new picture with the same name. But guess what happens when you refresh the page? The old image will still be on your site! That&#8217;s because the new image has the same name as the old image, so your browser won&#8217;t download the new image. You and anyone else that downloaded that original image will have it for 3 years because of the expiry!</p>
<p>But don&#8217;t worry. You can simply rename the file to a new name to get your browser to download the new image. Rename <code>profile</code> to <code>good-profile-picture</code> and you&#8217;re AOK.</p>
<h2>5. Speed It Up even More?</h2>
<p>Want another htaccess trick to speed your site up? Then you&#8217;ll want to look at compression. Compression works on file types just like <code>ExpiresByType</code>. Here&#8217;s an example command:</p>
<pre class="brush: bash; title: ; notranslate">
  AddOutputFilterByType DEFLATE text/html
</pre>
<p>This line is going to compress any file type of text/html that gets requested by a browser. Some files can be compressed by up to 75% of their original file size, which can be a big win for your site. Use the htaccess example file linked at the end of the post for more filetypes.</p>
<h2>6. Easy Error Messages</h2>
<p>The htaccess file allows for handy error redirects. In the off chance that someone requests a page that doesn&#8217;t exist, you can redirect them to your error page instead of an ugly generic page.</p>
<p><img class="aligncenter size-medium wp-image-1115" title="Example 404 page" src="http://randomtype.ca/cms/assets/404-image-500x166.png" alt="An example 404 page" width="500" height="166" /></p>
<p>On Randomtype all of our 404 errors go to a nice custom 404 page that has been setup:</p>
<p><img class="aligncenter size-medium wp-image-1118" title="Randomtype's 404 page" src="http://randomtype.ca/cms/assets/randomtype-404-500x176.png" alt="Randomtype's 404 page" width="500" height="176" /></p>
<p>You can set that type of scenario up like this:</p>
<pre class="brush: bash; title: ; notranslate">
  ErrorDocument 404 http://randomtype.ca/404
</pre>
<p>Another handy usage for the custom error message was on my old blog. When I setup redirects to randomtype.ca I didn&#8217;t want to lose any users on the old site if an error occurred, so I redirected all traffic from the old domain to the new domain. That looked like this:</p>
<pre class="brush: bash; title: ; notranslate">
  ErrorDocument 404 http://randomtype.ca/
</pre>
<h2>Goodies!</h2>
<p>As previously mentioned, that big green link will download a handy htaccess example that you can refer to when building your own htaccess file. There’s a couple more goodies in there that I didn’t mention in the post for making extra sure you don’t get a pesky 500 error! :D</p>
<p><a class="btn btn-success aligncenter" style="line-height: 38px; height: 40px; font-size: 24px;" onclick="_gaq.push(['_trackEvent', 'downloads', 'htaccess-example']);" href="http://randomtype.ca/cms/assets/example-htaccess-file.txt">Download the example .htaccess file!</a></p>
<p>If there&#8217;s anything that I missed or you&#8217;re not sure about leave a comment!</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/oVeLHHB3tYc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/6-htaccess-tips-clean-speed-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/6-htaccess-tips-clean-speed-website/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=6-htaccess-tips-clean-speed-website</feedburner:origLink></item>
		<item>
		<title>7 Questions to Challenge Your Corporate Identity</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/BAz88HhI_pE/</link>
		<comments>http://randomtype.ca/blog/7-questions-challenge-corporate-identity/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 20:31:42 +0000</pubDate>
		<dc:creator>Kevin Dubienski</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Brand]]></category>
		<category><![CDATA[Corporate Culture]]></category>
		<category><![CDATA[Corporate Identy]]></category>
		<category><![CDATA[Random Talks]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=1102</guid>
		<description><![CDATA[Over the past few months the Randomtype team has been bringing in guest speakers to talk on their area(s) of expertise. Undergoing some growth at work, we&#8217;ve been focusing much of our attention on resonating Randomtype&#8217;s Brand with our family &#8230; <a href="http://randomtype.ca/blog/7-questions-challenge-corporate-identity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the past few months the Randomtype team has been bringing in guest speakers to talk on their area(s) of expertise. Undergoing some growth at work, we&#8217;ve been focusing much of our attention on resonating Randomtype&#8217;s Brand with our family of employees, clients and partners. Our featured speaker was my Grandfather, Ralph Coombs. If you don&#8217;t recognize his name, here&#8217;s a snippet of his pro-bio:</p>
<p><div id="attachment_1103" class="wp-caption aligncenter" style="width: 510px"><img class="size-medium wp-image-1103" title="Ralph &amp; Bea Coombs" src="http://randomtype.ca/cms/assets/24866_111672332193013_2548562_n-500x332.jpg" alt="" width="500" height="332" /><p class="wp-caption-text">Ralph &amp; Bea Coombs</p></div></p>
<blockquote><p><strong>Mr. Coombs served as the President and Chief Executive Officer of the Foothills Provincial General Hospital in Calgary, 1973-1990.</strong> He is a past-President of the Alberta Hospital Association and the Association of Canadian Teaching Hospitals, was founding Chairman of&#8230;</p></blockquote>
<p>The hour of his time seemed to skip by in a heart beat so I&#8217;m going to jump right in. Ralph started off with “If I knew very little about your business or how you conduct business, and would like to decide if I would send work to you, maybe join you, or invest money, I&#8217;d start with the following questions&#8221;:</p>
<ul>
<li>Are the <strong>objects, purposes, and values</strong> of this organization clearly spelled out? In other words, what business are you in and how do you conduct that business in relation to your staff, your customers, and your suppliers?</li>
<li>Do the people who work here clearly <strong>understand the goals and values</strong> and can clearly enunciate them if anyone asks. Basically, do they feel connected to the work and exhibit a sense of &#8220;ownership&#8221; in the work of everyone who works here?</li>
<li>What evidence is there that you actually <strong>meet your goals, objectives, and values?</strong> In other words, what tangible measures do you have that demonstrates how well you are doing internally and externally? Furthermore, how does your company self criticize?</li>
<li>What evidence is there that you will be <strong>successful in the future?</strong> If he found unfunded debt, rapid turnover of staff, slow recruitment of new and shortage of work, he would worry about the future.</li>
</ul>
<p>I was shocked at how simple, rudimentary even, these questions seemed. I&#8217;m used to people telling me what to do, not unleashing the Socratic method. I&#8217;m a third his age, a third as experienced&#8230; It&#8217;s time for me to pipe down and listen up.</p>
<p>He fired more questions at us that sounded something like:</p>
<p>1. Does your organization <strong>value its most important assets?</strong> Regardless of industry, what determines the success of any business/organization is the people at it&#8217;s core. If the work environment is right, staff will form mutually trusting relationships while putting their best ideas forward… They might even start to take some risks. Essentially, a constructive work environment <strong>accepts mistakes</strong> that are made as <strong>foundational learning experiences</strong>.</p>
<p>2. Does your organization <strong>value and respect its customers?</strong> Your customers will come back if the following resonates through your business:</p>
<ul>
<li>Value for competency, quality in work, courtesy to all, and <strong>compassion/empathy</strong> for employees and the client alike,</li>
<li>Care about your work and you will go the extra mile to get customer satisfaction,</li>
<li>Have integrity and respect not only for customers and suppliers, but with everyone connected to your work. If a mistake is made on a customer&#8217;s work then <strong>tell them about it immediately</strong>, take ownership of the mistake, and <strong>promptly fix it!</strong></li>
</ul>
<p>3. Is there a <strong>recognizable brand of behaviour/culture in the organization?</strong> As an example Ralph mentioned how the foothills hospital resonated their brand through the motto &#8220;The patient, their problem and their time &#8211; what we care about most.&#8221; This was further defined and broken down into:</p>
<ul>
<li>Our patients deserve our respect, our courtesy and protection of their person and dignity at all times,</li>
<li>We will deliver contemporary science and technology in the diagnosis and treatment of their problem,</li>
<li>We will make careful use of their time &#8211; before and after admission.</li>
</ul>
<p>I&#8217;m severely fired up by this point. He&#8217;s showing me that it&#8217;s simple to validate a relationship by fulfilling a promise. In this context, he promised the Foothills Hospital staff and patients the above, and lovingly embraced being accountable to them!</p>
<p>His final remark was <strong>be diligent about tracking your time!</strong> Regardless of your billing process (time and materials, fixed rate, etc.) almost all businesses make their money from selling their time. Simply being busy isn&#8217;t a good measure of how effective you are. When it comes to time management, Papa (Ralph&#8217;s real name to me) had two rules of thumb:</p>
<ul>
<li>Schedule both work specific projects and meetings on your team calendar. If you need time to work, make it known!</li>
<li>Agree amongst your team that you will not &#8220;pop in on each other&#8221; before a set time in the morning. This gives everyone a little of their own space to start off the day right. In other words, management should appoint a set time of the day <strong>that will always be free of interruptions,</strong> everyone can use this as &#8216;brain use&#8217; time.</li>
</ul>
<h3>Summary Please!</h3>
<p>The three tasks of a leaders are to:</p>
<p>1. Set the specific purpose and mission &#8211; of course with much help from your team, but when all the information is in, the leader condenses it into working goals.</p>
<p>2. To make the work productive and every one of your team members an achiever &#8211; The leaders job is to help every worker to be a success!</p>
<p>3. To manage the social impact and social responsibilities of the organization.</p>
<p>Now you have to understand this blog post is me simply distilling my grandfathers words. What’s lost in my translation is that Papa is one of the most personable, humorous people I know. It was his mission to know a few things about everyone that worked for him on top of their name (he applied this across thousands of employees). He lives and breathes compassion alongside a willingness to help! He signed off our conversation with the following quote:</p>
<blockquote><p>Building a successful company is like making love to a gorilla &#8211; you don&#8217;t quit just because you are tired.</p></blockquote>
<p>I’d love to hear more about how you intend in expanding your brand. If you have comments or questions feel free comment below or tweet @Randomtype to keep our team in the loop!</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/BAz88HhI_pE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/7-questions-challenge-corporate-identity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/7-questions-challenge-corporate-identity/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=7-questions-challenge-corporate-identity</feedburner:origLink></item>
		<item>
		<title>Quick Script to Flush Mac DNS Cache</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/k_Q5huPL42E/</link>
		<comments>http://randomtype.ca/blog/quick-script-flush-mac-dns-cache/#comments</comments>
		<pubDate>Wed, 31 Oct 2012 15:42:50 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=1097</guid>
		<description><![CDATA[I am constantly forgetting the command to flush my DNS cache in mac. So I built this quick script: Simple and mindless like my script to open up the current directory in finder, this baby is going to save me &#8230; <a href="http://randomtype.ca/blog/quick-script-flush-mac-dns-cache/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am constantly forgetting the command to flush my DNS cache in mac. So I built this quick script:</p>
<pre class="brush: plain; title: ; notranslate">
gmiller:bin(17132m|master) $ cat flush-cache 

#!/bin/bash
dscacheutil -flushcache
</pre>
<p>
Simple and mindless like my <a href="http://randomtype.ca/2011/abstractions-require-assumptions/">script to open up the current directory in finder</a>, this baby is going to save me from Googling <b>flush dns mac</b> for the 700th time!</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/k_Q5huPL42E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/quick-script-flush-mac-dns-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/quick-script-flush-mac-dns-cache/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=quick-script-flush-mac-dns-cache</feedburner:origLink></item>
		<item>
		<title>How to create an awesome image carousel for your WordPress theme using Advanced Custom Fields and jQuery</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/56HXE3dAppo/</link>
		<comments>http://randomtype.ca/blog/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/#comments</comments>
		<pubDate>Mon, 01 Oct 2012 15:00:22 +0000</pubDate>
		<dc:creator>Ricardo Cardoza</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[advanced custom fields]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=1051</guid>
		<description><![CDATA[Here&#8217;s a request that I get often: &#8220;Can we have an image slideshow that appears on top of every page and can you set it up so that we can change the images from time to time?&#8221; In WordPress there&#8217; &#8230; <a href="http://randomtype.ca/blog/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a request that I get often: &#8220;<em>Can we have an image slideshow that appears on top of every page and can you set it up so that we can change the images from time to time?&#8221;</em></p>
<p>In WordPress there&#8217; s many ways  you could set this up and in most of them you would probably want to set up custom fields to accomplish this task. Before you start, however, there are a few questions that you should clear up:</p>
<ul>
<li>Do I want the same slideshow/carousel to appear on every page that uses the same template header? Or should there be a different slideshow on each page?</li>
<li>Will the image dimensions differ or should they all be the same?</li>
<li>How many images should the carousel be able to load at most?</li>
<li>Should the images appear in any particular order or load randomly page load?</li>
</ul>
<p>In this tutorial I&#8217;ll show you how to create an image carousel for your WordPress theme with the following assumptions (answers to the above questions):</p>
<ul>
<li>We want the the same carousel to appear on every page using the same template header.</li>
<li>All the images that are to be loaded in the carousel will have the same dimensions.</li>
<li>We will set a hard limit of 5 images for the carousel.  That is, up to 5 images can be loaded in the carousel.</li>
<li>The images will appear in a random order per page load.</li>
</ul>
<p>Also, to accomplish this task we will make use of the fantastic <a title="Advanced Custom Fields" href="http://www.advancedcustomfields.com/" target="_blank">Advanced Custom Fields</a> (ACF) WordPress plugin and the useful <a title="Woo Themes Flexslider" href="http://www.woothemes.com/flexslider/">Woo Themes Flexslider</a>, which, is a fully responsive jQuery slider plugin. They are both free of cost which is great. You can either download ACF and upload it to your testing server&#8217;s <strong>wp-content</strong>  directory or install it directly from within the WordPress admin site under the <strong>Plugins</strong> section. You will, however, need to download Flexslider to your machine and upload it to your theme&#8217;s directory containing JavaScripts. I usually have a directory called <strong>js</strong>  within my theme just for JavaScripts. Speaking of themes I&#8217;ll be working on the Twenty Eleven theme that comes with every WordPress 3 install for demonstration purposes, nevertheless, feel free to retool this for your custom theme. Also, it should go without saying, but I&#8217;m going to assume that you have a basic understanding of WordPress theme development, PHP, JavaScript and CSS. If not, then it might be a bit difficult to follow.</p>
<p>Assuming you have both the ACF plugin and Flexslider plugin uploaded to their respective places we can start.  We will divide the job into  steps:</p>
<ul>
<li><strong><a title="Step 1" href="http://randomtype.ca/2012/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/2">Step 1: Create a static page for the  carousel images and  a custom field group using ACF</a></strong></li>
<li><strong><a title="Step 2" href="http://randomtype.ca/2012/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/3">Step 2: Populate the custom fields for the static page</a></strong></li>
<li><a title="Step 3" href="http://randomtype.ca/2012/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/4"><strong>Step 3: Create a custom theme template file to pull down the advanced custom field data from the WordPress MySQL database</strong></a></li>
<li><a href="http://randomtype.ca/2012/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/5"><strong>Step 4: register the and load  the Flexslider jQuery plugin the WordPress way</strong></a></li>
<li><strong><a title="Step 5" href="http://randomtype.ca/2012/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/6">Step 5: connect the carousel HTML with the Flexslider plugin and style it with CSS</a></strong></li>
</ul>
<div></div>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/56HXE3dAppo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-create-an-awesome-image-carousel-for-your-wordpress-theme-using-advanced-custom-fields-and-jquery</feedburner:origLink></item>
		<item>
		<title>I’d Tap That</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/NP4Ct68HoSo/</link>
		<comments>http://randomtype.ca/blog/id-tap-that/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 17:32:59 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=978</guid>
		<description><![CDATA[Ruby 1.9 added a new method tap that is useful for cleaning up code. Here&#8217;s the Ruby doc: tap{&#124;x&#124;&#8230;} → obj: Yields x to the block, and then returns x. The primary purpose of this method is to “tap into” &#8230; <a href="http://randomtype.ca/blog/id-tap-that/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ruby 1.9 added a new method <code>tap</code> that is useful for cleaning up code. Here&#8217;s the <a href="http://ruby-doc.org/core-1.9.3/Object.html#method-i-tap">Ruby doc</a>:</p>
<blockquote><p>
tap{|x|&#8230;} → obj:</p>
<p>Yields x to the block, and then returns x. The primary purpose of this method is to “tap into” a method chain, in order to perform operations on intermediate results within the chain.
</p></blockquote>
<p>
Effectively <code>tap</code> could be coded in pure Ruby like this:
</p>
<pre class="brush: ruby; title: ; notranslate">
class Object
  def tap(value)
    yield(value)
    value
  end
end
</pre>
<p>
Knowing what tap does, here are some clever ways to use it.
</p>
<h2>As a With Statement</h2>
<p>
Jamis Buck demonstrated the <a href="http://weblog.jamisbuck.org/2006/10/27/mining-activesupport-object-returning">Rails version of tap &#8211; <code>returning</code> &#8211; back in 2006</a>. Since the two methods are equivalent, his example still applies:
</p>
<pre class="brush: ruby; title: ; notranslate">
def create_book
  book = Book.new
  book.title = &quot;Trafalgar: The Nelson Touch&quot;
  book.author = &quot;David Howarth&quot;
  @db.add(book)
  book
end
</pre>
<p>This can be simplified to the following:</p>
<pre class="brush: ruby; title: ; notranslate">
def create_book
  Book.new.tap do |book|
    book.title = &quot;Trafalgar: The Nelson Touch&quot;
    book.author = &quot;David Howarth&quot;
    @db.add(book)
  end
end
</pre>
<h2>As an Accumulator</h2>
<p>I like to use tap when building up collections of data, so instead of writing this:</p>
<pre class="brush: ruby; title: ; notranslate">
data = []
(1..3).each do |value|
  data &lt;&lt; value
end
data
</pre>
<p>I can write the much clearer tap version:</p>
<pre class="brush: ruby; title: ; notranslate">
[].tap do |data|
  (1..3).each do |value|
    data &lt;&lt; value
  end
end
</pre>
<h2>As an Indentor</h2>
<p>gsinclair showed <a href="https://gist.github.com/210946">a way to use tap for code structuring</a>:</p>
<pre class="brush: ruby; title: ; notranslate">
def test_isosceles_given_base_and_height
  triangle(:ABC, :isosceles, :base =&gt; 5, :height :=&gt; 9).tap do |t|
    assert_point_equal p(2.5,9), t.apex
    assert_point_equal p(0,0),   @register[:A]
    assert_point_equal p(5,0),   @register[:B]
    assert_point_equal p(2.5,9), @register[:C]
    assert_equal       t,        @register.retrieve(:triangle, :ABC)
  end
end
</pre>
</p>
<p>While I don&#8217;t agree that the unit test comes out looking cleaner than its counterpart, I do see the power of this type of nesting as a way to clean up code.</p>
<p>If you&#8217;ve discovered any other clever usages of tap leave it in the comments.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/NP4Ct68HoSo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/id-tap-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/id-tap-that/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=id-tap-that</feedburner:origLink></item>
		<item>
		<title>How to Generate Promo Codes from the ITunes Store</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/rk2YqGIwQ98/</link>
		<comments>http://randomtype.ca/blog/generate-promo-codes-from-itunes-store/#comments</comments>
		<pubDate>Tue, 29 May 2012 15:40:05 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=967</guid>
		<description><![CDATA[This blog post will detail how to generate promo codes for your apps. After completing this post you’ll be able to generate promo codes to hand out to reviewers, as give aways, or to friends and family. Login to iTunes &#8230; <a href="http://randomtype.ca/blog/generate-promo-codes-from-itunes-store/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
This blog post will detail how to generate promo codes for your apps. After completing this post you’ll be able to generate promo codes to hand out to reviewers, as give aways, or to friends and family.
</p>
<h2>Login to iTunes Connect</h2>
<p>
The first step is to <a href="https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa">login to iTunes Connect</a> with your apple username and password.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/1-login-500x141.png" alt="Login to iTunes Connect" title="Login to iTunes Connect" width="500" height="141" class="aligncenter size-medium wp-image-954" />
</p>
<p>
This will bring you to the iTunes Connect Dashboard. The next step is to click on the <b>Manager Your Applications</b> link.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/2-connect-500x435.png" alt="Manage your Applications Link" title="Manage your Applications Link" width="500" height="435" class="aligncenter size-medium wp-image-955" />
</p>
<h2>Select the App to Change</h2>
<p>You&#8217;ll now be on the App Selection screen. From here choose the application that you&#8217;d like to update.</p>
<p>
<img src="http://randomtype.ca/cms/assets/3-app-selection-500x359.png" alt="Choose the App to Update" title="Choose the App to Update" width="500" height="359" class="aligncenter size-medium wp-image-956" />
</p>
<p>
From the Application Detail screen click on the <b>View Details</b> button for the current version of your app.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/4b-app-screen-500x357.png" alt="View Current Version App Details" title="View Current Version App Details" width="500" height="357" class="aligncenter size-medium wp-image-963" />
</p>
<p>
Next click on the big blue promo codes button.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/1-promo-codes-button-500x230.png" alt="Click the promo codes button" title="Click the promo codes button" width="500" height="230" class="aligncenter size-medium wp-image-968" />
</p>
<p>
You&#8217;ll next be presented with a screen that asks you to enter the number of promo codes you&#8217;d like to download. <b>Because the promo codes expire, only enter the number of codes you currently need</b>, then click continue.
</p>
<p><img src="http://randomtype.ca/cms/assets/2-promo-code-screen-500x177.png" alt="Enter number of promo codes required" title="Enter number of promo codes required" width="500" height="177" class="aligncenter size-medium wp-image-969" />
</p>
<p>
The next step is to agree to Apple&#8217;s terms of service. Read these and make sure you&#8217;re using your promo codes for the correct reasons!
</p>
<p>
<img src="http://randomtype.ca/cms/assets/3-agreement-500x331.png" alt="Agree to the terms of service" title="Agree to the terms of service" width="500" height="331" class="aligncenter size-medium wp-image-970" />
</p>
<p>
Following that you&#8217;ll be presented with a big download button. Click that and your promo codes will be downloaded in a text file. The contents of the text file are a simple list of promo codes. 1 promo code per line.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/4-download-codes-500x181.png" alt="Download your promo codes" title="Download your promo codes" width="500" height="181" class="aligncenter size-medium wp-image-971" />
</p>
<p>
And that&#8217;s it. Share and enjoy! Remember though that promo codes only apply to apps with a purchase price, you can&#8217;t use promo codes for in app purchases.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/rk2YqGIwQ98" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/generate-promo-codes-from-itunes-store/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/generate-promo-codes-from-itunes-store/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=generate-promo-codes-from-itunes-store</feedburner:origLink></item>
		<item>
		<title>3 Tips for Ruby Mechanize</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/6yeVULnHfVI/</link>
		<comments>http://randomtype.ca/blog/3-tips-ruby-mechanize/#comments</comments>
		<pubDate>Tue, 22 May 2012 15:31:41 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[mechanize]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=966</guid>
		<description><![CDATA[Ruby Mechanize is a brilliant gem. Love it. But the documentation is sparse and you&#8217;ll find yourself having to poke and prod objects to coerce what you need out of them when things gone wrong. To make your life easier &#8230; <a href="http://randomtype.ca/blog/3-tips-ruby-mechanize/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Ruby Mechanize is a brilliant gem. Love it. But the documentation is sparse and you&#8217;ll find yourself having to poke and prod objects to coerce what you need out of them when things gone wrong. To make your life easier (and as crib notes for myself) here are 3 tips that made my life easier.
</p>
<h2>1. User Agent List</h2>
<p>
There are 14 default user agents available, but I wasn&#8217;t able to readily find them in the documentation. Open up irb and run the following command:
</p>
<pre class="brush: ruby; title: ; notranslate">
require 'mechanize'
pp Mechanize::AGENT_ALIASES
</pre>
<p>You&#8217;ll get a nice hash printout with the following list:</p>
<pre class="brush: ruby; title: ; notranslate">
{
  &quot;Mechanize&quot;       =&gt; &quot;Mechanize/2.3 Ruby/1.9.2p290 (http://github.com/tenderlove/mechanize/)&quot;,
  &quot;Linux Firefox&quot;   =&gt; &quot;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.1) Gecko/20100122 firefox/3.6.1&quot;,
  &quot;Linux Konqueror&quot; =&gt; &quot;Mozilla/5.0 (compatible; Konqueror/3; Linux)&quot;,
  &quot;Linux Mozilla&quot;   =&gt; &quot;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624&quot;,
  &quot;Mac FireFox&quot;     =&gt; &quot;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6&quot;,
  &quot;Mac Mozilla&quot;     =&gt; &quot;Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a) Gecko/20030401&quot;,
  &quot;Mac Safari 4&quot;    =&gt; &quot;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; de-at) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10&quot;,
  &quot;Mac Safari&quot;      =&gt; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22&quot;,
  &quot;Windows IE 6&quot;    =&gt; &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)&quot;,
  &quot;Windows IE 7&quot;    =&gt; &quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)&quot;,
  &quot;Windows IE 8&quot;    =&gt; &quot;Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)&quot;,
  &quot;Windows IE 9&quot;    =&gt; &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)&quot;,
  &quot;Windows Mozilla&quot; =&gt; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6&quot;,
  &quot;iPhone&quot;          =&gt; &quot;Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3&quot;
}
</pre>
<h2>2. Logs</h2>
<p>Watching the logs is incredibly helpful when things go wrong. You can attach a logger to mechanize and redirect the output to <code>STDOUT</code></p>
<pre class="brush: ruby; title: ; notranslate">
require 'logger'
@agent.log = Logger.new(STDOUT)
</pre>
<p>With the logs in place you&#8217;re able to see the full extend of what gets POSTed to a server, or which url is being used for a GET request.</p>
<h2>3. Submit isn&#8217;t Submitted</h2>
<p>
The submit button doesn&#8217;t actually get submitted, <a href="http://mechanize.rubyforge.org/Mechanize/Form.html#method-i-submit">kind of contrary to what the docs say</a>:
</p>
<blockquote><p>
Submit this form with the button passed in
</p></blockquote>
<p>
My first time through I read that as &#8220;the submit button gets submitted with the form&#8221;. However it doesn&#8217;t. And it took a long time to figure that out. It&#8217;s an easy enough problem to solve, I simply added the submit button as a field on my form:
</p>
<pre class="brush: ruby; title: ; notranslate">
@agent.get(url) do |page|
  page.form_with(id: 'the-form') do |form|
    # Other form fields

    # Required otherwise form submission fails silently
    form[&quot;submit&quot;] = 'submit'
  end.submit
end
</pre>
<p>
The other alternative to the above code is to use the <a href="http://mechanize.rubyforge.org/Mechanize/Form.html#method-i-click_button"><code>click_button</code></a> method which will automatically include the button with the form submission.
</p>
<p>
Any other tricks you have for working with Mechanize? Post them in the comments.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/6yeVULnHfVI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/3-tips-ruby-mechanize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/3-tips-ruby-mechanize/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=3-tips-ruby-mechanize</feedburner:origLink></item>
		<item>
		<title>How to Make InApp Purchase and App Description Changes</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/-_a82d_qkcE/</link>
		<comments>http://randomtype.ca/blog/inapp-purchase-app-description/#comments</comments>
		<pubDate>Mon, 14 May 2012 20:49:02 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[inapp]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=945</guid>
		<description><![CDATA[This blog post will detail how to make changes to InApp Purchases in the app store, as well as how to make app description changes. This means that after completing this post you&#8217;ll be able to put your apps on &#8230; <a href="http://randomtype.ca/blog/inapp-purchase-app-description/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
This blog post will detail how to make changes to InApp Purchases in the app store, as well as how to make app description changes. This means that after completing this post you&#8217;ll be able to put your apps on sale. Or raise the price to pull in the big bucks!
</p>
<h2>Login to iTunes Connect</h2>
<p>
The first step to making either change is to <a href="https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa">login to iTunes Connect</a> with your apple username and password.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/1-login-500x141.png" alt="Login to iTunes Connect" title="Login to iTunes Connect" width="500" height="141" class="aligncenter size-medium wp-image-954" />
</p>
<p>
This will bring you to the iTunes Connect Dashboard. The next step is to click on the <b>Manager Your Applications</b> link.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/2-connect-500x435.png" alt="Manage your Applications Link" title="Manage your Applications Link" width="500" height="435" class="aligncenter size-medium wp-image-955" />
</p>
<h2>Select the App to Change</h2>
<p>You&#8217;ll now be on the App Selection screen. From here choose the application that you&#8217;d like to update.</p>
<p>
<img src="http://randomtype.ca/cms/assets/3-app-selection-500x359.png" alt="Choose the App to Update" title="Choose the App to Update" width="500" height="359" class="aligncenter size-medium wp-image-956" />
</p>
<p>
That will take you to the App Details screen. On the App Detail screen you&#8217;ll select the <b>Manage In-App Purchases button.<br />
</b></p>
<p>
<img src="http://randomtype.ca/cms/assets/4-app-screen-500x357.png" alt="Link to Manage In-App Purchases" title="Link to Manage In-App Purchases" width="500" height="357" class="aligncenter size-medium wp-image-957" />
</p>
<h2>Selecting the In-App Purchase to Change</h2>
<p>
After clicking the Manage In-App Purchases button you&#8217;ll be on a screen that details all of the in app purchases available for your app. Once you find the in app purchase you&#8217;d like to change, click anywhere on the row (except the <b>delete</b> button!)
</p>
<p>
<img src="http://randomtype.ca/cms/assets/5-in-app-purchase-500x224.png" alt="Select the InApp Purchase to Change" title="Select the InApp Purchase to Change" width="500" height="224" class="aligncenter size-medium wp-image-958" />
</p>
<p>
After that click you&#8217;ll be loaded onto the Detail Screen for that in app purchase. Now to make a Pricing change click on the edit button
</p>
<p>
<img src="http://randomtype.ca/cms/assets/6a-in-app-purchase-screen-500x545.png" alt="Button to Edit a Purchase" title="Button to Edit a Purchase" width="500" height="545" class="aligncenter size-medium wp-image-959" />
</p>
<p>
After the edit button is clicked a scheduling screen will appear which will allow you to create your pricing change.</p>
<p>
<img src="http://randomtype.ca/cms/assets/7-scheduling-500x254.png" alt="Price Scheduling" title="Price Scheduling" width="500" height="254" class="aligncenter size-medium wp-image-960" />
</p>
<p>
Fill out the details of the pricing change by selecting a pricing tier, an effective date, and an end date. You&#8217;re also able to choose <b>Now</b> for the price effective date. Once you fill in the form completely the <b>Add to Schedule</b> button will activate. Review your schedule and push the button.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/9-scheduling-price-change.png" alt="Completed Price Scheduling Form" title="Completed Price Scheduling Form" width="443" height="165" class="aligncenter size-full wp-image-961" />
</p>
<p>
After you&#8217;ve completed that step you&#8217;ll be returned to the In App Purchase Detail screen. If everything went correctly you&#8217;ll see a new entry in the <b>Pricing and Availability</b> area like this:
</p>
<p>
<img src="http://randomtype.ca/cms/assets/10-price-in-effect-500x87.png" alt="Updated pricing schedule" title="Updated pricing schedule" width="500" height="87" class="aligncenter size-medium wp-image-962" />
</p>
<p>
And that&#8217;s it &#8211; you&#8217;ve made an In App Purchase price change. You&#8217;ll need to wait up to 24 hours to see the change take affect on iTunes, but the price change will go into effect immediately for anyone trying to make the purchase.
</p>
<h2>Updating the App Description</h2>
<p>
Making an update to your app&#8217;s description is just as simple as making a price change. From the Application Detail screen click on the <b>View Details</b> button for the current version of your app.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/4b-app-screen-500x357.png" alt="View Current Version App Details" title="View Current Version App Details" width="500" height="357" class="aligncenter size-medium wp-image-963" />
</p>
<p>
From there click the button to <b>Edit your Metadata and Uploads</b>
</p>
<p>
<img src="http://randomtype.ca/cms/assets/11-description-changes-500x496.png" alt="Click the Edit Metadata and Uploads Button" title="Click the Edit Metadata and Uploads Button" width="500" height="496" class="aligncenter size-medium wp-image-964" />
</p>
<p>
You&#8217;ll then be brought to a screen that allows you to update the description of your application. Make any changes you need to and when you&#8217;re done click the <b>Save</b> button at the bottom of the page.  </p>
<p>
<img src="http://randomtype.ca/cms/assets/12-description-editing-500x494.png" alt="Edit the App Description and Click Save" title="Edit the App Description and Click Save" width="500" height="494" class="aligncenter size-medium wp-image-965" />
</p>
<p>And you&#8217;re done! Now you&#8217;ve got all the steps necessary to put your app on sale!</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/-_a82d_qkcE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/inapp-purchase-app-description/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/inapp-purchase-app-description/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=inapp-purchase-app-description</feedburner:origLink></item>
		<item>
		<title>Fixing Association Type Mismatch error in Rails and FactoryGirl</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/cbyPFzHswoY/</link>
		<comments>http://randomtype.ca/blog/fixing-associationtypemismatch-error-rails-factorygirl/#comments</comments>
		<pubDate>Wed, 09 May 2012 05:07:05 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[factory_girl_rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=941</guid>
		<description><![CDATA[I was getting a big ugly error running FactoryGirl in my rails tests: I was able to trace the error to code where I was building up Associations: The error occurred whenever I had the :project_graph creation occurring. Removing the &#8230; <a href="http://randomtype.ca/blog/fixing-associationtypemismatch-error-rails-factorygirl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was getting a big ugly error running FactoryGirl in my rails tests:</p>
<pre class="brush: ruby; title: ; notranslate">
ActiveRecord::AssociationTypeMismatch: Organization(#2159382480) expected, got FactoryGirl::Declaration::Implicit(#2174473920)
</pre>
<p>I was able to trace the error to code where I was building up Associations:</p>
<pre class="brush: ruby; title: ; notranslate">
factory :organization do
  name 'Org Name'

  factory :organization_graph do
    after_create do |organization|
      FactoryGirl.create_list(:device, 5, organization: organization)
      FactoryGirl.create_list(:project_graph, 5, organization: organiaztion)
    end
  end
end
</pre>
<p>
The error occurred whenever I had the <code>:project_graph</code> creation occurring. Removing the line and the code would run fine.
</p>
<p>
All the Googling for a solution brought back weird issues with rspec, cucumber, etc. I wasn&#8217;t using any of those. The issue was actually really simple. I misspelled organization. Take a look at the value being passed in via the organization symbol:
</p>
<pre class="brush: ruby; title: ; notranslate">
FactoryGirl.create_list(:project_graph, 5, organization: organiaztion)
</pre>
<p>Yup, I spelt it <code>organiaztion</code> not <code>organization</code>. FactoryGirl is trying to integrate the misspelling as part of it&#8217;s DSL which is why I get such an obscure error. Fix the spelling &#8211; fix the error.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/cbyPFzHswoY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/fixing-associationtypemismatch-error-rails-factorygirl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/fixing-associationtypemismatch-error-rails-factorygirl/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fixing-associationtypemismatch-error-rails-factorygirl</feedburner:origLink></item>
		<item>
		<title>How Mobile Applications can Improve your Business</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/PDfGbXvr48E/</link>
		<comments>http://randomtype.ca/blog/mobile-applications-improve-business/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 20:29:44 +0000</pubDate>
		<dc:creator>Kevin Dubienski</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Android Apps]]></category>
		<category><![CDATA[Business Solutions]]></category>
		<category><![CDATA[iOS apps]]></category>
		<category><![CDATA[Mobile Applications]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=937</guid>
		<description><![CDATA[Smartphones are a happening topic and as time goes on, the mobile application market is doing nothing short of continuing it&#8217;s popularity explosion. Over the past few years my phone has transitioned from a over-powered toy into a hyper-productive business &#8230; <a href="http://randomtype.ca/blog/mobile-applications-improve-business/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Smartphones are a happening topic and as time goes on, the mobile application market is doing nothing short of continuing it&#8217;s popularity explosion. Over the past few years my phone has transitioned from a over-powered toy into a hyper-productive business tool. I track my time through apps, I share work docs through apps, I project manage through apps, I access my CRM through apps, and I make a good chunk of my living by making apps. Before I get too carried away with how mobile apps can revolutionize your business, I&#8217;d like show a few interesting stats:</p>
<ul>
<li>Over 1 billion of the worlds 4+ billion mobile phones are smartphones.</li>
<li>By 2014, mobile internet usage is projected to overtake desktop internet usage.</li>
<li>In 2012, more than 50% of local searches are preformed from smart phones</li>
<li>Apple has the smart phone largest market share of around 47%, followed closely by Android, with Windows and Blackberry being the runner ups.</li>
<li>Apps are developed differently for Apple, Android, Windows, and Blackberry devices, yet if properly planned apps can be created for all devices on a single framework.</li>
</ul>
<p>Now you&#8217;re up to speed with a few nifty facts, lets address how mobile applications can enhance your business. Here&#8217;s almost a handful of ways that applications can help you solve business problems:</p>
<h2>1. Create a Virtual Office</h2>
<p>It doesn&#8217;t matter if you&#8217;re at the local coffee shop or on the other side of the world, if you have your mobile device, work can be done! Personally, I&#8217;m asked for document feedback quite frequently and it&#8217;s great to offer a quick response even when I&#8217;m not around my computer through my iPhone. With easy access to information my work days are more productive and interacting with my company has never been simpler. Our virtual office space consists of access to our project management software, client relationship management software, time tracking, document sharing, expenses, invoicing and more. The only thing special about us is that we took some time to make sure everything works in/outside the office, and the same can be done for you!</p>
<h2>2. Facilitate Customer Relationships</h2>
<p>Applications are a great way for a company to communicate directly with their clients, while adding value every step of the way. The potential for on-the-fly project management is limitless as you can track to-do&#8217;s, set project milestones, and facilitate measurable employee communications regardless of where you are. Sales catalogues for product viewing/ordering can also be leveraged for a more interactive customer experience.</p>
<p>Now you understand a few ways apps can help facilitate customer relationships it&#8217;s time to brainstorm what kind of app your business could use. The best way to decide what to make is identifying what presently frustrates your clients the most, and form a strategy for addressing these issues.</p>
<h2>3. Cost-Effective Marketing</h2>
<p>Getting the word out about a new products, services, events, etc. can come at a great expense. Recently, companies have been developing applications geared for a targeted audience with sponsorship of their corporate funders. Corporate funders in turn receive advertising opportunities to reinforce their brand and gain product exposure to a highly relevant user group. As we all know, you have to be known to make a sale!</p>
<h2>4. New Platforms for Software</h2>
<p>As mobile technology continues to progress, the boundaries of what can be created for smart phones and tablets also expands. All industries have sector specific software that are highly catered their respective market(s). For the longest time, software companies were limited to building for PC or Mac. In today&#8217;s market we&#8217;ve entered the era of being capable of developing for all mobile devises as well. We&#8217;ve helped educational, agricultural, navigational (just to name a few sectors) software companies re-develop their proprietary programs to broaden their products reach.</p>
<p>Another way of seeing this is many devise specific applications no longer need to be tied to expensive hardware. For example, rather than purchasing an abundance of barcode scanners to track inventory, an application can be quickly built utilizing mobile cameras to scan inventory. Cost effective solutions are just a brainstorm away!</p>
<p>In closing, if you&#8217;re a dreamer, mobile applications can help solve any information based problem. If you like examples, apps can help you create a virtual office, facilitate customer relationships, cost-effective marketing, re-create software for new platforms, and much more. If you&#8217;d like some help thinking your mobile application through don&#8217;t hesitate to give us a call or send an email to start the conversation.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/PDfGbXvr48E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/mobile-applications-improve-business/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/mobile-applications-improve-business/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mobile-applications-improve-business</feedburner:origLink></item>
		<item>
		<title>Fixing Bundle Version Errors</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/3dwsQKPyHWc/</link>
		<comments>http://randomtype.ca/blog/fixing-bundle-version-errors/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 18:00:06 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[picture-guide]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=924</guid>
		<description><![CDATA[I don&#8217;t know about your first experience uploading to the iTunes store, but if it was anything like mine it was wraught with periles, errors, many tears, and most likely an expletive or seven. One of those errors is the &#8230; <a href="http://randomtype.ca/blog/fixing-bundle-version-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
I don&#8217;t know about your first experience uploading to the iTunes store, but if it was anything like mine it was wraught with periles, errors, many tears, and most likely an expletive or seven. One of those errors is the <strong>CFBundleVersion</strong> error that can show up when you&#8217;re updating one of your binaries. This post seeks to tackle that error by showing you:
</p>
<ul>
<li>How you&#8217;ll find out about the error.</li>
<li>How to determine your current bundle version number.</li>
<li>How to determine your previous bundle version number.</li>
<li>How to fix your bundle version number.</li>
</ul>
<h2 style="text-transform:capitalize">How you&#8217;ll find out about the error</h2>
<p>
If you haven&#8217;t hit this error yet, you&#8217;ll get notified when uploading your binary using the Apple Application Uploader and the error is going to look like this:
</p>
<p>
<img src="http://randomtype.ca/cms/assets/bundle-error.png" alt="Apple Application Loader showing a bundle error" title="Apple Application Loader showing a bundle error" width="485" height="243" class="aligncenter size-full wp-image-925" />
</p>
<blockquote><p>
This bundle is invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version.
</p></blockquote>
<h2 style="text-transform:capitalize">How to determine your Current Bundle Version number</h2>
<p>There are two places in XCode where you can find and set your current bundle version. The first is in the Info.plist file. Here you&#8217;re looking for the Key <strong>Bundle version</strong>. In the image below, the Bundle version is 1.1:
</p>
<p>
<img src="http://randomtype.ca/cms/assets/info-plist.png" alt="What the Bundle Version looks like in the info.plist file" title="What the Bundle Version looks like in the info.plist file" width="451" height="424" class="aligncenter size-full wp-image-926" />
</p>
<p>The second place to determine the current bundle version is in the main project area.</p>
<p>
<img src="http://randomtype.ca/cms/assets/xcode-bundle-version-500x182.png" alt="Alternative location for Bundle Version in XCode" title="Alternative location for Bundle Version in XCode" width="500" height="182" class="aligncenter size-medium wp-image-930" />
</p>
<p>By clicking on the main project, then on the target that you&#8217;re building, and then the Summary tab you&#8217;ll get to the area where the Bundle version resides. The interesting part of this is that <strong>it isn&#8217;t called Bundle Version &#8211; instead it&#8217;s called Build</strong>. The value here, and the value in the plist will synchronize with each other, so you only need to set the bundle version in one of those locations.</p>
<h2 style="text-transform:capitalize">How to Determine your Previous Bundle Version number</h2>
</p>
<p>The next important step is to figure out what the previous bundle version is. I hit an issue where I was unknowingly incrementing the bundle version and accidentally submitted a bundle version of 10.0. The CFBundleVersion error kept occurring but I had no idea why. Eventually I found out what the previous bundle version was and the problem was then easily solved! So let&#8217;s do that now.</p>
<p>Load up <a href="https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa">iTunes Connect</a> and click on <i>Manage Your Applications</i>. That&#8217;s going to take you to your app selection screen. Click on the app that you&#8217;re having troubles with. That&#8217;s going to load your app information. Click on the <strong>View Details</strong> link for the <strong>Current Version</strong> of your app.
</p>
<p>
<img src="http://randomtype.ca/cms/assets/path-1.png" alt="Part 1 in how to determine the submitted binaries Bundle Version" title="Part 1 in how to determine the submitted binaries Bundle Version" width="467" height="236" class="aligncenter size-full wp-image-928" />
</p>
<p>That&#8217;s going to take you to the app details page. On the right hand side of the screen you&#8217;re going to see the link <strong>Binary Details</strong> under the <strong>Links</strong> area. Click that.</p>
<p>
<img src="http://randomtype.ca/cms/assets/path-2-500x166.png" alt="Part 2 in how to determine the submitted binaries Bundle Version" title="Part 2 in how to determine the submitted binaries Bundle Version" width="500" height="166" class="aligncenter size-medium wp-image-929" />
</p>
<p>This page has all the binary details for the current version that you submitted to the app store. And one of the fields is Bundle Version. <strong>This is the value that you have to go higher than!</strong></p>
<p>
<img src="http://randomtype.ca/cms/assets/itunes-connect-bundle.png" alt="Pointing out of the Bundle Version number in iTunes Connect" title="Pointing out of the Bundle Version number in iTunes Connect" width="479" height="434" class="aligncenter size-full wp-image-927" />
</p>
<p>At this juncture it is more than appropriate to bring out the facepalm. I know I did.</p>
<p>
<img alt="Facepalm" src="http://i0.kym-cdn.com/entries/icons/original/000/000/554/facepalm.jpg" title="Facepalm" class="aligncenter" width="300" height="300" />
</p>
<h2 style="text-transform:capitalize">How to fix your Bundle Version number</h2>
<p>Now a lot of people have trouble with understanding how Apple does version numbering. And there&#8217;s one assumption in their system that most people miss: <strong>Versioning isn&#8217;t done using floating point numbers</strong>.</p>
<p>
You see, if you submit an app with bundle version 1.21; and then submit a bundle version of 1.3 you&#8217;re going to get rejected with the CFBundleVersion error. Go ahead scratch your head. <i>Isn&#8217;t 1.21 < 1.3?</i> Yep it is when you&#8217;re dealing with decimals. But that&#8217;s not how Apple is doing it. Instead this is how Apple is looking at your version numbering:<br />
</i></p>
<pre class="brush: bash; title: ; notranslate">
1  &lt;= 1 ? True
21 &lt;  3 ? False
</pre>
<p>Apple&#8217;s version numbering splits on the decimal point and compares each token. Really the best way to understand version numbering is to think of it as two fields separated by a period: <i>Major.Minor</i> Instead of a single field with a decimal point.</p>
<p>If none of the above suggestions didn&#8217;t help you and you&#8217;re still facing the issue. Submit a comment and we can work it through together &#8211; if it&#8217;s an issue I haven&#8217;t experienced before I&#8217;ll add it to the post too!</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/3dwsQKPyHWc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/fixing-bundle-version-errors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/fixing-bundle-version-errors/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fixing-bundle-version-errors</feedburner:origLink></item>
		<item>
		<title>How to Sign Out of the iTunes Store</title>
		<link>http://feedproxy.google.com/~r/rti-blog/~3/rhM38xW9sIQ/</link>
		<comments>http://randomtype.ca/blog/how-to-sign-out-of-the-itunes-store/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:19:21 +0000</pubDate>
		<dc:creator>Gavin Miller</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[picture-guide]]></category>

		<guid isPermaLink="false">http://randomtype.ca/?p=911</guid>
		<description><![CDATA[Below are the steps to sign out of the iTunes Store on your iOS device. Choose the Setting Application Touch the Store Icon Touch your Apple ID Touch Sign Out Important: if you&#8217;re doing this to test in-app purchases do &#8230; <a href="http://randomtype.ca/blog/how-to-sign-out-of-the-itunes-store/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Below are the steps to sign out of the iTunes Store on your iOS device.
</p>
<h2>Choose the Setting Application</h2>
<p>
<br /><img src="http://randomtype.ca/cms/assets/settings-app.jpg" alt="Settings app on iOS Device" title="Settings app on iOS Device" width="320" height="480" class="aligncenter size-full wp-image-912" />
</p>
<h2>Touch the Store Icon</h2>
<p>
<br /><img src="http://randomtype.ca/cms/assets/store-button.jpg" alt="Arrow pointing to Store button" title="Arrow pointing to Store button" width="320" height="480" class="aligncenter size-full wp-image-915" />
</p>
<h2>Touch your Apple ID</h2>
<p>
<br /><img src="http://randomtype.ca/cms/assets/apple-account.jpg" alt="Arrow pointing to apple id button" title="Arrow pointing to apple id button" width="320" height="480" class="aligncenter size-full wp-image-913" />
</p>
<h2>Touch Sign Out</h2>
<p>
<br /><img src="http://randomtype.ca/cms/assets/sign-out.jpg" alt="Arrow pointing to sign out button" title="Arrow pointing to sign out button" width="320" height="480" class="aligncenter size-full wp-image-914" />
</p>
<p>
<strong>Important</strong>: if you&#8217;re doing this to <strong>test in-app purchases</strong> do not sign in with your test account. You will instead be prompted to sign in during the in-app purchase test.</p>
<img src="http://feeds.feedburner.com/~r/rti-blog/~4/rhM38xW9sIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://randomtype.ca/blog/how-to-sign-out-of-the-itunes-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://randomtype.ca/blog/how-to-sign-out-of-the-itunes-store/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-sign-out-of-the-itunes-store</feedburner:origLink></item>
	</channel>
</rss>
