<?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>Jorge Pedret</title>
	<atom:link href="http://jorgepedret.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jorgepedret.com</link>
	<description>Freelance Web Developer + Front End Designer</description>
	<lastBuildDate>Wed, 16 May 2012 21:32:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Cloning a remote WordPress site in your local computer</title>
		<link>http://jorgepedret.com/web-development/cloning-a-remote-wordpress-site-in-your-local-computer/</link>
		<comments>http://jorgepedret.com/web-development/cloning-a-remote-wordpress-site-in-your-local-computer/#comments</comments>
		<pubDate>Wed, 16 May 2012 21:30:24 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=702</guid>
		<description><![CDATA[This is a trick that I usually use when I need to clone an existing WordPress installation in my local computer.]]></description>
			<content:encoded><![CDATA[<p>This is a trick that I usually use when I need to clone an existing WordPress installation in my local computer.</p>
<ol>
<li>Clone all the remote WordPress files in your local computer.</li>
<li>Clone the remote WordPress database into your local computer.</li>
<li>Update the wp-config.php file with your local MySQL access info and database name.</li>
<li>Replace the old domain with the new domain in your local MySQL by running this commands:</li>
</ol>
<pre class="brush: sql; title: ; notranslate">
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://old.domain.com', 'http://new.domain.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://old.domain.com', 'http://new.domain.com');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/cloning-a-remote-wordpress-site-in-your-local-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is considered a tabular data?</title>
		<link>http://jorgepedret.com/web-development/what-is-considered-a-tabular-data/</link>
		<comments>http://jorgepedret.com/web-development/what-is-considered-a-tabular-data/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 23:29:47 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[tables]]></category>
		<category><![CDATA[tabular data]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=671</guid>
		<description><![CDATA[If the data was designed or positioned differently, would you still make it a table?]]></description>
			<content:encoded><![CDATA[<p>When trying to consider if some piece of data in the design is a table or not, this is a good question to ask yourself: If the data was designed or positioned differently, would you still make it a table?</p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/what-is-considered-a-tabular-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading Google Maps API on demand</title>
		<link>http://jorgepedret.com/web-development/loading-google-maps-api-on-demand/</link>
		<comments>http://jorgepedret.com/web-development/loading-google-maps-api-on-demand/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 23:17:13 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[lazy loading]]></category>
		<category><![CDATA[on demand]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=686</guid>
		<description><![CDATA[Here's another quick snipped that I used recently to load Google Maps on demand.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another quick snipped that I used recently to load Google Maps on demand.</p>
<pre class="brush: jscript; title: ; notranslate">
function loadGoogleMapsApi(){
	if(typeof google === &quot;undefined&quot;){
		var script = document.createElement(&quot;script&quot;);
		script.src = &quot;https://maps.google.com/maps/api/js?sensor=false&amp;callback=loadGoogleMapsApiReady&quot;;
		document.getElementsByTagName(&quot;head&quot;)[0].appendChild(script);
	} else {
		loadGoogleMapsApiReady();
	}
}
function loadGoogleMapsApiReady(){
	$(&quot;body&quot;).trigger(&quot;gmap_loaded&quot;);
}
</pre>
<p>First we define the <code>loadGoogleMapsApi</code> function, where we include the script tag which is going to start loading Google Maps&#8217; API. Notice in line 4 how we define the callback function <code>loadGoogleMapsApiReady</code>. This is the function that will be executed after the library has been loaded.</p>
<p>The second step is defining the callback function <code>loadGoogleMapsApiReady</code>. This function simply triggers the custom even <code>gmap_loaded</code> on the body.</p>
<p>You&#8217;re all set now! Now is time to use the on demand functionality. For that you only need to attach some functionality to the custom event <code>gmap_loaded</code> triggered on the body tag. See below:</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;body&quot;).bind(&quot;gmap_loaded&quot;, function(){
	alert(&quot;Google map is loaded and ready to be used!&quot;);
});
loadGoogleMapsApi();
</pre>
<p>If you want to load the Google Maps API on a button click, you could do something like this:</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;.my-btn&quot;).click(function(){
	$(&quot;body&quot;).bind(&quot;gmap_loaded&quot;, function(){
		alert(&quot;Google map is loaded and ready to be used!&quot;);
	});
	loadGoogleMapsApi();
});
</pre>
<p>Let me know what you think and how it worked for you.</p>
<p>Here&#8217;s a link to the snippet on the gist: <a href="https://gist.github.com/2432506">https://gist.github.com/2432506</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/loading-google-maps-api-on-demand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Require.js including multiple files and managing packages</title>
		<link>http://jorgepedret.com/web-development/require-js-including-multiple-files-and-managing-packages/</link>
		<comments>http://jorgepedret.com/web-development/require-js-including-multiple-files-and-managing-packages/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 22:54:33 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[require.js]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=682</guid>
		<description><![CDATA[This is a quick way to manage packages or including multiple files using require.js.]]></description>
			<content:encoded><![CDATA[<p>This is a quick snippet to manage packages or including multiple files using require.js.</p>
<p>I have a couple of pages that need a set of files, so instead of including one by one in all the pages, I created a function that calls requires them all, keeping the callback function.</p>
<pre class="brush: jscript; title: ; notranslate">
require_form = function (callback) {
	require([
		&quot;form&quot;,
		&quot;validate&quot;,
		&quot;multiselect&quot;,
		&quot;form_extend&quot;
		], function(){
			require([&quot;my_validate&quot;], callback);
		}
	);
};
</pre>
<p>Whenever I need to require the form set of files, I call:</p>
<pre class="brush: jscript; title: ; notranslate">
require_form(function(){
	alert('All form files are loaded!');
});
</pre>
<p>Check out code on the gist <a href="https://gist.github.com/2432457">https://gist.github.com/2432457</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/require-js-including-multiple-files-and-managing-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fontomas</title>
		<link>http://jorgepedret.com/web-development/fontomas/</link>
		<comments>http://jorgepedret.com/web-development/fontomas/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 00:31:10 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=672</guid>
		<description><![CDATA[This tool helps to combine iconic webfonts for your project. With fontomas you can: Make a limited symbols subset, with reduced font size, Merge symbols from several fonts to single file, Access large collections of professional-grade open source icons]]></description>
			<content:encoded><![CDATA[<p>This tool helps to combine iconic webfonts for your project. With fontomas you can:</p>
<ul>
<li>make a limited symbols subset, with reduced font size</li>
<li>merge symbols from several fonts to single file</li>
<li>access large collections of professional-grade open source icons</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/fontomas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solving postMessage issues with form submissions in IE</title>
		<link>http://jorgepedret.com/web-development/solving-postmessage-issues-with-form-submissions-in-ie/</link>
		<comments>http://jorgepedret.com/web-development/solving-postmessage-issues-with-form-submissions-in-ie/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 23:40:03 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=663</guid>
		<description><![CDATA[Last week I started using the Ben Alman jQuery plugin for posting messages between different windows. Although it worked marvellously in modern browsers, Internet Explorer wouldn&#8217;t work properly for some cases. We&#8217;re currently using postMessage/receiveMessage to dynamically resize an iframe inside our client&#8217;s page. The plugin works in most browsers, including IE. But in my case, it was [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I started using the <a href="http://benalman.com/projects/jquery-postmessage-plugin/">Ben Alman jQuery plugin</a> for posting messages between different windows. Although it worked marvellously in modern browsers, Internet Explorer wouldn&#8217;t work properly for some cases.</p>
<p>We&#8217;re currently using postMessage/receiveMessage to dynamically resize an iframe inside our client&#8217;s page. The plugin works in most browsers, including IE. But in my case, it was failing in IE when a form was submitted inside the iframe. It took us a long time to figure out the solution, but we finally came up with a fix.</p>
<p>In the plugin&#8217;s website, they show and example of how to use it to communicate between two iframes residing in two different domains (<a href="http://benalman.com/code/projects/jquery-postmessage/examples/iframe/">http://benalman.com/code/projects/jquery-postmessage/examples/iframe/</a>). I&#8217;m going to use that example to show you how to solve it.</p>
<p>After a lot of debugging, we found out that the parent_url wasn&#8217;t being set in IE after the form was submitted. So our solution was to add a hidden field that can hold the parent_url value when the iframe first loads.</p>
<p>Here&#8217;s a quick example of how to fix the issue using the example posted in the plugins&#8217;s website:</p>
<p>The child frame code</p>
<pre class="brush: jscript; title: ; notranslate">
$(function(){
	var parent_url, link;

	// Create the hidden input field that will hold the parent_url variable.
	$(&quot;form&quot;).append('&lt;input id=&quot;parent_url&quot; type=&quot;text&quot; name=&quot;parent_url&quot; /&gt;');

	// We check to see if location hash is empty. It should only go in here if you're using IE and after the form as been submitted.
	if(document.location.hash == &quot;&quot;){
		var search 		= document.location.search,
				id 				= &quot;parent_url=&quot;,
				hs_start	= search.indexOf('parent_url'),
				hs_end 		= search.indexOf('&amp;product_service');

		// Get the parent URL from the URL parameters sent by the form
		parent_url = decodeURIComponent( search.substr(hs_start + id.length, hs_end - id.length - 1) );
	}
	// If location hash is not empty, then we just assign it to the variable parent_url
	else{
		parent_url = decodeURIComponent( document.location.hash.replace( /^#/, '' ) );
	}
	// We assign the value of the parent_url to the hidden input element. That way if document.location.hash is not accessible, it can be accessed
	$(&quot;#parent_url&quot;).val(parent_url);

	// This is the function that posts a message to the parent for it to resize the iframe
	function setHeight() {
		$.postMessage({ if_height: $('body').outerHeight( true ) }, parent_url, parent );
	};

	setHeight();
});
</pre>
<p>The code for the parent window stays the same as in the example. After applying this changes, the code should work properly after submitting a form.</p>
<p>Also if you have links in your code and want your iframe to resize every time you go to a new page inside the iframe, try doing something like this in your iframe code:</p>
<pre class="brush: jscript; title: ; notranslate">
// Go through each link and append the parent_url variable to the end.
$(&quot;a&quot;).each(function() {
	$(this).attr(&quot;href&quot;, $(this).attr(&quot;href&quot;)+&quot;#&quot;+parent_url);
});
</pre>
<p>Hope this post saves somebody a bunch of hours of debugging and IE cursing. If you&#8217;re having a similar problem implementing postMessage/receiveMessage, post a comment and we can figure out together.</p>
<p><a href="https://gist.github.com/1982122">Checkout the code in the gist</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/solving-postmessage-issues-with-form-submissions-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pears: Common patterns of markup &amp; style</title>
		<link>http://jorgepedret.com/wordpress/pears-common-patterns-of-markup-style/</link>
		<comments>http://jorgepedret.com/wordpress/pears-common-patterns-of-markup-style/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 12:08:00 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[pears]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/uncategorized/pears-common-patterns-of-markup-style/</guid>
		<description><![CDATA[Great WordPress theme for creating a pattern library]]></description>
			<content:encoded><![CDATA[<p>Great WordPress theme for creating a pattern library</p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/wordpress/pears-common-patterns-of-markup-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to translate WordPress&#8217; admin to a different language?</title>
		<link>http://jorgepedret.com/wordpress/how-to-translate-wordpress-admin-to-a-different-language/</link>
		<comments>http://jorgepedret.com/wordpress/how-to-translate-wordpress-admin-to-a-different-language/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 15:40:52 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[español]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[translate]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=647</guid>
		<description><![CDATA[While traveling in Venezuela, I was helping a friend setup his first WordPress site. He loved every single part of it, except that it was all in English and he wanted to see it in Spanish. Que problem-o.

Using a different language for WordPress' admin, was something I've always wanted to learn, so I started looking around and I couldn't believe how easy it was...]]></description>
			<content:encoded><![CDATA[<p>While traveling in Venezuela, I was helping a friend setup his first WordPress site. He loved every single part of it, except that it was all in English and he wanted to see it in Spanish. Que problem-o.</p>
<p>Using a different language for WordPress&#8217; admin, was something I&#8217;ve always wanted to learn, so I started looking around and I couldn&#8217;t believe how easy it was&#8230;</p>
<h2>1. Download the language files</h2>
<p>Go to this url <a href="http://codex.wordpress.org/WordPress_in_Your_Language">http://codex.wordpress.org/WordPress_in_Your_Language</a> and search for the language that you&#8217;re looking for:</p>
<ol>
<li>Find the language that you&#8217;re looking for (i.e.: es_ES)</li>
<li>Download the whole WordPress package for that language</li>
<li>Uncompress the downloaded .zip file</li>
<li>All the language files will be under the <code>/wp-content/languages/</code> directory</li>
</ol>
<h2>2.Move the languages files to your current WordPress installation</h2>
<p>Copy the language files from the previously uncompressed package (from <code>/wp-content/languages/</code>) and move them to <code>/wp-content/languages/</code> in your current WordPress installation.</p>
<h2>3. Change the wp-config.php file</h2>
<p>Go to the <code>/wp-config.php</code> file in your current WordPress installation and change the <code>WPLANG</code> constant to your language.</p>
<p>This is what mine looks like:</p>
<pre class="brush: php; title: ; notranslate">
define('WPLANG', 'es_ES');
</pre>
<h2>That&#8217;s it!</h2>
<p>Reload your admin panel and it should now be translated to your own language (or your clients&#8217;).</p>
<p>While researching this stuff, I also found an amazing plugin to manually translate WordPress templates that use the __() and _e() l10n&#8217;s functions. If you don&#8217;t know what I&#8217;m talking about check this out <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers">http://codex.wordpress.org/I18n_for_WordPress_Developers</a>. I&#8217;ll be writing a post about that soon, so stay close if this is something you&#8217;re interested in!</p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/wordpress/how-to-translate-wordpress-admin-to-a-different-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SEO for non-dicks</title>
		<link>http://jorgepedret.com/seo/seo-for-non-dicks/</link>
		<comments>http://jorgepedret.com/seo/seo-for-non-dicks/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 08:42:15 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=639</guid>
		<description><![CDATA[The key thing to understand is that the rules of SEO aren’t magic or arbitrary. They’re based on the goals of a search engine, which is to find relevant results. Relevance implies genuineness, and genuineness implies trust. So, shockingly, you should try to make your site’s content trustworthy, genuine and relevant. All of the rules [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>The key thing to understand is that the rules of SEO aren’t magic or arbitrary. They’re based on the goals of a search engine, which is to find relevant results. Relevance implies genuineness, and genuineness implies trust. So, shockingly, you should try to make your site’s content trustworthy, genuine and relevant. All of the rules have come about due to their utility in detecting those three positive metrics. Good SEO is a by-product of not being a dick on the internet.</p>
<p>Matt Legend Gemmell ~ <a href="http://mattgemmell.com/2011/09/20/seo-for-non-dicks/">SEO for Non-dicks</a></p></blockquote>
<p>I couldn&#8217;t agree more with Matt. I&#8217;d add that some of the core SEO rules are also based on how usable and accessible the site is.</p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/seo/seo-for-non-dicks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Separating Photoshop Layer Styles Into Their Own Layer — A Method &amp; Craft Video</title>
		<link>http://jorgepedret.com/design-2/separating-photoshop-layer-styles-into-their-own-layer-%e2%80%94-a-method-craft-video/</link>
		<comments>http://jorgepedret.com/design-2/separating-photoshop-layer-styles-into-their-own-layer-%e2%80%94-a-method-craft-video/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 15:39:29 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[layers]]></category>
		<category><![CDATA[photoshop]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=634</guid>
		<description><![CDATA[Check out Luke Holder from Method &#038; Craft on "Layer Style Jailbreaking". He show us how to make Photoshop Layer Styles separate into their own layer and some reasons why we want to do that.]]></description>
			<content:encoded><![CDATA[<p>Check out <a href="https://twitter.com/#!/lukeholder">Luke Holder</a> from <a href="http://methodandcraft.com/">Method &amp; Craft</a> on &#8220;Layer Style Jailbreaking&#8221;. He show us how to make Photoshop Layer Styles separate into their own layer and some reasons why we want to do that.</p>
<p>This is a technique I&#8217;ve never seen before, so if you don&#8217;t know what I&#8217;m talking about, just check out <a href="http://methodandcraft.com/videos/layer-style-jailbreak">the video</a>.</p>
<p>Here&#8217;s a quick step-by-step list:</p>
<ol>
<li>In Photoshop, select a layer with styles assigned to it.</li>
<li>On the main menu, go to Layer &gt; Layer Style &gt; Create Layer (Click OK on the message prompt).</li>
<li>Now all the styles are layers!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/design-2/separating-photoshop-layer-styles-into-their-own-layer-%e2%80%94-a-method-craft-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

