31 Aug 2010

node links order and module weight

I had my modules updated and voila! a new problem waiting to be solved.

The node-links section is being shared by the "print" (now "Printer, e-mail and PDF versions" module) and "service_links" modules. After the update process, the service links had been placed between "print" and "email" (parts of the print module). I don't like this.

So… how can someone manipulate the order of the objects in the links section? If you simply want the objects of one module to be in front (or after) the other module's objects, the answer is "module weight".

23 Jul 2010

Advertisement module error

If you updated the ad module (Drupal) to the latest dev version, you may come across the above error message:

user warning: Unknown column 'sitekey' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE date = 2010060800 AND aid = 6149 AND action = 'create' AND adgroup = '' AND hostid = '' AND sitekey = '' in .../sites/all/modules/ad/ad.module on line 333.

or something similar to it.

06 Jul 2010

UTF-8, Greek and a Facebook sharer bug?

comments bellow header is a photography-news oriented website. Every post has links at the bottom, "print this", "email this" and share on facebook, digg etc.

About a month ago, I saw a strange behavior. If someone was clicking on the "Share on Facebook" link, Facebook was parsing the article with wrong encoding. I couldn’t explain that because it suddenly happened without any change in the drupal code by my side. I was convinced that Facebook is the problem and it will be fixed soon. That did not happen.

26 Apr 2010

drupal views rewrite output to invalid markup

While I was testing the with the w3c validators, I saw several errors about

<h2> and <h5>

elements that where inside <a hrefs. I immediately spotted the problem on the node titles.

More specific: page views at are using fields. The field "node title" has a rewritten output to


and the "link to full node" checked.

Further investigation revealed that views module "links to full node" the whole "rewritten output" and not just the variable [title]. Therefore, the html output was

<h5><a href="...">[title]</a></h5>


24 Apr 2010

test and optimize your website

You are at the last stage of development, the beta stage. Your website needs to be tested. This is an article referencing to useful tools and methods to optimize the speed and the visual uniformity.

23 Apr 2010

auto-switch (mobile) theme based on User-Agent

I dislike the idea of auto-switching to mobile themes in general. I want the user to have the choice considering the fact that smartphones have now more power, bigger screens are wi-fi capable (no 3G costs).

Sometimes though, it is a good practice. Especially in the case of, which has a design-perfect mobile website. If you are developing websites using Drupal, there are some good modules: Mobile Tools and Browscap.

For simpler constructions like you can code simple and clean.