Adding text to the "upload file" dialog? Adding text to the "upload file" dialog?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Adding text to the "upload file" dialog?

Started by oldschoolandrew, May 23, 2007, 04:25:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oldschoolandrew

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

oldschoolandrew

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.


Joachim Müller

File size limitations are being displayed, see screenshot

oldschoolandrew

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

Joachim Müller

To edit that piece of information, edit upload.php, findsprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),and edit as you see fit.

oldschoolandrew

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!

Sami

on your language file (i.e. {gallery-root}/lang/english.php) look for
'max_fsize' => 'Maximum allowed file size is %s KB',
and change it to this
'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
sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),
and change it to this
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']
‍I don't answer to PM with support question
Please post your issue to related board

oldschoolandrew