Archive for November, 2006

That's what I call swap :)

Wednesday, November 29th, 2006

Nuf' said :)

swap.jpg

Adding :class parameter to link_to_remote in Rails

Monday, November 27th, 2006

Well, this is mostly a note to myself, since I have spend almost half an hour trying to figure how to add class parameter to a link generated by link_to_remote in Rails.

Well here is the code (with all bells and whilstles):

<%= link_to_remote "Vote on it",
{
:url => { :action => 'vote', :id => post_dig.id },
:update => 'thevote',
:before => visual_effect(:opacity, 'thevote', :duration => 0.2, :from => 1.0, :to => 0.1),
:complete => visual_effect(:opacity, 'thevote', :duration => 0.5, :from => 0.1, :to => 1.0)
},
:class => "vote"
%>

This code updates the contents of an element with id='thevote', and adds nice fade-out/in during the update. Most important that it also adds class "vote" to the generated link so it can be used for a nice CSS rollover.

Inline Google Maps for WordPress updated to version 2.1

Friday, November 10th, 2006

Finally, I had some time to juggle with the Google Maps code today, so here's a new update. :) (download link is at the bottom of this page!)

New stuff in this update is that basically you gain more control per map. Place Google map into your sidebar if you with, display maps in different sizes, show or hide map controls on per-map basis, as well as show/hide the marker on per-map basis! You can even choose if you want the google-map link to be replaced with a google map or not (in case you just would rather have a plain link to google maps site instead of inline map on your site).

(more…)

Firefox 2 freezes. The mistery resolved.

Tuesday, November 7th, 2006

Even since betas of Firefox 2, I had constant unexpected freezes of the browser, at least once on 1-2 hours of normal use (usually the uptime was not longer than 10-15 minutes during heavy lifting).

That, considering excellent stability of Firefox 1.5, was very very annoying. I thought may be it release candidates or the release version itself will fix the problem, but RCs came and gone, and even the release version of the browser was as freeze-prone as early betas.

I tried to delete user profiles and create new ones, delete preferences – without any results. Then I have started to turn off extensions (I had lots of them), leaving only the ones I can't live without, and which I thought I can trust 100%. These extensions happen to be: WebDeveloper, FireBug, Google Toolbar for Firefox and Google Browser sync. But no matter what, even with this limited extensions set, freezes continues at their usual annoying level.

…until one day when I was desperately searching for a solution to the problem again, and found a post in which the poster suggested removing Google Toolbar for Firefox extension in order to get rid of crashes. "Huh? Google's toolbar?", – I though. "Isn't Google's software pretty good and polished to be a source of such a horrible problem?". But I eventually gave it a try. I removed Google Toolbar for Firefox extension from both computers I use (Intel-based iMacs, one at home and one at work) – and I could barely believe my eyes – the freezes just stopped. I'm living my 3rd day without ANY freezes at all!

Now.. I'm not sure if Google Toolbar causes these problems on any machines it is installed on, or is this problem only Mac-version specific, or may be I live right in the middle of some anomaly which causes Google Toolbar to behave in such a way, but all I can say is that :

removing Google Toolbar extension resolved Firefox 2 freezes for me

so you might also give this solution a try if you have similar problems with Firefox 2 constantly freezing on you.