<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://guaka.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Guaka! - drupal planet</title>
 <link>http://guaka.org/tag/drupal-planet</link>
 <description></description>
 <language>en</language>
<item>
 <title>My first mobile site, in Drupal of course</title>
 <link>http://guaka.org/2011/my-first-mobile-site-drupal-course</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/furniture&quot;&gt;furniture&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/mobile&quot;&gt;mobile&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/seo&quot;&gt;seo&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-4&quot;&gt;&lt;a href=&quot;/tag/teak&quot;&gt;teak&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-5&quot;&gt;&lt;a href=&quot;/tag/drupal-planet&quot;&gt;drupal planet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;In 2008 I built my first Drupal site, for a &lt;a href=&quot;https://sourenmeubels.nl/&quot;&gt;furniture business&lt;/a&gt;.  The site proved to be a big success and we started some other furniture sites as well later on.  I also worked on many other Drupal sites and the web in general hasn&#039;t been standing still.   So last year we decided it was time for an upgrade.  Not as easy as thought with a site that is ranking extremely well for a wide range of keywords.  It also appeared more difficult to get to a new design.&lt;/p&gt;
&lt;p&gt;I moved the entire teakdump site to teakmeubelen.nl, which is super easy with &lt;a href=&quot;http://aegirproject.org/&quot;&gt;Aegir&lt;/a&gt;, added the new theme, and many of the custom modules I had developed for the new  Meubels website.  With that most of the site was ready except for some settings that weren&#039;t easy to grab in code.&lt;/p&gt;
&lt;p&gt;As early adopters of technology (especially within the furniture world) we&#039;d also been entertaining the thought of having a site that works well on mobile phones.  I had already seen and heard of &lt;a href=&quot;http://drupal.org/project/mobile_tools&quot;&gt;Mobile Tools&lt;/a&gt;, so I gave it a quick try.&lt;/p&gt;
&lt;h2&gt;The Drupal modules&lt;/h2&gt;
&lt;p&gt;I was pleasantly surprised by the integration with &lt;a href=&quot;http://drupal.org/project/ds&quot;&gt;Display Suite&lt;/a&gt; and &lt;a href=&quot;http://drupal.org/project/context&quot;&gt;Context&lt;/a&gt;.  That plus the &lt;a href=&quot;http://drupal.org/project/fusion_mobile&quot;&gt;Fusion Mobile&lt;/a&gt; theme gave me fairly decent mobile site in a very short time.&lt;/p&gt;
&lt;p&gt;The mobile build mode make it a snap to get a slightly more usable rendering of nodes on mobile devices and the mobile context makes it easy to quickly rearrange the entire site for mobile devices.&lt;/p&gt;
&lt;p&gt;I noticed an issue though: the Display Suite build mode was showing on the desktop site!   I had to disable Mobile Tools and look back into this the next day.&lt;/p&gt;
&lt;p&gt;Then I checked WURFL but that seemed to just complicate matters a bit more.&lt;/p&gt;
&lt;p&gt;As it seems now there was a little bug in the code that sets the build mode, at least &lt;a href=&quot;http://drupal.org/node/1213114&quot;&gt;I wrote a patch for the Mobile Tools&lt;/a&gt; that works very well for me!&lt;/p&gt;
&lt;p&gt;The main other thing I ran into was the caching of the theme.  I&#039;m using two different themes, one for the desktop version and one for the mobile version of the site.  This doesn&#039;t work at all if you have the same URLs.  So finally I had to take the redirect out of Aegir and into my nginx configuration so that &lt;a href=&quot;http://m.teakmeubelen.nl/&quot;&gt;m.teakmeubelen.nl&lt;/a&gt; also points to the same install (without a redirect).&lt;/p&gt;
&lt;h2&gt;SEO&lt;/h2&gt;
&lt;p&gt;From blog posts I gathered that Google doesn&#039;t seem to consider the same content on both desktop and mobile URLs as punishable duplicate content.  I just wonder how Google is supposed to detect the mobile URLs (which is one more reason for a nice blog post about my first mobile site).&lt;/p&gt;
&lt;p&gt;Now things still need some work here and there but overall I think this site looks great, both on the desktop and on mobiles.  And I wonder where to put the iPad and other tablets, as I think the desktop site is just fine on an iPad but Mobile Tools probably considers it mobile hardware anyway.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Fri, 08 Jul 2011 20:58:12 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">619 at http://guaka.org</guid>
</item>
<item>
 <title>Recursively create lowercase symlinks to filenames with uppercase letters - in Python</title>
 <link>http://guaka.org/recursively-create-lowercase-symlinks-filenames-uppercase-letters-python</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/free-software&quot;&gt;free software&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/python&quot;&gt;Python&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/drupal-planet&quot;&gt;drupal planet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I&#039;m working on a project to convert a big ASP website into Drupal.  On Windows OSes there is not really a distinction between upper and lower case characters in filenames.  At first I thought to just leave the capitals, but on web pages links were sometimes with capitals and sometimes lowercase.  So I added some stuff to the Apache configuration, usually inside the VirtualHost directive (this does &lt;em&gt;not&lt;/em&gt; work in &lt;tt&gt;.htaccess&lt;/tt&gt;):&lt;/p&gt;
