Berichten in categorie ‘English’.

Tracking Site Search using Google Analytics

Google Analytics is a very useful tool when analyzing website performance. However, novice users can find the functionalities offered by it daunting. Some very useful features don't work "out-of-the-box" and require some configuration. One of them is Site Search.

SEO Friendly Faceted Search – Part 2

In the first part of our SEO Friendly Faceted-Search blog we covered a way to retrieve products from the database in a quick way. In this part we will cover the SEO part of our faceted-search technique. Let's start!

SEO Friendly Faceted Search – part 1

You probably heard it before: faceted search. Many webshops use this way of searching in their catalog. But what is it exactly? And how can you implement it on your own website? In this blogpost we will try to explain what it is and how you can implement it.

Compressed mail in Dovecot

For one of our clients, I had to compress mails stored by Dovecot (to save some diskspace on their mail server). In the Dovecot wiki you can find a pseudo script that can do this for you. I used that to write the following script.

If statements in XPath 1.0

For a reflection field that I'm using in a Symphony CMS project, I needed to create an XPath conditional expression. XPath 2.0 supports if statements, but I couldn't use those because PHP-XSL only support XPath 1.0. After searching on the internet I finally came up with this solution: substring('repeat', 1, number(factuur/herhaling = 'Yes') * string-length('repeat')) This statement will return "repeat" when factuur/herhaling is checked in the CMS. Not the most readable solution, but it does work!

XSLT eating whitespace

I wanted to fill an HTML tag with three data nodes using <xsl:value-of select="the/node/path" /> and seperate them with whitespace. My first thought was a construction like this in my <xsl:template match="/data/klant/entry"> <td><xsl:value-of select="voornaam" /> <xsl:value-of select="tussenvoegsel" /> <xsl:value-of select="achternaam" /></td> However, this will result in the white space between the <xsl:value-of> statements being removed. After posting on the Symphony CMS forum, nickdunn suggested using this solution: <td><xsl:value-of select="concat(voornaam, ' ', tussenvoegsel, ' ', achternaam)" /></td> As you can see, this will even make the code more readable. Thanks Nick!

Ivaldi Android app published

We just published our first real Android app to the market: Usage Counter: view your total outgoing minutes and texts since a given date. [caption id="attachment_470" align="aligncenter" width="320" caption="The Usage Counter main screen"][/caption] It was created because I didn't have the posibility to see how many minutes or texts I could still use for the current month. This Android application allows me to get a rough idea of how much I have left. Note that it uses your call log and texts "log", so clearing those will result in resetting the number in Usage Counter.

IO Errors in KVM?

Last sunday we were migrating our server from Ubuntu Hardy to Lucid, because KVM is better supported and more up-to-date (we were using a backport PPA on Hardy). I had done the installation on a seperate machine and after configuring it to our wishes, I had created a tarball of it. So, the upgrade was just a matter of unpacking the tarball after booting with a livecd. After a reboot, everything seemed to work fine, except for the fact that our two virtual machines were giving IO errors. I had seen this before when KVM had a bug with qcow images, but we were now using raw images. On the host system, we created a new raw image, copied the contents of the old one and tried again. Same problem. What was causing this? We tried to boot the machines without virtio drivers and again, had the same problem. Eventually, Michael came up with the idea to check permissions on the disk images. Because of the upgrade, the owning group of the files was changed (well, the name was changed, not the id), meaning that my user could not write to the images. Apparently KVM doesn't check whether the images are writeable when it is started. This cost us almost two hours of debugging... So, remember to check you disk image permissions when you have IO Errors in KVM!

Publish custom post types in WP

I've hit this problem a few times now and it's not that obvious to solve. Suppose you want to use custom post types in WordPress. As a real neat developer, you add your plugin or theme namespace to the name of your custom post time, something like this: mynicepluginname_podcasts (where podcasts is the actual custom post type name). After registering the custom post type, everything seems to be working. You have the podcasts show up in the CMS, there is an add button, but the list is still empty though. When you click on create new podcast, something strange happens: you don't have a publish button, you can only send the podcast in for review! What is happening? Well, it took me some time to find out, but apparently the post type name may not exceed 20 characters. This is documented in the WordPress codex as well, but easy to miss: Do pay close attention to not having your namespace exceed 20 characters though, as the post_type column in the DB is currently a varchar field of the latter length. So remember, keep your custom post type names short!

WordPress Rewrite Rules

Trying to write a WordPress plugin that modifies the rewrite rules? I bet you have problems getting your rules to actually be used. There's a simple explanation for it: WordPress doesn't generate the rewrite rules on every page visit, they are cached. To refresh this cache you can use the flush_rules() WordPress function (don't do this in your plugin init function because your site might grind to a halt) or you can just simply visit the permalinks page (Settings->Permalinks) as this will flush the rules as well. You can find more information about rewrite rules and how to extend them in the WordPress Codex.

Categorieën

Archief