Image Image Image Image Image

code gremlins!

31

Oct

Lightbox 2 and problem solutions

I’ve been making some code changes to this site over the past week or so. The main change I’ve made is to the gallery when you click an image to see it larger. I’ve implemented the Lightbox 2 script. It’s really quite a nice script. I did have some issues with the base code and have been digging around making tweaks here and there. I thought I’d share some of the changes I made so that others out there having the same issues might find solutions.

Problem #1: Lightbox 2 doesn’t automatically resize/scale images larger than the browser window to fit into the constraints of the browser window. This was a big problem for me seeing that I use 1000px images for my large views. I like to accommodate those lucky users of on gigantic monitors. So I dug around on the internet and found a javascript programmer that came up with a solution. Fabian Lange integrated the javascript to make the resizing automatic. You can find the source code for the css and js files on his site.

Problem #2: Fabien’s script tweaked the code so the background overlay that shadows the main page only extends to the bottom of the visible webpage. That was a problem for me. Here is how you tweak the code so background overlay shadow will again extend down to the bottom of a page even if it scrolls:

In the lightbox.js file (from Fabien’s site) change the following lines:

Line 219:
$('overlay').setStyle({height: arrayPageSize[3] + 'px' });
should read
$('overlay').setStyle({height: arrayPageSize[1] + 'px' });

Line 306:
this.overlay.setStyle({ height: arrayPageSize[3] + 'px' });
should read
this.overlay.setStyle({ height: arrayPageSize[1] + 'px' });

So far that’s the only tweaks I’ve had to make and I think it’s a big improvement for the site.

I’ve also added another similar script to the blog. When you click on images in the blog they now zoom out of the page in the same fashion as cover flow on a mac. I used a script by Cabel Maxfield Sasser called FancyZoom 1.1. I like this script because it’s REALLY EASY to implement. It combs over the page and automatically links images which is great. The only problem is that I’d like the background overlay to darken like Lightbox 2 does. I’m looking at implementing the Lightbox 2 script but there are problems. The wordpress plugin for the Lightbox 2 script will automatically tag images for the zoom function, but it doesn’t have the automatic resizing integrated like the script I first mentioned above. I’m having problems finding a 3rd party hack out there for that. If anyone knows, drop me a line.

I’m also working on implementing the lightbox feature for the slideshow function. I found a programmer that has tweaked the lightbox code for slideshows, but not slideshows that automatically resize/scale images. If anyone knows where that code can be found drop me a line.

So the short of this is, new changes have been made and more new changes are on the way. I hope this helps some others out there that are having similar problems.

17

Nov

Adobe Flash Player 9 No Sound on Mac OSX

OK, so all of a sudden my Flash player had no sound… Was it the latest Mac software update? The latest Flash player update? My web browser? My computer about to die? I HATE these kind of problems! I did some searching around and found an answer here:

The answer

This may help you PC users out there as well. Basically you can skip reading all the threads above, here is the solution:

In the Applications > Utilities folder open the Audio MIDI setup. Find the audio output settings and change it from 96khz to 44khz or 48khz. Viola!!! This fixes the problem. Yay!