Hello,
I have recently upgraded to CPG 1.5.12 and am having an issue changing my filenames to file titles using the admin tool. This was not an issue for me under CPG1.4.xx. As I have been adding new photos the admin tool changes the comma (,) in my filenames to "2C" in the file title, forcing me to manually change each file name. Is there anyway I can fix this issue?
Admin tools
Filename - File title
How should the file title be modified (2):
Remove extension (.jpg or other) and replace _ (underscores) with spaces
Thanks for your time
- Jake
cpg1.5.x has a new feature, which replaces all 'illegal' characters in file names. Anyway, you can use the replace_forbidden_conditions (http://documentation.coppermine-gallery.net/en/dev_plugin_hooks.htm#plugin_hooks_replace_forbidden_conditions) plugin hook to avoid that function.
There has been a (German) discussion about that file renaming function: http://forum.coppermine-gallery.net/index.php/topic,67987.0.html
Αndré, thank you for the reply.
Unfortunately I do not read German, and do not understand the "replace_forbidden_conditions" code changes required in the include/functions.inc.php file to fix my issue.
Again, thanks for your time.
- Jake
To avoid core code modifications, you need to create a plugin. Then, in codebase.php you can do something like
function plugin_code($condition) {
$condition['transliteration'] = false;
$condition['special_chars'] = false;
return $condition;
}
to remove the new features completely. It's not recommended to disable the new features, so use it at your own risk.