<?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>Erika HeidiErika Heidi</title>
	<atom:link href="http://erikaheidi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://erikaheidi.com</link>
	<description>Web Developer - Amsterdam</description>
	<lastBuildDate>Thu, 28 Mar 2013 14:49:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Setting up a complete PHP development environment on ubuntu 12.04+</title>
		<link>http://erikaheidi.com/2013/03/28/setting-up-a-complete-php-development-environment-on-ubuntu-12-04/</link>
		<comments>http://erikaheidi.com/2013/03/28/setting-up-a-complete-php-development-environment-on-ubuntu-12-04/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 12:07:18 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[sublime]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=2278</guid>
		<description><![CDATA[<p>Last week, I had do reinstall my laptop and setup the complete php development environment. This includes the apache2 web server, php5, mysql, phpmyadmin, git, and a good php editor. Thought that this setup could be useful for other php developers who want to use Ubuntu, so I&#8217;m sharing a step by step guide here Before going any further, lets get something clear: this is for local / development environments, not for production servers! First things ...</p><p>The post <a href="http://erikaheidi.com/2013/03/28/setting-up-a-complete-php-development-environment-on-ubuntu-12-04/">Setting up a complete PHP development environment on ubuntu 12.04+</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2013/03/ubuntu.png" rel="image_group"><img class="wp-image-2310 alignleft" alt="ubuntu" src="http://erikaheidi.com/wp-content/uploads/2013/03/ubuntu.png" width="323" height="258" /></a></p>
<p>Last week, I had do reinstall my laptop and setup the complete php development environment. This includes the apache2 web server, php5, mysql, phpmyadmin, git, and a good php editor. Thought that this setup could be useful for other php developers who want to use Ubuntu, so I&#8217;m sharing a step by step guide here <img src='http://erikaheidi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Before going any further, lets get something clear: this is for local / development environments, not for production servers! <img src='http://erikaheidi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>First things first</h3>
<p>Do you already have Ubuntu installed, right? I will not give advice on this, but you may find everything you need do install Ubuntu here: <a href="http://www.ubuntu.com/download">http://www.ubuntu.com/download</a></p>
<p>I&#8217;m currently using the 12.04, the LTS (long-term support) version. I downgraded from 12.10 after getting a lot of weird problems with my audio, and It solved the problem. This instructions will work fine for other Ubuntu recent versions, though.</p>
<p>I don&#8217;t like Unity, so I installed Gnome 3 which is amazing for me. Of course everybody has its own tastes, so feel free to use whatever you want as a desktop environment. But if you want to try Gnome 3, installing it is a piece of cake:</p>
<pre>sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
<span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">sudo apt-get install gnome-shell</span></pre>
<h3>Web Server</h3>
<p>This 3 commands will install the local server, in this order: Apache 2, MySQL*, PHP 5.</p>
<pre>sudo apt-get install apache2
<span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">sudo apt-get install mysql-server php5-mysql
</span><span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">sudo apt-get install php5 libapache2-mod-php5</span></pre>
<p>Ps* When installing MySQL, you will be prompted to provide a password for the root mysql account.</p>
<p>Now your webserver shall be installed and running. Point your browser to http://localhost and you will get this:</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2013/03/Screenshot-from-2013-03-27-204633.png" rel="image_group"><img class="aligncenter size-full wp-image-2282" alt="Screenshot from 2013-03-27 20:46:33" src="http://erikaheidi.com/wp-content/uploads/2013/03/Screenshot-from-2013-03-27-204633.png" width="600" height="178" /></a></p>
<p>&nbsp;</p>
<p>The Apache&#8217;s Document Root, by default, is located at <strong>/var/www</strong> on Ubuntu. You can easily change this to a directory which best suits your needs. Just edit the file<strong> /etc/apache2/sites-enabled/000-default</strong> with an editor of your choice (just remember you need to use sudo).</p>
<p>Change all &#8220;/var/www&#8221; to your desired path &#8211; there are 2 places (lines 4 and 9).</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2013/03/Screenshot-from-2013-03-27-225756.png" rel="image_group"><img class="aligncenter size-full wp-image-2294" alt="Screenshot from 2013-03-27 22:57:56" src="http://erikaheidi.com/wp-content/uploads/2013/03/Screenshot-from-2013-03-27-225756.png" width="600" height="465" /></a></p>
<p>You will probably want to have URL rewriting enabled, so I recommend you also edit line 11 and change &#8220;<em>None</em>&#8221; for &#8220;<em>All</em>&#8221; (<strong>AllowOverride All</strong>).</p>
<p>After doing this, you need to restart Apache for your changes take effect.</p>
<pre>sudo apache2ctl restart</pre>
<p>Now, if you reload http://localhost you will get your new document root, which can be a directory structure (easy to navigate between different projects without any extra effort, but <em>may</em> be a problem to some project implementations).</p>
<p>You can also create a VirtualHost for a specific project, so you can access it with a url like this: http://myfakedomain.local. This scenario makes your environment more similar to what you have at production servers, and it&#8217;s not hard to set up.</p>
<h3>Setting up an Apache VirtualHost</h3>
<p>You just need to edit 2 files. First, create an entry inside your /etc/hosts file (use sudo to open the file otherwise you cannot save it). Add your desired fake local domain name, like this:</p>
<pre>127.0.0.1        myfakedomain.local</pre>
<p>Now, edit the same file you opened before &#8211; <em>/etc/apache2/sites-enabled/000-default</em> . You need to add a <strong>VirtualHost</strong> entry. As we are going to use name-based virtualhost, we also need to add this at the top of the file:</p>
<pre>NameVirtualHost *:80</pre>
<p>Then, add the VirtualHost section:</p>
<pre>&lt;VirtualHost *:80&gt;
 ServerAdmin your@email.com
 DocumentRoot "/path/to/your/project"
 ServerName myfakedomain.local
&lt;/VirtualHost&gt;</pre>
<p>Now, just restart Apache and try http://myfakedomain.local in your browser.</p>
<p>We have our server running, and now let&#8217;s get some extras.</p>
<h3>PhpMyAdmin</h3>
<p>Installing:</p>
<pre>sudo apt-get install phpmyadmin</pre>
<p>You will be prompted to choose the web server (apache) and to provide the mysql root password.</p>
<p>After  this, PhpMyAdmin will be available in http://localhost/phpmyadmin , and you will be able to access it directly (without providing password).</p>
<h3>GIT</h3>
<p>Installing is quite straightforward:</p>
<pre>sudo apt-get install git</pre>
<p>Now configure your git user:</p>
<pre>git config --global user.name "<em>Your Name Here</em>"
<span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">git config --global user.email "</span><em>your_email@example.com</em><span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">"</span></pre>
<p>And run this to have a colored git (like code highlighting &#8211; way better to read).</p>
<pre>git config --global color.ui true</pre>
<h3>Sublime Text 2</h3>
<p>Sublime is probably the best complete (and lightweight&#8230; and awesome) editor available for free nowadays. They gentle ask that you buy a license, but there aren&#8217;t any restrictions or limitations in the version we download for free. Sometimes it will show a silent popup to remember you about the license stuff, and that&#8217;s all.</p>
<pre>sudo add-apt-repository ppa:webupd8team/sublime-text-2
<span style="font-family: 'Courier 10 Pitch', Courier, monospace; font-size: 13px; line-height: normal;">sudo apt-get install sublime-text</span></pre>
<h3>Did I forget something?</h3>
<p>If you want to suggest something, please leave a comment! Keep in mind that this is a *very* generic starting point for a php development environment, really the basics for getting started.</p>
<p>&nbsp;</p>
<p>The post <a href="http://erikaheidi.com/2013/03/28/setting-up-a-complete-php-development-environment-on-ubuntu-12-04/">Setting up a complete PHP development environment on ubuntu 12.04+</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/03/28/setting-up-a-complete-php-development-environment-on-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple Twig truncate filter &#8211; Silex</title>
		<link>http://erikaheidi.com/2013/03/20/a-simple-twig-truncate-filter-silex/</link>
		<comments>http://erikaheidi.com/2013/03/20/a-simple-twig-truncate-filter-silex/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 11:06:54 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Silex]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[silex]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[truncate]]></category>
		<category><![CDATA[twig]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=2238</guid>
		<description><![CDATA[<p>Sometimes you can get in trouble when dealing with dynamic data with variable length, such as titles and descriptions, so they can fit well in your layout. With Smarty you have the built-in filter &#8220;truncate&#8221;, but Twig doesn&#8217;t have this filter by default. I know there&#8217;s some text extensions available, but I didn&#8217;t get it to work with Silex easily and I didn&#8217;t want to lose more time on this issue, so I made this ...</p><p>The post <a href="http://erikaheidi.com/2013/03/20/a-simple-twig-truncate-filter-silex/">A simple Twig truncate filter &#8211; Silex</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2013/03/twig-logo.png" rel="image_group"><img class="alignleft  wp-image-2254" alt="twig-logo" src="http://erikaheidi.com/wp-content/uploads/2013/03/twig-logo.png" width="307" height="335" /></a>Sometimes you can get in trouble when dealing with dynamic data with variable length, such as titles and descriptions, so they can fit well in your layout. With Smarty you have the built-in filter &#8220;truncate&#8221;, but Twig doesn&#8217;t have this filter by default. I know there&#8217;s some text extensions available, but I didn&#8217;t get it to work with Silex easily and I didn&#8217;t want to lose more time on this issue, so I made this simple twig truncate filter and it&#8217;s working perfectly for truncating strings in the smarty style.</p>
<p>Just add this to your bootstrap.php (or whatever initialization file you use), <strong>after</strong> registering the Twig Extension:</p>
<p><script src="https://gist.github.com/erikaheidi/5203854.js"></script></p>
<p>Use it like this:</p>
<pre>{{ my_big_title|truncate(10) }}</pre>
<p>The code below will truncate your title to 10 characters, including a &#8216;&#8230;&#8217; at the end of the string.</p>
<p>The post <a href="http://erikaheidi.com/2013/03/20/a-simple-twig-truncate-filter-silex/">A simple Twig truncate filter &#8211; Silex</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/03/20/a-simple-twig-truncate-filter-silex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silex and Localization (i18n/L10n): TranslationServiceProvider</title>
		<link>http://erikaheidi.com/2013/03/19/silex-and-localization-l10n-translationserviceprovider/</link>
		<comments>http://erikaheidi.com/2013/03/19/silex-and-localization-l10n-translationserviceprovider/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 21:44:03 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[L10n]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[silex]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=2174</guid>
		<description><![CDATA[<p>I&#8217;ve been using Silex* in a large variety of projects in the last year, and I always find something new to make my life easier. Last week, I was dealing with internationalization / localization (i18n / L10n) &#8211; a quite relevant topic when talking about web projects aiming a high audience. This post shows how to make an easy structure who automatically loads language files written in YAML, using the TranslationServiceProvider. Although the post is ...</p><p>The post <a href="http://erikaheidi.com/2013/03/19/silex-and-localization-l10n-translationserviceprovider/">Silex and Localization (i18n/L10n): TranslationServiceProvider</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2013/03/15017435-flags-globe.jpg" rel="image_group"><img class="alignleft  wp-image-2206" alt="15017435-flags-globe" src="http://erikaheidi.com/wp-content/uploads/2013/03/15017435-flags-globe.jpg" width="200" height="200" /></a>I&#8217;ve been using Silex* in a large variety of projects in the last year, and I always find something new to make my life easier. Last week, I was dealing with internationalization / localization (i18n / L10n) &#8211; a quite relevant topic when talking about web projects aiming a high audience. This post shows how to make an easy structure who automatically loads language files written in YAML, using the TranslationServiceProvider. Although the post is focused on Silex, I believe it&#8217;s also compliant with Symfony 2.</p>
<p>If you wanna go directly to the code, there&#8217;s a GitHub repo with the whole example (a basic silex application) here: <a href="https://github.com/erikaheidi/silex-L10nex">https://github.com/erikaheidi/silex-L10nex</a></p>
<p><em>For those of you who didn&#8217;t have the opportunity to try Silex before, I have a post <a title="Getting started with Silex" href="http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/" target="_blank">here</a> covering the basics, and a <a title="PagodaBox QuickStart with Silex and Twitter Bootstrap" href="http://erikaheidi.com/open-source/silex-bootstrap-a-silex-bundle-with-twitter-bootstrap-ready-for-pagoda-box/" target="_blank">Pagodabox quickstart</a> with a Silex barebone using Twitter Bootstrap for front-end. Silex is a micro framework based on Symfony 2.</em></p>
<h3>Structure</h3>
<p>Before going any further, let&#8217;s talk about project structure. With Silex, you have a quite liberty to choose whatever structure works better for your project. To make things easier, let&#8217;s consider the following directory structure and files:</p>
<ul>
<li><span style="line-height: 14px;">src/</span>
<ul>
<li>locale/
<ul>
<li>en/
<ul>
<li>app.yml</li>
</ul>
</li>
<li>pt-BR/
<ul>
<li>app.yml</li>
</ul>
</li>
</ul>
</li>
<li>templates/</li>
<li>app.php</li>
<li>bootstrap.php</li>
</ul>
</li>
<li>composer.json</li>
<li>composer.phar</li>
<li>www/</li>
<li>vendor/</li>
</ul>
<p>You can see it better here: <a href="https://github.com/erikaheidi/silex-L10nex">https://github.com/erikaheidi/silex-L10nex</a> (without the vendor directory, which is installed when you hit composer install ) .</p>
<h3>The YAML translation files</h3>
<p>The basic usage of the TranslationServiceProvider loads the language strings via arrays, but of course this is impracticable (unless you only want to translate a really small amount of strings). We&#8217;re going to use YAML translation files, making an automatic loader which reads a directory. For accomplishing that, we&#8217;re going to need 2 more components provided by Symfony: Config e Yaml.</p>
<p>This is the content inside the<a title="app.yml" href="https://github.com/erikaheidi/silex-L10nex/blob/master/src/locale/pt-BR/app.yml" target="_blank"> app.yaml</a> translation file, inside the pt-BR folder:</p>
<pre>locale_lang: Português
Welcome: Bem Vindo
msg_example: Esse é um exemplo de texto traduzido.</pre>
<h3>Registering the ServiceProviders</h3>
<p>First of all, you need to update your composer.json with the new dependencies. We will be working also with Twig and Sessions:</p>
<p><strong>Heads Up:</strong> to use the trans filter on Twig templates, you need the TwigBridge component as well.</p>
<p><script type="text/javascript" src="https://gist.github.com/erikaheidi/5200187.js"></script>For registering the SP, this code shall go in your bootstrap.php (or wathever place you use for the app initialization):<script type="text/javascript" src="https://gist.github.com/erikaheidi/5200248.js"></script></p>
<h3>Loading the languages</h3>
<p>Now we need to load the language files. You could load everything on bootstrap.php, but this would cause an unnecessary load, since we just need one language each time the page is loaded. Of course this must be done at the beginning of the application code.<br />
<script type="text/javascript" src="https://gist.github.com/erikaheidi/5200258.js"></script></p>
<h3>Changing the current language</h3>
<p>Now lets create a route to actually change the current language. You could also do this automatically after checking request/browser headers.<script type="text/javascript" src="https://gist.github.com/erikaheidi/5200294.js"></script></p>
<h3>Using on twig templates</h3>
<p>Its incredibly easy to use the translation strings on twig templates. As said before, just make sure you also include TwigBridge as a dependency in your composer.json. You just need to use the <strong>trans</strong> filter.</p>
<p>Just like this:</p>
<p>{{ &#8216;Welcome&#8217;|trans }}</p>
<p>See the template code here: <a href="https://github.com/erikaheidi/silex-L10nex/blob/master/src/templates/index.twig.html">https://github.com/erikaheidi/silex-L10nex/blob/master/src/templates/index.twig.html</a></p>
<p>The example app is available here: <a href="https://github.com/erikaheidi/silex-L10nex">https://github.com/erikaheidi/silex-L10nex</a></p>
<p>If you are cloning the repo, don&#8217;t forget to run</p>
<pre>php composer.phar install</pre>
<p>to install the dependencies (vendor directory).</p>
<p>The post <a href="http://erikaheidi.com/2013/03/19/silex-and-localization-l10n-translationserviceprovider/">Silex and Localization (i18n/L10n): TranslationServiceProvider</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/03/19/silex-and-localization-l10n-translationserviceprovider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The PHPness riot and the sexism overreaction</title>
		<link>http://erikaheidi.com/2013/02/24/the-phpness-riot-and-the-sexism-overreaction/</link>
		<comments>http://erikaheidi.com/2013/02/24/the-phpness-riot-and-the-sexism-overreaction/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 11:54:00 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpness]]></category>
		<category><![CDATA[riot]]></category>
		<category><![CDATA[sexism]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=2130</guid>
		<description><![CDATA[<p>Recently, we had a new riot on the European PHP community. I saw some random tweets and got really curious about what the hell was happening. Supposedly, some organization was spreading sexist material leading to a general uncomfortable feeling from women developers. I&#8217;ve been working surrounded by men for more than 10 years. Frequently,  I was the only girl in the team. I also already suffered some job sexism, like don&#8217;t being considered for a ...</p><p>The post <a href="http://erikaheidi.com/2013/02/24/the-phpness-riot-and-the-sexism-overreaction/">The PHPness riot and the sexism overreaction</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><strong></strong>Recently, we had a new riot on the European PHP community. I saw some random tweets and got really curious about what the hell was happening. Supposedly, some organization was spreading sexist material leading to a general uncomfortable feeling from women developers.</p>
<p>I&#8217;ve been working surrounded by men for more than 10 years. Frequently,  I was the only girl in the team. I also already suffered some job sexism, like don&#8217;t being considered for a job application or getting a lower salary only because of my gender. But these are exceptions &#8211; I always had a great time with &#8220;the guys&#8221;, because:</p>
<ol>
<li>I&#8217;m used to their world and their habits (aka I don&#8217;t bother with &#8220;man talk&#8221; and sometimes I even give my opinion)</li>
<li>I know how to do my job pretty good, and they normally notice this fast</li>
<li>When you are working in a real team, you abstract gender differences, because a good work is what matters</li>
</ol>
<p>And I came from Brazil. Brazilian men are great, but sometimes they can sound really sexist. I&#8217;m used to the jokes, and I really don&#8217;t care.</p>
<p>So, when I heard about this sexist event happening HERE, in Europe, I thought something was clearly wrong. I searched to find the riot origin, and came to this:</p>
<div id="attachment_2134" style="width:600px;" class="wp-caption alignleft"><a href="http://erikaheidi.com/wp-content/uploads/2013/02/phpness.jpg" rel="image_group"><img class="size-full wp-image-2134" alt="image source: @webandphp" src="http://erikaheidi.com/wp-content/uploads/2013/02/phpness.jpg" width="600" height="800" /></a><span class="wp-caption-text">image source: @mrhazell</span></div>
<p>This lovely girls are the editors at <a title="@webandphp" href="https://twitter.com/webandphp" target="_blank">@webandphp</a>, a free digital publication focusing on PHP and web technologies. They are women and the do a great job.</p>
<p>You may have not noticed the joke at the t-shirt: &#8220;enhance your phpness&#8221;. Do you remember that annoying spam email that promised a way to enhance a specific part of a man&#8217;s body? That&#8217;s it. You got it. A simple joke, easy as that.</p>
<p>When I saw this, I laugh, and I wanted to have one of this t-shirts. It gets even funnier when it&#8217;s a woman wearing it.</p>
<p>So, the final question is: WHAT THE HELL IS WRONG WITH YOU PEOPLE? It&#8217;s really weird when there are more men complaining about this than actually women that felt offended by this simple joke. I mean, what if I come with the idea that the really sexism is men thinking: &#8220;women developers don&#8217;t have sense of humor to get the joke, so they will feel offended and we must defend them&#8221;.</p>
<p>I really can&#8217;t see anything wrong with that shirt. And I think my opinion worths, since I&#8217;m a php woman developer for 10 years now.</p>
<p>If you got offended someway by this t-shirt, it means you don&#8217;t have sense of humor, or you are so newbie that you don&#8217;t know the origin of the joke. I don&#8217;t know. Just go find something more important to worry about.</p>
<p>The post <a href="http://erikaheidi.com/2013/02/24/the-phpness-riot-and-the-sexism-overreaction/">The PHPness riot and the sexism overreaction</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/02/24/the-phpness-riot-and-the-sexism-overreaction/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Why you, regular developer, should consider moving to a PaaS solution right now</title>
		<link>http://erikaheidi.com/2013/02/18/moving-to-the-cloud-with-new-generation-paas/</link>
		<comments>http://erikaheidi.com/2013/02/18/moving-to-the-cloud-with-new-generation-paas/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 19:06:58 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[paas]]></category>
		<category><![CDATA[pagodabox]]></category>
		<category><![CDATA[platform as service]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=2030</guid>
		<description><![CDATA[<p>So, you just finished your kick-ass web application and it&#8217;s ready for deploy. If you did it before, you are probably aware of all the headaches a &#8220;simple&#8221; deploy can bring to you &#8211; sometimes things just don&#8217;t go as expected. And if you are still going to buy a hosting package for your app, you know it will take some time &#8211; days &#8211; for your environment to be ready for deploy. Is this familiar ...</p><p>The post <a href="http://erikaheidi.com/2013/02/18/moving-to-the-cloud-with-new-generation-paas/">Why you, regular developer, should consider moving to a PaaS solution right now</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2013/02/cartoon_clouds_1.gif" rel="image_group"><img class="alignleft size-full wp-image-2066" alt="cartoon_clouds_1" src="http://erikaheidi.com/wp-content/uploads/2013/02/cartoon_clouds_1.gif" width="268" height="208" /></a>So, you just finished your kick-ass web application and it&#8217;s ready for deploy. If you did it before, you are probably aware of all the headaches a &#8220;simple&#8221; deploy can bring to you &#8211; sometimes things just don&#8217;t go as expected. And if you are still going to buy a hosting package for your app, you know it will take some time &#8211; days &#8211; for your environment to be ready for deploy. Is this familiar for you?</p>
<p>But this is not the worst part. Lets suppose you bought a cheap hosting (of course, you are just starting in the business!) for your app. Then, suddenly, it starts to grow unexpectedly &#8211; your app is a huge success, and you must be super happy, right? Wrong, because your app is offline &#8211; your hosting provider thought that it was &#8220;stealing&#8221; <em><strong>too much</strong></em> memory from the shared server, so they decided to put it offline.</p>
<p>What are your options now? Buy more memory, change to another company?</p>
<p>Well, I had this experience quite a lot in the last years, and it&#8217;s not funny at all. I switched from shared to dedicated server, then to another (better) dedicated server (because the one I was using before was getting really too expensive), then to another one, and another one&#8230; all these changes were very stressful, and they costed me a lot of money and time.</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2013/02/CloudComputingCartoon.jpg" rel="image_group"><img class="alignleft size-full wp-image-2070" alt="CloudComputingCartoon" src="http://erikaheidi.com/wp-content/uploads/2013/02/CloudComputingCartoon.jpg" width="350" height="299" /></a>Since the social networks <em>boom</em>, everybody talks about &#8220;the cloud&#8221; as a magical solution for everything.  And they even say it&#8217;s cheaper than dedicated hosting. But my first attempt to get something &#8220;in the cloud&#8221;, with Amazon (3 years ago), was just horrible. I got so confused with the interface and all their product names, and it was really expensive comparing to what I was paying in that time for my dedicated server. I ended up with an &#8220;OK&#8221; meme face an the idea that these ~things~ are only for companies and really big projects.</p>
<p>Now it&#8217;s 2013 and the <a title="Platform as a service - wikipedia" href="http://en.wikipedia.org/wiki/Platform_as_a_service" target="_blank">PaaS</a> (platform as a service) topic came up again. But now we have more options, new companies and new technologies &#8211; wouldn&#8217;t it be great if you could deploy your application with Git? And what if you could change the whole app (which is, in fact, a website) to a previous commit, right before that demonic bug appeared? This is already a reality with PagodaBox and other new-generation <em>PaaS</em>.</p>
<p>The best thing is: you can try it for free. The majority of PaaS offers a starter free &#8220;package&#8221;, so you can try it with <em>no strings attached</em>. Some applications don&#8217;t need any more resources than what they offer for free &#8211; sounds perfect, right? And its REALLY simple to get your application running.</p>
<p>That&#8217;s why I strongly encourage you to try it. When I said &#8220;regular developer&#8221; at the post title, I was meaning a develop who may think that the cloud is a bit <em><strong>too much</strong></em> for its small to medium projects (this was me yesterday). Even if it&#8217;s only for learning purposes, or to test your application before deciding how you will make it available. Because this is the future of web servers.</p>
<p>I&#8217;m using Pagoda Box now with this WordPress blog, and I have to say that it&#8217;s amazing. I plan to write a Pagoda Box tutorial in the next days, so if you are interested please come back later =)</p>
<p>The post <a href="http://erikaheidi.com/2013/02/18/moving-to-the-cloud-with-new-generation-paas/">Why you, regular developer, should consider moving to a PaaS solution right now</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/02/18/moving-to-the-cloud-with-new-generation-paas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix ubuntu apt-get connection problems</title>
		<link>http://erikaheidi.com/2013/01/09/how-to-fix-ubuntu-apt-get-connection-problems/</link>
		<comments>http://erikaheidi.com/2013/01/09/how-to-fix-ubuntu-apt-get-connection-problems/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 10:33:17 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[software sources]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.erikaheidi.com/?p=1707</guid>
		<description><![CDATA[<p>Today I tried to install LAMP on my notebook and got a lot of errors from Ubuntu apt-get, related to connection problems &#8211; the server (br server) from which it was trying to download the updates was apparently down. If you ever get these kind of errors on apt-get: Err http://br.archive.ubuntu.com/ubuntu/ precise/main libapr1 amd64 1.4.6-1 Something wicked happened resolving 'br.archive.ubuntu.com:http' (-5 - No address associated with hostname) And your internet seems to be ok (in ...</p><p>The post <a href="http://erikaheidi.com/2013/01/09/how-to-fix-ubuntu-apt-get-connection-problems/">How to fix ubuntu apt-get connection problems</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Today I tried to install LAMP on my notebook and got a lot of errors from Ubuntu apt-get, related to connection problems &#8211; the server (br server) from which it was trying to download the updates was apparently down. If you ever get these kind of errors on apt-get:</p>
<pre class="brush:shell">Err http://br.archive.ubuntu.com/ubuntu/ precise/main libapr1 amd64 1.4.6-1
Something wicked happened resolving 'br.archive.ubuntu.com:http' (-5 - No address associated with hostname)</pre>
<p>And your internet seems to be ok (in a nutshell, the archive server is offline), there&#8217;s a super easy way to fix it: just go to <em><strong>Ubuntu Software Center</strong></em>, then select the &#8220;Edit  -&gt; <strong>Software Sources</strong>&#8230;&#8221;.</p>
<p><a href="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2013-01-09-112435.png" rel="image_group"><img class="aligncenter size-full wp-image-1842" alt="Screenshot-from-2013-01-09-112435" src="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2013-01-09-112435.png" width="600" height="353" /></a></p>
<p>You can change it to &#8220;Server for United States&#8221; or another location which suits you better. Then, run a</p>
<pre>sudo apt-get update</pre>
<p>And that&#8217;s all. You can try to install your software again and it will be okay (unless you&#8217;re facing internet problems).</p>
<p>The post <a href="http://erikaheidi.com/2013/01/09/how-to-fix-ubuntu-apt-get-connection-problems/">How to fix ubuntu apt-get connection problems</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2013/01/09/how-to-fix-ubuntu-apt-get-connection-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Silex &#8211; the php micro framework based on Symfony 2</title>
		<link>http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/</link>
		<comments>http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/#comments</comments>
		<pubDate>Wed, 21 Nov 2012 11:28:29 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[microframework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[silex]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://blog.erikaheidi.com/?p=1680</guid>
		<description><![CDATA[<p>This post aims to show the basics, and how to get started with the php micro framework Silex- which, by the way, is my favorite php framework nowadays. It&#8217;s based on Symfony 2, but focused on smaller applications. It has a really comprehensive and intelligent schema for url rewriting (so-called &#8220;Routes&#8221;) that brings to PHP one of the great things you can find in Django. It&#8217;s concise, extensible &#8211; using Pimple and Composer for dependency ...</p><p>The post <a href="http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/">Getting started with Silex &#8211; the php micro framework based on Symfony 2</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Silex.png" rel="image_group"><img class="alignleft size-full wp-image-1858" alt="Silex" src="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Silex.png" width="331" height="272" /></a>This post aims to show the basics, and how to get started with the <a title="Silex, the php microframework" href="http://silex.sensiolabs.org/" target="_blank">php micro framework Silex</a>- which, by the way, is my favorite php framework nowadays. It&#8217;s based on Symfony 2, but focused on smaller applications. It has a really comprehensive and intelligent schema for url rewriting (so-called &#8220;Routes&#8221;) that brings to PHP one of the great things you can find in Django. It&#8217;s concise, extensible &#8211; using Pimple and Composer for dependency management &#8211; and secure. Oh, almost forgot: it&#8217;s practical, easy to learn and super versatile &#8211; according to my own experience with the framework so far.</p>
<p>So, lets write some code! These instructions are focused on Linux (Ubuntu) environments. Another important thing to note is that Silex requires PHP 5.3 or higher.</p>
<h3>First things first: install Silex via Composer</h3>
<p>Let&#8217;s start by installing <a title="Composer" href="http://getcomposer.org/" target="_blank">Composer</a>*, so we can download the last version of Silex. This is the best way for maintaining your project and manage dependencies, its really easy to install and update everything! Open the terminal and go to your project folder. Then:</p>
<pre>curl -s http://getcomposer.org/installer | php</pre>
<p>Now, you must create a composer.json file containing instructions about which packages you are going to use in your project. The basic composer.json file for Silex is bellow:</p>
<p><script type="text/javascript" src="https://gist.github.com/erikaheidi/d7f8ed77515592b10b24.js"></script>Now you can actually install everything:</p>
<pre>php composer.phar install</pre>
<p>You will get something like this: <a href="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2012-11-06-104546.png" rel="image_group"><img class="aligncenter size-full wp-image-1846" alt="Screenshot-from-2012-11-06-104546" src="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2012-11-06-104546.png" width="1049" height="755" /></a> Note: if you get a json error when installing composer, try to edit the file and trim the whitespaces. <em>*Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. If you are not using Linux or have some trouble using Composer, you can also download Silex in the old-fashioned way &#8211; just go to <a href="http://silex.sensiolabs.org/download">http://silex.sensiolabs.org/download</a> and follow the instructions.</em></p>
<h3>Hello Worlding</h3>
<p>Now that you have Silex installed, have a look at the directory tree. You will find a folder named &#8220;vendor&#8221; &#8211; that&#8217;s where Composer installs all dependencies defined at composer.json . Let&#8217;s create an index.php file at the root directory of your project and make some &#8220;Hello World&#8221; stuff. You can organize things better later. Let&#8217;s start with the basics.<script type="text/javascript" src="https://gist.github.com/erikaheidi/85f560684bece6e695a7.js"></script></p>
<p>This will give you a basic &#8220;Hello World&#8221; output, as you can imagine. But let&#8217;s see what happens if you <strong>remove the route definition part</strong> from the script:</p>
<p><img class="aligncenter size-full wp-image-1850" alt="Screenshot-from-2012-11-06-105859" src="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2012-11-06-105859.png" width="1079" height="441" /></p>
<p>Want to get more information about this error? Set the debug mode in your application to true. The code will be like this:<br />
<script type="text/javascript" src="https://gist.github.com/erikaheidi/83303fcfb86d688bfeac.js"></script>And you will get this: <a href="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2012-11-06-110957.png" rel="image_group"><img class="aligncenter size-full wp-image-1854" alt="Screenshot-from-2012-11-06-110957" src="http://erikaheidi.pagodabox.com/wp-content/uploads/2012/09/Screenshot-from-2012-11-06-110957.png" width="991" height="644" /></a> Gorgeous! Now you can debug everything &#8211; just remember to unset this option when your project is in production.</p>
<h3>Working with Routes</h3>
<p>Now that you are familiar with the basics, let&#8217;s take a deeper look at the Silex Routes. What if I want to get some parameters along with the request? No problem at all &#8211; there&#8217;s a quite awesome way to accomplish this:<script type="text/javascript" src="https://gist.github.com/erikaheidi/6b19fdaab5feb687989a.js"></script></p>
<p>Got it? <strong><em>Heads up:</em></strong> when somebody hits the <strong>/hello</strong> path, the app will throw an error, since the only defined route is <strong>/hello/something</strong>. You can use the <strong>value</strong> modifier to set a default value for {name}, so you don&#8217;t need to define another route for <strong>/hello</strong>. Just like this:</p>
<p><script type="text/javascript" src="https://gist.github.com/erikaheidi/92d3c3b16d0b13457ed6.js"></script>Note that until now we only worked with GET routes. The POST routes are very similar, though. The only difference is that you shall work with a Request object to get the post variables &#8211; then you must include the Request class from Symfony HttpFoundation. Like this:<script type="text/javascript" src="https://gist.github.com/erikaheidi/b96dd49f196fef4be5e1.js"></script></p>
<p>If you don&#8217;t want to specify the method (GET, POST, PUT or DELETE) you can use the &#8220;match&#8221; method. This is useful for getting generic requests like you would do with the $_REQUEST global var in plain PHP. For example &#8211; if you want to match GET and POST for the same route and var:<br />
<script src="https://gist.github.com/erikaheidi/e03244eed4d94b2b8f99.js"></script></p>
<blockquote><p>Last, but not least: the order in which you define your routes is significant. The first route matched will be used &#8211; so place the more generic routes (like &#8216;/&#8217; ) at the bottom.</p></blockquote>
<p>For a complete reference about Silex Routes (there&#8217;s a lot of other options, including filters and requirements using regex for matching the request variables), take a look at the the documentation: <a href="http://silex.sensiolabs.org/doc/usage.html#routing">http://silex.sensiolabs.org/doc/usage.html#routing</a></p>
<p>The purpose of this post was to give a brief introduction to Silex. If you liked what you saw, I strongly recommend you to read the official documentation, so you can take advantage of everything this microframework has to offer to increase your productivity when creating not-that-big projects. Here are some links for getting started:</p>
<p>Silex Website - <a href="http://silex.sensiolabs.org/">http://silex.sensiolabs.org</a></p>
<p>Official Documentation: <a href="http://silex.sensiolabs.org/documentation">http://silex.sensiolabs.org/documentation</a></p>
<p>Matthias Noback&#8217;s blog about silex and symfony2 &#8211; useful posts and how to&#8217;s: <a href="http://php-and-symfony.matthiasnoback.nl/category/silex/">http://php-and-symfony.matthiasnoback.nl/category/silex/</a></p>
<p>The post <a href="http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/">Getting started with Silex &#8211; the php micro framework based on Symfony 2</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2012/11/21/getting-started-with-silex-the-php-micro-framework-based-on-symfony-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Solving VirtualBox problem in Ubuntu Gnome Remix 12.10</title>
		<link>http://erikaheidi.com/2012/10/30/solving-virtualbox-problem-in-ubuntu-gnome-remix-12-10/</link>
		<comments>http://erikaheidi.com/2012/10/30/solving-virtualbox-problem-in-ubuntu-gnome-remix-12-10/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 14:52:01 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[remix]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://blog.erikaheidi.com/?p=1668</guid>
		<description><![CDATA[<p>Recently, I installed in my new notebook the Ubuntu Gnome Remix 12.10. Its a fantastic remix from Ubuntu, I am completely in love with this version &#8211; although sometimes I get some weird bugs related to package installations. The most recent problem I had was related to Virtualbox. I installed it from apt-get and it looked ok, but when I tried to start the newly created VM I got this error: Kernel driver not installed ...</p><p>The post <a href="http://erikaheidi.com/2012/10/30/solving-virtualbox-problem-in-ubuntu-gnome-remix-12-10/">Solving VirtualBox problem in Ubuntu Gnome Remix 12.10</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/imgvirtualbox1.png" rel="image_group"><img class="alignleft  wp-image-1906" alt="imgvirtualbox1" src="http://erikaheidi.com/wp-content/uploads/2012/09/imgvirtualbox1.png" width="282" height="291" /></a>Recently, I installed in my new notebook the <a title="Ubuntu Gnome Remix" href="https://wiki.ubuntu.com/UbuntuGNOME/ReleaseNotes/12.10" target="_blank">Ubuntu Gnome Remix 12.10</a>. Its a fantastic remix from Ubuntu, I am completely in love with this version &#8211; although sometimes I get some weird bugs related to package installations.</p>
<p>The most recent problem I had was related to Virtualbox. I installed it from apt-get and it looked ok, but when I tried to start the newly created VM I got this error:</p>
<p><em>Kernel driver not installed (rc=-1908)<br />
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.</em></p>
<p>I did some Googling but nothing seemed to work&#8230; This &#8220;/etc/init.d/vboxdrv&#8221; file didn&#8217;t exist. I found just a &#8220;virtualbox&#8221; script inside init.d folder, so after trying to execute it, I got this message:</p>
<pre class="brush:shell">erika@velvet:/etc/init.d$ sudo virtualbox setup
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-ose-dkms package and the appropriate headers, most likely linux-headers-generic.

You will not be able to start VMs until this problem is fixed.</pre>
<p>What I did:</p>
<pre class="brush:shell">sudo apt-get install linux-headers-generic virtualbox-ose-dkms</pre>
<p>So, after this, I ran:</p>
<pre class="brush:shell">sudo dpkg-reconfigure virtualbox-dkms

sudo dpkg-reconfigure virtualbox</pre>
<p>And the problem was solved. Hope this can help someone out there!</p>
<p>The post <a href="http://erikaheidi.com/2012/10/30/solving-virtualbox-problem-in-ubuntu-gnome-remix-12-10/">Solving VirtualBox problem in Ubuntu Gnome Remix 12.10</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2012/10/30/solving-virtualbox-problem-in-ubuntu-gnome-remix-12-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to selectively show content for followers on Facebook Page Tabs</title>
		<link>http://erikaheidi.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/</link>
		<comments>http://erikaheidi.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 14:42:07 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook application]]></category>
		<category><![CDATA[fan page]]></category>
		<category><![CDATA[page tab]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=1649</guid>
		<description><![CDATA[<p>In this post, you will learn how to selectively show content on your Facebook Page Tabs &#8211; you can show a special content for users who liked your fan page, for example &#8211; without the need to request any kind of user authorization / permission. This is extremely useful if you have high-value content to share , or if you want to create some kind of giveaway only for your followers (and gather a bunch ...</p><p>The post <a href="http://erikaheidi.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/">How to selectively show content for followers on Facebook Page Tabs</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/like.us_.on_.facebook.gif" rel="image_group"><img class="alignleft size-full wp-image-1930" alt="like.us_.on_.facebook" src="http://erikaheidi.com/wp-content/uploads/2012/09/like.us_.on_.facebook.gif" width="280" height="142" /></a>In this post, you will learn how to selectively show content on your Facebook Page Tabs &#8211; you can show a special content for users who liked your fan page, for example &#8211; without the need to request any kind of user authorization / permission. This is extremely useful if you have high-value content to share , or if you want to create some kind of giveaway only for your followers (and gather a bunch of new followers as a consequence).</p>
<p>If you are not familiar with Facebook page tab applications, you should take a look at this post: <a title="How to create a Facebook Tab App for your Fanpage – step by step guide" href="http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/" target="_blank">How to Create a Facebook Tab App for your Fan Page</a> - which has a step-by-step guide on creating a tab app from scratch.</p>
<p>First of all, <a title="How to create a Facebook Tab App for your Fanpage – step by step guide" href="http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/" target="_blank">prepare and set up your tab application</a>.</p>
<h3>How it Works</h3>
<p>When a user reaches your application tab, he will send you a <a title="Signer Request - Facebook Developers" href="http://developers.facebook.com/docs/authentication/signed_request/" target="_blank">signed request</a>. This signed request contains a piece of (public) information about this user and the relationship between him and your page &#8211; if he likes it or not. This data is signed using your App Secret (that&#8217;s why is so important to keep it secret: only you and Facebook shall know it). The process to decode this data is quite easy, though. These two functions (which was shameless copied from the Facebook Developers Documentation) below will do all the hard work for you. At the end you can see the usage in a working code parsing the request.</p>
<p><script src="https://gist.github.com/erikaheidi/4977971.js"></script></p>
<p>Below, you can see an example of a signed_request array taken from the print_r above (I just removed the OAuth token from it).</p>
<pre class="brush:js">Array ( 
   [algorithm] =&gt; HMAC-SHA256
   [expires] =&gt; 1348675200 
   [issued_at] =&gt; 1348669677 
   [oauth_token] =&gt; (user oauth token suppressed)
   [page] =&gt; Array (
       [id] =&gt; 462041577153253 
       [liked] =&gt; 1 
       [admin] =&gt; 1 
    ) 
   [user] =&gt; Array ( 
      [country] =&gt; br 
      [locale] =&gt; en_GB 
      [age] =&gt; Array ( [min] =&gt; 21 ) 
    ) 
   [user_id] =&gt; 707860628 
)</pre>
<p>Take a look at the &#8220;page&#8221; sub array &#8211; there you can find out if the user liked or not the page. Also, you can check if the user is an admin of that page. This is useful if you want to show some administrative information / action to perform only for page admins.</p>
<p>You may have noticed that we don&#8217;t get much information about the user at all. This is expected, since you didn&#8217;t asked the user for it &#8211; if you want any other information about the user, such as its name, you need to request authorization (and this will be left for another post).</p>
<p>*I don&#8217;t have any coupon codes to give, the image is only representative <img src='http://erikaheidi.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>The post <a href="http://erikaheidi.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/">How to selectively show content for followers on Facebook Page Tabs</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a Facebook Tab App for your Fanpage &#8211; step by step guide</title>
		<link>http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/</link>
		<comments>http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 17:50:38 +0000</pubDate>
		<dc:creator>erika</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook app]]></category>
		<category><![CDATA[fanpage]]></category>
		<category><![CDATA[fanpage tabs]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://erikaheidi.com/?p=1561</guid>
		<description><![CDATA[<p>In this post, I will show you how to create a Facebook Tab App from scratch. If you are a web developer, you can do all the job by yourself, but if you don&#8217;t have at least some basic knowledge about web development ,you&#8217;ll probably need someone else to help you. You can find a Portuguese (pt-BR) version of this post, also written by me, here: Tutorial: como criar abas customizadas (timeline apps) para sua fanpage ...</p><p>The post <a href="http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/">How to create a Facebook Tab App for your Fanpage &#8211; step by step guide</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In this post, I will show you how to create a Facebook Tab App from scratch. If you are a web developer, you can do all the job by yourself, but if you don&#8217;t have at least some basic knowledge about web development ,you&#8217;ll probably need someone else to help you.</p>
<p>You can find a Portuguese (pt-BR) version of this post, also written by me, here: <a title="Criando abas customizadas no FB" href="http://entrebits.com.br/post/2012/03/30/tutorial-como-criar-abas-customizadas-timeline-apps-para-sua-fanpage-no-facebook" target="_blank">Tutorial: como criar abas customizadas (timeline apps) para sua fanpage no Facebook</a> .</p>
<p>Fist of all: you&#8217;ll need to be a Facebook developer in order to create applications, but it&#8217;s quite easy to accomplish that. You just need to register yourself (you need to log-in with a valid Facebook account) at <a title="Facebook Developers" href="http://developers.facebook.com" target="_blank">http://developers.facebook.com</a> .</p>
<h3>Before you Start</h3>
<p>Before creating your application, you need to prepare your content. It must be accessible via http, since Facebook applications work with iframes. When a user reaches your application, in fact he will be accessing your url via an iframe inside Facebook. You can manage to only show content for users who liked your fanpage, or to show an specific content for these users (and another one for the non-followers). Later we&#8217;ll talk more about this.</p>
<p>For learning purposes, we&#8217;ll be using a simple static html page as content, with a &#8220;Hello Facebook&#8221; text inside it. This content is online at this url: <a title="Example page" href="http://entrebits.com.br/helloface.html" target="_blank">http://entrebits.com.br/helloface.html</a> . Remember you can use any content you want, as long as it&#8217;s publicly accessible via http. It should fits on 810px wide.</p>
<h3>Create the App</h3>
<p>Access <a title="Facebook Developers" href="https://developers.facebook.com/apps" target="_blank">https://developers.facebook.com/apps</a> and click on the &#8220;Create New App&#8221; button. You will be prompted to fill in the form with basic information about your app:</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/p01.png" rel="image_group"><img class="aligncenter size-full wp-image-1934" alt="p01" src="http://erikaheidi.com/wp-content/uploads/2012/09/p01.png" width="600" height="200" /></a></p>
<p>Give a name to your app in the first field. In the second field, you must provide a unique name as a namespace. Then click on the &#8220;Continue&#8221; button. A Captcha window will appear. After filling the captcha, you will be redirected to an &#8220;edit&#8221; page where you can customize your application.</p>
<p><img class="aligncenter size-full wp-image-1938" alt="p02" src="http://erikaheidi.com/wp-content/uploads/2012/09/p02.png" width="600" height="152" /></p>
<p>In the header you will find important information about your recently created application. Here you can also upload an image and an icon to your app (just click on the images and a form will pop up).</p>
<p>The App ID identifies your application. As well as the App Secret, the ID must be provided when you need to make requests to the Facebook API through your application. For the first part of this tutorial, we won&#8217;t make any requests because our app is just a simple static html page with a &#8220;Hello World&#8221;.</p>
<h3>Configure your app settings</h3>
<p>Now you have to configure the application settings, and specify the url of your content. Select the &#8220;Page Tab&#8221; option and fill in the form with your app information, as shown below.</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/p03.png" rel="image_group"><img class="aligncenter size-full wp-image-1946" alt="p03" src="http://erikaheidi.com/wp-content/uploads/2012/09/p03.png" width="600" height="391" /></a></p>
<p>The app name will be shown as the Tab Name in your fan page (right bellow the Tab Image thumbnail), and also in the header of the application inside Facebook. However, you can change the Tab Name and the Tab Thumbnail directly at the Fan Page, there&#8217;s no need to edit the app settings for this.</p>
<p>Don&#8217;t forget to check the &#8220;Wide (810px)&#8221; option for the Page Tab Width.</p>
<h3>Note about https (secure page tab url)</h3>
<p>It&#8217;s not mandatory for your app to have a secure url &#8211; if you skip this, your app will run as expected for all users accessing Facebook via normal http &#8211; the usual way. But users who are accessing FB via https (secure browsing) will not be able to access your application.</p>
<p>Now, if your web server has ssl enabled and https is working fine (just try to access the same url using https instead of http), you can set this field (secure page tab url) to https://whateverisyourappurl . However, if you don&#8217;t own an SSL certificate issued by a reliable entity, users will get something like this when trying to access your application / page tab:</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/error_chrome.png" rel="image_group"><img class="aligncenter size-full wp-image-1922" alt="error_chrome" src="http://erikaheidi.com/wp-content/uploads/2012/09/error_chrome.png" width="600" height="241" /></a></p>
<p>Note that this is not Facebook&#8217;s fault. It&#8217;s a &#8220;security care&#8221; from browsers.</p>
<p>I couldn&#8217;t find any research about how many users are accessing Facebook via https nowadays. So, if you want to create a big app or some &#8220;serious stuff&#8221;, I recommend you to buy an SSL certificate. After creating your application, you can try a <a title="90 day trial" href="http://www.comodo.com/e-commerce/ssl-certificates/free-ssl-certificate.php" target="_blank">90-day trial ssl certificate from Comodo</a> for free, and check if it suits your needs. I recently bought a really cheap ssl certificate (for only one subdomain) also from Comodo and its working pretty good.</p>
<p>Now let&#8217;s move on to the next step &#8211; add the application to your FanPage. Now we&#8217;ll need that App ID we talked about after creating the app.</p>
<p>You just need the link bellow &#8211; changing, of course, &#8220;YOUR_APP_ID&#8221; to whatever is your App ID, and &#8220;YOUR_URL&#8221; to your page tab app url (the same you entered when setting up the application).</p>
<p>http://www.facebook.com/dialog/pagetab?app_id=<strong>YOUR_APP_ID</strong>&#038;next=<strong>YOUR_URL</strong></p>
<p>For our example app, the url is: <a href="http://www.facebook.com/dialog/pagetab?app_id=280648832010374&amp;next=http://entrebits.com.br/helloface.html">http://www.facebook.com/dialog/pagetab?app_id=280648832010374&amp;next=http://entrebits.com.br/helloface.html</a></p>
<p>When accessing this url, you will be prompted to choose in which FanPage you want to add the application as a Tab. You must be one of the FanPage&#8217;s administrators to do so.</p>
<p>After choosing, access your FanPage to see the result:</p>
<p><a href="http://erikaheidi.com/wp-content/uploads/2012/09/beabc9c35d20120330095922.png" rel="image_group"><img class="aligncenter size-full wp-image-1918" alt="beabc9c35d20120330095922" src="http://erikaheidi.com/wp-content/uploads/2012/09/beabc9c35d20120330095922.png" width="600" height="436" /></a></p>
<p>If you want to show selective content only for followers on your fanpage, you should see this post: <a title="How to selectively show content for followers on Facebook Page Tabs" href="http://erikaheidi.pagodabox.com/2012/09/26/how-to-selectively-show-content-for-followers-on-facebook-page-tabs/" target="_blank">How to selectively show content for followers on Facebook Page Tabs</a></p>
<p>The post <a href="http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/">How to create a Facebook Tab App for your Fanpage &#8211; step by step guide</a> appeared first on <a href="http://erikaheidi.com">Erika Heidi</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://erikaheidi.com/2012/09/12/how-to-create-a-facebook-tab-app-for-your-fanpage-step-by-step-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
