Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Adding text to the "upload file" dialog?  (Read 2982 times)

0 Members and 1 Guest are viewing this topic.

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Adding text to the "upload file" dialog?
« 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
« Last Edit: June 04, 2007, 08:45:42 am by Hein »
Logged

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Adding text to the "upload file" dialog?
« Reply #1 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.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding text to the "upload file" dialog?
« Reply #2 on: May 23, 2007, 06:42:42 pm »

File size limitations are being displayed, see screenshot
Logged

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Adding text to the "upload file" dialog?
« Reply #3 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding text to the "upload file" dialog?
« Reply #4 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.
Logged

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Adding text to the "upload file" dialog?
« Reply #5 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!
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Adding text to the "upload file" dialog?
« Reply #6 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']
Logged
‍I don't answer to PM with support question
Please post your issue to related board

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Adding text to the "upload file" dialog?
« Reply #7 on: June 04, 2007, 07:40:43 am »

Thanks so much!
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.