Software Blogs

MySQL: Set UTF-8 Throughout
Last edited on: 01/02/2010 - 16:19

The MySQL manual states By default, MySQL uses the latin1 (cp1252 West European) character set and the latin1_swedish_ci collation that sorts according to Swedish/Finnish rules. These defaults are suitable for the United States and most of Western Europe. That's certainly true but only half the story. If you have ever developed PHP or Perl applications, sooner or later you are bound to notice inexplicable hieroglyphics in your website output. Closer inspection of these characters and you'll probably realise it is an apostrophe or an accented letter being rendered incorrectly.

»   Read more
openSUSE 11.1 to 11.2 Upgrade: Grub Boot Settings
Last edited on: 01/02/2010 - 16:17

Firstly, before upgrading your openSUSE box from 11.1 to 11.2, remember that 11.2 comes with PHP 5.3 which is not compatible with Drupal 6 due to the Drupal core reliance on the deprecated ereg() function.

»   Read more
Synaptics Touchpad Woes: Prevent Cursor Jump During Typing
Last edited on: 01/02/2010 - 16:16

Maybe I am heavy-handed, but I have always had a problem when typing on my laptop of the cursor jumping to another part of the screen, and so my typing continues at that point. This is caused by sensitivity of the Synaptics - a merest brush of the touchpad whilst typing results in a mouse tap event.

Thankfully, this can be cured very easily with the syndaemon command. This disables mouse taps for a specified amount of time after typing finishes, with a default setting of two seconds. The command to run during a KDE xterm sessions being:

syndaemon -d -t

»   Read more
openSUSE 11.1 to 11.2 Upgrade: Postfix Errors Solution
Last edited on: 01/02/2010 - 16:15

Having upgraded from openSUSE 11.1 to 11.2 I noticed that local mail wasn't working on my machine. So a command line mail request like:

# ls | mail root

was disappearing. Further investigation was required, and by inspecting my /var/log/mail
# tail /var/log/mail.err

The output indicated that postfix was issuing warnings and errors

Dec 6 09:24:39 laptop4 postfix/qmgr[4521]: fatal: open database /etc/postfix/relay.db: No such file or directory

»   Read more
Drupal 6: Display Full Node When Only One Node in a View is Returned
Last edited on: 01/02/2010 - 14:47

It is common practice when developing applications to display all the fields of a database record when returning a list of rows but the row count is only one. In Drupal Views parlance, you would want to list the output of the view IF there was more than one row, but if there is exactly one row it would be better to display the node page instead.

I've not found a way of doing this automatically in Views, so decided to do it myself with a small amount of theming.

»   Read more
Drupal 6 Node Inside Another Node Using Word-Wrap Panel
Last edited on: 01/02/2010 - 14:46

This page shows a Drupal node inside another node. The main node is the body text, whilst the child node is encapsulated in the right aligned panel which the main node's text wraps around. There are many ways in Drupal to display a node inside another node. The Views module can be used, as can the Insert_View module. Neither are a perfect fit - they both require quite a lot of work to arrive at what we want.

»   Read more
Drupal 6 Display File Attachments in Contemplate Templates
Last edited on: 01/02/2010 - 14:45

In earlier tutorials I showed how to use the Drupal module Contemplate to customize the default output for content types. Recently I developed a SMS Gateway Module for the Esendex service provider and documented it in a tutorial here.

»   Read more
Syndicate content