Calgarypuck Forums - The Unofficial Calgary Flames Fan Community

Go Back   Calgarypuck Forums - The Unofficial Calgary Flames Fan Community > Main Forums > The Off Topic Forum > Tech Talk
Register Forum Rules FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 09-14-2011, 02:12 PM   #1
Rathji
Franchise Player
 
Rathji's Avatar
 
Join Date: Nov 2006
Location: Supporting Urban Sprawl
Exp:
Default Images on websites - Blacked out background?

I know there are some much smarter web design people here than me so I thought I would toss this out.

I am trying to make a picture so when you click the link/thumbnail it opens in almost a popup type interface with the website in the background kind of blacked out. Seems like it would be a php or js solution, but for the life of me I cant even figure out what to search for to find details.

Can anyone point me in the right direction?
__________________
"Wake up, Luigi! The only time plumbers sleep on the job is when we're working by the hour."
Rathji is offline   Reply With Quote
Old 09-14-2011, 02:20 PM   #2
Regular_John
First Line Centre
 
Regular_John's Avatar
 
Join Date: Feb 2010
Location: Calgary
Exp:
Default

Hey Rathji,

What your describing is a 'lightbox' solution. Much like this:
http://www.lokeshdhakar.com/projects/lightbox2/

It typically runs on JS and doesn't need PHP to run, but obviously can be used in conjunction with PHP/ASP if you need. But that's more for dynamic websites.

There's been quite a few 'lightbox' type plugins created for many different javascript libraries (jQuery/Prototype/MooTools) such as these:
http://www.designyourway.net/blog/re...htbox-plugins/

Personally I recommend finding one that runs on jQuery over prototype, I quite like http://fancybox.net/ (although there site seems to be down right now).

Setting them up is ussually pretty easy, you include the JS & CSS files in the header, activate the script & attach a custom class or rel to the links you want to trigger the lightbox with.

tl;dr: Use This: http://www.lokeshdhakar.com/projects/lightbox2/
Regular_John is offline   Reply With Quote
The Following User Says Thank You to Regular_John For This Useful Post:
Old 09-14-2011, 02:28 PM   #3
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Quote:
Originally Posted by Rathji View Post
I know there are some much smarter web design people here than me so I thought I would toss this out.

I am trying to make a picture so when you click the link/thumbnail it opens in almost a popup type interface with the website in the background kind of blacked out. Seems like it would be a php or js solution, but for the life of me I cant even figure out what to search for to find details.

Can anyone point me in the right direction?
Similar to clicking an image in Google Image search? There are js frameworks out there that will do most of the heavy lifting for you. I've been using ExtJS (now Sencha) for a while now, and you can accomplish this by creating an Ext.Window that is set as modal, and populating it with your image.

If you want to do this yourself, the basics steps are:
1) Dynamically create a div tag that covers the browser client area, set to grey and transparent, and place it on top of everything. This is your mask.

2) Create another div tag containing the image on top of the mask, sized how you like.
psyang is offline   Reply With Quote
The Following User Says Thank You to psyang For This Useful Post:
Old 09-14-2011, 03:19 PM   #4
Rathji
Franchise Player
 
Rathji's Avatar
 
Join Date: Nov 2006
Location: Supporting Urban Sprawl
Exp:
Default

Quote:
Originally Posted by jaydorn View Post
Hey Rathji,

What your describing is a 'lightbox' solution. Much like this:
http://www.lokeshdhakar.com/projects/lightbox2/

....


tl;dr: Use This: http://www.lokeshdhakar.com/projects/lightbox2/
Exactly what I needed, and simple to set up.

Thanks a ton.
__________________
"Wake up, Luigi! The only time plumbers sleep on the job is when we're working by the hour."
Rathji is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:32 AM.

Calgary Flames
2024-25




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021 | See Our Privacy Policy