Archive for April, 2008

Published by Fabian on 09 Apr 2008

Latest Lightbox v2 with automatic resizing

It seems that quite many people want to get their lightbox resizing automatically, but there were not many good solutions out there. I finally found a solution from Sebastien Grosjean, which was already integrated into a later, not yet very object oriented lightbox version, by Michael R. Bagnall. However the latest available one, which was upgraded to use latest Prototype and Scriptaculous versions, was not patched.

So this is what I did.
Please find my patched version of the Javascript and CSS file. Please take care to update image pathes in CSS and JS file. And the localization if you don’t speak German :-)

Detailed list of changes from Lightbox v2.04:

  • Added automatic resize method. Controlled by featBrowser & breathingSize options.
  • Corrected Opera 9 fix, to prevent disortion in FireFox on slidedown.
  • Tweaked the overlay to resize to windowHeight, not pageHeight.
  • When in a slideshow the next image had no title set it inherited the title of the previous one. that was fixed.
  • Tweaked some default parameters (thats my matter of taste :-) )

Many thanks to Lokesh Dhakar for creating this awesome Lightbox, that is still unmatched by soo many clones :-)

Published by Fabian on 09 Apr 2008

Javascripts should be fun and small

I rarely do blog posts just to link to somebody else, because I think my blog is not read by so many people that anyway wouldn’t have discovered that link otherwise.

So I suppose you seen this already Super Mario in Javascript made by Jacob Seidelin. There are many aspects of it what I like:

  1. Its fun to play
  2. It again proves that javascript is a language capable of doing such things
  3. It uses inline graphics. Thats right, no external files. While this is not a problem in any other scenario, in web it saves that extra http request, that with such small sprites adds a lot of overhead.
  4. It is awesome small. Just lately I played around with some Cover Flow js widgets (namely ProtoFlow and ImageFlow, in combination with HighSlide and LightBoxv2) and I was very disappointed that these libs are just that huge. I am willing to take extra bytes for eye candy, but I wont take 40KB just for opening a enlarged version of an image.
  5. It is compressed but not packed. Many people use Dan Edwards packer to make their Javascript smaller. This indeed brings a few bytes, however on every page load the browser has to unpack the script. Even the cached one! I found statistics on this some time ago, unfortunately cannot find them anymore, but they, additionally to common sense, convinced me that packing Javascript is not a good idea.

A very interesting idea is that he aliases some often used functions:

appChild = function(parent, child) {return parent.appendChild(child);}

by doing so YUI Compressor can shrink the method name, because its a local variable. Pretty neat idea.

Now back to ProtoFlow coding :-)

Ah by the way, does anybody have a better,smaller alternative for lightboxv2?
Features should be: Fade background, display caption, handle multiple pictures in a row (next+prev) Autoresize to screen (a feature that LightBox doesn’t handle). Ideally it should use Prototype and scriptaculous, as this is already set for the project. And it should be small. YUI compressed less than 15k

Published by Fabian on 07 Apr 2008

Now also PHP5 certified

I just passed the certification exam for the Cheap PHP certification. The exam was okay, But I wonder why I got so many questions regarding file access. And the inevitable tons of questions on security (interestingly the Java Web Component developer, which is exposed to the same risks, did not contain a single question on this).
Lets see how many people wonder why I still criticize PHP5 on certain aspects of its API and language design :-)

Published by Fabian on 04 Apr 2008

How to deal with blog content harvesting?

I am a bit clueless on how to deal with blog content stealing. over 50% of my comments are trackbacks from “blogs” that harvest the net and steal content from blogs. Some of them manage to at least give the source or quote the author name correctly, but most of them give no correct credits. It seems that others also add some random text to it that should even more emphasise that it is a manual trackback, but you can notice that they are generated.

How to deal with those? I cannot do more than to mark them “spam”, however my valuable text (well my gibberish that perhaps might be valuable) is on their site, sometimes claiming that they have authored it.

Ideas anyone?

PS: Harvested misquoted trackbackspam welcome on this entry :-)

Published by Fabian on 04 Apr 2008

One Google to rule them all

I have some e-Mail accounts which get spammed by multiple spam mails per hour, but unfortunatly I could not make a clear cut and kill them. Now I found a neat feature in GMail which allows you to collect pop3 accounts and provide the mails via GMail interface. This is especially handy because then I have them on my iPhone as well. And most important: They have to pass the superb Google spam filter.

So as you see I dropped my resistance against Google crawling all my private data, because the service they provide is worth more than I consider the value of my mails.

Published by Fabian on 03 Apr 2008

Bye Bye iPhone, Welcome iPhone

T-Mobile announced today that there will be a special offer starting on Monday, where I would save 200 Euros for my phone. Too sad that I bought it already. Well I tried calling T-Mobile and negotiating about getting this back without any hassle. And yes! its not possible :-)

To bad, because here in Germany you can send back goods you ordered via phone or internet within 14 days.

So I will send back my phone on Monday and order a new one on Monday. Because terminating my account, charging 1/4 of monthly fee, inspecting my sent back phone, repackaging it and sending me a new via Express is cheaper for T-Mobile than just adding 200 Euro to my account.

Well if you (T-Mobile) want it like that you can have it. I can live two days without my iPhone.

Update
Urks, I was pointed to a tiny detail: Upon activation I confirmed that I waive my right to return the iPhone. Of course if I would want to go into a lawsuit I could argue that I was unable to test the device (testing is the main reason for those magical 14 days, you have to have time to test it similar to what you do when you can hold it in your hand) without activating it.

Somehow I am reluctant and consider taking the offer of 100€ onto the account T-Mobile is giving at the moment.

« Prev - Next »