Problems removing fields at upload (yes I removed them from upload.php) Problems removing fields at upload (yes I removed them from upload.php)
 

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

Main Menu

Problems removing fields at upload (yes I removed them from upload.php)

Started by turtle_in_time, January 23, 2009, 01:44:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

turtle_in_time

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

MrTheme

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

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


Around Line 525:
    // 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:
/**
*    // 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__);
*    }
*/

MrTheme

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
            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.


Joachim Müller

Quote from: MrTheme on January 23, 2009, 03:41:32 PM
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.