<?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>A bite of bits</title>
	<atom:link href="http://madewithlove.be/abob/feed/" rel="self" type="application/rss+xml" />
	<link>http://madewithlove.be/abob</link>
	<description>Have a seat and enjoy the madewithlove team&#039;s development stories.</description>
	<lastBuildDate>Wed, 21 Dec 2011 07:45:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WP-CLI: WordPress Command Line Tools</title>
		<link>http://madewithlove.be/abob/2011/12/wp-cli-wordpress-command-line-tools/</link>
		<comments>http://madewithlove.be/abob/2011/12/wp-cli-wordpress-command-line-tools/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 07:45:33 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[wp-cli]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=577</guid>
		<description><![CDATA[Have you ever tried to automate WordPress upgrade tasks or deployments? I did, it was a big pain. Sometimes I would find myself updating WordPress options on 54 different blogs trough the admin interface. Completely tired of it I created a little tool to automate these kind of things trough the command line interface (like [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to automate WordPress upgrade tasks or deployments? I did, it was a big pain.</p>
<p>Sometimes I would find myself updating WordPress options on 54 different blogs trough the admin interface. Completely tired of it I created a little tool to automate these kind of things trough the command line interface (like every self respecting developer would do). The wp-cli project was born. </p>
<p><span id="more-577"></span>Why did I started a new project instead of modifying one of the available tools?</p>
<p>My code is inspired on some of them but they all missed one essential concept: pluggability. You can add commands to wp-cli from anywhere in WordPress on the fly, which allows anyone to take full advantage of the command line interface.</p>
<p>Shortly after my first batch of commits @scribu picked up the project and added some great functionality and insights. Today multiple people are contributing to the project and I hope plugin developers will pick it up in the near future.</p>
<p>Interested? Fork the repository on <a href="https://github.com/andreascreten/wp-cli">Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/12/wp-cli-wordpress-command-line-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to be a perfect freelancer</title>
		<link>http://madewithlove.be/abob/2011/11/how-to-be-a-perfect-freelancer/</link>
		<comments>http://madewithlove.be/abob/2011/11/how-to-be-a-perfect-freelancer/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 08:57:55 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[Strategy]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[partnerships]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=523</guid>
		<description><![CDATA[As a freelancer you try to do your job as best as possible, but is that enough to compete with the other freelancers around? I have been freelancing as well, so seeing the case from both sides is quite interesting. In the last few years we had to hire freelancers for different types of work [...]]]></description>
			<content:encoded><![CDATA[<p>As a freelancer you try to do your job as best as possible, but is that enough to compete with the other freelancers around? I have been freelancing as well, so seeing the case from both sides is quite interesting.</p>
<p>In the last few years we had to hire freelancers for different types of work and amongst them there was a stunning difference in style. So how can you be the perfect freelancer? It is a combination of style, communication and great work.</p>
<p><span id="more-523"></span></p>
<p>Of course the most important thing is doing the actual work you are hired for as good and fast as possible. If you deliver great quality on time you are already a good freelancer. But there is more, and if you do those extra things right you can be almost sure that client will hire you again.</p>
<p>Most important to me are your communication skills, I prefer to be in contact with our freelancers through email because they can be easily recaptured later on. Answering emails correctly and replying on all the topics is a start. Just answering as fast as possible is not a good idea, think about what you write and make sure you cover all aspects. This is extremely important, especially when you are dealing with someone who knows your job as well.</p>
<p>When you have to be in touch with your client&#8217;s client directly try to copy your employer&#8217;s writing style. This is great for the end-client experience and if the end-client is happy your client will be happy as well. (Please don&#8217;t do this if your client&#8217;s communication style really sucks)</p>
<p>Your biggest job is to infiltrate the company you are working for as good as possible. Know who you have to contact for which question, know who is responsible for what, find out which processes are interesting for you. If you know exactly how the company works you will not only save time but the person responsible for you will be happy you don&#8217;t always need to pass by him, be aware however, that some clients like to control every task you do, in that case you need to discuss everything with them. Try to use the tools they use, try to act exactly like they do.</p>
<p>Show availability when they need you in off-hours. Sometimes there are matters that require urgency, a project that dropped on their laps at the last minute, site that went down, content that needs producing, a bug that was discovered shortly after launch. It is in these dire times that they will need help the most, and if you show availability, they will greatly appreciate it and will definitely consider working with you in the future.</p>
<p>If you are payed by the hour, always make an estimate of time you are going to spend on a job. Your employer will be doing the same. If you exceed that time more than once you will have to start questioning yourself. Not only because it annoys you but because your employer sees his margin going down and will probably replace you with someone else if possible. So if you want to stay working for him: only invoice what you initially planned, and tell him you did so, together you might think of a solution for the issue or realize the estimates are too positive. If you want to lose your job, just invoice the lump sum.</p>
<p>When you work with monthly invoices, send your invoices on time. We send our freelancers a reminder the last day of the month to ask them to send their invoices. If you don&#8217;t send them in time you will not be payed on time. Never back-date an invoice, date the invoice with the day you are actually making it.</p>
<p>Send your client a follow-up email a month after you finished the project. Just to check if everything is still working and if he is still happy with your work. This will not only be good for your rating by the employer, but he might be working on a new project and because you are sending that email you remind him of the great job you did last time and might reply with something like &#8220;Oh, we have a new project coming up, interesting in working on that as well?&#8221;</p>
<p>To summarize:</p>
<ul>
<li>Do your job the best you can, and finish on time</li>
<li>Communicate with style</li>
<li>Infiltrate the company</li>
<li>Show availability</li>
<li>Send invoices on time</li>
<li>Follow up on your project</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/11/how-to-be-a-perfect-freelancer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updated htaccess tester: referrer support</title>
		<link>http://madewithlove.be/abob/2011/08/updated-htaccess-tester-referrer-support/</link>
		<comments>http://madewithlove.be/abob/2011/08/updated-htaccess-tester-referrer-support/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 08:02:19 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[HTTP_REFERER]]></category>
		<category><![CDATA[referer]]></category>
		<category><![CDATA[referrer]]></category>
		<category><![CDATA[rewrite rule]]></category>
		<category><![CDATA[tester]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=531</guid>
		<description><![CDATA[We just updated our htaccess tester to support the HTTP_REFERER variable in your rewrite rules. To do so we simply added a new field underneath the field for the htaccess. You can type any url in this field, which will be used in the script as the HTTP_REFERER variable. The field is optional, if you [...]]]></description>
			<content:encoded><![CDATA[<p>We just updated our <a title="Htaccess tester" href="http://htaccess.madewithlove.be" target="_blank">htaccess tester</a> to support the HTTP_REFERER variable in your rewrite rules. To do so we simply added a new field underneath the field for the htaccess. You can type any url in this field, which will be used in the script as the HTTP_REFERER variable. The field is optional, if you leave it empty the HTTP_REFERER variable will also be empty.</p>
<p><span id="more-531"></span></p>
<p><a href="http://madewithlove.be/abob/files/2011/08/Schermafbeelding-2011-08-27-om-12.21.28.png"><img class="alignnone size-medium wp-image-532" src="http://madewithlove.be/abob/files/2011/08/Schermafbeelding-2011-08-27-om-12.21.28.png" alt="" width="680" /></a></p>
<p>Other things we changed since the <a href="http://madewithlove.be/abob/2011/04/simple-htaccess-tester/">initial launch</a> of the tester:</p>
<ul>
<li>Support for https requests and the %{HTTPS} variable.</li>
<li>Support for server port and the %{SERVER_PORT} variable, default server port is 80.</li>
<li>Fixed a bug with parsing path which sometimes resulted in an empty result.</li>
<li>Fixed a bug that added the port number behind the url when using the %{SERVER_PORT} variable.</li>
</ul>
<p>If you have ideas for implementing other variables in the tester, please let us know. We hope you love the tester as much as we do and we would like to thank everyone for the kind words and shoutouts.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/08/updated-htaccess-tester-referrer-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple htaccess tester</title>
		<link>http://madewithlove.be/abob/2011/04/simple-htaccess-tester/</link>
		<comments>http://madewithlove.be/abob/2011/04/simple-htaccess-tester/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 08:23:23 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[rewrite cond]]></category>
		<category><![CDATA[rewrite engine]]></category>
		<category><![CDATA[rewrite rule]]></category>
		<category><![CDATA[tester]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=499</guid>
		<description><![CDATA[Last wednesday we where struggling with some complex rewrite rules. To test them we had to setup a local server and keep hitting that refresh button after each change. The only thing we could see is if the url was rewritten to the right location or not, but there was no way to actually see [...]]]></description>
			<content:encoded><![CDATA[<p>Last wednesday we where struggling with some complex rewrite rules. To test them we had to setup a local server and keep hitting that refresh button after each change. The only thing we could see is if the url was rewritten to the right location or not, but there was no way to actually see what&#8217;s happening. So we went on a hunt for a htaccess tester, something like <a title="Rubular: a Ruby regular expression editor and tester" href="http://www.rubular.com/" target="_blank">Rubular</a> which we use for regular expressions.</p>
<p>To our surprise there was no simple app to test rewrite rules, so we decided to dedicate our wednesday afternoon to build one, here is the result: <a title="htaccess tester" href="http://htaccess.madewithlove.be" target="_blank">htaccess.madewithlove.be</a>.</p>
<p><span id="more-499"></span>It&#8217;s very easy to use, just fill in your htaccess and the url (starting with http://) you want to test and hit the &#8220;Check now&#8221; button.</p>
<p><a href="http://madewithlove.be/abob/files/2011/04/Schermafbeelding-2011-04-08-om-10.02.19.png"><img class="alignnone size-full wp-image-503" title="Schermafbeelding 2011-04-08 om 10.02.19" src="http://madewithlove.be/abob/files/2011/04/Schermafbeelding-2011-04-08-om-10.02.19.png" alt="" width="680" /></a></p>
<p>By doing that your url will be rewritten according to your rewrite rules, the output view gives the new url and some debugging information you can use to improve your rules.</p>
<p><a href="http://madewithlove.be/abob/files/2011/04/Schermafbeelding-2011-04-08-om-10.09.14.png"><img class="alignnone size-full wp-image-512" title="Schermafbeelding 2011-04-08 om 10.09.14" src="http://madewithlove.be/abob/files/2011/04/Schermafbeelding-2011-04-08-om-10.09.14.png" alt="" width="680" /></a></p>
<p>There are a couple of things which are not supported yet (like ${HTTP_REFERER} and %{REQUEST_FILENAME}) but we hope to add them in the future. Adding the ${HTTP_REFERER} will be quite easy but we need to find a good way to implement things like %{REQUEST_FILENAME}, please comment if you have suggestions on how we should do it.</p>
<p>That&#8217;s it! I hope you like it. Feel free to <a href="http://twitter.com/madewithlove" target="_blank">get in touch with us</a> if any problems arise or if you have ideas on how we can improve it.</p>
<p><strong>Update:</strong> We updated the checker to also support the HTTP_REFERER, HTTPS and SERVER_PORT variables, read more about the update in <a title="Updated htaccess tester: referrer support" href="http://madewithlove.be/abob/2011/08/updated-htaccess-tester-referrer-support/">this blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/04/simple-htaccess-tester/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Handling WordPress uploads anywhere</title>
		<link>http://madewithlove.be/abob/2011/03/handling-wordpress-uploads-anywhere/</link>
		<comments>http://madewithlove.be/abob/2011/03/handling-wordpress-uploads-anywhere/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 10:18:07 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[image processing]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=489</guid>
		<description><![CDATA[We are currently working on a WordPress project where visitors need to be able to upload images for a competition. Their data is stored as a custom post type but we wondered how we&#8217;d store their image uploads? We can&#8217;t upload them trough regular php and add a meta to the post linking to the [...]]]></description>
			<content:encoded><![CDATA[<p>We are currently working on a WordPress project where visitors need to be able to upload images for a competition. Their data is stored as a custom post type but we wondered how we&#8217;d store their image uploads? We can&#8217;t upload them trough regular php and add a meta to the post linking to the image, but what about WordPress&#8217;s different image sizes and media management?</p>
<p>The solution turns out to be really easy if we use the WordPress function <a href="http://wpseek.com/media_handle_upload/" target="_blank">media_handle_upload</a>. It works with the normal $_FILES array, resizes your image, and gives back the attachment id.</p>
<p><span id="more-489"></span></p>
<p>Some example code:</p>
<pre class="brush: php;">
&lt;?php

if(!empty($_POST)) {
	// Create the new post
	$post_id = wp_insert_post($_POST);

	// Attach the image to the post
	$upload = media_handle_upload($_FILES['image'], $post_id);
}

?&gt;
&lt;form action=&quot;&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
	&lt;p&gt;
		&lt;label for=&quot;post_title&quot;&gt;Title&lt;/label&gt;
		&lt;input type=&quot;text&quot; name=&quot;post_title&quot; value=&quot;&quot; id=&quot;post_title&quot; /&gt;
	&lt;/p&gt;
	&lt;p&gt;
		&lt;label for=&quot;post_content&quot;&gt;Content&lt;/label&gt;
		&lt;textarea name=&quot;post_content&quot; id=&quot;post_content&quot;&gt;&lt;/textarea&gt;
	&lt;/p&gt;
	&lt;p&gt;
		&lt;label for=&quot;image&quot;&gt;Image&lt;/label&gt;
		&lt;input type=&quot;file&quot; name=&quot;image&quot; value=&quot;&quot; id=&quot;image&quot; /&gt;
	&lt;/p&gt;
	&lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;&lt;/p&gt;
&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/03/handling-wordpress-uploads-anywhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Hosting API</title>
		<link>http://madewithlove.be/abob/2011/03/open-hosting-api/</link>
		<comments>http://madewithlove.be/abob/2011/03/open-hosting-api/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 09:02:33 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[control panel]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=408</guid>
		<description><![CDATA[A while ago Jonas and I where discussing hosting control panels over lunch. Most of them are unappealing and unusable for average internet users. A few web hosting companies also write their own control panels, they have no choice. This happens because every hosting environment is so unique that sometimes using an existing control panel simply [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago <a title="Jonas Van Schoote" href="http://madewithlove.be/abob/authors/jonas-van-schoote/" target="_blank">Jonas</a> and I where discussing hosting control panels over lunch. Most of them are unappealing and unusable for average internet users. A few web hosting companies also write their own control panels, they have no choice. This happens because every hosting environment is so unique that sometimes using an existing control panel simply isn&#8217;t viable.</p>
<p>About 6 years ago I remember writing a script to dynamically generate email aliases from a mysql database, on a shared server. All the members of our boys scout group could fill out out their email address in their profile and they would automatically get an alias on our domain by doing so.<br />
About a year later I wrote a control panel for my clients on my reseller package. By using the DirectAdmin API I allowed my clients to manage their email accounts and view their usage statistics. Those where my end-clients, small business owners that would get lost in DirectAdmin itself.</p>
<p>Since then a lot has changed on the field of server management itself but the market of hosting control panels hasn&#8217;t changed much. We think it’s time for a change. Instead of hacking all this stuff wouldn’t it be great to, for example, be able to install a plugin on WordPress to manage your mail accounts?</p>
<p><span id="more-408"></span></p>
<p>This could easily be done if we had a standard API to talk with a web hosting company’s infrastructure. We&#8217;re really curious about why such a thing doesn’t exists yet.</p>
<p>The way we see it, such an API would bring these two main advantages:</p>
<ul>
<li><strong>Implementation in apps</strong><br />
Our employees can create staging servers on the fly on our intranet, in another app we would like to create a separate database for each new client that signs up for the service. But we want to do a lot more and I am sure we are not alone. If every web hosting company would implement a RESTfull service over XML every developer would be able to create apps on top of it, no matter what programming language he uses.</li>
<li><strong>3th party control panels</strong><br />
Great designers and developers could work together to create awesome and usable hosting control panels that work on any web hosting environment. I am sure that when such an API is widely spread open source projects will see the light and that there will be wrappers available for any programming language. Even the hosters themselves could use a skinned 3th party control pane for their own business and working together with the developers to implement specific features.</li>
</ul>
<p>With all those APIs available for cloud management I think the web hosting companies should really start cooperating on this field and we hope to see an Open Hosting API somewhere in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/03/open-hosting-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Useful php classes we discovered</title>
		<link>http://madewithlove.be/abob/2011/03/useful-php-classes/</link>
		<comments>http://madewithlove.be/abob/2011/03/useful-php-classes/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 08:20:01 +0000</pubDate>
		<dc:creator>Jonas Van Schoote</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=460</guid>
		<description><![CDATA[In this post I&#8217;d like to talk about 2 very useful libraries we found here at the madewithlove HQ in the past week: WideImage and Simple Paypal Payments. The first one is a very nice image manipulation library built that uses GD2. A few years ago I wrote my own library to do something similar, [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;d like to talk about 2 very useful libraries we found here at the madewithlove HQ in the past week: <a href="http://wideimage.sourceforge.net/" target="_blank">WideImage</a> and <a href="http://www.binpress.com/app/simple-paypal-payments/20">Simple Paypal Payments</a>.</p>
<p>The first one is a very nice image manipulation library built that uses GD2. A few years ago I wrote my own library to do something similar, but recently I had to use transparency masking on profile pictures uploaded by users. This was something my library couldn&#8217;t do. Instead of refactoring my code, a small search turned up the WideImage library and now in a few lines of code I can combine any image with a mask. It provides exactly what I need and I waved goodbye to my old library.</p>
<p>The second library, Simple Paypal Payments, addresses one of the most cumbersome and expensive problems in web development: communicating with the PayPal API. I say expensive because the amount of time you lose with trying to get a useful result out of the bloated, almost incomprehensible, API is staggering and quite unique in these modern days of nice, RESTful API&#8217;s. The Simple Paypal Payments library offers some relief if all you&#8217;re interested in is the Express Checkout API, which I think is the one used by most small <del>PayPal victims</del> web shops. It offers a very basic interface to handle payments, allowing you to simply add products and call a method to start the process. The only thing I missed was an option to change the currency, but that was only a small hack away.</p>
<p>I hope I helped someone by pointing out these interesting libraries. If you know a better library, feel free to tell us in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2011/03/useful-php-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The real wpmu_delete_user</title>
		<link>http://madewithlove.be/abob/2010/11/the-real-wpmu_delete_user/</link>
		<comments>http://madewithlove.be/abob/2010/11/the-real-wpmu_delete_user/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 11:24:03 +0000</pubDate>
		<dc:creator>Andreas Creten</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[reassign]]></category>
		<category><![CDATA[wpmu_delete_user]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=447</guid>
		<description><![CDATA[// @todo Merge with wp_delete_user() ? Like they suggest in their comment the wpmu_delete_user function is not ready yet. When deleting a user, WordPress does not allow you to reassign the user&#8217;s content to another user. My rewrite below is a merge with the wp_delete_user that lets you do so. function wpmu_delete_user($id, $reassign) { global [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: php;">// @todo Merge with wp_delete_user() ?</pre>
<p>Like they suggest in their comment the <a href="http://codex.wordpress.org/Function_Reference/wpmu_delete_user" target="_blank">wpmu_delete_user</a> function is not ready yet. When deleting a user, WordPress does not allow you to reassign the user&#8217;s content to another user. My rewrite below is a merge with the <a href="http://codex.wordpress.org/Function_Reference/wp_delete_user" target="_blank">wp_delete_user</a> that lets you do so.</p>
<pre class="brush: php;">function wpmu_delete_user($id, $reassign) {
    global $wpdb;

    $id = (int) $id;

    do_action( 'wpmu_delete_user', $id );

    $blogs = get_blogs_of_user( $id );

    if ( ! empty( $blogs ) ) {
        foreach ( $blogs as $blog ) {
            switch_to_blog( $blog-&gt;userblog_id );
            remove_user_from_blog( $id, $blog-&gt;userblog_id );

            if ( 'novalue' === $reassign || null === $reassign ) {
                $post_ids = $wpdb-&gt;get_col( $wpdb-&gt;prepare(&quot;SELECT ID FROM $wpdb-&gt;posts WHERE post_author = %d&quot;, $id) );

                if ( $post_ids ) {
                    foreach ( $post_ids as $post_id )
                        wp_delete_post($post_id);
                }

                // Clean links
                $link_ids = $wpdb-&gt;get_col( $wpdb-&gt;prepare(&quot;SELECT link_id FROM $wpdb-&gt;links WHERE link_owner = %d&quot;, $id) );

                if ( $link_ids ) {
                    foreach ( $link_ids as $link_id )
                        wp_delete_link($link_id);
                }
            } else {
                $reassign = (int) $reassign;
                $wpdb-&gt;update( $wpdb-&gt;posts, array('post_author' =&gt; $reassign), array('post_author' =&gt; $id) );
                $wpdb-&gt;update( $wpdb-&gt;links, array('link_owner' =&gt; $reassign), array('link_owner' =&gt; $id) );
            }

            restore_current_blog();
        }
    }

    // FINALLY, delete user
    $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;DELETE FROM $wpdb-&gt;usermeta WHERE user_id = %d&quot;, $id) );
    $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;DELETE FROM $wpdb-&gt;users WHERE ID = %d&quot;, $id) );

    clean_user_cache( $id );

    // allow for commit transaction
    do_action( 'deleted_user', $id );

    return true;
}</pre>
<p>I think it would be even better to use the wp_delete_user function in this function instead of just copying the code, by doing that the hooks would be triggered for each blog which would allow each&#8217;s plugins to do their thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2010/11/the-real-wpmu_delete_user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Should we start building our websites with HTML5 already?</title>
		<link>http://madewithlove.be/abob/2010/10/should-we-start-building-our-websites-with-html5-already/</link>
		<comments>http://madewithlove.be/abob/2010/10/should-we-start-building-our-websites-with-html5-already/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 00:24:41 +0000</pubDate>
		<dc:creator>Marco Jardim</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://madewithlove.be/abob/?p=423</guid>
		<description><![CDATA[This is Marco&#8217;s personal view, as a company we do create html5 websites and we try to adopt it as good as possible. The short answer: No. The slightly longer answer: It depends. The excruciatingly long answer: Read on&#8230; If you&#8217;re a web developer like me, regardless of which sites you visit, including this one [...]]]></description>
			<content:encoded><![CDATA[<div>
<blockquote><p>This is Marco&#8217;s personal view, as a company we do create html5 websites and we try to adopt it as good as possible.</p></blockquote>
<p>The short answer: No.<br />
The slightly longer answer: It depends.<br />
The excruciatingly long answer: Read on&#8230;</p>
<p>If you&#8217;re a web developer like me, regardless of which sites you visit, including this one now, you&#8217;ll soon stumble upon the latest buzzword which is HTML5. A lot of articles going around the web tend to use the term HTMl5 very loosely whereas in fact, most of them are about something completely different (CSS3) or a very specific part of HTML5 which is a specification in it&#8217;s own right: Canvas.</p>
<p>Why does this happen? Why is CSS sometimes trampled by the term HTML5, and why is Canvas, which is more of a &#8220;new technology&#8221; rather than an intricate part of HTML5, simply branded as HTML5.</p>
<p><span id="more-423"></span></p>
<p>Well, I&#8217;m afraid it&#8217;s because of marketing, and we as a community have been doing very little, if anything, about it. These articles wouldn&#8217;t continue to be published with these misleading titles if we ignored them. No, visiting the article, and pointing out the mistake in the comments won&#8217;t help. the light controversy will only help build interest, and people will revisit the site just to discuss the matter.</p>
<p>This all started when Apple decided that HTML would be the ideal engine to build applications for the iPhone, before they announced their SDK. With this in mind, people started looking at HTML&#8217;s capabilities, and most importantly, some very specific parts of HTML5 that allowed them to do things that they normally wouldn&#8217;t be able to do, like offline storage and such.</p>
<p>Although there is a current HTMl5 draft, and some parts of the specification are pretty much &#8220;done&#8221; and can be applied to real projects, it really depends on context. On the iPhone it made sense to make use of some of the new features because you could be sure that everyone would be able to use it.</p>
<p style="text-align: center;"><a href="http://madewithlove.be/abob/files/2010/10/pantsdown.jpg"><img class="size-medium wp-image-424 aligncenter" src="http://madewithlove.be/abob/files/2010/10/pantsdown-232x300.jpg" alt="" width="232" height="300" /></a></p>
<p>However, HTMl5 is far from finished. How far? Well, it&#8217;s only meant to be finished in 2022, at least that was the plan some time ago. Surely I jest, you must be thinking, but no, I&#8217;m not. With the increasing growth of popularity of the iPhone people essentially stumbled onto the W3C&#8217;s work with it&#8217;s pants down. Sure, the bare-bones of the specification are there, and we already have a solid feel for what we we&#8217;ll be able to do with it, but it&#8217;s far from finished.</p>
<p>Right now the only parts of HTML5 that are &#8220;finished&#8221;, or very close to that, are the parts that either add semantical value, or help make things prettier. They are both things that can be done, to some extent, with HTML4/XHTML1 and progressive enhancement.</p>
<p>A few years back, some people wrote books on how progressive enhancement was the ideal way for us to take the industry forward. I purchased some of those books, and I still believe that it is a great idea to follow. But somehow, most of those same writers and admired people in our community are now stating that we should shoehorn features that old browsers don&#8217;t support, and simply ignore them. <strong>What</strong>?!</p>
<p>I know that Microsoft has a track record of being slow to adopt new features on it&#8217;s browsers, but to even render an html5 site correctly on any stable Internet Explorer you have to run a small Javascript library. When did forcing these features in a browser suddenly become a good thing?</p>
<p>I&#8217;m all for preparing oneself for the future, and practicing it while we get there. But this isn&#8217;t practicing, this is putting a check mark on a feature set. This hardly adds any value to the site. The tools we have to right now, to build and validate this new code, are still unfinished, or not even created. We are putting the wagon in front of the horse.</p>
<p>Let&#8217;s look at the past; when did shoe-horning new features into an old browser ever work well?</p>
<p>Did it work when we started using Microsoft&#8217;s proprietary filters?<br />
Did it, or does it work when we use PNG fixes? Sure, those &#8220;work&#8221;, but I pity the lives of every person visiting a site where I&#8217;m forced to implement it.</p>
<p>You all know how those fixes are. You should be ashamed if you don&#8217;t think they are detrimental to the User Experience we all like to brag about. Not even JavaScript libraries, which we use in most of our projects, are flawless and can leave some parts of our sites completely unusable.</p>
<p>If your target audience is tech savvy, or is using a certain platform that supports a certain amount of HTML5 features, like the iPhone or Android, by all means, do jump on board, it only helps bring the industry forward.</p>
<p>But if you&#8217;re building Bob&#8217;s plumbing company site, I highly doubt that his users are running Safari, or will appreciate the extra effort put into that CSS recreation of his logo (which is stupid and completely useless), or be able to use the new form tags like the date picker.</p>
<p>HTML5 isn&#8217;t finished, and if you look at which companies are shaping it: Google, Apple, Microsoft and Adobe; you probably realize that they all have their own different interests at stake which contradict crucial parts of HTMl5.</p>
<p>Do you think Adobe is a fan of Canvas which might steal a large part of Flash, or even kill it?<br />
Do you think Microsoft is happy about Google&#8217;s efforts to bring 3D to the browser, and it&#8217;s push to enable browser applications to become more like standalone ones?</p>
<p>If the HTML group was a real company, and not an organization, none of those companies would be a part of the board, because the conflicts of interest are painfully obvious. And unfortunately we will have to cope with whatever compromises they make so that HTML5 hurts or improves their businesses in the least possible manner.</p>
<p>We can all dance and cheer about how wonderfully semantic and easy it is to use HTML5, but we must remember that right now more than half of the people using the internet have no access to it&#8217;s features, due to their browser of choice. This is a choice we must respect as professionals, and adjust accordingly.</p>
<p>Sure, some people might say it&#8217;s perfectly fine to start using HTML5 right now, and that there&#8217;s no reason not to, but most of those people are also trying to sell you books on how to use this new technology, or some service related to it, like a blog with web development tips and such.</p>
<p>I&#8217;m not saying you shouldn&#8217;t pick up those books, or read those blogs/sites and learn more about it. I do it, and so should any web developer with any interest. But you shouldn&#8217;t let them dictate how you will build sites right now. Remember that the users, and not those book writers or bloggers, are the reason why you have your job.</p>
<p>It&#8217;s in your best interest to make the choice that is best for your users, and not the choice that is most convenient/popular, because they almost never mean the same thing.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2010/10/should-we-start-building-our-websites-with-html5-already/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>For designers: How to use a grid system</title>
		<link>http://madewithlove.be/abob/2010/07/for-designers-how-to-use-a-grid-system/</link>
		<comments>http://madewithlove.be/abob/2010/07/for-designers-how-to-use-a-grid-system/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 11:37:09 +0000</pubDate>
		<dc:creator>Marco Jardim</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.madewithlove.be/abob/?p=331</guid>
		<description><![CDATA[As a front-end developer for multiple designers sometimes I&#8217;m given designs and layouts for sites that follow a grid system, like 960.gs. Sometimes I debate with myself whether they&#8217;re using a grid system because they are aware of the advantages a system like that brings, or because it&#8217;s a trend. But either way, since some [...]]]></description>
			<content:encoded><![CDATA[<p>As a front-end developer for multiple designers sometimes I&#8217;m given designs and layouts for sites that follow a grid system, like <a href="http://960.gs/">960.gs</a>.</p>
<p>Sometimes I debate with myself whether they&#8217;re using a grid system because they are aware of the advantages a system like that brings, or because it&#8217;s a trend. But either way, since some of them don&#8217;t understand how a grid system works, I thought I&#8217;d write a tutorial on simple guidelines they can follow, to make their front-end developer&#8217;s life easier.</p>
<p><span id="more-331"></span></p>
<h3>Columns and Gutters</h3>
<p>Every grid system consists of two concepts: columns and gutters.</p>
<p><a href="http://madewithlove.be/abob/files/2010/07/960gs.jpg"><img class="aligncenter size-full wp-image-380" src="http://madewithlove.be/abob/files/2010/07/960gs.jpg" alt="" width="350" height="350" /></a></p>
<p>The columns are represented above by the pink areas, and gutters are the spaces between them.</p>
<p>In Photoshop, if you design something that only occupies one pink area, it will be the size of the pink area alone. If you choose to occupy two columns, then it will be the width of two columns + the width of 1 gutter. If it occupies 3 columns, it will be the width of 3 columns and 2 gutters, and so on.</p>
<p>Unlike what some people believe, the gutters are not just a fixed value on one of the sides of each column, but instead, they consist of 2 values, on both sites. Let&#8217;s take a closer look.</p>
<p><a href="http://madewithlove.be/abob/files/2010/07/twocolumns.png"><img class="aligncenter size-full wp-image-379" src="http://madewithlove.be/abob/files/2010/07/twocolumns.png" alt="" width="307" height="291" /></a></p>
<p>This image consists of two columns and, as you can see, it clearly shows how the gutters are configured in the grid system. The width of the gutter, by default (on the system with 12 columns) is 20 pixels. That means, on the left and right side of each column, there is a margin of 10 pixels.</p>
<p>If you want to occupy any of those 10 pixels, belonging to the gutter, we have to make a rule that resizes the element and removes the margin from either side. Unless this element is used a lot, we just wasted a lot of code, and it&#8217;s untested, might break other elements in the grid system and (usually) it&#8217;s not used in anything else.</p>
<p>Everything, and anything you design, by default, should always be inside of the pink areas above, and any gutters in between them.</p>
<p><a href="http://madewithlove.be/abob/files/2010/07/goodbad1.png"><img class="aligncenter size-full wp-image-386" src="http://madewithlove.be/abob/files/2010/07/goodbad1.png" alt="" width="640" height="372" /></a></p>
<p>It saddens me, and probably a few other front-end developers elsewhere, when we receive a design from someone obviously trying to improve their work, by using the grid system, but fail to size their elements correctly, forcing us to code the site as if it had no grid system at all, thus eliminating all the benefits of having it.</p>
<p>If your design elements constantly move into the area where the gutters lie, that renders the grid system useless for us. Any code re-usability is wasted, and we have to write something custom from scratch. This means that when we implement the design, the chances are higher there will be more bugs and problems to fix, because the default 960 grid system, is already cross-browser tested.</p>
<h3>Why do designers do this? How can we avoid it?</h3>
<p>Well, I think it&#8217;s quite simple to solve. Most designers simply stick to the default grid system layout, which has 12 columns. Although those sizes are fine for a common website, sometimes they limit the creativity if they want to add something different. When you download the PSD package from the 960.gs website, it includes a 24 column layout, which is much more versatile.</p>
<p>If that doesn&#8217;t work, just make a new one! There is a Photoshop script you can download <a href="http://www.danclien.com/psd-grid-layout-generator/">here</a> that allows to create custom 960 Grid Systems on the fly. You can change the number of columns, their width, and various other things.</p>
<p>The better you follow a grid system, the more concise it will be, the less bugs/problems it will have when it&#8217;s implemented. I&#8217;m not saying that every site should follow a grid, you shouldn&#8217;t limit your creativity. You should understand the advantages of using a grid system before jumping on to it.</p>
<p>All designers should remember that the better they understand their medium, the better their designs will be.</p>
]]></content:encoded>
			<wfw:commentRss>http://madewithlove.be/abob/2010/07/for-designers-how-to-use-a-grid-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

