Get Firefox

If you haven’t already noticed, my site has been updated with a large alternating “Get Firefox” banner, at the top of every page. I’ve also updated the Get Firefox button in the sidebar. Before I go into the details of how these are implemented, I just want to give a small update of the SpreadFirefox.com campaign. I’ve created some Firefox Flyers for people to distribute in their area. I’ll be distributing them around my area this weekend. I’ve also started a new mini-project called the Firefox 5 Minute Challenge. Full details are available in my SpreadFirefox blog, I want as much feedback as I can get, to make them as good as possible.

These Get Firefox banners have been implemented to randomly rotate between all the ones I have available. There’s currently 5 buttons for the sidebar, and 2 banners for the header. They’ve been set up to rotate using the Dan Benjamin’s image rotator. Because that rotator uses PHP, yet the files from my site are currently all static, I used SSI to include the PHP files, which inturn include the PHP rotator script and pass the appropriate .ini file, with the list of images.

The two files for the 88×31 buttons, and the 600×120 banners were extended from those described in the ALA article by adding height and width attributes. This is because the image size functions weren’t working for me since the height and width attributes were not being output, and my knowledge of PHP is fairly limited. So, the easiest way for me to handle this was to add the attributes, and extend the script to insert the values from the properties file. This was done by adding the following lines to the script:

    # height
    $height = $images[$img]['height'] ?
      sprintf( ' height="%s" ', $images[$img]['height'] ) :
      '';
    # width
    $width = $images[$img]['width'] ?
      sprintf( ' width="%s" ', $images[$img]['width'] ) :
      '';

Then, the image element output was also modified to include these extra values.

    printf(
      '<img src="%s" alt="%s" %s %s %s %s %s>',
      $images[$img]['src'],
      $images[$img]['alt'],
	  $title,
      $id,
      $class,
	  $height,
	  $width
    );

There’s actually two slightly different versions of this. One for XHTML and the other for HTML. I know there are probably much better ways to handle this, but I just wanted something quick and dirty to get the job done. I eventually want to handle everything by creating XHTML, served as application/xhtml+xml to descent browsers, and convert it with XSLT and PHP, but I my previous trials of implementing that failed. I don’t think my ISP has the required PHP modules installed.

Finally, I’ve been trying lately to track down a copy of the font used for the Firefox logos. This font is called FF Meta Bold, but unfortunately, it’s rather expensive to buy. So, if anyone has this font available, I would appreciate it if you could make up some vector images, such as a .fla file or .eps, or whatever, with the text “Get Firefox” and “Get Thunderbird”, and the slogans such as “Rediscover the web”, etc. All the ones that appear on the official Firefox buttons. Because the font is copyrighted, I’m not asking for a copy, but I won’t say know if you just want to send it to me anyway ;-). A lot of people would appreciate having the text as vector images, so we don’t have to put up with the low-res GIFs and PNGs we currently have available. If you’re interested, we already have a vector logo available.