View Full Version : Cmotion gallery

10-09-2005, 12:53 PM
Hi there,

I'm using Cmotion gallery :


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!

10-10-2005, 10:40 PM
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)?

10-11-2005, 05:19 AM
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!

10-11-2005, 07:40 AM
I was just playing around with this and found that:

<script type="text/javascript">
for (var i_tem = 1; i_tem < 10; i_tem++)
document.write('<img src="../thumb2/photo'+i_tem+'.jpg">')

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:

<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">')

That is for 1001 through 1100 of them.

10-12-2005, 08:31 AM
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!