Force image renaming to start at 1 and increment

See all posts See thread Reply

Re: Force image renaming to start at 1 and increment new!
by Jason, 17 years ago
OK... a bit of thinking and i've fixed the problem!

I defined a variable:
$count=1

then modified the handle:
$handle->file_new_name_body = 'image_'.$count++;

and made sure the following two handles were set:
$handle->file_overwrite = true;
$handle->file_auto_rename = false;

Hopefully this will help someone out there trying to do the same.

Thanks again for a fantastic class!Reply
Re: Force image renaming to start at 1 and increment new!
by colin, 17 years ago
Yes, that's the solution I would have suggested. Just force the name of the picture for each one of them.

Glad you like the class :)Reply