Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

renaming resised file by appending the size to the uploaded
https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=2814
Page 1 of 1

Author:  videovic [ 8. Dec 2010, 23:44 ]
Post subject:  renaming resised file by appending the size to the uploaded

I have a customer that uses numerous size files. Sometimes she needs to upload a large file and a thumbnail. the way it is now, the file is not renamed, so they have to be renamed manually to -300.png (size) or -210.png, or -thumb.png etc.

is there a way to append the resize number to the file on upload?

that way a user can upload the large size images, and then reset the upload size to the thumb size and reupload them, without the manual renaming?

thanks

Author:  TinyWebGallery [ 8. Dec 2010, 23:58 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

simply use a plugin - a rename plugin and a thumbnail plugin is already available on the plugins page.

- Michael

Author:  videovic [ 9. Dec 2010, 01:08 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

Thanks for your support Michael.

i installed the prefix plugin but i dont know the $xxx to grab the image upload size.

do you know it?

thanks

vic in toronto

Author:  TinyWebGallery [ 9. Dec 2010, 10:23 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

you have to read it with php...

- Michael

Author:  videovic [ 9. Dec 2010, 10:35 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

lol goof one. Actually I read it with a file editor, the browser reads it with php. But what i need is the value to use for the prefix plugin . Is the value that contains the dimension chosen in the drop down, to resize the image, available to use? what is the value name ? $something.

thanks

Author:  TinyWebGallery [ 9. Dec 2010, 10:46 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

With getimagesize you get the dimensions of the image. If you want the dropdown selection than you have to use $size (make it global in the plugin first).

- Michael

Author:  videovic [ 9. Dec 2010, 11:19 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

Thanks again Michael.

so in the a_prefix_plugin.php file i can use $prefix =$size.

is that the right syntax?

at any rate thanks for the advice

Author:  TinyWebGallery [ 9. Dec 2010, 11:37 ]
Post subject:  Re: renaming resised file by appending the size to the uploa

You have to decide how your naming is ;) ...

it'S only importatn to add
global $size;

otherwise this variable is not available...

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/