Title from original filename (upper- & lowercase

Phoca Gallery - image gallery extension
wemo
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Feb 2021, 08:48

Title from original filename (upper- & lowercase

Post by wemo »

Hi there,
if i upload the files via multiple upload, all filenames are lowercase.

The title of the picture should by the original filename with upper- und lowercases.
Maybe also with special characters translated to html.

Please help.
Yours,
Werner
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title from original filename (upper- & lowercase

Post by Jan »

Hi, there was a specific protection in past but the lower rule is not more needed.

Try to change this file:
administrator\components\com_phocagallery\libraries\phocagallery\file\fileupload.php

line cca 263

FROM:

Code: Select all

//$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.strtolower($file['name']));
TO:

Code: Select all

//$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.strtolower($file['name']));
$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.$file['name']);
And let me know if it works for you. I will add it to next version.

Jan
If you find Phoca extensions useful, please support the project
wemo
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Feb 2021, 08:48

Re: Title from original filename (upper- & lowercase

Post by wemo »

And when i use the multiple upload tool?
And what can i do with the special characters like ä, ö, ü, ß?
I need it in the title!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title from original filename (upper- & lowercase

Post by Jan »

Hi, does not work for you in Multiple Upload?

Diacritic characters are not supported in filenames, this is assigned to possible problems on servers, see:

https://www.phoca.cz/documents/2-phoca- ... ing-images

Mostly the best way is to avoid using such characters in filenames, example:

Deutsche Übersetzung.jpg => deutsche-uebersetzung.jpg
März.jpg => maerz.jpg
Straße.jpg => strasse.jpg

etc.

Jan
If you find Phoca extensions useful, please support the project
wemo
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 02 Feb 2021, 08:48

Re: Title from original filename (upper- & lowercase

Post by wemo »

I know that servers cannot handle diacritic characters, but is there a way, that the gallery converts e.g. "ö" automatically to "oe"?

Werner
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title from original filename (upper- & lowercase

Post by Jan »

Hi, there is no such option, the problem is, the files can be uploaded to phocagallery image folder many way: per Phoca Gallery but even per FTP or another extension, etc. So even there will be such function, it will be not 100% :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply