Enable special char and disable "_" replacement in filenames Enable special char and disable "_" replacement in filenames
 

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

Enable special char and disable "_" replacement in filenames

Started by RubySN4, August 16, 2012, 02:49:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RubySN4

Hello,

I've had a problem with filenames since I've upgraded to cpg 1.5, and I would really like to get it fix if possible. I have files named this way: Vancouver Food Truck Festival (Vancouver) - 29 July 2012.jpg and it used to be fine with cpg 1.4 but now if I upload a file with a similar name it transforms it to: Vancouver20Food20Truck20Festival2028Vancouver2920-202920July202012.jpg. Is there a way to allow these "(), ' ' " back in the filenames?

FYI: these are the characters that aren't allowed in my settings: $/\\:*?"'<>|`&#@

I know that this question has been asked several times but I couldn't find a solution this time.

Thanks in advance for the help you can provide.

Stephanie

ΑndrĂ©

Open include/functions.inc.php, find
    $condition = array (
        'transliteration' => true,
        'special_chars' => true
    );

and replace with
    $condition = array (
        'transliteration' => true,
        'special_chars' => false
    );


Mind, that it only affects newly uploaded files. If it works as expected you can use the plugin hook replace_forbidden_conditions to adjust the above array, so you don't need to apply that change after each Coppermine update.