Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Problems removing fields at upload (yes I removed them from upload.php)  (Read 2230 times)

0 Members and 1 Guest are viewing this topic.

turtle_in_time

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Hello,

I want to remove the fields, title and file description at upload. I tried to remove these fields in upload.php and they disappear, but when I then click "Next", I get the error message "Paramter missing". Is there something else that I have to delete in order to continue without these fields?

Any help appreciated...
johan
Logged

MrTheme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problems removing fields at upload (yes I removed them from upload.php)
« Reply #1 on: January 23, 2009, 03:35:10 pm »

You would also need to open db_input.php and comment out the following sections

Around Line 487:
Code: [Select]
    $title = $superCage->post->getEscaped('title');
    $caption = $superCage->post->getEscaped('caption');

Around Line 525:
Code: [Select]
    // Test if the filename of the temporary uploaded picture is empty
    if ($superCage->files->getRaw("/userpicture/tmp_name") == '') {
        cpg_die(ERROR, $lang_db_input_php['no_pic_uploaded'], __FILE__, __LINE__);
    }

Remember in php escapes are as follows:
Code: [Select]
/**
*    // Test if the filename of the temporary uploaded picture is empty
*    if ($superCage->files->getRaw("/userpicture/tmp_name") == '') {
*        cpg_die(ERROR, $lang_db_input_php['no_pic_uploaded'], __FILE__, __LINE__);
*    }
*/
Logged

MrTheme

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problems removing fields at upload (yes I removed them from upload.php)
« Reply #2 on: January 23, 2009, 03:41:32 pm »

I apologize - that is incorrect - it would seem that it isn't necessary to edit that file at all - to remove those two field all I had to do was comment out the following lines in upload.php

Around Line 672
Code: [Select]
            array($lang_upload_php['pic_title'], 'title', 0, 255, 1),
            array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length']),

I was able to use the uploader without any problems after doing this.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problems removing fields at upload (yes I removed them from upload.php)
« Reply #3 on: January 28, 2009, 09:32:08 am »

I apologize - that is incorrect
Your instructions apply for cpg1.5.x, but not for cpg1.4.x, which is the version that currently goes supported. Some things have changed dramatically from cpg1.4.x to cpg1.5.x. We appreciate your readiness to help, but please be carefull not to confuse the two versions.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 21 queries.