Tag: DIY

  • Lightbox 2 and XHTML 1.1 validation

    I recently started using the Lightbox 2 WordPress plugin on my Marbella news site to automatically add the zooming overlay effect to certain images. It is really plug & play and works out of the box.

    I did encounter however that my pages stopped validating as XHTML 1.1 which is the standard doctype on all sites I develop.

    The error in question is due to the square brackets (“[” and “]”) being used to link individual images in one single post together as a gallery under the “rel” attribute. The square brackets are not permitted characters and therefore the W3 Validator spits out the following error message:

    character "[" is not allowed in the value of attribute "rel"
    It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.

    To avoid this XHTML 1.1 validation problem simply edit the following line in the Lightbox 2 plugin file named lightbox2.php under the “autoexpand_rel_wlightbox” function:

    from:

    $replacement    = '$1 rel="lightbox['.$post->ID.']">';

    to:

    $replacement    = '$1 rel="lightbox_'.$post->ID.'">';
    

    You should now be able to validate that plugin’s output as XHTML 1.1 with no issues.

  • Online Ribbon Generator

    I recently needed a little ribbon for the top corner of Globalpandora to spiff up the site a bit.

    Usually I look around on Google Images for available images but was not able to locate exactly what I was after.

    What I did find though was a nifty tool that generates ribbons in different colours, fonts, etc.

    So thanks to QuickRibbon for a useful service.

  • Simple SMS sending with AT commands

    Since I am analysing different SMS related questions because of a new project I am involved in, I thought the following page at Nokia was useful. It is a very simplistic overview on how to read and send SMS with your mobile phone hooked up to your machine.

    As said it only covers the most basic AT commands (Hayes) but should be enough to get you started if you desire.