Archive for July, 2009

Redirection problem for admin login from WordPressMu 2.6 -> 2.8.1 upgrade

Sunday, July 19th, 2009

Welp – writing this update from WordPress Mu version 2.8.1 – the admin definitely looks pretty good, and I like the extra support for Google Gears. I encountered a little bit of trouble that someone with less webdev experience might find extremely puzzling.

A redirect issue (infinite loop) is caused if you have old cookies for the previous WordPress MU install and try to log into the admin panel. As you might expect, the solution is to delete the offending cookies (in my case, I just deleted all cookies for verstory.com and was good to go).

It’s a bit troubling that this advice wasn’t posted on the upgrade page of the WordPress MU sites, but, such is life.

Emulate max-width / max-height for Internet Explorer (no extra work needed!)

Saturday, July 11th, 2009

As I’m sure many of you know, Internet Explorer (even IE8) completely ignores the max-width and max-height css properties. I did some Googling but unfortunately all of the stuff I found was for manually setting the max-width/max-height or some similar buffoonery. I’ve written a nice Javascript (uses jQuery) function that you can include in your head tag to emulate proper detection of the max-width and max-height css attributes without doing any extra work after that (so long as it’s in the head of the content you’re loading with max-width/max-height attributes). Feel free to use it but please keep my copyright statement if you don’t mind!

Cheers and happy designing:

function css_emulateMaxWidthHeight() {
/* (c) Evan Roberts - 7/10/2009
www.GoWFB.com - Wholesale Furniture Brokers
Everyone is free to use/mdoify this but please keep the copyright statement!
*/

	$('img').each(function() {		

		if( $(this).css('max-width') != 'none' || $(this).css('max-height') != 'none' ) {

			max_width = $(this).css('max-width').replace(/[^0-9]/g, '');
			max_height = $(this).css('max-height').replace(/[^0-9]/g, '');		

			if( $(this).width() > max_width || $(this).height() > max_height ) {
				if( (max_width / $(this).width()) < (max_height / $(this).height()) ) {
					$(this).css('height', Math.round($(this).height() * (max_width / $(this).width())));
					$(this).css('width', max_width);
				} else {
					$(this).css('width', Math.round($(this).width() * (max_height / $(this).height())));
					$(this).css('height', max_height);
				}

			}
		}
	});
}

$(document).ready(function() {

	css_emulateMaxWidthHeight();

});

Bruno!!!

Friday, July 10th, 2009

So – Bruno is coming. I haven’t been this excited for a movie since – well – maybe ever. I’ve been following the skits posted on facebook and youtube. If you haven’t considered watching Bruno yet, I encourage you to do so.

Preview:

Want to return to stardom after falling from grace? Easy – just die.

Wednesday, July 8th, 2009

When I was a young sprout, I fondly remember the movie “Free Willy” and Michael Jackson singing that song. Even at such a young age, it was vividly apparent that the he had talent. I think it’s probably undeniable that Michael was (and is) one of the greatest musical talents of all time. At any rate – I forget exactly when it was, but it all of a sudden became cool to make child molestation references in association with Michael Jackson. I guess I (and most of the population) pretty much accepted that he was pretty weird and likely a child molester.

I guess what pains me (and obviously a lot of people) is that now, after his death, it becomes apparent just how much on an impact he had on the world, and what a great person he really was. As far as the allegations – well – who knows. I certainly don’t know – but I’m about 150% sure that the last case in 2003 or whatever was 1000% bullshit, and I do recall feeling sort of sorry for him at the time that went down. In any case, it seems that “early death” was just what the media prescribed for Jackson’s defamation, and the medicine certainly appears to have worked.

Rest in peace MJ – I think we owe you a collective apology.

Air Canada to allow pets in the cabin..

Thursday, July 2nd, 2009

Air Canada passengers can now carry on pets

I’m not sure about the exact details, but it seems like this applies to all flights. I can only hope that this doesn’t apply to international flights. While I’m aware that there are enough “it’s OK if my dog licks my face” pet owning hippie-vegan PETA membership holding animal rights activists in Canada to perhaps economically justify this move, the day a majority of the world thinks this way is the day that the world is ravaged by large herds of newly liberated livestock. It’s probably likely (and it’s definitely fitting) that these smug self righteous airheads probably supported the ban on indoor smoking in Canada while lobbying for the right to inconvenience and disturb others by bringing their animals into the passenger cabin. I wonder how things would go over if I were to light up a smoke to dampen the stench of their pets..

Now, in addition to the already pretty shoddy service that Air Canada provides, passengers can look forward to the possibility of smelling cat shit or listening to a dog yap throughout the flight. Rather than take the chance of this happening to me, I think I’ll just not fly Air Canada until they change this ridiculous policy – I’m ashamed that such an airline is given the right to use my country’s name.