&lt;pre&gt;        
        RewriteEngine on
        RewriteMap lc int:tolower
        RewriteCond %{REQUEST_URI} [A-Z]
        RewriteRule (.*) ${lc:$1} [R=301,L]
&lt;/pre&gt;&lt;p&gt;But that wasn&#039;t all.  For the project I&#039;m parsing thousands of ASP files and the plan is to do this everyday while the existing website is updated.  We&#039;re rsyncing files to be parsed, and the &lt;a href=&quot;http://www.linuxweblog.com/node/306&quot;&gt;recursively rename to lowercase&lt;/a&gt; script I found is nice but it&#039;s not very efficient to copy and rename almost 3 GB everyday.  I wrote a little Python script in the train today to create lowercase symbolic links to file and directory names with uppercase letters.  The hardest part was to properly change directories - it&#039;s important to change into the directory the symlink is created but at the end of an &lt;tt&gt;os.walk&lt;/tt&gt; it&#039;s necessary to get back to the current working directory.&lt;/p&gt;
&lt;p&gt;I&#039;m sure it can be useful to other people dealing with similar issues...&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/sites/guaka.org/files/lowlink.py&quot;&gt;lowlink.py&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;
#!/usr/bin/env python
&quot;&quot;&quot;
lowlink.py

Recursively creates lower case symlinks to filenames with uppercase letters.

Created by Guaka in 2010, consider this public domain, copy and re-use freely.
&quot;&quot;&quot;

import os

