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.

  • ip2.cc an alternative to hostip.info

    I have used the API of hostip.info for long time to resolve IP addresses to country codes or country names. The web service has been hit by some severe downtime lately returning “500 – Internal Server Error” for any calls including both API and website page requests. As of now hostip.info has been down and unreachable for several days in a row, with no signs of coming up in the near future. Perhaps the maintainer is on holiday or something…

    I manage several applications depending on this web service so I started searching for an alternative solution to lookup IP addresses. I did not find anything suitable so I decided to launch my own free IP to country lookup API instead.

    This new web service can be found at ip2.cc (IP to Country Code) for everyone to use.

  • BMW X5 fan blower issues

    Sometimes I had the climate system blower in my BMW X5 slow down so it could barely be heard, even when increasing the fan manually to a higher setting. After some minutes it usually started behaving normally again. Yesterday though it simply stayed on minimum no matter which buttons were activated.

    After a bit of reading I determined that the final stage resistor (aka final stage unit or blower motor resistor) was probably the culprit. This morning I went to the BMW dealer and bought the original unit for €90 and replaced it myself in about 15 minutes without any issues. The most time consuming part was actually to get to the dealer and back in rush hour traffic.

    The BMW part number is 64116923204 (PN 64 11 6 923 204) and is a newer, slightly different formed, and hopefully improved version of the existing unit. You can also buy the same unit cheaper at Ebay but from a different manufacturer. Simply search for the part number in the auction description.

    There are some excellent guides full of pictures to follow which you should have a look at:

    This unit is unfortunately very often the source of other issues, the most annoying one would be draining the battery so you can not start the car. Definitely a recommended DIY job before proceeding to more expensive repairs.