<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Q</title>
	<atom:link href="http://www.mc2design.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mc2design.com/blog</link>
	<description>Web development and marketing from the squares at MC² Design Group</description>
	<lastBuildDate>Tue, 16 Feb 2010 22:53:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A few quick notes about getting a design&#160;job</title>
		<link>http://www.mc2design.com/blog/a-few-quick-notes-about-getting-a-design-job</link>
		<comments>http://www.mc2design.com/blog/a-few-quick-notes-about-getting-a-design-job#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:49:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Rants, Raves & Crazy Things]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=317</guid>
		<description><![CDATA[A little bit of advice I&#8217;d like to provide, as I like to encourage people to&#160;succeed.
I see the same mistakes being made over and over&#160;again&#8230;
I&#8217;m sure that with most agencies like ours, they get a lot of inquiries regarding employment. As the potential employee of that agency, you will want to stand out from the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A little bit of advice I&#8217;d like to provide, as I like to encourage people to&nbsp;succeed.</strong></p>
<p>I see the same mistakes being made over and over&nbsp;again&#8230;</p>
<p>I&#8217;m sure that with most agencies like ours, they get a lot of inquiries regarding employment. As the potential employee of that agency, you will want to stand out from the others. Standing out from the others isn&#8217;t that hard, frankly my observations of the current job seeker is that they are LAZY&#8230; here a few things to&nbsp;consider.</p>
<p><strong>First mistake I see:</strong> People make impersonal phone calls and emails.<br />
If you are in physical proximity, show-up! Dress appropriately and show up at the agency, with portfolio, prepared to interview on the spot. Yeah we may be busy, but the fact you made the time to visit, is much better than an impersonal email. You never know, they might see you then. If they don&#8217;t see you then, ask to schedule something later, you&#8217;d be may be pleasantly surprised. (I&#8217;m always surprised how few people actually show up compared to the number of emails we get. I am also surprised how big of the percentage that do show-up, are unprepared, not dressed appropriately; like wearing shorts and flip flops. Yes I&#8217;m serious this happens).</p>
<p><strong>Second mistake I see:</strong> Absolutely no follow-up. Use email, phone call or hand written-note, smoke-signals something to follow-up after the visit, thanking them for their time, whether they reviewed your stuff or not. For goodness sakes follow-up. We make it a rule that if someone drops a resume&#8217;, sends an email or even after we&#8217;ve done a portfolio review, we do nothing, we wait, to see what they do, are they hungry for the job? If they don&#8217;t follow-up, we won&#8217;t hire&nbsp;them.</p>
<p><strong>First impressions are HUGE.</strong> Besides being creative, be professional, in your conversation and in your follow-up. Treat the agency just as you would potentially treat that agency&#8217;s clients. We are looking at that type of stuff. We want to see how you follow through with clients and projects, what your communication skills are like, not just how good you can&nbsp;design.</p>
<p><strong>It&#8217;s a business</strong><br />
Try to convey how you can help them make money, the quality and quantity of what you can/have/could produce, that what you do will make the hiring agency look good and make them money. Maybe you don&#8217;t outright say I can make you X dollars, but ultimately it&#8217;s a business and no matter how visually talented you are if the agency cannot connect the dots to you being a viable and profitable part of their business they will not hire you.</p>
<p>Be prepared, be professional and make the&nbsp;effort.</p>
<p>Good&nbsp;luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/a-few-quick-notes-about-getting-a-design-job/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opacity CSS Validation Using&#160;Javascript</title>
		<link>http://www.mc2design.com/blog/opacity-css-validation-using-javascript</link>
		<comments>http://www.mc2design.com/blog/opacity-css-validation-using-javascript#comments</comments>
		<pubDate>Fri, 29 May 2009 20:11:00 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[css javascript w3 validation opacity]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=298</guid>
		<description><![CDATA[I&#8217;ve always been annoyed by browser specific CSS properties. Not necessarily because of the purpose browser specific CSS properties serve, but more so the isolation of each property. For instance, applying opacity across multiple browsers requires something like the&#160;following:

#selector {
    filter:alpha(opacity=80); /* Internet Explorer */
    -moz-opacity:0.8; /* Mozilla Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been annoyed by browser specific CSS properties. Not necessarily because of the purpose browser specific CSS properties serve, but more so the isolation of each property. For instance, applying opacity across multiple browsers requires something like the&nbsp;following:</p>
<pre class="brush: css">
#selector {
    filter:alpha(opacity=80); /* Internet Explorer */
    -moz-opacity:0.8; /* Mozilla Firefox (legacy) */
    opacity: 0.8; /* CSS3 Standard */
}
</pre>
<p>Someday when CSS3 goes completely live, we won&#8217;t have to worry about opacity not validating; however, what about other browser specific styles that we need in order to support multiple browsers? If you don&#8217;t care about passing W3 CSS Validation, then this article is not for you. But for those of you whom require validation, or have a perfectionist nature, can workaround the validation engine using both JavaScript and&nbsp;CSS.</p>
<p>Although it may not be the best method out there, using JavaScript to implement impossible-to-validate CSS works the best for&nbsp;me.</p>
<p>Why does it work? Well its simple. Most bots/spiders don&#8217;t render JavaScript, which I imagine is for a number of reasons. Perhaps rendering JavaScript would slow down the bots&#8217; very purpose of data mining (or with bad bots, the purpose of infiltrating). In fact, there usually isn&#8217;t anything valuable to a bot that would come from having to render JavaScript. (As a side note, this doesn&#8217;t mean that their aren&#8217;t bots that seek out sites that have vulnerabilities in their JavaScript markup, but reading JavaScript and rendering JavaScript are completely&nbsp;different).</p>
<p>So first, its a matter of migrating browser specific code to its own spreadsheet (so our JavaScript can include it).&nbsp;</p>
<pre class="brush: css">
/* invalidable.css */
#selector {
  /* random properties */
    zoom: 1;
    -moz-border-radius
  /* opacity properties */
    filter:alpha(opacity=80); /* Internet Explorer */
    -moz-opacity:0.8; /* Mozilla Firefox (legacy) */
    opacity: 0.8; /* CSS3 Standard */
}
</pre>
<p>Once you have your browser specific properties on its own stylesheet, its just a matter of creating a JavaScript file that will &#8220;dynamically&#8221; insert the &lt;link type=&#8221;text/css&#8221; rel=&#8221;stylesheet&#8221; href=&#8221;/assets/styles/invalidable.css&#8221; media=&#8221;screen&#8221;/&gt; into your page (thus keeping with XHTML Strict&nbsp;standards).</p>
<pre class="brush: javascript">
// invalidable.js  &lt;-- note the extension
//
// Dynamically Inserts CSS Link Tag
var headTag = document.getElementsByTagName(&quot;head&quot;)[0];
var linkTag = document.createElement(&#039;link&#039;);
linkTag.type = &#039;text/css&#039;;
linkTag.rel = &#039;stylesheet&#039;;
linkTag.href = &#039;/assets/styles/invalidable.css&#039;;
linkTag.media = &#039;screen&#039;;
headTag.appendChild(linkTag);
</pre>
<p>Now all you have to do is throw in an JavaScript include&nbsp;tag:</p>
<pre class="brush: html">
&lt;script type=&quot;text/javascript&quot; src=&quot;/assets/js/invalidable.js&quot;&gt;&lt;/script&gt;
</pre>
<p>Your done! Bots will now only get this:&nbsp;</p>
<pre class="brush: html">
&lt;script type=&quot;text/javascript&quot; src=&quot;/assets/js/invalidable.js&quot;&gt;&lt;/script&gt;
</pre>
<p>&#8230;while visitors will get&nbsp;this:</p>
<pre class="brush: html">
&lt;script type=&quot;text/javascript&quot; src=&quot;/assets/js/invalidable.js&quot;&gt;&lt;/script&gt;
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/assets/styles/invalidable.css&quot; media=&quot;screen&quot;/&gt;
</pre>
<p>NOTE: It&#8217;s important to mention that visitors who have JavaScript DISABLED will NOT have the CSS file included, simply because the JavaScript won&#8217;t process; however, I will go on to say that its incredibly rare for you to have visitors that have JavaScript disabled. The only cases you&#8217;ll probably run into is visitors who visit your site from a cheap mobile phone (iPhone supports JavaScript), or a visitor who knows what their doing and has a Firefox plugin like &#8220;<a href="https://addons.mozilla.org/en-US/firefox/addon/722" target="_blank" rel="nofollow">NoScript</a>&#8221;&nbsp;installed.</p>
<p>On another subject, its important to mention that Google now penalizes for showing &#8220;different&#8221; content to search engines than to visitors. Would I classify an extra line in the <head></head> section as different? Probably not. It&#8217;s my opinion that Google&#8217;s algorithm would check for differences in content, and not necessarily markup. I also haven&#8217;t seen very many cases where practices such as using JavaScript to &#8220;show/hide&#8221; content, be penalized in anyway.&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/opacity-css-validation-using-javascript/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Wordpress /backup/.htaccess&#160;Error</title>
		<link>http://www.mc2design.com/blog/wordpress-backuphtaccess-error</link>
		<comments>http://www.mc2design.com/blog/wordpress-backuphtaccess-error#comments</comments>
		<pubDate>Fri, 08 May 2009 15:49:03 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[backup wordpress]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=293</guid>
		<description><![CDATA[This is a solution for anyone that has encountered this problem: Backup .htaccess File&#160;Error.
Having recently upgraded a Wordpress solution and migrating it to another server, I encountered a similar error where the /backup/.htaccess file is not able to be reached. Having spent a few minutes researching it, I found that the &#8220;Backup Wordpress&#8221; plugin, that [...]]]></description>
			<content:encoded><![CDATA[<p>This is a solution for anyone that has encountered this problem: <a href="http://wpforum.designpraxis.at/topic/blog-down-after-performing-backup-help" rel="nofollow" title="Backup .htaccess File Error">Backup .htaccess File&nbsp;Error</a>.</p>
<p>Having recently upgraded a Wordpress solution and migrating it to another server, I encountered a similar error where the /backup/.htaccess file is not able to be reached. Having spent a few minutes researching it, I found that the &#8220;Backup Wordpress&#8221; plugin, that the client had added to their Wordpress solution, was the culprit. The plugin was looking for the .htaccess in the directory path of the old server, and not the new&nbsp;one.</p>
<p>Instead of trying to dig through PHP files to try and find some kind of absolute path, I simply deactivated and deleted the plugin, upgraded to the latest version of Wordpress, and added another &#8220;Wordpress Backup&#8221; solution via the built-in plugin search in the admin&nbsp;area.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/wordpress-backuphtaccess-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limit Characters or Words in&#160;ExpressionEngine</title>
		<link>http://www.mc2design.com/blog/limit-characters-of-variable-in-expressionengine</link>
		<comments>http://www.mc2design.com/blog/limit-characters-of-variable-in-expressionengine#comments</comments>
		<pubDate>Tue, 05 May 2009 18:10:21 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=287</guid>
		<description><![CDATA[The more I use ExpressionEngine, the more I love it as there&#8217;s a solution for anything that I can find a need&#160;for.
I couldn&#8217;t find a parameter that I could use in ExpressionEngine (that was already built in) that limited how many characters were used from a variable. In PHP, you could use substr() and trim(), [...]]]></description>
			<content:encoded><![CDATA[<p>The more I use ExpressionEngine, the more I love it as there&#8217;s a solution for anything that I can find a need&nbsp;for.</p>
<p>I couldn&#8217;t find a parameter that I could use in ExpressionEngine (that was already built in) that limited how many characters were used from a variable. In PHP, you could use substr() and trim(), but I wanted to avoid using PHP in ExpressionEngine as much as possible. So after a bit of searching I found this ExpressionEngine plugin called &#8220;<a href="http://expressionengine.com/downloads/details/character_limiter/" rel="nofollow" title="ExpressionEngine Character Limiter">Character Limiter</a>&#8221; which allows me to use the following&nbsp;expression:</p>
<pre class="brush: php">
{exp:char_limit total=&quot;100&quot;}
    {variable}
{/exp:char_limit}
</pre>
<p>Simple as&nbsp;that.</p>
<p>You may find that you would rather limit the number of words outputted. To do this, use the <a href="/tag/expressionengine">ExpressionEngine</a> plugin called &#8220;<a href="http://expressionengine.com/downloads/details/word_limit_plus/" rel="nofollow" title="ExpressionEngine Word Limit Plus">Word Limit Plus</a>&#8220;.  Upload &#8220;pi.word_limit_plus.php&#8221; to the /system/plugins/ directory, and use the following expression to limit the amount of words&nbsp;outputted:</p>
<pre class="brush: php">
{exp:word_limit_plus if_exceeds=&quot;600&quot; stop_after=&quot;500&quot; the_link=&quot;&lt;a href=&#039;{title_permalink=weblog/comments}&#039;&gt;MORE...&lt;/a&gt;&quot;}
   {variable}
{/exp:word_limit_plus}
</pre>
<p>I haven&#8217;t used this plugin yet, but from the &#8220;Word Limit Plus&#8221; plugin documentation, the &#8220;if_exceeds&#8221; parameter is the amount of words that need to be met before the text is triggered to be truncated. The amount of words that the text string would be truncated TO is the &#8220;stop_after&#8221; parameter.&nbsp;</p>
<p>Again I haven&#8217;t confirmed this, but if I am correct, then a paragraph that has more than 600 words would be truncated to only be 500 words, while a paragraph of 599 words would not be truncated at all. I imagine this is to prevent from having blogs posts that truncate and leave out only a few words (obviously if there&#8217;s only a few more words left to display of a blog post, why not just display them rather than truncate the extra words&nbsp;out).</p>
<p>The &#8220;the_link&#8221; parameter is not required, but from what I can tell, its tacked onto the end of the outputted text and serves as a way to display a &#8220;Read more&#8230;&#8221; link at the end of a blog&nbsp;post.</p>
<p>A good side note is through my research of the &#8220;Word Limit Plus&#8221; ExpressionEngine plugin, I did find that because the &#8220;Word Limit Plus&#8221; looks for spaces (to determine the word count), consecutive spaces may cause an&nbsp;error.</p>
<p>None-the-less, the ExpressionEngine &#8220;Word Limit Plus&#8221; plugin could be useful for summarizing blog posts on your home page, building a custom RSS feed to be used for feeding data to <a href="http://en.wikipedia.org/wiki/Twitter" rel="nofollow" title="Twitter">Twitter</a>, or simply feeding data to another portion of your site. I won&#8217;t go into too much detail about it, but I&#8217;m sure the possibilities are fairly&nbsp;endless.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/limit-characters-of-variable-in-expressionengine/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save the&#160;swine!</title>
		<link>http://www.mc2design.com/blog/save-the-swine</link>
		<comments>http://www.mc2design.com/blog/save-the-swine#comments</comments>
		<pubDate>Fri, 01 May 2009 18:12:54 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Rants, Raves & Crazy Things]]></category>
		<category><![CDATA[swine flu]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=279</guid>
		<description><![CDATA[The Swine Flu Piggy Mask

]]></description>
			<content:encoded><![CDATA[<p>The Swine Flu Piggy Mask<br />
<img src="http://www.mc2design.com/blog/wp-content/uploads/2009/05/mc2design_piggymask.jpg" alt="mc2design_piggymask" title="Swine Flu Piggy Mask" width="600" height="400" class="aligncenter size-full wp-image-280" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/save-the-swine/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random Fields Extension in&#160;ExpressionEngine</title>
		<link>http://www.mc2design.com/blog/random-fields-extension-in-expressionengine</link>
		<comments>http://www.mc2design.com/blog/random-fields-extension-in-expressionengine#comments</comments>
		<pubDate>Fri, 01 May 2009 16:35:30 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=271</guid>
		<description><![CDATA[Early last month I posted two different ways to have random fields in ExpressionEngine stating that &#8220;&#8230;in ExpressionEngine, a &#8216;random number&#8217; expression has yet to exist&#8221;. Well I hate to say but I was wrong! In fact, ExpressionEngine comes with a &#8220;Randomizer&#8221; plugin built right in. Simply navigate to: Admin > Utilities > Plugin&#160;Manager.
However, there [...]]]></description>
			<content:encoded><![CDATA[<p>Early last month I posted <a href="http://www.mc2design.com/blog/random-in-expressionengine-with-without-php">two different ways to have random fields in ExpressionEngine</a> stating that &#8220;&#8230;in ExpressionEngine, a &#8216;random number&#8217; expression has yet to exist&#8221;. Well I hate to say but I was wrong! In fact, ExpressionEngine comes with a &#8220;Randomizer&#8221; plugin built right in. Simply navigate to: Admin > Utilities > Plugin&nbsp;Manager.</p>
<p>However, there is an inconvenience with the &#8220;Randomizer&#8221; plugin. It&#8217;s a pain to use!&nbsp;</p>
<p>The instructions state:<br />
-Open this file: /plugins/pi.randomizer.php<br />
-Fill the array with as many quotes as you want.<br />
-Then place the following tag in any of your templates: {exp:randomizer:set_one}</p>
<p>A friendly no thanks to that plugin. So I did a bit of searching and found a plugin (by a different author) called &#8220;<a href="http://expressionengine.com/downloads/details/randomizer_plus/" target="_blank" rel="nofollow">Randomizer Plus</a>&#8221; and its the best solution I&#8217;ve found so far to randomization within ExpressionEngine&#8217;s template&nbsp;system.</p>
<p>Setting it up is also really easy. Take the pi.randomizer_plus.php file from the downloaded zip archive file, and upload it into your &#8216;plugins&#8217; directory, located in /system/plugins.&nbsp;</p>
<p>From there, its just a matter of using the appropriate tag in your page template, and to specify the seperator&nbsp;(delimiter):</p>
<pre class="brush: php">
{exp:randomizer_plus separator=&quot;{OR}&quot;}
Random Value 1
{OR}
Random Value 2
{OR}
Random Value 3
{/exp:randomizer_plus}
</pre>
<p>Looks clean and super easy to use! It makes you just love ExpressionEngine just that much&nbsp;more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/random-fields-extension-in-expressionengine/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random Number in ExpressionEngine With &amp; Without&#160;PHP</title>
		<link>http://www.mc2design.com/blog/random-in-expressionengine-with-without-php</link>
		<comments>http://www.mc2design.com/blog/random-in-expressionengine-with-without-php#comments</comments>
		<pubDate>Wed, 08 Apr 2009 20:49:09 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=256</guid>
		<description><![CDATA[The rand() function in PHP is a quick and easy way to have a nice random number generated. Without it, faking randomization can quickly become cumbersome. After all, a random number has so many uses. Maybe you want to display a random testimonial on each page load, a featured blog post, or even use a [...]]]></description>
			<content:encoded><![CDATA[<p>The rand() function in PHP is a quick and easy way to have a nice random number generated. Without it, faking randomization can quickly become cumbersome. After all, a random number has so many uses. Maybe you want to display a random testimonial on each page load, a featured blog post, or even use a different stylesheet.&nbsp;</p>
<p>To get a random number with ExpressionEngine, we can go the PHP route, or the non-PHP route. Going the PHP route is obviously easier to output and write the markup for (not to mention, is truely &#8220;random&#8221;), but enabling PHP in your templates may not be your answer; especially if you don&#8217;t want users [who have the ability to create/edit blog posts] have the power to do anything that PHP would allow them to do (such as outputting normally unobtainable data from the&nbsp;database).</p>
<p>Unfortunately, in ExpressionEngine, a &#8220;random number&#8221; expression has yet to exist; however, one of the nice things about ExpressionEngine is the ability to process PHP at the flip of a switch.&nbsp;</p>
<p>The PHP Solution:<br />
First, turn on PHP processing in: Templates (tab) > Template Preferences Manager (link) > Allow PHP (dropdown)</p>
<p>Then we simply assign the rand() to a variable, and check against that variable to output&nbsp;accordingly.</p>
<pre class="brush: php">
&lt;?php 

$random_number = rand(0,6); 

if ($random_number == 1) { echo &#039;&lt;img src=&quot;/assets/images/image1.png&quot; /&gt;&#039;; }
elseif ($random_number == 2) { echo &#039;&lt;img src=&quot;/assets/images/image2.png&quot; /&gt;&#039;; }
elseif ($random_number == 3) { echo &#039;&lt;img src=&quot;/assets/images/image3.png&quot; /&gt;&#039;; }
elseif ($random_number == 4) { echo &#039;&lt;img src=&quot;/assets/images/image4.png&quot; /&gt;&#039;; }
elseif ($random_number == 5) { echo &#039;&lt;img src=&quot;/assets/images/image5.png&quot; /&gt;&#039;; }
elseif ($random_number == 6) { echo &#039;&lt;img src=&quot;/assets/images/image6.png&quot; /&gt;&#039;; }

// ensures an image is displayed even when no other conditions are met (in this case, it really only displays when random_number = 0)
else { echo &#039;&lt;img src=&quot;\/assets\/images\/image0.png&quot; \/&gt;&#039;; } 

?&gt;
</pre>
<p>For those that prefer to avoid PHP, here&#8217;s a quick way to (in a way) fake a random number. I figured a good way to do this was using the {current_time}, but only the seconds portion. Granted, its not the most elegant solution, but it gets the job&nbsp;done.</p>
<p>The Non-PHP&nbsp;Solution:</p>
<pre class="brush: php">
{!-- Sets current time (seconds) to the variable &#039;current_time_seconds&#039; --}
{assign_variable:current_time_seconds=&quot;{current_time format=&quot;%s&quot;}&quot;}

{!-- %s = Seconds range: 00-59 --}
{!-- Check current time in seconds and displays a different image based on current time in seconds --}

{!-- displays if 1-9 --}
{if {current_time_seconds} &gt; 0 &amp;&amp; {current_time_seconds} &lt; 10}
&lt;img src=&quot;/assets/images/image1.png&quot; /&gt;

{!-- displays if 11-19 --}
{if:elseif {current_time_seconds} &gt; 10 &amp;&amp; {current_time_seconds} &lt; 20}
&lt;img src=&quot;/assets/images/image2.png&quot; /&gt;

{!-- displays if 21-29 --}
{if:elseif {current_time_seconds} &gt; 20 &amp;&amp; {current_time_seconds} &lt; 30}
&lt;img src=&quot;/assets/images/image3&quot; /&gt;

{!-- displays if 31-39 --}
{if:elseif {current_time_seconds} &gt; 30 &amp;&amp; {current_time_seconds} &lt; 40}
&lt;img src=&quot;/assets/images/image4.png&quot; /&gt;

{!-- displays if 41-49 --}
{if:elseif {current_time_seconds} &gt; 40 &amp;&amp; {current_time_seconds} &lt; 50}
&lt;img src=&quot;/assets/images/image5.png&quot; /&gt;

{!-- displays if 51-59 --}
{if:elseif {current_time_seconds} &gt; 50 &amp;&amp; {current_time_seconds} &lt; 60}
&lt;img src=&quot;/assets/images/image6.png&quot; /&gt;

{!-- displays if seconds don&#039;t match any of the conditions above (basically the following times in seconds: 00,10,20,30,40,50) --}
{if:else}
&lt;img src=&quot;/assets/images/image0.png&quot; /&gt;

{/if}
</pre>
<p>The non-PHP solution can be a great solution for someone who doesn&#8217;t want a random image &#8220;every single time&#8221; (for the visitors who are clicking through pages within seconds of&nbsp;eachother).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/random-in-expressionengine-with-without-php/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS Coders. It&#8217;s Time To Clean-up Your&#160;Markup!</title>
		<link>http://www.mc2design.com/blog/css-coders-its-time-to-clean-up-your-markup</link>
		<comments>http://www.mc2design.com/blog/css-coders-its-time-to-clean-up-your-markup#comments</comments>
		<pubDate>Fri, 27 Mar 2009 23:43:58 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[colorzilla]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[stylesheets]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=251</guid>
		<description><![CDATA[It&#8217;s so easy to write CSS without laying out a single comment. After all, in those glorious moments of coding, everything is understood. You know what your coding because, well frankly, you&#8217;ve been coding it! Don&#8217;t get me wrong, I&#8217;m a true believer in balancing time constraints and code quality. I&#8217;m also a true believer [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s so easy to write CSS without laying out a single comment. After all, in those glorious moments of coding, everything is understood. You know what your coding because, well frankly, you&#8217;ve been coding it! Don&#8217;t get me wrong, I&#8217;m a true believer in balancing time constraints and code quality. I&#8217;m also a true believer in finding the perfect balance between code simplicity and code expandability. But quite frankly, I&#8217;ve mopped up too many messy stylesheets recently that I felt obligated to encourage good&nbsp;practices.</p>
<p>So time goes by and lucky for you, your all done with that site so your markup doesn&#8217;t really matter. After all, it works, and if it ain&#8217;t broke, don&#8217;t fix it. But then comes the day where you get that phone call, and you&#8217;ll need to make changes to that spreadsheet you coded so mindlessly way back when. Oops! I guess it doesn&#8217;t make as much sense as it did when you were coding it. &#8220;What was I thinking!?&#8221; -or maybe its more along the lines of &#8220;What in the world was this guy thinking!?&#8221;&nbsp;</p>
<p>Thank goodness for Firefox Add-ons like Firebug! Oh where would I be without it. But regardless, I am finding more and more that CSS markup conventions are just lacking, and designers are the ones&nbsp;responsible!</p>
<p>Here&#8217;s some practices that may save you (or anyone else for that matter) a fair amount of time when editing those&nbsp;stylesheets.</p>
<p>Though I don&#8217;t like resetting styles when I don&#8217;t have to, I tend to like defaulting specific elements to have no padding, margin, and border. Until all browsers conform to the exact same &#8220;default browser spreadsheet&#8221;, resetting styles is beneficial in the sense that it overrides specific properties to be the same across all&nbsp;browsers.</p>
<pre class="brush: css">
/*********************
  RESET STYLES
*********************/
img, table, tr, td, tbody, ul, li, ol {
	padding: 0;
	margin: 0;
	border: 0;
}
</pre>
<p>I always like to keep &#8220;tag specified&#8221; styles in its own section at the top of my file (they can always be overwritten by compound&nbsp;CSS):</p>
<pre class="brush: css">
/*********************
  TAG SPECIFIC STYLES
*********************/
body {
	background: url(&#039;../graphics/design/body-bg.jpg&#039;);
	font: .9em normal Arial, Verdana, Tahoma;
	color: #666666;
}
a {
	color: #666666;
}
a:hover {
	color: #000000;
}
a:active {
	color: #666666;
}
fieldset {
	border-color:#999999;
	border-style:solid none none;
	border-width:1px;
	padding:0.75em;
}
</pre>
<p>It&#8217;s also nice to have &#8220;general classes&#8221; for those rogue elements that you don&#8217;t know what to do&nbsp;with:</p>
<pre class="brush: css">
/*********************
  CLASS SPECIFIC STYLES
*********************/

.noborder {	border: 0; }
.nomargin { margin: 0; }
.nopadding { padding: 0; }

.floatleft { float: left; }
.floatright { float: right; }
.block { display: block; }
.inlineblock { display: inline-block; }
.inline { display: inline; }
</pre>
<p>&#8230; and finally some general advise for your CSS&nbsp;properties:</p>
<pre class="brush: php">
/*
##	COLOR MAPPING - to help with managing frequently used colors
##
##		Mango Orange: CE882D
##		Dark Red: 621817
*/

/*  Comments next to specific properties along with author notes
      help you remember why the &quot;value&quot; is coded a particular way */
	#newsletter h3 {
		color: #ce882d; /* Orange */
		margin: 10px 0;
	}
#footer {
	width: 100%;
	height: 13px; /* absolute height is specified for all footer items for IE6 compatibility - jbarnett@mc2design.com */
	display: block;
	vertical-align: top;
}
</pre>
<p>A technique that I sometimes use (when colors are not specified) is obtaining a color code of a certain element using the Firefox Add-On ColorZilla, and simply performing a CTRL+F[ind] (or CMD+F in OSX) and searching for the color code in the stylesheet. However, its actually more useful to use the &#8220;Inspect&#8221; tool in Firebug and to obtain the exact line you need to&nbsp;modify.</p>
<p>Some might be thinking, &#8220;Well with all that time trying to comment-up my stylesheets, I could of just spent it figuring it out sometime in the future&#8221;. Wrong! The time you spend making your spreadsheet understandable is nothing compared to the time you&#8217;ll waste trying to figure your spreadsheet out later on. I find that the best way to comment your stylesheets, is to comment as you code. Not after your done writing it. But while you write&nbsp;it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/css-coders-its-time-to-clean-up-your-markup/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useful Knowledge About the Internet Explorer 6 &#8220;PNG&#160;Fix&#8221;</title>
		<link>http://www.mc2design.com/blog/useful-knowledge-about-the-internet-explorer-6-png-fix</link>
		<comments>http://www.mc2design.com/blog/useful-knowledge-about-the-internet-explorer-6-png-fix#comments</comments>
		<pubDate>Fri, 27 Mar 2009 22:17:04 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[internet explorer 6]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[pngfix]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=243</guid>
		<description><![CDATA[As a web designer constantly dealing with deadlines, I&#8217;m constantly managing the time I spend on implementing features, fixing bugs, creating markup, you name it. More recently I&#8217;ve had to deal with PNG issues in Internet Explorer 6 a lot more than I would have liked to. Having worked on a project that required a [...]]]></description>
			<content:encoded><![CDATA[<p>As a web designer constantly dealing with deadlines, I&#8217;m constantly managing the time I spend on implementing features, fixing bugs, creating markup, you name it. More recently I&#8217;ve had to deal with PNG issues in Internet Explorer 6 a lot more than I would have liked to. Having worked on a project that required a large amount of PNG transparent images, I was quickly reminded of how the PNG fix for IE6 actually works.&nbsp;</p>
<p>When I wrote the markup for a recent project, I did what felt right. I made use of background images for things like the logo, borders, and corners. I did everything possible to keep everything in the stylesheet. But that doesn&#8217;t work when it comes to&nbsp;IE6.</p>
<p>When I first got my hands dirty with the IE6 PNG Fix, it wasn&#8217;t an easy implementation for me some 2 years a go, but I included the pngfix.js file as I was supposed to (which can be found here: <a href="http://homepage.ntlworld.com/bobosola/" target="_blank" title="PNG Fix Author">http://homepage.ntlworld.com/bobosola/</a>) and was ready to move on. Unfortunately, the transparent part of the PNG images were a pastel blue. So thinking that perhaps I didn&#8217;t implement the javascript correctly, I went through the troubleshooting process. After about 15 minutes, and still staring at PNG images with pastel blue instead of transparency, I found myself cursing Internet Explorer 6, about ready to create an IF statement that kicked IE6 users to the curb. But as so many users were on IE6 at the time (and a decent number still using IE6 to this day), I pushed myself to nail down the specifics of the PNG&nbsp;fix.</p>
<p>What I learned?<br />
The PNG fix doesn&#8217;t fix background images specified using CSS. Rather, you need to actually have the PNG image in the markup.</p>
<p>For example, the following markup would result in the transparent portions of the image to not be transparent at&nbsp;all:</p>
<pre class="brush: css">
/* CSS Stylesheet */
#footer {
   background-image: url(&#039;/assets/graphics/footer-bottom.png&#039;);
   height: 10px;
   width: 980px;
}
</pre>
<pre class="brush: html">
&lt;!-- XHTML Markup --&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;/div&gt;
</pre>
<p>To have the PNG fix actually work, the image needs to be in the markup. I also created a new CSS selector to specify the dimensions of the image (so I wouldn&#8217;t have to specify the dimensions in the&nbsp;markup):</p>
<pre class="brush: css">
/* CSS Stylesheet */
#footer {
   height: 10px;
   width: 980px;
}
   /* For PNG Fix to work properly, image dimensions need to be specified.
       I prefer to keep everything in my external stylesheet, rather than
       having it in the &lt;img&gt; element */
   #footer img {
      height: 10px;
      width: 980px;
   }
</pre>
<pre class="brush: html">
&lt;!-- XHTML Markup --&gt;
&lt;div id=&quot;footer&quot;&gt;
   &lt;img src=&quot;/assets/graphics/footer-bottom.png&quot; /&gt;
&lt;/div&gt;
</pre>
<p>It&#8217;s also good to remember that in general, IE6 doesn&#8217;t follow the &#8220;inherit&#8221; value (nor does it automatically assume to inherit the parent). Therefore its a good rule of thumb that in order to minimize IE6 problems, specify dimensions for every &#8220;selector&#8221;. It does make it a little inconvenient as you&#8217;ll need to change both parent and child element dimensions (rather than simply changing the parent element dimensions). But at least it keeps your IE6 css only file minimal (and in many cases, found that I didn&#8217;t need&nbsp;one).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/useful-knowledge-about-the-internet-explorer-6-png-fix/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 7 Flash Overlapping&#160;Problem</title>
		<link>http://www.mc2design.com/blog/internet-explorer-7-flash-overlapping-problem</link>
		<comments>http://www.mc2design.com/blog/internet-explorer-7-flash-overlapping-problem#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:47:42 +0000</pubDate>
		<dc:creator>Jarrett M. Barnett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[overlapp]]></category>
		<category><![CDATA[sIFR]]></category>

		<guid isPermaLink="false">http://www.mc2design.com/blog/?p=235</guid>
		<description><![CDATA[Anyone who&#8217;s had anything to do with web design, knows what a lightbox is, or at least has clicked on their fair share of them. For any web designer lucky enough to experience a YouTube video or Flash video overlapping their oh-so-beautiful lightbox, or their lovely css/javascript dropdown menu, will know that its one of [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who&#8217;s had anything to do with web design, knows what a lightbox is, or at least has clicked on their fair share of them. For any web designer lucky enough to experience a YouTube video or Flash video overlapping their oh-so-beautiful lightbox, or their lovely css/javascript dropdown menu, will know that its one of those&#8230; you guessed it, Internet Explorer annoyances (in this case IE7).&nbsp;</p>
<p>With the move from Internet Explorer 7, we were finally able to use PNG graphics (at least without having to add an IF IE7 condition statement to our head markup); however, when using flash, you&#8217;ll notice it renders as the upper most element, overlapping anything that dares try to be on top. The fix? Well its actually quite&nbsp;simple.</p>
<p>Here is an example object/embed&nbsp;element.</p>
<pre class="brush: html">
&lt;object width=&quot;450&quot; height=&quot;300&quot; data=&quot;http://www.somedomain.com/video.mov&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;http://www.somedomain.com/video.mov&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;
&lt;/object&gt;
</pre>
<p>To prevent Flash from overlapping other elements, we simply need to remove &#8216;Line&nbsp;3&#8242;.</p>
<pre class="brush: html">
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;
</pre>
<p>For those that use sIFR to render standard text as flash, you&#8217;ll need to change the &#8220;sWmode&#8221; from transparent to opaque as is the case in the following&nbsp;line:</p>
<pre class="brush: jscript">
sIFR.replaceElement(named({sSelector:&quot;h2#phrase&quot;, sFlashSrc:&quot;/assets/typography/walbaum.swf&quot;, sColor:&quot;#FFFFFF&quot;, sLinkColor:&quot;#FFFFFF&quot;, sBgColor:&quot;#000000&quot;, sHoverColor:&quot;#CCCCCC&quot;, sWmode:&quot;opaque&quot;, nPaddingTop:1, nPaddingRight:10, sFlashVars:&quot;textalign=right&amp;offsetTop=0&quot;}));
</pre>
<p>Once your done changing your markup, Flash elements will FINALLY play nicely with the rest of your site. <img src='http://www.mc2design.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mc2design.com/blog/internet-explorer-7-flash-overlapping-problem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