def lowlink(path = &#039;.&#039;):
    cwd = os.getcwd()  # os.walk can&#039;t handle path changes very well 
    for root, dirs, files in os.walk(path):
        # change directory for symlink creation
        os.chdir(os.path.join(cwd, root))
        print root
        for name in files + dirs:
            lowname = name.lower()
            if name != lowname and not os.path.exists(lowname):
                os.symlink(name, lowname)
        os.chdir(cwd) # restore path for os.walk

lowlink()
&lt;/pre&gt;&lt;div style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs533.ash1/31270_443942522208_611107208_5835466_349375_n.jpg&quot; alt=&quot;my working setup&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Tue, 04 May 2010 17:51:54 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">435 at http://guaka.org</guid>
</item>
<item>
 <title>Support for Dutch sites in Drupal Service Links</title>
 <link>http://guaka.org/2010/03/20/support-dutch-sites-drupal-service-links</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/hyves&quot;&gt;Hyves&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/seo&quot;&gt;seo&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/code&quot;&gt;code&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-4&quot;&gt;&lt;a href=&quot;/tag/drupal-planet&quot;&gt;drupal planet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;For my little &lt;a href=&quot;http://zwembad-aanleg.nl/&quot;&gt;project site about swimming pool construction&lt;/a&gt; I decided I needed some way to spread links better over Dutch sites. So I hacked around a little bit in Drupal&#039;s &lt;a href=&quot;http://drupal.org/project/service_links&quot;&gt;Service Links module&lt;/a&gt; and I just uploaded some files to &lt;a href=&quot;http://drupal.org/node/748128&quot;&gt;support nujij en eKudos&lt;/a&gt;.  I want to add some more Dutch sites, but there ain&#039;t that many it seems.  The result can be viewed on the individual articles pages of my blog - there&#039;s still some work on Service Links before it can be conveniently shown on the main page.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Sat, 20 Mar 2010 19:59:37 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">415 at http://guaka.org</guid>
</item>
<item>
 <title>memcache doesn&#039;t necessarily speed up your Drupal sites</title>
 <link>http://guaka.org/2010/01/25/memcache-doesnt-necessarily-speed-up-your-drupal-sites</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/hammerhead&quot;&gt;hammerhead&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/lullabot&quot;&gt;lullabot&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/memcache&quot;&gt;memcache&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/performance&quot;&gt;performance&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-4&quot;&gt;&lt;a href=&quot;/tag/tuning&quot;&gt;tuning&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-5&quot;&gt;&lt;a href=&quot;/tag/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-6&quot;&gt;&lt;a href=&quot;/tag/seo&quot;&gt;seo&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-7&quot;&gt;&lt;a href=&quot;/tag/drupal-planet&quot;&gt;drupal planet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;Sites that show up quickly on a user&#039;s screen tend to keep the user&#039;s attention for longer and also rank better in Google.  So when listening to the excellent &lt;a href=&quot;http://www.lullabot.com/audiocast/lullabot-podcast-80-top-40-drupal-modules-revisited&quot;&gt;Lullabot Podcast 80: Top 40 Drupal Modules Revisited&lt;/a&gt; I was caught by Drupal experts stating that Memcache would even speed up your site if it&#039;s not a high traffic site. It could off-load the database.  I decided to give it a try on a relatively low traffic &lt;a href=&quot;http://teakhouten-meubelen.nl/&quot;&gt;site of one of my clients&lt;/a&gt;.  The site is already being served by nginx so the load times are already pretty good.

When setting up the experimentation I was a bit confused by the &lt;a href=&quot;http://drupal.org/project/memcache&quot;&gt;thorough but chaotic instruction&lt;/a&gt; to set up memcache.  I ran into a problem setting up PECL memcache:
&lt;pre&gt;$ sudo pecl install memcache
downloading memcache-2.2.5.tgz ...
Starting to download memcache-2.2.5.tgz (35,981 bytes)
..........done: 35,981 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
shtool at &#039;/tmp/pear/temp/memcache/build/shtool&#039; does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.

ERROR: `phpize&#039; failed&lt;/pre&gt;
Since I run Debian I solved this by running &lt;code&gt;apt-get install php5-memcache&lt;/code&gt; instead.

I restarted php-fastcgi (needed for nginx) and added &lt;code&gt;$conf[&#039;cache_inc&#039;] =&#039;sites/all/modules/memcache/memcache.db.inc&#039;;&lt;/code&gt; to settings.php.

Then I ran some tests in &lt;a href=&quot;http://stevesouders.com/hammerhead/&quot;&gt;Hammerhead&lt;/a&gt;.  Not on the front page since there is an embedded Youtube video. I chose a page without any external elements. I was a bit confused at first, and ran several short tests. I forgot to log out and the memcache module was adding a lot of extra information in the bottom.  I thought that was the reason that my site was a lot slower with memcache than without it.  So I logged out and tried again:
&lt;table id=&quot;hammerurls&quot; style=&quot;border: 1px solid #bbbbbb;&quot; border=&quot;0&quot; cellspacing=&quot;10&quot; cellpadding=&quot;10&quot;&gt;
&lt;tbody id=&quot;hammerurlsTbody&quot;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;th&gt;count&lt;/th&gt;
&lt;th&gt;latest&lt;/th&gt;
&lt;th&gt;median&lt;/th&gt;
&lt;th&gt;avg&lt;/th&gt;
&lt;/tr&gt;
&lt;tr id=&quot;hhtr_0&quot;&gt;
&lt;th&gt;empty cache with memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1449&lt;/td&gt;
&lt;td&gt;1449&lt;/td&gt;
&lt;td&gt;1759&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;primed cache with memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1277&lt;/td&gt;
&lt;td&gt;1186&lt;/td&gt;
&lt;td&gt;1184&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id=&quot;hhtr_0&quot;&gt;
&lt;th&gt;empty cache without memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1239&lt;/td&gt;
&lt;td&gt;1283&lt;/td&gt;
&lt;td&gt;1483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;primed cache without memcache&lt;/th&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1014&lt;/td&gt;
&lt;td&gt;900&lt;/td&gt;
&lt;td&gt;950&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
It could be that I&#039;d have to tweak some memcache settings, or run longer tests, but I think these numbers are clear enough: memcache made my site slower instead of faster!&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Mon, 25 Jan 2010 00:50:31 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">260 at http://guaka.org</guid>
</item>
</channel>
</rss>
