Filename to file title problem using the admin tool Filename to file title problem using the admin tool
 

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

Filename to file title problem using the admin tool

Started by jake, April 22, 2011, 01:43:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jake

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

Αndré

cpg1.5.x has a new feature, which replaces all 'illegal' characters in file names. Anyway, you can use the 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

jake

Α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

Αndré

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.