<?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>Xavi Esteve &#187; Web design</title>
	<atom:link href="http://xaviesteve.com/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://xaviesteve.com</link>
	<description>I&#039;m a front end web developer and graphic designer from Barcelona based in London. I am passionate in JavaScript, jQuery, CSS, PHP, Wordpress, usability and SEO.</description>
	<lastBuildDate>Thu, 10 May 2012 11:45:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Register in WordPress with Twitter account (plugin)</title>
		<link>http://xaviesteve.com/3128/register-in-wordpress-with-twitter-account-plugin/</link>
		<comments>http://xaviesteve.com/3128/register-in-wordpress-with-twitter-account-plugin/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 21:54:45 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=3128</guid>
		<description><![CDATA[Wordpress Login is a WordPress plugin that will allow users to register into a WordPress website with a Twitter account in one single click. The plugin will create an account in the WordPress wp_users table. WP-Twitter-Login Who is this plugin for? This plugin has been specially coded for intermediate to senior WordPress developers that want [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-3141" title="wordpress twitter account register" src="http://xaviesteve.com/wp-content/uploads/2012/04/wordpress-twitter-account-register.jpg" alt="wordpress twitter account register" width="600" height="300" /><br />
Wordpress Login is a WordPress plugin that will allow users to register into a WordPress website with a Twitter account in one single click. The plugin will create an account in the WordPress wp_users table.</p>
<h2>WP-Twitter-Login</h2>
<h3>Who is this plugin for?</h3>
<p>This plugin has been specially coded for intermediate to senior WordPress developers that want to develop a new web application using WordPress. The plugin can be configured easily and it has been coded to be very scalable. Users with no knowledge of PHP may find other solutions more helpful since this plugin doesn&#8217;t have any GUI. The main purpose of this plugin is to allow people to develop an app taking advantage of the high-converting one-click Twitter sign-up process and saving time in programming a User Authentication system.</p>
<h3>How it works?</h3>
<p>When a user accesses the URL <code>?tw=login</code> in a WordPress website he is redirected to Twitter using Matt Harris&#8217; OAuth library. Once authenticated, a new WordPress user is created picking all the information from the Twitter username. The WordPress username has a prefix (<code>tw-</code> by default) and his Twitter ID (the public username is not used here since it can be changed). The password is his Twitter ID with a custom salt. Extra information is stored in his user profile (nickname, full name, website, bio, etc.) as well as in custom user fields (oauth_token, oauth_token_secret, language, followers and friends count, profile image, etc.).</p>
<p>A caveat in WordPress is that it requires a valid and unique email address per user. Since Twitter does not provide you with the user&#8217;s email address, the plugin registers the user with an email address like tw-twitterid@domainname.com.</p>
<p><a href="http://xaviesteve.com/wp-content/uploads/2012/04/wordpress-user-twitter.jpg"><img class="aligncenter size-large wp-image-3144" title="wordpress-user-twitter" src="http://xaviesteve.com/wp-content/uploads/2012/04/wordpress-user-twitter-600x96.jpg" alt="" width="600" height="96" /></a></p>
<p>By default the plugin will not allow users to access WP-Admin which makes this plugin perfect for someone who will provide a service to registered users without ever showing the WordPress inner pages to them. You can enable access to WP-Admin changing a variable from true to false although you should disallow users from changing their password or they will not be able to log back in.</p>
<h2>Download</h2>
<p>Download the plugin from GitHub:</p>
<p><a class="button blue" href="https://github.com/luckyshot/wp-twitter-login" rel="nofollow">wp-twitter-login</a></p>
<h3>License</h3>
<p>This plugin is licensed under a MIT license. Feel free to use it in any commercial way.</p>
<h2>Installation</h2>
<p>1. Download the plugin and upload it to your plugins folder as you would do with any other WordPress plugin</p>
<p>2. Create a new app at Twitter <a title="Create a new Twitter app" href="https://dev.twitter.com/apps/new">here</a></p>
<p>3. Copy the Consumer Key and Consumer Secret and paste them in <code>twitterlogin.php</code></p>
<p>4. Change the <code>$salt</code> variable to something long and complicated</p>
<p>5. Optionally, you can change the username prefix to something else to increase security</p>
<h2>Retrieving user information</h2>
<p>To see if a user is logged in through Twitter run <code>is_user_logged_in()</code> and then check if the username matches the Twitter prefix (<code>tw-</code> by default).</p>
<p>To retrieve the current user&#8217;s data do something like this:</p>
<pre>global $current_user;
get_currentuserinfo();
echo 'Hello ' . $current_user-&gt;nickname;
echo 'User token: ' . $current_user-&gt;oauth_token;
echo '&lt;img src="' . $current_user-&gt;profile_image_url . '" alt="" /&gt;';</pre>
<p>To retrieve data from someone else do something like this:</p>
<pre>$user_info = get_userdata($user_id);
echo 'Username: ' . $user_info-&gt;nickname;</pre>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/3128/register-in-wordpress-with-twitter-account-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplest Modal Window (less than 1KB) &#8211; jQuery Plugin</title>
		<link>http://xaviesteve.com/3054/simplest-modal-window-less-than-1kb-jquery-plugin/</link>
		<comments>http://xaviesteve.com/3054/simplest-modal-window-less-than-1kb-jquery-plugin/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 15:18:19 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[creativecommons]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=3054</guid>
		<description><![CDATA[Following my jQuery minimal plugin series I&#8217;ve now built a very functional and minimal jQuery plugin to create modal windows on the go, it weights exactly 572 Bytes (0.6KB). The modal windows have a slick design using a white rounded border square with a fine shadow: The CSS style is fully customizable, only 8 properties used [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-3072" title="" src="http://xaviesteve.com/wp-content/uploads/2012/03/9.jpeg" alt="" width="600" height="200" /></p>
<p>Following my jQuery minimal plugin series I&#8217;ve now built a very functional and minimal jQuery plugin to create modal windows on the go, it weights exactly 572 Bytes (0.6KB). The modal windows have a slick design using a white rounded border square with a fine shadow:</p>
<p><img class="aligncenter size-full wp-image-3057" title="Simple jQuery Modal Window Plugin" src="http://xaviesteve.com/wp-content/uploads/2012/03/Screen-shot-2012-03-04-at-02.00.29.png" alt="Simple jQuery Modal Window Plugin" width="526" height="147" /></p>
<p>The CSS style is fully customizable, only 8 properties used by default and you can modify most of them to customise it your way.</p>
<p>The script is unobtrusive and has a high-performance, meaning it only loads and modifies the DOM when required and it unloads everything completely when the modal window is closed. Closing the modal window can be done by either clicking outside of the window or by clicking any <code>.mw_close</code> element in the window content.</p>
<h3>Download Simple Modal Window jQuery Plugin</h3>
<p>Copy and paste this code below. Yes, ALL the plugin is in this small piece of code, you should just add it into a JavaScript file you have or directly into the page (inside the jQuery wrapper).</p>
<pre>/* Simplest Modal Window by Xavi Esteve (Creative Commons BY-SA) http://xaviesteve.com/?p=3054 */function mw_close(){$("#mw_win,#mw_mask,#mw_style").remove()}function mw_load(a){mw_mask="background:#333;height:100%;opacity:0.33;position:fixed;top:0;left:0;width:100%;z-index:1000;";mw_win="background: white;border-radius: 5px;box-shadow: 0 1px 2px #666;left: 33%;padding: 2%;position: fixed;top: 33%;width: 33%;z-index: 1001;";$("head").append('&lt;style id="mw_style"&gt;#mw_mask{'+mw_mask+"}#mw_win{"+mw_win+"}&lt;/style&gt;");$("body").append('&lt;div id="mw_mask"&gt;&lt;/div&gt;&lt;div id="mw_win"&gt;'+a+"&lt;/div&gt;");$("#mw_mask,.mw_close").unbind("click").bind("click",function(){mw_close()})}</pre>
<p>Here&#8217;s the code without minifying:</p>
<pre>/* Simplest Modal Window by Xavi Esteve (Creative Commons BY-SA) http://xaviesteve.com/?p=3054 */
$(function() {
  /* Modal window script in 9 lines */
  function mw_load(html) {
    mw_mask = 'background:#333;height:100%;opacity:0.33;position:fixed;top:0;left:0;width:100%;z-index:1000;';
    mw_win = 'background: white;border-radius: 5px;box-shadow: 0 1px 2px #666;left: 33%;padding: 2%;position: fixed;top: 33%;width: 33%;z-index: 1001;';
    $('head').append('&lt;style id="mw_style"&gt;#mw_mask{'+mw_mask+'}#mw_win{'+mw_win+'}&lt;/style&gt;');
    $('body').append('&lt;div id="mw_mask"&gt;&lt;/div&gt;&lt;div id="mw_win"&gt;'+html+'&lt;/div&gt;');
    $('#mw_mask,.mw_close').unbind('click').bind('click', function() {mw_close();});
  }
  function mw_close() {$('#mw_win,#mw_mask,#mw_style').remove();}</pre>
<p>You can load a new Modal Window through JavaScript by using this function:</p>
<pre>mw_load('&lt;p&gt;Lorem ipsum dolor sit &lt;a href="#" class="mw_close"&gt;amet&lt;/a&gt;.&lt;/p&gt;');</pre>
<p>If you have any issues please let me know, note that the plugin&#8217;s purpose is to simply work, fancy features and extras should be coded apart specifically for your projects. The plugin requires jQuery and it hasn&#8217;t been tested in IE6.</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/3054/simplest-modal-window-less-than-1kb-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spreadsheet to calculate share/equity between startup/business co-founders</title>
		<link>http://xaviesteve.com/3011/spreadsheet-calculate-share-equity-startup-business-co-founders/</link>
		<comments>http://xaviesteve.com/3011/spreadsheet-calculate-share-equity-startup-business-co-founders/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 08:57:57 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Project management]]></category>
		<category><![CDATA[Startups]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[equity]]></category>
		<category><![CDATA[startups]]></category>
		<category><![CDATA[stock]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=3011</guid>
		<description><![CDATA[One of the first and most important questions a new startup, business or company should have is how to divide the stock amongst its co-founders or stockholders. Purpose of the Co-Founders Pie The Co-Founder&#8217;s Pie can be used in two different ways: A) Work and responsibility distributor We always use the Co-Founder&#8217;s Pie to calculate [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3037" title="Co-founder share equity" src="http://xaviesteve.com/wp-content/uploads/2012/03/14.jpeg" alt="Co-founder share equity" width="600" height="250" /></p>
<p>One of the first and most important questions a new startup, business or company should have is how to divide the stock amongst its co-founders or stockholders.</p>
<h2>Purpose of the Co-Founders Pie</h2>
<p>The Co-Founder&#8217;s Pie can be used in two different ways:</p>
<h3>A) Work and responsibility distributor</h3>
<p>We always use the Co-Founder&#8217;s Pie to calculate <strong>how to distribute work and responsibilities</strong> between the co-founders. First we write in everything as it is and then tweak it to make it as balanced as possible so we keep the same equity for all the co-founders. That&#8217;s the best approach, if all the co-founders can have the same equity everything would be much better and simpler. If we end up with a 33% 32% 34% then we will agree and share them at 33% each. But if the distribution is quite unbalanced, something like 40% 35% 25% and we can&#8217;t tweak the spreadsheet further to balance work/responsibilities then we will go with that equity.</p>
<h3>B) Calculate co-founder share equity</h3>
<p>If you already have all the areas assigned then you can <strong>calculate the equity division</strong> with the spreadsheet and see exactly how much should every co-founder own.</p>
<h2>Spreadsheet Guide</h2>
<p>It is recommended to fill in the spreadsheet in a meeting, when all co-founders are present and do it all together, agreeing on each step. Also, please read <a href="http://www.andrew.cmu.edu/user/fd0n/35%20Founders'%20Pie%20Calculator.htm" rel="nofollow" target="_blank">this article</a> (5 minute read) from Frank Demmler to learn the origins and reasoning of the Co-Founder&#8217;s Pie and the actual purpose of all this.</p>
<p><a class="blue button strong" href="http://xaviesteve.com/go/docs">Co-Founder Pie Spreadsheet</a></p>
<h4>1. Login to Google, follow the link above and click &#8216;Use this template&#8217;</h4>
<p><img class="alignnone size-full wp-image-3021" title="Google Docs - Use this template" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.33.08.png" alt="Google Docs - Use this template" width="390" height="27" /></p>
<p>A new copy of the Co-Founders Pie Spreadsheet will be created in your Google Docs. No one has access to it now, not even me. To allow people to collaborate click the Share button (top right corner).</p>
<h4>2. Fill in the co-founder names at the top</h4>
<p><img class="alignnone size-full wp-image-3022" title="Fill in co-founders name" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.34.36.png" alt="Fill in co-founders name" width="600" height="59" /></p>
<p>You can write from 2 to 5 different co-founders.</p>
<h4>3. Allocate the different items, tasks, areas in Column A</h4>
<p><img class="alignnone size-full wp-image-3023" title="Areas, tasks, work and responsibility distribution" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.35.37.png" alt="Areas, tasks, work and responsibility distribution" width="441" height="181" /></p>
<p>Examples are in there for demonstration purposes, create your own elements from scratch.</p>
<h4>4. Fill in the Weight of each row</h4>
<p><img class="alignnone size-full wp-image-3024" title="Calculate the weight of each" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.37.10.png" alt="Calculate the weight of each" width="72" height="221" /></p>
<p><em>This is the most important step of all</em>. Decide a relative importance for each element.<br />
The minimum value is 1, higher is more important. Example: Finance=1 and Design=2 means Design has twice the amount of work or responsibility than Finance.</p>
<h4>5. Fill in the amount of work/responsibility of each co-founder</h4>
<p><img class="alignnone size-full wp-image-3025" title="Distribute importance between co-founders" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.38.37.png" alt="Distribute importance between co-founders" width="596" height="145" /></p>
<p>Add a number from 0 to 10 for each player&#8217;s participation in each element. It should add up to 10, no more, no less. Use round values like: 3-7 or 1-5-4. If everyone has the <em>same amount leave it blank</em>.</p>
<h4>6. Results in Row 2</h4>
<p><img class="alignnone size-full wp-image-3026" title="Co-founders share equity" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-26-at-21.40.04.png" alt="Co-founders share equity" width="465" height="91" /></p>
<p>Row 2 show how much each co-founder owns of the company. You can change all the numbers in the spreadsheet and it will automatically update.</p>
<h2>Good to know</h2>
<p>Please read <a href="http://answers.onstartups.com/questions/6949/forming-a-new-software-startup-how-do-i-allocate-ownership-fairly" rel="nofollow">this question</a> (<a href="http://xaviesteve.com/2341/como-repartir-las-acciones-de-una-empresa-equitativamente-entre-fundadores-inversores-y-trabajadores/">spanish translation</a>) if you are unfamiliar with equity division, it is a completely different approach but a must-read which should be considered whenever work and responsibilities among co-founders is quite similar. Also, have a look at <a href="http://answers.onstartups.com/" rel="nofollow">OnStartups Q&amp;A</a> site for many interesting information.</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/3011/spreadsheet-calculate-share-equity-startup-business-co-founders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Base64 online file encoder</title>
		<link>http://xaviesteve.com/2974/best-base64-online-file-encoder/</link>
		<comments>http://xaviesteve.com/2974/best-base64-online-file-encoder/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 08:55:24 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Front-End]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2974</guid>
		<description><![CDATA[I&#8217;ve created a simple yet powerful free online tool to convert any image or file into a Base64 encoded string. The tool works by either providing a URL to a file or by uploading your file directly. Why should you base64 encode? Base64 encoding allows you to embed media into your HTML, CSS or JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xaviesteve.com/pro/base64.php"><img class="alignnone size-large wp-image-2975" title="Base64 encoder" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-24-at-13.10.46-600x427.png" alt="Base64 encoder" width="600" height="427" /></a></p>
<p>I&#8217;ve created a simple yet powerful free online tool to convert any image or file into a Base64 encoded string. The tool works by either providing a URL to a file or by uploading your file directly.</p>
<h2>Why should you base64 encode?</h2>
<p>Base64 encoding allows you to embed media into your HTML, CSS or JavaScript files which means you save one or more server requests. Keeping your website with as fewer requests as possible is one of the best ways of loading websites faster.</p>
<h3>When not to base64 encode?</h3>
<p>If your file is bigger than 20KB or appears in several pages of your site then it is best to load it as a separate file and let the user&#8217;s browser cache it.</p>
<h3>Extra features</h3>
<p>Apart from providing you the code to embed into your project, I&#8217;ve also made available copy-paste codes already with the base64 string in it so if you want to embed your code as a favicon, an image, JavaScript file, CSS sprite map or CSS image you are just a few keystrokes away:</p>
<p><img class="alignnone size-full wp-image-2976" title="Base64 encoder results" src="http://xaviesteve.com/wp-content/uploads/2012/02/Screen-shot-2012-02-24-at-13.11.05.png" alt="Base64 encoder results" width="508" height="656" /></p>
<h2>Base64 encoder website</h2>
<p>Ok, enough talking, here&#8217;s the link to the tool:</p>
<p><a class="button blue" title="Online base64 encoder" href="http://xaviesteve.com/pro/base64.php">Online Base64 encoder</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2974/best-base64-online-file-encoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohana 3.2 Documentation all-in-one PDF, ePub and HTML formats</title>
		<link>http://xaviesteve.com/2965/kohana-3-2-documentation-all-in-one-pdf-epub-and-html-formats/</link>
		<comments>http://xaviesteve.com/2965/kohana-3-2-documentation-all-in-one-pdf-epub-and-html-formats/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 12:14:54 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[official]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2965</guid>
		<description><![CDATA[Kohana&#8217;s official documentation is pretty complete and useful as well as well written. I have been studying it for a few days but wanted to read the tutorials also whenever I had no Internet connectivity. Searching on the Internet for PDFs or ePubs on Kohana didn&#8217;t really show much so I developed a little tool [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-2982" title="Kohana ePub file" src="http://xaviesteve.com/wp-content/uploads/2012/02/kohana-epub.jpg" alt="Kohana ePub file" width="600" height="425" /></p>
<p>Kohana&#8217;s <strong>official documentation</strong> is pretty complete and useful as well as well written. I have been studying it for a few days but wanted to read the <strong>tutorials</strong> also whenever I had <strong>no Internet connectivity</strong>. Searching on the Internet for PDFs or ePubs on Kohana didn&#8217;t really show much so I developed a little tool that extracts the official documentation and outputs it in <strong>one single file</strong> so you can read the official Kohana <strong>guide</strong> anywhere anytime.</p>
<p>You can download the documentation both in <strong>ePub</strong>, <strong>PDF</strong> and <strong>HTML</strong> formats. The ePub format does not have the images in it (I used an online tool and it removed them, there aren&#8217;t a lot anyway) but works great in the iPad, Kindle and Android tablets.</p>
<p><strong><a href="http://www.mediafire.com/?ac2mebegnm0cx67" rel="nofollow">Kohana 3.2 Documentation in PDF format</a></strong> (<a href="http://min.us/mlZHsYfmD#2o">mirror</a>) (3.3MB)</p>
<p><strong><a href="http://www.mediafire.com/?u9r6clwut2g4q4e" rel="nofollow">Kohana 3.2 Documentation in ePub format</a></strong> (<a href="http://min.us/mlZHsYfmD#1o">mirror</a>) (240KB)</p>
<p><strong><a href="http://www.mediafire.com/?m5bq0p3icdqigv9" rel="nofollow">Kohana 3.2 Documentation in HTML format</a></strong> (<a href="http://min.us/mlZHsYfmD#3o">mirror</a>) (310KB)</p>
<p>I have done my best with the crawling tool but it hasn&#8217;t been 100% tested so some sections may have been skipped, please let me know in the comments if that&#8217;s the case.</p>
<p>Thanks to all the contributors to the Kohana Documentation, as I am still learning Kohana accept this as my little contribution to the framework :)</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2965/kohana-3-2-documentation-all-in-one-pdf-epub-and-html-formats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPad web based Code Editor (with extra symbols keyboard)</title>
		<link>http://xaviesteve.com/2928/ipad-web-based-code-editor-with-extra-symbols-keyboard/</link>
		<comments>http://xaviesteve.com/2928/ipad-web-based-code-editor-with-extra-symbols-keyboard/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 16:11:39 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Front-End]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2928</guid>
		<description><![CDATA[I mostly use the iPad for reading email, news and blogs although I am still perplexed at how few apps there are for actually doing some work. Well, to be honest, there are many apps to do some work. But I believe in platform-agnostic web-apps or SAAS to be the future of our world and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-2932" title="iPad Code Editor Web Based" src="http://xaviesteve.com/wp-content/uploads/2012/02/ipad-code-editor-web-based.jpg" alt="iPad Code Editor Web Based" width="600" height="300" /></p>
<p>I mostly use the iPad for reading email, news and blogs although I am still perplexed at how few apps there are for actually doing some work. Well, to be honest, there are many apps to do some work. But I believe in platform-agnostic web-apps or SAAS to be the future of our world and the amount, variety and features of current web apps for web development is still quite scarce.</p>
<p>One of the big gaps that I found was regarding code editors. The lack of fast symbol typing in the keyboard is very frustrating and slow (you need to use iOS&#8217;s default keyboard and type 3 keys just to get a &#8220;&lt;&#8221; sign, plus another one to get back). This is why I came up with a proof of concept on<strong> additional keyboard rows with extra keys for touch screen devices</strong> and added all symbols frequently used for coding and programming so you don&#8217;t need to keep switching from one keyboard set to another. It has been optimised for the iPad in portrait mode although with some responsive CSS queries and device detection it can be adapted anywhere.</p>
<p>The code itself is basic HTML, CSS and a bit of JavaScript and jQuery. I&#8217;ve kept it simple to aid scalability and customisation. This is how it looks:</p>
<p><a href="http://xaviesteve.com/wp-content/uploads/2012/02/ipad-additional-keyboard-coding-programming-symbols.png"><img class="alignnone size-large wp-image-2929" title="iPad additional web-based keyboard for coding" src="http://xaviesteve.com/wp-content/uploads/2012/02/ipad-additional-keyboard-coding-programming-symbols-600x800.png" alt="iPad additional web-based keyboard for coding" width="600" height="800" /></a></p>
<h2>Demo and download</h2>
<p>Click the following link to open the Code Editor. To test it properly you will need an <em>iPad in portrait mode</em>.</p>
<p><a class="button blue" href="http://xaviesteve.com/pro/ipadkeyboard" target="_blank">iPad web-based code editor with extra symbols keyboard</a></p>
<h3>License</h3>
<p>Public Domain, keeping the Internet open. You can use it commercially and distribute it as much as you want without being forced to credit the author.</p>
<h3>Changelog</h3>
<p>If you have developed it further send me an email and I will include it in the next release and you in the Credits.</p>
<h4>8 February 2012 (v1.0)</h4>
<ul>
<li>First release</li>
</ul>
<p>If you haven&#8217;t seen my <a title="iPad/iPhone/mobile HTML/CSS template for web apps (responsive, no javascript)" href="http://xaviesteve.com/2899/ipad-iphone-mobile-html-css-template-for-web-apps/">iPad HTML/CSS template</a> you must see it now.</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2928/ipad-web-based-code-editor-with-extra-symbols-keyboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test de usabilidad web económico</title>
		<link>http://xaviesteve.com/2913/test-de-usabilidad-web-economico/</link>
		<comments>http://xaviesteve.com/2913/test-de-usabilidad-web-economico/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 19:47:49 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Español]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2913</guid>
		<description><![CDATA[Si nos falta el tiempo y el dinero para poder ejecutar un estudio de usabilidad de nuestra página web siempre podemos recurrir a sistemas caseros que son rápidos y económicos. Escoger la lista de perfiles Muchos usuarios visitarán nuestra web en el futuro. Entre éstos tenemos que identificar los diferentes perfiles de usuario (llamados &#8220;personas&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-2917" title="" src="http://xaviesteve.com/wp-content/uploads/2012/02/11.jpeg" alt="" width="600" height="250" /></p>
<p>Si nos falta el tiempo y el dinero para poder ejecutar un estudio de usabilidad de nuestra página web siempre podemos recurrir a sistemas caseros que son rápidos y económicos.</p>
<h2>Escoger la lista de perfiles</h2>
<p>Muchos usuarios visitarán nuestra web en el futuro. Entre éstos tenemos que identificar los diferentes perfiles de usuario (llamados &#8220;personas&#8221; en inglés) y de estos perfiles escoger los <strong>dos o tres principales</strong>, si hay algo que está claro es que la página web nunca será del agrado de todos nuestros usuarios ya que es <strong>imposible que agrade a todo el mundo</strong> aunque sí que podemos adaptarla a la mayoría que nos interese. Un perfil de usuario sería algo así:</p>
<blockquote><p>Persona de entre 25 y 35 años con poder adquisitivo medio-alto, educación universitaria, que vive en una ciudad, no tiene hijos, con conocimientos medios de informática, que navega entre 30 minutos y 2 horas al día por Internet vía un ordenador portátil o de escritorio. Realiza actividades de ocio entre 4 y 8 veces al mes.</p></blockquote>
<p>Una vez tengamos los perfiles principales deberemos encontrar gente que se adapte a ellos. Si nuestro presupuesto es bajo podemos recurrir a favores de amigos, familiares y conocidos. Lo importante es que puedan estar presencialmente con nosotros.</p>
<h2>Test de usabilidad</h2>
<p>Una vez tengamos una lista de los diferentes perfiles de usuario, situaremos al primero delante del ordenador y dejaremos unos minutos para que el usuario se acomode y familiarice con él, encuentre el icono del navegador web y lo abra. Si puedes realizar el test desde el ordenador del usuario muchísimo mejor.</p>
<h3>Misión</h3>
<p>El siguiente paso es el más importante y es que sólo le encomendamos <strong>una misión no más larga que una oración</strong> y cuya tarea debe durar <strong>menos de 15-30 minutos</strong> (podemos encomendarle varias misiones, una a una, pero una sola a la vez). Por ejemplo:</p>
<blockquote><p>Visita la página xaviesteve.com y compra el aparato de música de entre 100 y 200 euros que más te guste.</p></blockquote>
<p>En esa frase queda implícito que el usuario deberá: buscar el producto, registrarse para poder comprar, confirmar un enlace de activación de la cuenta en su correo, hacer click en Comprar, introducir sus datos de la tarjeta de crédito (una vez saque su tarjeta de crédito le proporcionaremos una nuestra de prueba) y finalmente confirmar. Otro ejemplo sería:</p>
<blockquote><p>Mañana quieres ir a cenar a un restaurante japonés, haz una reserva para 2 en la web helloplan.com y encuentra donde está ubicado.</p></blockquote>
<h3>Nuestro papel</h3>
<p>Lo importante es que <strong>el usuario lo deduzca todo por él mismo</strong> sin que tengamos que explicarle nada. Si nos hace preguntas le diremos que no se preocupe, que intente descubrirlo él mismo. Si vemos que duda demasiado o empieza a frustrarse le ayudaremos.</p>
<h3>Pensando en voz alta</h3>
<p>Al usuario le pediremos que piense en voz alta durante el proceso, es decir, que <strong>vaya contando todo lo que piensa, hace y por qué</strong>, por ejemplo:</p>
<blockquote><p>Espero a que la página se cargue, a ver&#8230; ¡Ahá! Aquí pone Electrónica, los aparatos de música estarán dentro, ah no, hay otro que se llama Música, debe ser este mejor, hago clic&#8230; Ok este es, bien, a ver, aquí centrado hay las mejore ofertas&#8230; aquí a la izquierda me sale una lista con subcategorías&#8230; voy a clicar aquí&#8230;</p></blockquote>
<h3>Analizar con detalle</h3>
<p>Si disponemos de una cámara de vídeo o programa de screencasts, nos ayudará muchísimo para poder analizar mas tarde cualquier duda que el usuario haya podido tener y descurir las dudas y micro-gestos que ha tenido y que ocurren en milisegundos (estas son las que cuestan más de detectar y las que tenemos que solucionar) o aquellas donde el usuario duda de entre varias opciones.</p>
<h2>Objetivo del test</h2>
<p>Nuestro objetivo final del test de usabilidad es detectar qué podemos cambiar o mejorar para que nuestros usuarios reales tengan que pensar o dudar lo mínimo. Cuanto menos hagamos pensar a nuestro usuario <strong>menor será su nivel de frustración y mayor el de autorealización</strong>. Una web usable es aquella donde <strong>el usuario cumple su objetivo por intuición</strong> sin tener que pensar demasiado. Para acabar, una cita de uno de los genios en usabilidad web, os recomiendo su libro.</p>
<blockquote><p>Una web poco usable no es aquella web que no se usará pero sí aquella que se usará menos.<br />
&#8211;Steve Krug en &#8216;Don&#8217;t make me Think&#8217;</p></blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2913/test-de-usabilidad-web-economico/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad/iPhone/mobile HTML/CSS template for web apps (responsive, no javascript)</title>
		<link>http://xaviesteve.com/2899/ipad-iphone-mobile-html-css-template-for-web-apps/</link>
		<comments>http://xaviesteve.com/2899/ipad-iphone-mobile-html-css-template-for-web-apps/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 17:03:16 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Front-End]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2899</guid>
		<description><![CDATA[iPad/iPhone template made in pure HTML and CSS (no JavaScript needed) that works perfectly on any modern browser (iPad (including iPad 3), iPhone, tablets, mobiles, laptops, etc.). The template uses responsive queries to hide the sidebar in iPad portrait mode and in the iPhone and smaller screens (you can disable that easily if you want [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xaviesteve.com/wp-content/uploads/2012/01/ipad-web-html-css-template.jpg"><img class="alignnone size-full wp-image-2902" title="Xavi's iPad web HTML/CSS template" src="http://xaviesteve.com/wp-content/uploads/2012/01/ipad-web-html-css-template.jpg" alt="Xavi's iPad web HTML/CSS template" width="600" height="448" /></a></p>
<p>iPad/iPhone template made in <strong>pure HTML and CSS</strong> (no JavaScript needed) that works perfectly on any modern browser (iPad (including iPad 3), iPhone, tablets, mobiles, laptops, etc.). The template uses responsive queries to hide the sidebar in iPad portrait mode and in the iPhone and smaller screens (you can disable that easily if you want to).</p>
<p>Here&#8217;s how it looks in the iPhone (click image to view full size):</p>
<p style="text-align: center;"><a href="http://xaviesteve.com/wp-content/uploads/2012/01/html-css-iphone-template-responsive-no-javascript.png"><img class="aligncenter  wp-image-3154" title="HTML CSS iPhone template (responsive, no javascript)" src="http://xaviesteve.com/wp-content/uploads/2012/01/html-css-iphone-template-responsive-no-javascript-600x900.png" alt="HTML CSS iPhone template (responsive, no javascript)" width="227" height="340" /></a></p>
<p>This template is the perfect start for any front-end or back-end developer to build complex web apps without spending time on developing the main structure. Or even to create a mobile version of your current site.</p>
<p>The code has been developed so that there is no &#8220;divitis&#8221;, completely optimized, semantically correct and <strong>minimal HTML code</strong>. There are no images or animations at all, everything has been coded using some of the latest CSS3 available features and tested it in most modern browsers. Ready for you to download and start developing. These are some of the template&#8217;s features:</p>
<h2>Features</h2>
<h3>App-ready</h3>
<p><strong></strong>You can install this template as a normal <strong>App Store app</strong>, removing the Safari top navigation bar and enjoying the full screen.</p>
<h3>Responsive Web Design</h3>
<p><strong></strong>Hides the sidebar in iPhone, mobiles and iPad portrait mode. Adapts nicely to the full screen.</p>
<h3>No images</h3>
<p><strong></strong>The whole template has been built <strong>without requiring any images</strong> which means less server queries and increased bandwidth savings.</p>
<h3>Heading styles</h3>
<p><strong></strong>Two different heading styles: the main black one and the smaller blueish.</p>
<h3>Anchor texts (links)</h3>
<p><strong></strong>The <strong>whole clickable area</strong> is active so that even fat fingers can click comfortably.</p>
<h3>Scrollable</h3>
<p><strong></strong>Both the sidebar and the main content can be <strong>scrolled separately</strong> in the iPad and other touch screen tablets.</p>
<h3>Tables</h3>
<p><strong></strong>Fully flexible and <strong>liquid tables</strong> that allow you to include more information while keeping the same look and feel as in any Apple app.</p>
<h3>Forms</h3>
<p><strong></strong>Fillable textboxes, password fields, select dropdowns and buttons.</p>
<h3>Fully tested in several devices</h3>
<p><strong></strong>Works great in: iPhone 4, iPhone 3GS, iPad 2, Samsung Galaxy Tab (GT-P7510), Safari 5, Chrome 16 and Firefox 9.</p>
<p>Graceful degradation: IE9 (no rounded corners), IE8.</p>
<p>Not working: (none tested yet).</p>
<h3><strong>License</strong></h3>
<p><strong></strong>The best of it, I am releasing it under a <strong>Public Domain license</strong>. This means it is free to use as many times as you want (even for <strong>commercial projects</strong>) and you do not need to give me credits if you don&#8217;t want to. I would appreciate if you do so or if you send me a link to your creation, it will motivate me to develop it further and make me happy.</p>
<h2>Download the template</h2>
<p>To <strong>download</strong> the most recent version of the Xavi iPad template click the link below:</p>
<p><a class="big button blue" title="Xavi iPad template" href="http://xaviesteve.com/pro/ipad-template/" target="_blank">Xavi iPad template</a></p>
<p>And then go to File &gt; Save as&#8230; The CSS has been coded in a &lt;style&gt; tag to keep everything in a single file.</p>
<p>For a better experience open the template in an iPad and test how cool Responsive Web Design is by rotating the iPad.</p>
<h4>Comments, improvements, feedback, feature requests and bugs</h4>
<p>If you have any comments, doubts or would like to point out a bug or a feature request you can write a comment below or tweet me at @xaviesteve in Twitter. If you code your own improvements and would like to share them with everyone let me know and I will include them in the next release. Bear in mind that the purpose of this plugin is to remain as simple as possible so drag&#8217;n'drops, special effects and lengthy scripts should be avoided.</p>
<h4>Changelog</h4>
<h5>Version 1.0 (31 January 2012)</h5>
<ul>
<li>Moved sidebar to the bottom of the HTML.</li>
<li>Fixed content header left and right link clickable area</li>
<li>Added commented <code>&lt;link rel="stylesheet"&gt;</code>, <code>&lt;script&gt;</code> and favicon for faster development</li>
<li>Disabled the callout shown when you touch and hold a touch target (thanks 185)</li>
<li>Added <code>-webkit-user-select: none</code> (thanks Josiah)</li>
</ul>
<h5>Version 0.9b (27 January 2012)</h5>
<ul>
<li>First release.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2899/ipad-iphone-mobile-html-css-template-for-web-apps/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Generate a custom/fake/virtual page on the fly &#8211; WordPress Plugin Development</title>
		<link>http://xaviesteve.com/2851/generate-a-custom-fakevirtual-page-on-the-fly-wordpress-plugin-development/</link>
		<comments>http://xaviesteve.com/2851/generate-a-custom-fakevirtual-page-on-the-fly-wordpress-plugin-development/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:01:10 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Front-End]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2851</guid>
		<description><![CDATA[I&#8217;m currently developing a WordPress plugin that needs to show a virtual page generated by my plugin (such as a form or a message) and I wanted to avoid adding a new Page and modifying the current WordPress installation, so every plugin form, message or page had to be generated on the fly without touching the database. Some WordPress plugins [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://xaviesteve.com/wp-content/uploads/2011/09/wordpress-performance-speed-tips1.jpg" alt="Wordpress ultimate performance" /></p>
<p>I&#8217;m currently developing a <strong>WordPress plugin</strong> that needs to <strong>show a virtual page generated by my plugin</strong> (such as a form or a message) and I wanted to <strong>avoid adding a new Page</strong> and modifying the current WordPress installation, so every plugin form, message or page had to be <strong>generated on the fly</strong> without touching the database.</p>
<p>Some WordPress plugins or themes create new pages in the website&#8217;s installation to add advanced functionalities. As an example, WooCommerce adds new pages to the <code>wp_posts</code> database that help set up the website to work with it. In my opinion this is a mess, if you already have a WordPress website running, installing this theme/plugin will mess with your current page structures and whenever you want to uninstall it or deactivate it you will need to manually remove those pages created previously by the plugin. I once wanted to test an advanced WordPress theme that deleted all the current pages I had&#8230; that was the most annoying thing ever, since I already had written the content for the website and lost it (yes, I should have backed up but, who would expect a theme to delete and install pages without even a warning?).</p>
<p>A few weeks ago I posted <a href="http://wordpress.stackexchange.com/questions/37954/display-custom-content-using-page-php-from-theme" rel="nofollow">a question</a> in WordPress StackExchange but couldn&#8217;t really get the answer I was looking for, there was <a href="http://www.blogseye.com/2010/05/creating-fake-wordpress-posts-on-the-fly/" rel="nofollow">this</a> solution to <strong>create fake posts</strong> but I wanted generate <strong>unlimited pages</strong> with <strong>simple code</strong> as possible and using friendly URLs like: <em>http://example.com/?<strong>plugin_page=myfakepage</strong></em> (I could then easily use <code>mod_rewrite</code> to make them look even better). Today I kept investigating and finally came with the solution.</p>
<h2>Step by step guide</h2>
<p>We will load the page at http://example.com/ but modify its title, content and select a blank theme template so it looks like a complete new page.</p>
<h3>Custom page content</h3>
<p>First of all we create a function that will overwrite the content:</p>
<pre>function plugin_myown_content() {
  $return = '
&lt;p&gt;Fill in this form:&lt;/p&gt;
&lt;form action="?" method="post"&gt;
  &lt;input type="text" name="foo" value="bar" /&gt;
  &lt;input type="submit" value="Connect" /&gt;
&lt;/form&gt;
';
  return $return;
}</pre>
<h3>Custom page title</h3>
<p>Now we overwrite the title of the page with this function:</p>
<pre>function plugin_myown_title() {
  return "On the fly foobar form";
}</pre>
<h3>Default page template</h3>
<p>With this function we force WordPress to load the default page template of the current active theme:</p>
<pre>function plugin_myown_template() {
  include(TEMPLATEPATH."/page.php");
  exit;
}</pre>
<h3>Hook actions and filters</h3>
<p>Finally, we add a simple <code>if</code>to check if the user is requesting the plugin&#8217;s fake page and run WordPress hooks to load the 3 functions mentioned before and force WordPress into displaying the virtual page we have just generated.</p>
<pre>if ($_GET['plugin_page'] == "myfakepage") {
  add_filter('the_title','plugin_myown_title');
  add_filter('the_content','plugin_myown_content');
  add_action('template_redirect', 'plugin_myown_template');
}</pre>
<p>The code is pretty basic, from here you can add your desired PHP code to make it do whatever you want. You can also add more hooks to customize the page even further. I hope you get the idea. This code has been tested with the latest version of WordPress (3.3.1).</p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2851/generate-a-custom-fakevirtual-page-on-the-fly-wordpress-plugin-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick website prototyping</title>
		<link>http://xaviesteve.com/2556/quick-website-prototyping/</link>
		<comments>http://xaviesteve.com/2556/quick-website-prototyping/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 17:35:58 +0000</pubDate>
		<dc:creator>Xavi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Front-End]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://xaviesteve.com/?p=2556</guid>
		<description><![CDATA[This is a little compilation I&#8217;ve made of my most used code snippets every time I build a prototype, website or theme. By following these steps you can save 80% of coding time for any HTML/CSS website or WordPress theme. For some of my projects I use the Zen Coding plugin to develop the HTML. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-large wp-image-2616" title="" src="http://xaviesteve.com/wp-content/uploads/2011/10/prototype-600x400.jpg" alt="" width="600" height="400" /></p>
<p>This is a little compilation I&#8217;ve made of my most used code snippets every time I build a prototype, website or theme. By following these steps you can save 80% of coding time for any HTML/CSS website or WordPress theme. For some of my projects I use the Zen Coding plugin to develop the HTML. Most of the CSS itself is optimized already using short names and what some people call OOCSS (Object Oriented CSS).</p>
<h2>1. CSS Reset and Minimal Grid</h2>
<h3>Yahoo CSS Reset</h3>
<pre>/* Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:

http://developer.yahoo.com/yui/license.html

version: 2.9.0 */
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}</pre>
<h3>960px Grid (12 cols, 60px width, 20px gutter)</h3>
<pre>/* Minimal Grid */
.g1{width:60px;}.g2{width:140px;}.g3{width:220px;}.g4{width:300px;}.g5{width:380px;}.g6{width:460px;}.g7{width:540px;}.g8{width:620px;}.g9{width:700px;}.g10{width:780px;}.g11{width:860px;}.g12{width:940px;}.g1,.g2,.g3,.g4,.g5,.g6,.g7,.g8,.g9,.g10,.g11,.g12{overflow:hidden;float:left;display:inline;margin:0 10px;}.r{width:960px;overflow:hidden;margin:0 auto;}.r .r{width:auto;display:inline-block;margin:0 -10px;}</pre>
<h3>CSS 100% box model</h3>
<p>Padding, borders, margins and width equals 100%:</p>
<pre><code>* {-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing: border-box;}</code></pre>
<h3>Common CSS</h3>
<pre>/* Common CSS */
html {}body {font-family:Arial,sans-serif;font-size:14px;}
a{color:#0085d5;text-decoration:none}a:hover{}
li{display:inline}
h1,h2,h3,h4,h5,h6 {}
strong,.strong {font-weight:900}em,.em {font-style:italic}
.right{text-align:right}.center {text-align:center}
.fright{float:right}.fleft{float:left}
.hide{display:none}</pre>
<h3>Sprite map</h3>
<pre>/* Sprite */
#logo,.button,
.sprite{background:transparent url('images/sprite.jpg') no-repeat;}
.ico {display:inline-block;height:16px;width:16px}
.ico.aa {background-position:-px -px}</pre>
<h3>Forms and buttons</h3>
<pre>.button{background:#eee;border:1px solid #ccc;cursor:pointer;font-weight:900;padding:5px 10px;text-decoration:none}</pre>
<h3>CSS for the coming HTML template</h3>
<pre>/* Main structure */
#wrap {}
#header {}
 #logo {}
  #logo span {display:none}
 #s {}
#topnav {}
 #nav {}
  #nav li {display:inline}
#container {}
 #container a {text-decoration:underline}
 #container li {display:list-item}
 .main {}
 .main h1 {}
 .main h2 {}
 .main p {}

 .side {}
  .side h4 {}
  .side h5 {}
  .side p {}

#footer {}
 #footer p {}
 #footer p a {}</pre>
<h3>Overlap design watermark for pixel perfect CSS</h3>
<pre>    &lt;style&gt;
        #watermark {position:fixed;top:0;left:0;width:100%;background:url(images/watermark.jpg) top center;height:5px;opacity:0.2}
        #watermark:hover {height:1000px;opacity:0.5}
    &lt;/style&gt;
    &lt;div id="watermark"&gt;&lt;/div&gt;</pre>
<h2>2. HTML Zen Coding shortcuts</h2>
<h4>Typical HTML website structure</h4>
<p>With the power of Zen Coding, I can code a full HTML website in one line of code, then press the shortcut (Ctrl+, in Dreamweaver) and voila, there you have all the HTML ready:</p>
<pre>html:xt&gt;(div#wrap&gt;(div#header.r&gt;(div.g6&gt;p#logo&gt;span)+(div.g6&gt;form#search&gt;input[type=text]#s+input[type=submit].hide))+(div#topnav.r&gt;div.g12&gt;ul.nav&gt;li*5&gt;a)+(div#container.r&gt;(div.main.g8&gt;div.post&gt;h1+p+img[src=http://dummyimage.com/150x150])+(div.side.g4&gt;h4+p&gt;ul&gt;li*5&gt;a))+(div#footer.r&gt;(div.g6&gt;p&gt;a*1)+(div.g6&gt;p&gt;a*4)))</pre>
<p>Here&#8217;s the fragmented HTML:</p>
<pre>html:xt
div#wrap
div#header.r&gt;div.g6*2
div#header.r&gt;(div.g6&gt;p#logo&gt;span)+(div.g6&gt;form#search&gt;input[type=text]#s+input[type=submit].hide)
div#topnav.r&gt;div.g12&gt;ul.nav&gt;li*5&gt;a
div#container.r&gt;(div.main.g8&gt;div.post&gt;h1+p+img[src=http://dummyimage.com/150x150])+(div.side.g4&gt;h4+p&gt;ul&gt;li*5&gt;a)
div#footer.r&gt;(div.g6&gt;p&gt;a*1)+(div.g6&gt;p&gt;a*4)</pre>
<h4>Forms and tables</h4>
<pre>form&gt;label+input:text+input:submit
select#items&gt;option[value=item-$]*3
table&gt;(tr&gt;th*2)+(tr&gt;td*2)</pre>
<h4>Listings</h4>
<pre>div.list-vert&gt;(img[src=http://dummyimage.com/100x100]+h3+p.brand+span.rating-5+p.price+(p&gt;a.button-m))</pre>
<h2>3. WordPress theme</h2>
<ol>
<li>Download the <a href="http://wpcandy.com/made/the-wordpress-starter-theme-project">Starter Theme</a></li>
<li>Add <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">TimThumb</a></li>
<li>Then grab snippets from <a href="http://wp-snippets.com/">WP Snippets</a></li>
<li>Start coding and customizing</li>
</ol>
<h2>4. WordPress customization</h2>
<h3>In the functions.php</h3>
<pre>date_default_timezone_set('Europe/Madrid');
date_default_timezone_set('Europe/London');</pre>
<h4>TimThumb shortcut</h4>
<pre>function timthumb($src, $w, $h, $q=90, $zc=1) {
    return get_bloginfo('template_url').'/thumb.php?src='.$src.'&amp;amp;w='.$w.'&amp;amp;h='.$h.'&amp;amp;q='.$q.'&amp;amp;zc='.$zc;
}</pre>
<h4>Custom field shortcut</h4>
<pre>function customfield($name, $id="") {
    $value = get_post_custom_values($name, $id);
    return $value[0];
}</pre>
<h4>Extract images of a post</h4>
<pre>function catch_that_image() {
    global $post, $posts;
    $first_img = '';
    ob_start();
    ob_end_clean();
    $output = preg_match_all('/&lt;img.+src=[\'"]([^\'"]+)[\'"].*&gt;/i', $post-&gt;post_content, $matches);
    $first_img = $matches [1] [0];

    if(empty($first_img)){ $first_img = "/images/default.jpg"; }
    return $first_img;
}</pre>
<h4>Nice excerpts</h4>
<pre>/* This function will trim text without
cutting it in the middle of the word and
adding … if longer
*/
function trimtext($text, $length) {
    $words = explode(" ", strip_tags($text));
    $newtext = "";
    $addhellip = "";
    foreach ($words as $word) {
        if (strlen($newtext." ".$word) &lt; $length) {
            $newtext .= " ".$word;
        }else{
            $addhellip = 1;
            break;
        }
    }
    if ($addhellip) {$newtext .= "…";}
    return $newtext;
}</pre>
<h4>Get exact current page URL</h4>
<pre>function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}</pre>
<h4>Optimize WYSIWYG editor for SEO</h4>
<pre>if (isset($wp_version)) {
    add_filter("mce_buttons", "extended_editor_mce_buttons", 0);
    add_filter("mce_buttons_2", "extended_editor_mce_buttons_2", 0);
    add_filter('tiny_mce_before_init', 'extended_editor_change_mce_buttons', 0);
}

function extended_editor_mce_buttons($buttons) {
    return array(
        "formatselect", "separator",
        "bold", "italic", "separator",
        "bullist", "numlist", "blockquote", "separator",
        "link", "unlink", "separator",
        "charmap", "separator",
        "pasteword", "separator",
        "fullscreen", "separator",
    );
}

function extended_editor_mce_buttons_2($buttons) {
// the second toolbar line
return array();
}

function extended_editor_change_mce_buttons( $initArray ) {
    $initArray['theme_advanced_blockformats'] = 'p,h2,h3,h4,h5,h6,pre';
    return $initArray;
}</pre>
<h4>In the wp-config.php</h4>
<p>Disable/limit revisions</p>
<pre># Maximum 5 revisions
define('WP_POST_REVISIONS', 5);
# Disable revisions
define('WP_POST_REVISIONS', false);</pre>
<h2> 5. WordPress must-have plugins</h2>
<ul>
<li><a href="http://xaviesteve.com/2498/admin-helper-wordpress-plugin-essential-tool-for-theme-developers/">Admin Helper</a></li>
<li><a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All-in-one SEO</a></li>
<li><a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">Google XML Sitemap</a></li>
<li><a href="http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/">HTML Sitemap</a></li>
</ul>
<h3>Related posts</h3>
<ul>
<li><a title="WordPress code snippets, tricks and cheat sheet" href="http://xaviesteve.com/936/wordpress-code-snippets-tricks-and-cheat-sheet/">WordPress code snippets, tricks and cheat sheet</a></li>
<li><a title="Ultimate WordPress Performance Tip List to speed up and save up to 80% of space" href="http://xaviesteve.com/2433/clean-your-wordpress-website-to-speed-up-and-save-up-to-80-percent-of-space/">WordPress Performance</a></li>
</ul>
<div></div>
<p><small>Photo by <a href="http://www.flickr.com/photos/coffeegeek/" rel="nofollow">CoffeGeek</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://xaviesteve.com/2556/quick-website-prototyping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

