Results 1 to 8 of 8

Thread: help with Image Thumbnail Viewer II

  1. #1
    Join Date
    Dec 2005
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help with Image Thumbnail Viewer II

    i really like this script (Image Thumbnail Viewer II), but i would like to modify it, and i am having some major dificulties in doing so. i like how it displays the image in the same page, but i want it to have more than three images to select from, and i know if i add more than three, it will obviously display all or them to choose from. what i want it to do is, have it only display three pics at one time, and for the rest of the imgages, i want it to give you a next and previous button when appropriate to display the other ones, only three at a time. when it gets through the list of the images, the next button should disappear, and only have the previous button still visable. same goes for when you are at the beginning. to see an example of what i mean visit http://www.methodcomptech.com/samplework.html. right now i have it displaying 2 images across and three down, but i only want 3 across and 0 down wich i can achieve with my current script, but i cant get it to not display in a popup since i did not write the script and i am not that great with javascript to begin with. so if you could help me, that would be great, and of course if i use it, i will keep your name on the script.

    just a note, it is not the Image Thumbnail viewer script on my site currently, and it will not be for my site. I will be using it on a client's site. i am however using it on a test site i am building http://www.methodcomptech.com/images/dad under the b & w link, and it would actually be a big help to use something like what i am describing for that site too, but it would need to have a way for me to tell it how many images to display across and how many down, like it is donw in the site right now. thanks in advance for any help.

  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

    I really didn't like that image thumbnail II script too well, the fade in effect wasn't cross browser. So, a little while back I wrote my own version based on the new Ultimate Fade In Slideshow. I've combined that script with a modified version of PHP Photo Album script. And added a little intuitive communication between the two. It still isn't exactly what you say you want but, I'm tired of messing with it for just now and I like the way the pages are treated better. You said you wanted buttons to disappear when they were not applicable. Here I've made them so they cycle back to the beginning or end once they have reached the limit in the direction they were going. Here's a link to a demo. The server is a tad slow but the once the images load, there should be no problem getting the idea. Also, in an effort to save time, I've committed a big no, no. I've let the browser resize the images to create the thumbnails. In actual practice, an individual set of thumbnails should be made.
    - John
    ________________________

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

  3. #3
    Join Date
    Dec 2005
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it is almost exactly what i am looking for. i will see if i can modify it the rest of the way now that you have a pase for it. i will give full credit where deserved of course. i would also like to put a link under my affiliates section to your site so that people my have the great pleasure of having you help them too. if you would like me to do so, let me know and you can reach me on MSN @ Prophecy_Internet@hotmail.com or email me at jstgermain@methodcomptech.com thanks for your help. can you send a zip file of the script to me?

  4. #4
    Join Date
    Dec 2005
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    john, also, is there a way to have it display the image once clicked, instead of onmouseover? i couldnt find it in the code. i want to change it to onclick, but maybe i am blind. i will look some more, but let me know if it is not in there, how i can change it. thanks again for your help.

    edit:
    ooops, never mind, i found it. all i had to do was a damn find and replace search. hehe. ok, but now i am having trouble with it not displaying the proper image once the next button is clicked. it will display the second image instead of the first. here is a link. http://www.methodcomptech.com/testgallery when you click the image, it displays perfectly, but when you just click next, it doesn't. please help
    Last edited by jstgermain; 12-28-2005 at 05:31 PM.

  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

    That has nothing to do with changing to onclick. I made a mistake when determining how to calculate which slide would begin each 'page' enlarged. Near the end of the last script change this:

    Code:
    switchFade(Math.ceil(galleryarray.length/totalslots*(p-1)), dynimages)
    to:

    Code:
    switchFade(startpoint, dynimages)
    - John
    ________________________

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

  6. #6
    Join Date
    Dec 2005
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    you are an ace man. thanks. i would have never figured that part out. now the script is 99% perfect. the only thing i would prefer is to have the previous and next buttons appear and dissappear when nessessary. if you can figure that part out, let me know. otherwise, i will use it how it is. thanks for your help.

  7. #7
    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

    Well, I only said I was tired of dealing with the script, not finished. I like the way I have the buttons handled and wanted you to at least have a look at it. It is the way I would do it. Here's a way to do it as I believe you were describing - at the end of the second (last large) script, where it says 'var k=1', add this function so that it now looks like so:

    Code:
    var k=1
    function controls(dir){
    k=k+dir
    jumptopage(k);
    document.getElementById('next').style.visibility=document.getElementById('back').style.visibility='visible'
    if (k>=Math.ceil(galleryarray.length/totalslots))
    document.getElementById('next').style.visibility="hidden";
    else if (k<=1)
    document.getElementById('back').style.visibility="hidden";
    }
    
    </script>
    And change the inputs' HTML to this:

    HTML Code:
    <input id="next" type="button" onclick="controls(1)" value="Next">&nbsp;&nbsp;<span id="pageNum">Page 1</span>&nbsp;
    <input id="back" style="visibility:hidden;" type="button" onclick="controls(-1)" value="Previous">
    That's it!
    - John
    ________________________

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

  8. #8
    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

    Also, I would sooner opt for disabling the undesirable button than hiding it:

    Code:
    var k=1
    function controls(dir){
    k=k+dir
    jumptopage(k);
    document.getElementById('next').disabled=document.getElementById('back').disabled=0
    if (k>=Math.ceil(galleryarray.length/totalslots))
    document.getElementById('next').disabled=1;
    else if (k<=1)
    document.getElementById('back').disabled=1;
    }
    
    </script>
    and:

    HTML Code:
    <input id="next" type="button" onclick="controls(1)" value="Next">&nbsp;&nbsp;<span id="pageNum">Page 1</span>&nbsp;
    <input id="back" disabled type="button" onclick="controls(-1)" value="Previous">
    - 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
  •