Results 1 to 5 of 5

Thread: Cmotion gallery

  1. #1
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cmotion gallery query

    Hi there,

    I'm using Cmotion gallery :

    http://www.dynamicdrive.com/dynamic...tiongallery.htm

    for a large scale gallery of around 700 images (though they are split into several subgalleries to save scrolling!)

    My hands are getting rather tired with repeatedly going through the code changing each link to the correct filename (they all increment sequentially btw - eg m1000, m1001, m1002...

    So anyway, it got to the stage where I was gnawing my own head off from boredom and no doubt causing typos too, when I thought 'i know' I'll ask someone clever for a shortcut!

    So does anyone know a way I can change the cmotion gallery script so that it simply displays all the thumbnails within a particular directory or so that it just sequentially adds thumbnails until it doesn't find a matching file?

    Go on, make my day. I know you're all geniuses waiting to impress everyone.... remember my poor head... I've already chewed my ears off, I hope my nose makes it....

    Many Thanks for any suggestions and many many many thanks if you're clever enough to think of a solution!
    Last edited by alphabeta77; 10-10-2005 at 08:55 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm if I have time I'll take a crack at this. So what's the name of the directory containing the images relative to where the script page is, and what are the file names exactly (ie: m0001, m0002 etc)?

  3. #3
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi ddadmin!

    the directory is /thumbnails/ from the root directory (where the scripts are)

    The filenames are m1001.jpg, m1002.jpg, m1003.jpg etc...

    Any help you can provide would be brilliant!

  4. #4
    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 was just playing around with this and found that:

    Code:
    <script type="text/javascript">
    for (var i_tem = 1; i_tem < 10; i_tem++)
    document.write('<img src="../thumb2/photo'+i_tem+'.jpg">')
    </script>
    Slipped in between the opening and closing <nobr id="trueContainer"></nobr> tags worked well. You would need to modify it for your purposes, something like:

    Code:
    <nobr id="trueContainer"><script type="text/javascript">
    for (var i_tem = 1; i_tem <= 100; i_tem++)
    document.write('<img src="/thumbnails/m'+(1000+i_tem)+'.jpg">')
    </script></nobr>
    That is for 1001 through 1100 of them.
    - John
    ________________________

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

  5. #5
    Join Date
    Oct 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey thanks a lot!

    I'm gonna give this a go once I've got a second - it sounds like it'll work a treat!

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
  •