EnglishUTF-8 support would be greatly appreciated. This is stopping me from transitioning to Piwigo. All directories with my Pics are in UTF-8 format (Swedish Characters in my case), and I dont want to rename all directories.
Looking forward to the upcoming 2.4 release! :-)
Many Thanks for a great looking Picture Gallery!
Regards,
~Mike
in Piwigo 2.4, more characters can be easily allow so wait a little bit
For anyone still having this issue, I wrote a hack to fix it for my scenario. You have to put this into a file named rename.php in your galleries folder. Run it a few times to get all folder names.
<?php
function find_all_files($dir)
{
$root = scandir($dir);
foreach($root as $value)
{
if($value === '.' || $value === '..') {continue;}
$result[]="$dir/$value";
if(is_file("$dir/$value")) {continue;}
foreach(find_all_files("$dir/$value") as $value)
{
$result[]=$value;
}
}
return $result;
}
$dir = '.';
$files1 = find_all_files($dir);
foreach($files1 as $filename)
{
rename($filename, str_replace(" ", "_", $filename));
}
print_r($files1);
?>
I know this thread is as old as methusalem itself, but any chances you're going to implement the below described changes (or any similar ones) in the future?
Yeah, that's it. I actually tried to do that (replaced all 6 or so occurences of that regexp with the conf. variable) and it works fine.
With /u modifier, it could at least partially solve the problem with accented characters (i.e. one would have to write all accented characters into that regexp, but still better than nothing).
I hope somebody could incorporate this change into the SVN (or whatever are you using), it's quite trivial. I guess it's not really good design practice to have such things not defined as constants (or variables) but written in-place.
Anyway, thanks for help.
If the only thing you really need is to enable space characters, the best solution (easy for us and safe for you) is that we implement a configuration variable with the regular expression for authorized characters. We keep the current one by default, ie:
$conf['authorized_characters_in_files'] = '/^[a-zA-Z0-9-_.]+$/';
Then you can overload it with the config_local.inc.php mecanism (edit the configuration with plugin LocalFiles Editor):
$conf['authorized_characters_in_files'] = '/^[a-zA-Z0-9-_. ]+$/';
(I've just added the blank space)
Would that suit you?
This is very near what Eric B proposes in [Bugtracker] bug 414
Hello plg, thanks for answer.
I read the suggested links but I still don't know which one of these possibilities is correct:
1) its mainly convention and can be changed (possibly as an configuration option) if somebody finds enough time to do it
2) there are some serious problems with it and we don't want to implement it
I think that space character is rather non-problematic and could go with 1)
It may seem to be a big fuss but I really want to have 1:1 relationship between web and local archive and I'm not willing to (partly not able to) change my local directory structure (this is strictly "space" problem as I don't use accented characters).
Thanks.
Hello eddie,
Piwigo is a perfect solution for managing such a big collection of photo :-)
Here comes discussions about the "forbidden characters" subject:
* post:107782
* topic:13423
* [Bugtracker] bug 414
No change has been made to the very old rule "only non accented characters and no space". Now with pLoader (and the API method pwg.images.add), you can add photos with very complex names, because the filename is automatically changed to something "clean" and simple (for a filesystem, not for a human) and the original filename is used to set the photo caption.
Hi,
I want to make my photo archive (40K photos) online using Piwigo. To ease the maintanence, I'd like to keep the old directory structure.
The problem is that I'm used to name my directories with space in file name which Piwigo from some reason does not want to accept.
And I don't know why. The same goes for accented characters - if filesystem and web browser is ready, why can't I use them?
Yes, I can hack the sources to let it do what I want but I don't wanna do that - I don't want to hack it again and again after every upgrade.
So, the question is: why?