GuildPortal will be going offline (permanently) by the end of the month.
Sign Up! Login: Password: New User? Forgot? Support
Forums : Multimedia > Image Gallery popup
Mottie (SuperAdmin) 10/12/2008 4:50 AM EST : Image Gallery popup
Posts: 3884



Image Gallery Popups

GuildPortal admin site link to original post

This short script makes the links in your "Image Gallery" (Static List & Scrolling Gallery) open the image in a pop up window (facebox) instead of on a new page. It will also make the "Open Full Gallery" link open a popup window. Add it to your header, footer or anywhere on the page to make it work.

If you want to change the style of the facebox pop up, including the "close" image, read this post.

Also, check out this post on how to modify some things in the image gallery (like adding a previous and next image button)

The Code

<script type="text/javascript">
$(document).ready(function() {
 // Image Gallery: Static List
 // Image Gallery: Scrolling Gallery
 $("img[title*='- Click to advance to the next image.']").each(function(){
  $(this).attr("title",$(this).attr("title").replace(" - Click to advance to the next image.","")).parent().attr("target","").facebox();
Edited (1/14/2009): Updated the code, to reflect changes made to the image gallery: modified the scrolling gallery script and removed the open full gallery in a popup window, since it does this by default now. I also added a link to a post on modifying the image gallery.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems

New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
Who's Online 
There are   members online.
So-and-so has logged on!