forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: oldschoolandrew on May 23, 2007, 04:25:59 pm

Title: Adding text to the "upload file" dialog?
Post by: oldschoolandrew on May 23, 2007, 04:25:59 pm
Is it possible to add text to the dialog box that is shown when users click the "upload file" link? 

Currently I create an "anycontent" file that showed the file size limits for uploads, but I think it would make more sense to display the information on the when the users are about to upload the files (plus the main page would look better without the "anycontent" file). 
I've searched this board and haven't found anyone posting this kind of question. 

Thanks,
Andrew
Title: Re: Adding text to the "upload file" dialog?
Post by: oldschoolandrew on May 23, 2007, 04:30:09 pm
I thought I could spell better than that....guess not 

If you're having trouble reading that jibberish, I want to display file size limitations with the other text that is shown in the file upload section. 

I've looked through the "upload.php" file and (to me at least) it didn't look like anything there would help me out with this.

Title: Re: Adding text to the "upload file" dialog?
Post by: Joachim Müller on May 23, 2007, 06:42:42 pm
File size limitations are being displayed, see screenshot
Title: Re: Adding text to the "upload file" dialog?
Post by: oldschoolandrew on May 23, 2007, 10:07:04 pm
Thanks for the reply, and this is true except it doesn't display the max height or width (pixels) that images can be or give users any idea what they can use (i.e. GIMP) to reduce the size of their images.

Since you didn't say anything about it in your last reply, is this not possible?

Thanks!
Andrew
Title: Re: Adding text to the "upload file" dialog?
Post by: Joachim Müller on May 24, 2007, 08:08:36 am
To edit that piece of information, edit upload.php, find
Code: [Select]
sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),and edit as you see fit.
Title: Re: Adding text to the "upload file" dialog?
Post by: oldschoolandrew on June 04, 2007, 05:52:45 am
Could you give me any kind of tip as to how I can add text to that code?  I can create very basic php code, but nothing I've tried has even come close to working? 

Thanks!
Title: Re: Adding text to the "upload file" dialog?
Post by: Sami on June 04, 2007, 07:34:34 am
on your language file (i.e. {gallery-root}/lang/english.php) look for
Code: [Select]
'max_fsize' => 'Maximum allowed file size is %s KB',and change it to this
Code: [Select]
'max_fsize' => 'Maximum allowed file size is %s KB and maximum allowed file height/width is %s px',
Now you should add the max value to upload.php
look for
Code: [Select]
sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),and change it to this
Code: [Select]
sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size'], $CONFIG['max_upl_width_height']),
You can add simple string (i.e. '1024') instead of $CONFIG['max_upl_width_height']
Title: Re: Adding text to the "upload file" dialog?
Post by: oldschoolandrew on June 04, 2007, 07:40:43 am
Thanks so much!