Advanced search  

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

Pages: [1]   Go Down

Author Topic: Filename to file title problem using the admin tool  (Read 1823 times)

0 Members and 1 Guest are viewing this topic.

jake

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Filename to file title problem using the admin tool
« on: April 22, 2011, 01:43:58 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Filename to file title problem using the admin tool
« Reply #1 on: April 26, 2011, 03:31:48 pm »

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
Logged

jake

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Filename to file title problem using the admin tool
« Reply #2 on: April 29, 2011, 08:38:11 am »

Α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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Filename to file title problem using the admin tool
« Reply #3 on: April 29, 2011, 09:22:40 am »

To avoid core code modifications, you need to create a plugin. Then, in codebase.php you can do something like
Code: [Select]
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.