Lightbox Mother Bitches!

If you touch your software enough does it become hardware?

Moderator: Forum Moderators

Post Reply
tandino
Ninja Pirate
Ninja Pirate
Posts: 1580
Joined: March 23rd, 2005, 15:20
Location: Liverpool UK
Contact:

Lightbox Mother Bitches!

Post by tandino »

A quick question for the web geniuses amongst us. I'm looking to create a light box style effect for a website I'm working on whereby when a punter clicks on an image it opens a larger version of that image on the same page, but darkens the background. My question is thus: Is it possible to include textual information on said image as it opens up. Basically it's for a section of a site where clicking actors' images will open a larger version of that image and include information from their biographies. I've done google fu and it only seems to lead me to standard lightbox scripts for images alone and possibly a caption.

Any thoughts? Ideally I'd like to avoid using pop ups too. Any help will be gratefully received and rewarded with a bummin gof your choice (or an alternative reward, should you deny the bumming.
deject
Berk
Berk
Posts: 10353
Joined: December 7th, 2004, 17:02
Location: Oklahoma City, OK, USA
Contact:

Post by deject »

It's entirely possible, but it probably requires some PHP or AJAX knowledge, of which I have essentially none. I'm guessing you just need to have your script load up a div containing the text you want to show in the lightbox, erm, box.
Stoat
Site Admin
Site Admin
Posts: 3291
Joined: October 8th, 2004, 15:48
Location: Sheffield, UK
Contact:

Post by Stoat »

Can you not just repurpose one of the ones with a caption? It sounds like the feature you want is there, it just needs positioning and styling differently.
tandino
Ninja Pirate
Ninja Pirate
Posts: 1580
Joined: March 23rd, 2005, 15:20
Location: Liverpool UK
Contact:

Post by tandino »

Stoat wrote:Can you not just repurpose one of the ones with a caption? It sounds like the feature you want is there, it just needs positioning and styling differently.
You know what Toast, you're probably right. Maybe I shouldn't be so ambitious... I'll give it a crack anyway. Deej, I possess limited PHP and no AJAX skills, so a re-purposing might be the best option.
Grimmie
Master of Soviet Propaganda
Master of Soviet Propaganda
Posts: 7672
Joined: February 5th, 2005, 19:00
Location: Birming-humm, England
Contact:

Post by Grimmie »

I PRESENT TO YOU, THE ANSWER: JQUERY

I've not used it myself, but we use it on our sites at work.
You just stick a reference to a javascript file (a JQuery Library) in the head, and then bung the code, example HTML, provided CSS and Images into your site.

http://colorpowered.com/colorbox/
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

yep, jquery all the way for this.
load up jquery, then my personal fav would be fancybox (but colorbox is probably much the same). just have a hidden div with the content you want to show, and get fancybox to open it in a lightbox when you click a link or something.
alternatively if you want to keep your page code light you coulf have the bio on a different page, and pull it in dynamically with fancybox. that way they only load it if they want to view it.
jqueryui dialog controls may also be worh a look.
Post Reply