All posts by Lachlan Hunt

Volunteer Spotlight: Me!

Just a few hours ago on SpreadFirefox, I was awarded the coveted Volunteer Spotlight award. This is a weekly honour awarded to a special volunteer that has put in a lot of effort to spread the word about Firefox. In particular, my contributions included my Firefox Flyers, SpreadFirefox buttons, randomized buttons and the very popular, yet still in development, Hitchhiker’s Guide to Firefox! So, Yay!!! Let’s all congratulate me on a job well done! ?

Google Print

I just came across this new system being developed by Google, called Google Print. The idea is that they scan in an entire book, or just the portions that the author requests, and they make the book searchable, and allow users to view some of the pages within the book. The idea is to give the users a better idea about the content of the book in order to help increase sales.

One of the features of the system is that they claim to have disabled cut and copy operations. That’s easy, the book pages are images, so of course the text cannot be copied like that. The other protection feature they claim is that Save Image functions are also disabled. However, their method of doing so is pathetic, and of course, once I found an example page, it took less than 2 minutes to bypass it, and set up Firefox to allow me to save all of the pages that I could access.

However, I should point out that I had already read a few posts on the topic that explained how the site was set up and some ideas of how to bypass it, but none seemed to present a method as simple as this.

Basically, the book image is added using a CSS background, which is placed behind a transparent gif. The problem is that this transparet gif covers the element with the background image, thus attempting any user from right-clicking, and selecting View Background Image and then saving it. Some of the previous ideas suggest from other blogs and comments include viewing the CSS or looking in the Page Info dialog on the Media tab to get the URI of the image, entering it in the location bar and viewing it. That’s quite easy, but takes a few too many steps. The answer is as simple as adding a single style rule to your userContent.css in Firefox, or an equivalent setting or config file for your user agent.


img[src="images/cleardot.gif"] {
    visibility: hidden;
}

All that does is hide the transparent gif and allow you right click, to select View Background Image. Although I don’t normally promote stealing copyrighted material, my aim is just to show that DRM doesn’t work, and is very useless. I think Google should just give up on such a pointless system, because the more you try to protect something, the more people try to break it, and quite often succeed.

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.