Archive for September, 2009
September 25th, 2009
I thought I would post a few of the graduation photos I have been culling through and editing. Can’t believe I took almost 800 photos that day!
September 22nd, 2009
This is a very compelling video from TED about a concept bouncing around in my head for awhile now. I have had a hypothesis regarding the unsustainable nature of American capitalism in terms of sheer output. My observations started with the absurd expansion in the razor blade business and noticed this trend with other products as well.
Air fresheners was one product I found particularly ridiculous. We used to just have “Stickups” and the Glade solid. This morphed into multiple incarnations of devices just to make your living room smell like <insert fragrance here>. Simmering Pots, electric oil plugins, plugins with fans, nightlights, dual smells, reeds and even CD players came out at a frenetic pace. Seems like this trend is amok in every industry. To me, it is just stinking up the works.
September 16th, 2009
Oh Leica you sweet temptress. I recall when I owned Leica’s first digital camera—back when digital cameras were just emerging onto the market as mainstream. Yes way back in 2000 it was the Digilux 4.3 and looking back it really was a horrible offering. Camera phones today take better shots than it did. Yet, the immediacy it brought was great.
Now Leica has introduced the M9 digital rangefinder, the world’s smallest full-frame digital camera and compatible with all M series lenses. Metal blade shutter, magnesium alloy body, quiet and stealthy. This is not your sports journalism camera at only 2 frames/sec. But for portraits, candids, photo-journalism and street photography it offers the old school purity and quality that is Leica with the instant gratification of digital. It is also priced accordingly at $6999 (body only). You still need to factor in another $3500 – $6000 for (a) great Summilux lens. Truly for connoisseur indeed, which is why it is in the “Dream Camera” category :)
September 15th, 2009
This is part two of my implementation of XML Google Maps & NextGEN galleries in Wordpress as a geotagged photo solution. After getting the maps to work on a basic level, there was one thing left to do. I wanted the images which popped up from the map in the infowindow to open with a “lightbox” type effect — rather than opening in a new window.
Normally, opening images in Wordpress using scripted effects like Litebox would simply require a “rel=’lightbox” option in your HREF image tag (along with the appropriate plugin as well). However this solution does not work this way with Google Maps implemented in this way. Without getting into the gory details, which I am ill-equipped to accurately explain, I can say this: Google Maps uses iframes to load its maps into. Javascript has issues in dealing with contents in and out of iframes. Why Google uses iframes since they have been depreciated by the W3C, but I am sure they have a reason.
Nonetheless after numerous tries, I have cobbled together a fix for anyone wanting to use, in this case Slimbox2, with XML Google Maps and NextGEN galleries to display your photos on a map.
Prerequisites:
- Wordpress site up and running. I am running 2.7.1, so it’s not necessary to be running the very latest 2.8.4.
- NextGEN Gallery plugin installed, working and some geotagged photos in a gallery.
- XML Google Maps plugin installed and configured.
- Some version of Litebox effect (I use Slimbox2 based on personal preferences).
Now once you have a page set up to display a map linked to a gallery with XML Google Maps, it is time to get Slimbox working with it. In my last post (Default markers with XML Google Maps & NGG Gallery), I talked about editing the xmlgooglemaps_show.php file in the “xml-google-maps” folder in the “plugins” folder of your Wordpress installation to change the default markers. Here you will be working with that same file. If you haven’t already done so, make a copy of the xmlgooglemaps_show.php.
Open xmlgooglemaps_show.php using your favorite editor (I use TextMate on Mac). At the top you will see a block of code something like this (yours will be slightly different):
$error = ""; $output .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";; $output .= '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" style="height: 100%">'."\n";; $output .= '<head>'."\n";; $output .= '<meta http-equiv="content-type" content="text/html; charset=utf-8" />'."\n";; $output .= '<title>Google Maps</title>'."\n";;
Now we are going to add the following lines after the
statement and before the$output .= '<script type="text/javascript" src="http://www.kevinpadams.com/wp-includes/js/jquery/jquery.js"></script>'."\n";; $output .= '<script type="text/javascript" src="http://www.kevinpadams.com/wp-content/plugins/wp-slimbox2/javascript/slimbox2.js?ver=2.02"></script>'."\n";; $output .= '<link rel="stylesheet" href="http://www.kevinpadams.com/wp-content/themes/WhiteGrid/map.css" type="text/css" media="screen" />'."\n";; $output .= '<link rel="stylesheet" href="http://www.kevinpadams.com/wp-content/plugins/wp-slimbox2/slimbox2.css" type="text/css" media="screen" />'."\n";;
The lines that were added were jquery.js, slimbox2.js, map.css and wp-slimbox.css. The map.css would not exist for your installation. I just created a separate CSS file for the map styling, but you don’t have to. Omit if desired.
Normally, these files would be loaded in your header.php, but since the map gets loaded into an iframe, it ends up having its own header information. Hence the need to put these here. Now with these in place, save the xmlgooglemaps_show.php on your server and go to the xmlgooglemaps settings in your admin area. All the way down at the bottom, you will see the area where you will place the html for your NGG map links. Here is the code you will use for the HREF portion:
<a onclick="jQuery.slimbox(this.href); return false;" rel="lightbox" href="%FULLPATH%" target="_blank"> <img style="border: 0; float: left; margin: 5px 10px 5px 5px;" src="%THUMBPATH%" alt="" /> </a>
Hopefully, this will get you on your way. Now, it will be noted that the Slimbox effect still does not pop outside the map’s iframe. I have tried to research this and cannot get it work. Seems others have the same issue and I tried to correct this using other techniques. Suffice to say, with my limited scripting ability I can’t wrap my head around it so it will have to stand as is for now. I just adjusted the map height to allow for this anomaly. All in all it works and that’s good enough for government work. Happy trails!










Recent Comments