Results 1 to 5 of 5

Thread: PHP Photo Album script v2.11 & Fancybox

  1. #1
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Photo Album script v2.11 & Fancybox

    1) Script Title:
    PHP Photo Album script v2.11

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...photoalbum.htm

    3) Describe problem:
    Hello everybody,

    First of all let me tell you that I am more of a designer than a programer and DD has help me a lot with the websites I do. Thanks to all for posting the scripts. without you I will be lost

    Here is my dilemma:

    -I hope this question is not posted somewhere else. I looked and I could not find it. If it is, could you please post a link to it?-

    I am already using fancybox in some pages of a website I am building and I would like to keep the same look troughout the site. Is there anyway to use fancybox in the PHP Photo album instead of the built in lightbox viewer. I read the additional page for the onphotoclick event handler, but because I know almost nothing about php, javascript or JQuery I couldn't do much. I need to use it to show the same image in its original size. Could someone help me with directions?

    ohh here is my test page:
    http://sprocketproductions.com/wonde...s-gallery.html

    Thanks a lot!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Here's one way (addition/change highlighted):

    Code:
    <script type="text/javascript">
    
    new phpimagealbum({
    	albumvar: posters, //ID of photo album to display (based on getpics.php?id=xxx)
    	dimensions: [5,2],
    	sortby: ["date", "desc"], //["file" or "date", "asc" or "desc"]
    	autodesc: "", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
    	showsourceorder: false, //Show source order of each picture? (helpful during set up stage)
    	onphotoclick:function(thumbref, thumbindex, thumbfilename){
    		$.fancybox('<img src="' + thumbref.src + '" alt="">');
    	}
    })
    
    </script>
    Or possibly (for a title from the filename):

    Code:
    <script type="text/javascript">
    
    new phpimagealbum({
    	albumvar: posters, //ID of photo album to display (based on getpics.php?id=xxx)
    	dimensions: [5,2],
    	sortby: ["date", "desc"], //["file" or "date", "asc" or "desc"]
    	autodesc: "", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
    	showsourceorder: false, //Show source order of each picture? (helpful during set up stage)
    	onphotoclick:function(thumbref, thumbindex, thumbfilename){
    		$.fancybox('<img src="' + thumbref.src + '" alt="">', {title: thumbfilename});
    	}
    })
    
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks John!

    That was perfect... and quick too!

  4. #4
    Join Date
    Dec 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'm trying to make php photoalbum working with fancybox, there is a way to manage multiple images ??? I mean it is possible to have the next and prev button into the fancybox popup?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by elio.d View Post
    I'm trying to make php photoalbum working with fancybox, there is a way to manage multiple images ??? I mean it is possible to have the next and prev button into the fancybox popup?
    Please start a new thread for what is essentially a new question, or at least will have a different approach. Include a link to the demo pages of the versions of the scripts that you are using, as well as one to the page where you are attempting this.
    Last edited by jscheuer1; 12-07-2010 at 03:55 PM. Reason: caught something
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •