<?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"
	>

<channel>
	<title>Clear Pixel Lab</title>
	<atom:link href="http://lab.clearpixel.com.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.clearpixel.com.au</link>
	<description>The development blog for Clear Pixel</description>
	<pubDate>Tue, 03 Jan 2012 02:13:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>HTML entity - character conversion in PHP</title>
		<link>http://lab.clearpixel.com.au/2012/01/html-entity-character-conversion-in-php/</link>
		<comments>http://lab.clearpixel.com.au/2012/01/html-entity-character-conversion-in-php/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 02:11:42 +0000</pubDate>
		<dc:creator>px-joew</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=29</guid>
		<description><![CDATA[A quick quiz for PHP developers:

What function in PHP&#8217;s standard library is used for converting characters in a string to HTML entities?
What function does the opposite?
By default, what character encoding is used by each of these functions?


If you can answer these questions without looking at the documentation, you&#8217;re doing better than I am.  It&#8217;s symptomatic [...]]]></description>
			<content:encoded><![CDATA[<p>A quick quiz for PHP developers:</p>
<ol>
<li>What function in PHP&#8217;s standard library is used for converting characters in a string to HTML entities?</li>
<li>What function does the opposite?</li>
<li>By default, what character encoding is used by each of these functions?</li>
</ol>
<p><span id="more-29"></span></p>
<p>If you can answer these questions without looking at the documentation, you&#8217;re doing better than I am.  It&#8217;s symptomatic of the haphazard design of the standard library that answer to the first question is <a href="http://www.php.net/manual/en/function.htmlentities.php">htmlentities()</a>, whereas the second is <a href="http://php.net/manual/en/function.html-entity-decode.php">html_entity_decode()</a>, which &#8220;converts HTML entities in a string to their applicable characters.&#8221;</p>
<p>As if this naming inconsistency weren&#8217;t inconvenient enough, the answer to the third question raises real problems because each function has different default character encodings which change depending on which version of PHP you&#8217;re running.  htmlentities() defaults to using ISO-8859-1 encoding, but according to the documentation, &#8220;this default is very likely to change in future versions of PHP; the programmer is highly encouraged to specify a value.&#8221;</p>
<p>The situation with html_entity_decode() is even worse.  Prior to PHP 5.4, this function defaults to giving its output in ISO-8859-1 encoding but as of that version has changed the default to UTF-8.  Since I prefer to encode all text in UTF-8, &#8220;&amp;nbsp;&#8221; and other entities will be converted to invalid characters that will show as a question mark or box if the encoding is not specified.  The following code will show how this will cause problems when changing PHP versions:</p>
<pre>echo htmlentities(html_entity_decode('&amp;nbsp;'));</pre>
<p>Under 5.3, this will output &#8220;&amp;nbsp;&#8221;, while under 5.4 it will give &#8220;&amp;Acirc;&amp;nbsp&#8221;, showing how htmlentities() is still trying to interpret its input in ISO-8859-1, while html_entity_decode() is now defaulting to UTF-8.  You can simulate this result on an earlier version by setting the encoding for html_entity_decode() to UTF-8 and leaving the encoding for htmlentities() unspecified (ie. ISO-8859-1).</p>
<p>It seems that the only practical solution here is to define the character encoding explicitly, otherwise the behaviour of the HTML entity encoding/decoding functions could vary from installation to installation.  If you want to use UTF-8, even if you&#8217;re running a version &lt;= 5.3 and don&#8217;t care about future compatibility, you&#8217;ll still have to specify the encoding every time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2012/01/html-entity-character-conversion-in-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Meet Greg – Our New Web Designer</title>
		<link>http://lab.clearpixel.com.au/2011/12/meet-greg-%e2%80%93-our-new-web-designer/</link>
		<comments>http://lab.clearpixel.com.au/2011/12/meet-greg-%e2%80%93-our-new-web-designer/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 05:22:48 +0000</pubDate>
		<dc:creator>px-zakr</dc:creator>
		
		<category><![CDATA[Team]]></category>

		<category><![CDATA[staff]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=30</guid>
		<description><![CDATA[Hi, I&#8217;m Greg Jones. I started working at PX Webdesign just over four months ago now, as their new Web design Trainee. In that time I have learned multiple coding languages and been able to integrate myself into the design team. I&#8217;ve been using computers for what seems like my entire life, but I&#8217;ve always [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, I&#8217;m Greg Jones. I started working at PX Webdesign just over four months ago now, as their new Web design Trainee. In that time I have learned multiple coding languages and been able to integrate myself into the design team. I&#8217;ve been using computers for what seems like my entire life, but I&#8217;ve always been keen to learn more. Working at PX Webdesign and being trained by Zak has given and continues to give me the opportunity to do just that – learn as much as I am able whilst working in a fun and ever changing environment.</p>
<p><span id="more-30"></span></p>
<p>I was born into a family of five; my parents, my two siblings and myself. My older sister is almost finished a nursing degree and my genius of a little brother moved to NSW to study medicine. So I&#8217;ll be the only one of my siblings not saving lives haha.</p>
<p>Through high school (despite some health issues) I was very much a part of the nerdy group - spending most of my time on the internet, playing around with various computer programs and  playing video games with friends. I learned very quickly how to prank my friends using their computers and get around a few of the restrictions the teachers put in place. Simply put, computers have always been my passion (and at times my frustration).</p>
<p>Last year I was living in Brisbane studying animation at Qantm College, but due to the recent state of the animation industry in Australia and my reluctance to move overseas, I decided not to continue. I returned to Toowoomba and began working a temp job whilst looking for a new direction. It was then that I found PX Webdesign and I&#8217;ve been working here and loving it, ever since.</p>
<p>Due to the massive influence it has had on my upbringing, I have always considered myself to be a “child of the internet”. The internet has been able to answer any question I had to ask and has provided my with access to information  and entertainment that I have craved over the years. At one time or another I&#8217;ve been mildly addicted to a few memes and many websites. The most recent being my ongoing addiction to YouTube and Facebook. (having them both on my iPhone really isn&#8217;t helping). I&#8217;m honestly not sure how I would survive without the internet and I&#8217;m loving the chance to be a part of PX and as one of my friends phrased it, “make some internet”.</p>
<p>Web design has proven to be a great industry for me and one I&#8217;m very happy to have been able to get into. The combination of technical aspects (coding languages) and design elements continues to interest and intrigue me. My browser of choice is Firefox. My favourite operating system is Windows 7 and my favourite thing about web design is the potential of HTML5 and CSS3.</p>
<p>The team at PX Webdesign have been very friendly and supportive, welcoming me into their ranks. I look forward to my ongoing work with PX and my ability to work with and learn from a great team of developers and designers.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/12/meet-greg-%e2%80%93-our-new-web-designer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create a Custom Self-hosted Webfont</title>
		<link>http://lab.clearpixel.com.au/2011/12/create-a-custom-self-hosted-webfont/</link>
		<comments>http://lab.clearpixel.com.au/2011/12/create-a-custom-self-hosted-webfont/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 03:51:16 +0000</pubDate>
		<dc:creator>px-zakr</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[@font-face]]></category>

		<category><![CDATA[typography]]></category>

		<category><![CDATA[webdesign]]></category>

		<category><![CDATA[webfont]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=28</guid>
		<description><![CDATA[A few years ago it looked like self-hosted fonts were going to take the web by storm. By simply linking to a typeface in our CSS, we could use any typeface imaginable. But due to licencing issues with commercial typefaces, the focus has now shifted to font hosting providers like Typekit, Fontdeck and more recently [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago it looked like self-hosted fonts were going to take the web by storm. By simply linking to a typeface in our CSS, we could use any typeface imaginable. But due to licencing issues with commercial typefaces, the focus has now shifted to font hosting providers like <a href="https://www.typekit.com/" target="_blank">Typekit</a>, <a href="http://www.fontdeck.com/" target="_blank">Fontdeck</a> and more recently <a href="http://www.google.com/webfonts" target="_blank">Google Webfonts</a>.</p>
<p><span id="more-28"></span></p>
<p>The great thing about these font providers are they ensure web designers are using quality fonts with full browser compatibility. Implementation is damn easy and they&#8217;re really useful if you want to change the appearance of body copy to a more specialized font.</p>
<p>Most designers would ask why bother self-hosting any fonts when you have huge repositories of beautiful typefaces available for a small subscription or in some cases free.</p>
<p>This being the case, I thought I&#8217;d experiment developing and hosting my own custom eCommerce icon font set.</p>
<h2>A bit of a background on Shopper Std</h2>
<p>As the font&#8217;s website describes, <a href="http://www.shopperfont.com" target="_blank">Shopper Std</a> is a hosted font substitute for eCommerce icons. The beauty of hosting the icons as a font rather than storing them as images means we can style each icon like text.</p>
<p>Laying out each letter was really simple. Using <a href="http://www.high-logic.com/font-editor/fontcreator.html" target="_blank">High Logic&#8217;s FontCreator</a>, I imported each monochromatic bitmap symbol from my Photoshop document and individually resized them to fit the provided guides and grid system. The program allows you to render your typefaces on the fly meaning you save directly as a TrueType Font and reopen it later to make edits. At a tiny 9kb, designing custom fonts in this program is quick, easy and is perfect for amateur typographers like myself at only $79.</p>
<p>I designed the font to use many of the common icons you&#8217;ll see in online shops including a trolley, auction gavel and credit cards.</p>
<p>The beauty of the font is we can resize letters to any size, recolour them, add a shadow and even a gradient without touching Photoshop. Also feel free to use the icons as many times as you like on a page; drawing from a typeface reduces browser requests which means your website will fly.</p>
<h2>Will @font-face work in all browsers?</h2>
<p>Most designers unfamiliar with self-hosted fonts think there isn&#8217;t widespread support in browsers. All browsers except Internet Explorer render TrueType Fonts (.TTF) but all including IE can show Embedded OpenType (.EOT) fonts. I simply converted the TrueType format to Embedded OpenType and now we have IE support. Here&#8217;s the CSS I used to link the font to my website.</p>
<pre>@font-face  {
font-family: 'Shopper';
src: url('font/Shopper-Std.eot');
}

@font-face {
font-family: 'Shopper';
src: url('font/Shopper-Std.ttf') format('opentype');
}</pre>
<p>The first call targets all browsers including Internet Explorer. The second @font-face declaration overrides the original call, but it only targets modern browsers (Firefox, Safari, Chrome and Opera) by using the OpenType format attribute.</p>
<h2>Conclusion</h2>
<p>Self-hosted custom webfonts can be useful for adding minor styling to your website but I&#8217;d personally shy away from using it for major headings and body text.</p>
<p>For more information on the font itself or to implement it on your website, visit <a href="http://www.shopperfont.com/" target="_blank">http://www.shopperfont.com/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/12/create-a-custom-self-hosted-webfont/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Meet Jibao – Our Newest Web Developer</title>
		<link>http://lab.clearpixel.com.au/2011/11/meet-jibao-our-newest-web-developer/</link>
		<comments>http://lab.clearpixel.com.au/2011/11/meet-jibao-our-newest-web-developer/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 04:26:40 +0000</pubDate>
		<dc:creator>px-zakr</dc:creator>
		
		<category><![CDATA[Team]]></category>

		<category><![CDATA[staff]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=27</guid>
		<description><![CDATA[Hi there my name is Jibao Mansaray. Both of my names as you can tell  are native. Jibao means “let God save this one” and Mansaray means  “King”. My native language is Mende but sadly I don&#8217;t speak Mende. The  reason for this is that I am a bit too lazy to [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there my name is Jibao Mansaray. Both of my names as you can tell  are native. Jibao means “let God save this one” and Mansaray means  “King”. My native language is Mende but sadly I don&#8217;t speak Mende. The  reason for this is that I am a bit too lazy to learn a new language and  secondly, we didn&#8217;t speak Mende at home. Each of my parents had their  own native language so we just spoke &#8216;Pigeon English&#8217;.</p>
<p><span id="more-27"></span></p>
<p>I am the eldest of two boys and six sisters - this family may seems  huge but it was lots of fun growing up with that many sisters. I had a  significant number of test &#8216;Guinea pigs&#8217; for my pranks and eye-wetting  jokes - hope none of them ever read this!</p>
<p>If I have the chance to revisit my old home I would be more than  willing to but my childhood wasn&#8217;t always fun. My native country is a  little one on the west coast of Africa called Liberia which has been  affected by civil war for over eighteen years. At the age of eight I  fled with my family to a neighbouring country called Guinea where we  lived for ten years. These ten years I consider the hardest in my life  so far and in early 2000 civil war also broke out in Guinea which forced  me to look for refuge in Ghana.</p>
<p>It was in Ghana that my interest in computing and electronics  actually surfaced – but it was by no accident. I was in one of the  world&#8217;s biggest refugee&#8217;s camps, Buduburam and communicating by phone or  e-mail was not cheap. I needed a way to have free access to computers  so I started researching online for tutorials, reading blogs or anything  that has to do with granting someone free computer access. Over time I  was able to build my skills and after saving some funds, I enrolled at a  computer institution called IPMC, Intercom Programming and  Manufacturing Company. Embedded system development was my major at IPMC  but after two semesters and hanging with other students, I came to like  web and application development as well.</p>
<p>On November 17, 2006 I moved to beautiful Australia. The ease of  communication, better living condition and friendly locals have moved me  to call this place my home. I now have the privilege to complete my  education and presently am doing that through the University of Southern  Queensland studying computer science with a major in applied computer  science and network security. After trying very hard to get a job in the  industry but to no avail, I worked as a labourer for four years.</p>
<p>In August this year, 2011, I was offered an entry position at PX Webdesign as a web developer.<br />
Working at PX Webdesign is one of the best things that have ever  happened to me. My co-workers are all awesome and the working  environment is state of the art. Most importantly, PX gave me the  opportunity to do what I love doing and I thank everyone at PX Webdesign  for making me feel as part of the team and welcoming me with open  hands.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/11/meet-jibao-our-newest-web-developer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create an Animated Bar Graph using CSS3 Keyframing</title>
		<link>http://lab.clearpixel.com.au/2011/10/create-an-animated-bar-graph-using-css3-keyframing/</link>
		<comments>http://lab.clearpixel.com.au/2011/10/create-an-animated-bar-graph-using-css3-keyframing/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 23:50:52 +0000</pubDate>
		<dc:creator>px-zakr</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[CSS3]]></category>

		<category><![CDATA[keyframing]]></category>

		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=25</guid>
		<description><![CDATA[If you&#8217;ve read any web design blog written in 2011 you&#8217;ll hear that CSS3 is a great, simple tool to add interactive elements to a website. It&#8217;s popularity seems to coincide with the widespread adoption of modern browsers like Chrome and Firefox.
I&#8217;ve been reading a lot of tutorials on CSS animations in particular but haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve read any web design blog written in 2011 you&#8217;ll hear that CSS3 is a great, simple tool to add interactive elements to a website. It&#8217;s popularity seems to coincide with the widespread adoption of modern browsers like Chrome and Firefox.</p>
<p>I&#8217;ve been reading a lot of tutorials on CSS animations in particular but haven&#8217;t come across many practical applications of these properties. Sure, it can be wacky to make a GIF fly around the screen in pure CSS but these new effects need to be able to enhance the user experience.</p>
<p>Here&#8217;s how to create a quick animated bar graph using CSS keyframing. For the sake of demonstrations, I&#8217;ve made a simple Yes or No poll.</p>
<p><span id="more-25"></span></p>
<h2>The Result</h2>
<p style="text-align: center;"><a href="http://lab.clearpixel.com.au/uploads/posts/2011-10-21/css-graph.html" target="_blank"><img src="http://lab.clearpixel.com.au/uploads/posts/2011-10-21/css-graph.gif" alt="" width="560" height="281" /></a></p>
<p style="text-align: center;"><a href="http://lab.clearpixel.com.au/uploads/posts/2011-10-21/css-graph.html" target="_blank">View Demo »</a></p>
<h2>The HTML</h2>
<pre>&lt;body&gt;
&lt;h1&gt;Do you believe in horoscopes?&lt;/h1&gt;
&lt;h3&gt;Yes&lt;/h3&gt;
&lt;div id="yes"&gt;&lt;p class="percent"&gt;35%&lt;/p&gt;&lt;/div&gt;
&lt;h3&gt;No&lt;/h3&gt;
&lt;div id="no"&gt;&lt;p class="percent"&gt;65%&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;</pre>
<p>All very self explanatory. The percentage classes are going to render the animation.</p>
<h2>First Part of the CSS Animation</h2>
<pre>.percent {
height: 20px;
text-indent: 5px;
text-decoration: none;
color: #fff;
-webkit-animation-name: results;
-moz-animation-name: results;
-webkit-animation-duration: 1s;
-moz-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
-moz-animation-iteration-count: 1;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
}</pre>
<p>Here&#8217;s where we setup the results bars. The first animation property animation-name  lets us declare which animation should be played. This is similar to calling a function in Javascript. The other animation properties allow us to configure the animation speed, number of iterations (1 to infinity) and physical properties. Notice each property is prefixed with -webkit or -moz for webkit supported browsers and Firefox. I&#8217;ve intentionally left out the straight animation call as there doesn&#8217;t seem to be any support for it at this stage.</p>
<h2>Second Part of the CSS Animation</h2>
<pre>#yes {
width: 200px;
}

#yes .percent {
background-color: green;
}

#no {
width: 500px;
}

#no .percent {
background-color: red;
}</pre>
<p>As I mentioned, this is a quick demonstration so I&#8217;ve hard-set the widths of each poll and made the Yes bar green and the No bar red. If you were to seriously implement it, the polls would be sent as a variable and the widths would be worked out and output as inline CSS or possibly Javascript.</p>
<h2>Third Part of the CSS Animation</h2>
<pre>@-webkit-keyframes results {
0% {
width: 0;
opacity: 0.5;
background-color: red;
}
90% {
width: 105%;
}
100% {
width: 100%;
opacity: 1;
}
}

@-moz-keyframes results {
0% {
width: 0;
opacity: 0.5;
background-color: red;
}
90% {
width: 105%;
}
100% {
width: 100%;
opacity: 1;
}
}</pre>
<p>After countless tests, it appears these 2 CSS functions need to be declared separately.  As you can see I&#8217;ve setup the results function we setup earlier and declared properties based on a percentage. These are processed as percentages of the overall animation – similar to frame-by-frame animation. 0% is the first frame in the animation, 90% is almost at the end and 100% is the end of the animation.</p>
<p>The best part is you&#8217;re unlimited in how many frames you can declare! Using the principles of <a href="http://en.wikipedia.org/wiki/Squash_and_stretch" target="_blank">squash and stretch animation</a>, I&#8217;ve set a keyframe at the 90% mark which increases the width of the bar a touch more than where it sits at 100%. This gives the animation some snap back.</p>
<p><a href="http://lab.clearpixel.com.au/uploads/posts/2011-10-21/css-graph.html" target="_blank">Click here to view a demonstration »</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/10/create-an-animated-bar-graph-using-css3-keyframing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Modularise your CodeIgniter 2 applications with Modular Extensions – HMVC</title>
		<link>http://lab.clearpixel.com.au/2011/10/modularise-your-codeigniter-2-applications-with-modular-extensions-%e2%80%93-hmvc/</link>
		<comments>http://lab.clearpixel.com.au/2011/10/modularise-your-codeigniter-2-applications-with-modular-extensions-%e2%80%93-hmvc/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 06:30:49 +0000</pubDate>
		<dc:creator>px-joew</dc:creator>
		
		<category><![CDATA[CodeIgniter]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[HMVC]]></category>

		<category><![CDATA[modular extensions]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=24</guid>
		<description><![CDATA[CodeIgniter (CI) is a relatively lightweight PHP framework implementing the MVC pattern. It&#8217;s become quite popular amongst PHP developers largely for its simplicity and comprehensive documentation. This post discusses integrating Modular Extensions – HMVC with the CodeIgniter 2 framework, and the advantages that this gives over using the unmodified framework.
On its own, CodeIgniter only allows [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codeigniter.com/">CodeIgniter</a> (CI) is a relatively lightweight PHP framework implementing the <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC pattern</a>. It&#8217;s become quite popular amongst PHP developers largely for its simplicity and comprehensive documentation. This post discusses integrating Modular Extensions – HMVC with the CodeIgniter 2 framework, and the advantages that this gives over using the unmodified framework.<span id="more-24"></span></p>
<p>On its own, CodeIgniter only allows for one group of components (models, views, controllers, etc.) <a href="https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home">Modular Extensions – HMVC</a> is a set of modifications to CI which introduces modules, which are “groups of independent components&#8230; arranged in one application sub-directory that can be dropped into other CodeIgniter applications.” This kind of <a href="http://en.wikipedia.org/wiki/Modular_programming">modular separation</a> is desirable for a number of reasons. The best reason for using modular programming is probably the separation of concerns that it provides. First, by breaking down your features into modules, you can more easily know the location in your source tree of the code for any particular feature. Most important, however, is the separation between core and module code – you don&#8217;t need to worry that changing something in one module will affect core code or any other modules.</p>
<p>The concept is particularly useful to us at Clear Pixel, where most of the development work we do is on our proprietary CMS “Breeze.” Because this system is deployed to a number of sites, each of which requires a different combination of modules, we need a way to distribute to each site only the modules each require along with the core code shared between them. The ability to separate the components required for a certain feature makes it easy to package the minimum code required for a particular installation. Applications can provide install and remove features for modules to allow for users to customise. Even if your application doesn&#8217;t require this kind of per-installation customisation, modules still allow you to easily add or remove features without having to worry about complex flow-on effects. Because Modular Extensions implements a hierarchical module system, several modules which need to share code between themselves, but not with other modules, can be created as sub-modules of a parent module containing that shared code. Note also that you can also use “<span style="font-family: Consolas,monospace;"><span style="font-size: small;">Modules::run(&#8217;module/controller/method&#8217;, $param, $&#8230;)</span></span>” to return the output of a module controller method, which is useful for displaying the output of several modules on the one page.</p>
<p>The process of setting up CI with Modular Extensions is simple. At the time of writing, the latest version of CodeIgniter is 2.0.3 (<a href="http://codeigniter.com/download.php">download</a>). Extract the files to a directory which can be served by your web server and verify that everything is working by navigating to its URL – you should see the default CI “welcome” page. The latest version of Modular Extensions – HMVC can be found in the project&#8217;s BitBucket repository (<a href="https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/get/d28d24e26397.tar.gz">download</a>). Since the <a href="https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home">instructions on the project&#8217;s site</a> are quite straightforward, I won&#8217;t reproduce them here.</p>
<p>For the sake of convenience, you can download this copy of CI 2.0.3 with Modular Extensions already installed.</p>
<p class="download"><a href="http://lab.clearpixel.com.au/uploads/posts/2011-10-14/ci2.0.3-hmvc.zip">Download CI 2.0.3 with Module Extensions (2.2MB ZIP)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/10/modularise-your-codeigniter-2-applications-with-modular-extensions-%e2%80%93-hmvc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Give your dull CSS reset stylesheet a facelift</title>
		<link>http://lab.clearpixel.com.au/2011/09/give-your-dull-css-reset-stylesheet-a-facelift/</link>
		<comments>http://lab.clearpixel.com.au/2011/09/give-your-dull-css-reset-stylesheet-a-facelift/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 23:54:24 +0000</pubDate>
		<dc:creator>px-zakr</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[CSS3]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[reset stylesheet]]></category>

		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=23</guid>
		<description><![CDATA[If you've ever built a website from scratch, no doubt you've had to subdue the erratic browser beast with a reset stylesheet. The majority of these stylesheets in use are pre made, garden-variety templates downloaded from the YUI library or copied from other sites.

Reset stylesheets can be more than a bunch of hacks setup to fix a website layout. They can also provide a set of easily accessible classes for editing content as well as enhance the user experience without cluttering up your primary stylesheet.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever built a website from scratch, no doubt you&#8217;ve had to subdue the erratic browser beast with a reset stylesheet. The majority of these stylesheets in use are pre made, garden-variety templates downloaded from the YUI library or copied from other sites.</p>
<p>Reset stylesheets can be more than a bunch of hacks setup to fix a website layout. They can also provide a set of easily accessible classes for editing content as well as enhance the user experience without cluttering up your primary stylesheet.<span id="more-23"></span></p>
<p>Recently, we&#8217;ve been drastically cleaning up our reset CSS to add functionality and makeover elements so I thought I&#8217;d share a few ideas.</p>
<h2>Antialiasing</h2>
<pre>* {
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
}</pre>
<p>Font smoothing works in Firefox, Opera, Safari and any other webkit-supported browsers. You’re given 3 options for rendering text - none, subpixel-antialiased and antialiased. Most browsers render the text subpixel-antialiased but I find antialiased makes it a bit clearer. Tiny text smaller than 6px or so will look crisper if you change font-smoothing to none.</p>
<h2>Text Selection</h2>
<p>Typographic refinement never goes astray in web design. Surprise visitors when they select a paragraph of text with styled text selection.</p>
<pre>::selection {
background: #000;
color: #fff;
}

::-moz-selection {
background: #000;
color: #fff;
}</pre>
<p>The ::selection property enables the styling for Safari and Chrome whereas ::-moz-selection targets Firefox. The downside is your IE buds still won&#8217;t see this cool effect but no doubt they&#8217;re used to missing out.</p>
<h2>Transitions</h2>
<p>Add a transition time to all links and hoverable items to give the site an elegant, modern look.</p>
<pre>a, img {
-webkit-transition: all 0.15s ease;
-moz-transition: all 0.15s ease;
-o-transition: all 0.15s ease;
transition: all 0.15s ease;
}</pre>
<p>This amazing snippet of markup can be used to brighten any element without the use of JavaScript. You have heaps of transitional options as well as control of the duration. Apply this effect to your site’s main menu and users will have to right-click to make sure it wasn’t built in Flash.</p>
<h2>Commenting</h2>
<p>It’s surprising how many web designers leave reset stylesheets completely uncommented. Your CSS will look more well-kept if you bring over the comment tags from your main stylesheet.</p>
<h2>Positioning</h2>
<p>One thing I’ve learnt on the job is to use quick-reference positional classes to save time when writing markup. Here are a few examples.</p>
<pre>.left {
float: left;
}

.right {
float: right;
}

.clear {
clear: both;
}

.center {
text-align: center;
}</pre>
<p>Now you can quickly apply a float, a clear or align text by simply adding a class to a HTML element. I wouldn’t go overboard with this as you don’t want to clutter up your now well-structured reset stylesheet.</p>
<p>By adding default classes and modern browser styling, you&#8217;ll turn your dull reset CSS will into a simple style guide.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2011/09/give-your-dull-css-reset-stylesheet-a-facelift/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IE6 wants to hide my post values - the horror!</title>
		<link>http://lab.clearpixel.com.au/2008/09/ie6-wants-to-hide-my-post-values/</link>
		<comments>http://lab.clearpixel.com.au/2008/09/ie6-wants-to-hide-my-post-values/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 06:44:57 +0000</pubDate>
		<dc:creator>Lone</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[html form ie6 first value post missing bug]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=22</guid>
		<description><![CDATA[I hit what would have to be one of the freakiest and hardest to replicate bugs in IE6 today. It all started when a client said a form they were using was coming up with missing post index errors. I spent forever trying to replicate and see what they were doing. Simply put if they [...]]]></description>
			<content:encoded><![CDATA[<p>I hit what would have to be one of the freakiest and hardest to replicate bugs in IE6 today. It all started when a client said a form they were using was coming up with missing post index errors. I spent forever trying to replicate and see what they were doing. Simply put if they pasted a certain bit of content into a plain textarea box the first post value would automagically disappear. That first value for us was a hidden value defining if you were adding or editing an item - kind of important!</p>
<p><span id="more-22"></span>After plenty of searching I managed to come across the certain factors that need to be in place for this to happen and hopefully this might just one day help someone else out.</p>
<ul>
<li>Client using IE6</li>
<li>Form needs <em>enctype=&#8221;multipart/form-data&#8221;</em></li>
<li>Textarea value needs character that MS Word creates that is three dots</li>
</ul>
<p>Then upon submitting your first post value will dissappear. Here is a link to a <a href="http://bugs.php.net/bug.php?id=22427">PHP Bug thread</a> covering the issue - and it&#8217;s not PHP specific, its purely IE6. Below is the sample code that will reproduce the error:</p>
<p><code>
<pre>&lt;form method=&quot;post&quot; action=&quot;whatever&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;field1&quot; value=&quot;1&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;field2&quot; value=&quot;2…&quot;&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;field3&quot; value=&quot;3&quot;&gt;
&lt;input type=&quot;submit&quot;&gt;
&lt;/form&gt;
</pre>
<p></code></p>
<p>All I have done to stop it in the meantime is added a &#8216;fake&#8217; hidden post value at the start so it gets destroyed instead of a value that is actually required.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2008/09/ie6-wants-to-hide-my-post-values/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Release details about Worganiser - finally!</title>
		<link>http://lab.clearpixel.com.au/2008/09/release-details-about-worganiser-finally/</link>
		<comments>http://lab.clearpixel.com.au/2008/09/release-details-about-worganiser-finally/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 00:21:44 +0000</pubDate>
		<dc:creator>Lone</dc:creator>
		
		<category><![CDATA[Projects]]></category>

		<category><![CDATA[management]]></category>

		<category><![CDATA[organiser]]></category>

		<category><![CDATA[task]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=21</guid>
		<description><![CDATA[Worganiser is an internal task and project management tool that we have developed here at PX Webdesign. We use it to help us keep track of what clients work is still to be done and assign tasks to each other. We have always invisaged on releasing this organiser to the public but not until it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.worganiser.com">Worganiser</a> is an internal task and project management tool that we have developed here at <a href="http://www.clearpixel.com.au">PX Webdesign</a>. We use it to help us keep track of what clients work is still to be done and assign tasks to each other. We have always invisaged on releasing this organiser to the public but not until it had been fully tested in house.<span id="more-21"></span></p>
<p>We have started re-writing it now on the CodeIgniter framework along with giving it the extra dimension of multiple user accounts so you can signup to register a new account as this will be a hosted web application service. Some of the features include the following:</p>
<ul>
<li>Client contact management (phone numbers, email addresses etc.)</li>
<li>Project management</li>
<li>Project job management</li>
<li>Task/todo list management</li>
</ul>
<p>Whilst we don&#8217;t have an exact release date, we would hope with in the next 3 months will be the likely release date. If you do want to know more, be certain to <a href="http://www.worganiser.com">visit the site</a> and send us your email address to be updated when more information is available.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2008/09/release-details-about-worganiser-finally/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A simple way to ease spam from forms</title>
		<link>http://lab.clearpixel.com.au/2008/08/a-simple-way-to-ease-spam-from-forms/</link>
		<comments>http://lab.clearpixel.com.au/2008/08/a-simple-way-to-ease-spam-from-forms/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 06:00:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[jvascript jquery forms]]></category>

		<guid isPermaLink="false">http://lab.clearpixel.com.au/?p=20</guid>
		<description><![CDATA[A common request we get from many of our clients is &#8220;How do I stop spam coming through from forms on my website?&#8221;. Some client&#8217;s sites we have seen can get upto 80-100 spam emails in one day from forms on their website - this of course is very frustrating for them especially when you [...]]]></description>
			<content:encoded><![CDATA[<p>A common request we get from many of our clients is &#8220;How do I stop spam coming through from forms on my website?&#8221;. Some client&#8217;s sites we have seen can get upto 80-100 spam emails in one day from forms on their website - this of course is very frustrating for them especially when you need to look a bit closer at these emails in case they are a genuine email.</p>
<p>One of the common approaches these days is to use a image verification system (usually called <a href="http://psyrens.com/captcha/" target="_blank">Captcha</a>) but this can become very  annoying for an end user especially when it is difficult to read. Plus, these forms are usually enquiry/contact forms which are very critical to help generate sales for the client so making them unattractive and difficult to a end user can reduce the number of enquiries sent.<span id="more-20"></span></p>
<h2>Our Solution</h2>
<p>One of the common traits of the scripts out there that are auto spamming all of these forms is that they are done through very simple methods and don&#8217;t support features that most broswers do such as Javascript - we can use this to our advantage.</p>
<p>In your form create a hidden input and make its value empty such as the sample code below:</p>
<pre><code>&lt;input type=&quot;hidden&quot; name=&quot;js_check&quot; id=&quot;js_check&quot; value=&quot;&quot; /&gt;</code></pre>
<p>Now create a javascript file that is loaded on the form page and insert the following code:</p>
<h4>Raw Javascript</h4>
<pre><code>document.getElementById('js_check').value = 'pass';</code></pre>
<h4>or <strong>jQuery</strong> (in document.ready)</h4>
<pre><code>$('input[@name=js_check]').val('pass');</code></pre>
<p>Then all you need to do is where the form is posted to is check that $_POST[&#8217;js_check&#8217;] is equal to &#8216;pass&#8217;. If it isn&#8217;t then send the user back to the form and inform them that they need javascript required to complete the form.</p>
<p>I would usually jump up and down here and say &#8220;oh that&#8217;s not right to depend on javascript&#8221; but honestly speaking <a href="http://www.w3schools.com/browsers/browsers_os.asp" target="_blank">the stats show</a> that now 95% of people have it enabled and as long as you redirect them back informing them that they need it enabled they will know why the form was not sent.</p>
<p>For the amount of spam this stops for the minimal implementation time and small amount of users that maybe affected I think it is well worth adding to your forms instead of a Image Verification method.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.clearpixel.com.au/2008/08/a-simple-way-to-ease-spam-from-forms/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

