My filenames have parens, commas, and underlines in them. After uploading files, the filename => Title option under Admin Tools gratiously copies the filename to the Title; however, it replaces ( with "28", ) with "29", and comma with "2C" (and underline to space). I presume that is the hex ascii code.
Is it possible to modify the code allow parens and commas to pass through without change?
Please re-check your file names after you've added them to your Coppermine gallery. Some time ago we decided to replace almost all non-alphanumerical characters in file names, for compatibility reasons:
$condition = array (
'transliteration' => true,
'special_chars' => true
);
$condition = CPGPluginAPI::filter('replace_forbidden_conditions', $condition);
/**
* Transliteration
*/
if ($condition['transliteration']) {
require_once('include/transliteration.inc.php');
$return = transliteration_process($return, '_');
}
/**
* Replace special chars
*/
if ($condition['special_chars']) {
$return = str_replace('%', '', rawurlencode($return));
}
That's maybe too much for some people in some cases, so we added a plugin hook to disable either one or both methods.
I assume the "filename => title" feature works as expected, as the characters have already replaced in your file names. You maybe want to set $condition['special_chars'] to false for future file uploads.
Thank you, ΑndrĂ©! :)
Until I understand the code better I have disabled 'special_chars' as you suggested and no conversion is done.
Yes, "filename => title" is working as advertised.