Announcement

#1 2013-03-26 03:54:17

o purity o
Member
2013-03-26
2

Spaces in file names

Let me start by saying I have read 5+ topics that have a fix for this. I am asking for somebody to tell me HOW to accomplish this task. There are no, I repeat, no steps that anybody has talked about in any topic that I have read so far. I understand the file name issue is related to this "$conf['sync_chars_regex']". That's all I know, because that's all the info I was given. All I understand is that this is code. Where is it located? Who knows, nobody ever says where this is. I found what might be it inside a PHP file named i.php. Is that the right spot? If it is, then what? I'm obviously frustrated nobody has taken the top to give proper explanation on WHERE this code is. That's kind of imperative. I don't expect anybody to, but at the same time I can't wrap my head around how people can figure this out with just knowing "$conf['sync_chars_regex']". That's like telling somebody to find 'The' resteraunt, then giving them a map to find it. - No sense. I sound like I'm complaining -Yes. I've spent countless hours finding the right gallery software, and when I do, I have an issue with file names. Seriously? I don't want to use any other gallery software. Not Gallery or ZenPhoto. Can somebody shut me up and just tell me what to do? (as in, HOW to do it)

Last edited by o purity o (2013-03-27 21:27:59)

Offline

 

#2 2013-03-26 11:25:50

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Spaces in file names

Please next time seperate yoiur sentences, you post is absolutely unreadable

this config must be done in the file local/config/config.inc.php

the default value is

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/';

in you case it should be

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

(same but with a space at the end)

Offline

 

#3 2013-03-26 12:18:57

flop25
Piwigo Team
2006-07-06
7037

Re: Spaces in file names

Whereas your post is unreadable, unreasonable and not polite, I suggest you to read our documentation about local configuration


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2013-03-27 21:17:05

o purity o
Member
2013-03-26
2

Re: Spaces in file names

I apologize for my tone in my first post.

Thank you both so much. This did work for spaces.

Would it be possible to add, "!" and "@" as well as other symbols?

EDIT:

I tried other symbols and it worked. Thank you!! Besides the lack of themes (nobody's fault), this software is flawless ^_^

Last edited by o purity o (2013-03-27 21:34:51)

Offline

 

#5 2013-03-29 20:44:49

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: Spaces in file names

Would it be possible to add, "!" and "@" as well as other symbols?

Why? Keep the file names simple and short(ish). Avoid special characters as this can break things especially on the internet. As plenty of characters are already assigned uses.

If you need to add descriptions then add that via EXIF or IPTC data fields.

I have created file names that are unique but still have enough data in, so I can track information about the file. For example I have two letters to indicate event type or what I was photographing then the date then a 4 digit number eg MW_01-04-2013_0001.jpg, though I came up with the numbering style several years ago I wish I had reversed the date ie 2013-04-01_MW_0001.jpg

Offline

 

#6 2014-05-08 16:23:10

bpiwigo
Guest

Re: Spaces in file names

This is the best thread I've found on the subject.

The only thing missing was that the config file needs be in PHP format, and that the easiest way is to copy the sample file from the tools directory.

For example, from the Piwigo root,

Code:

cp tools/config.inc.php local/config

And then edit local/config/config.inc.php accordingly, perhaps removing the sample $conf lines.

 

#7 2014-05-08 18:10:12

flop25
Piwigo Team
2006-07-06
7037

Re: Spaces in file names


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2014-05-08 19:23:27

Bpiwigo
Guest

Re: Spaces in file names

Oh, cool, thanks, flop25.  From the name and description I had thought "LocalFiles Editor" was a generic text editor, not one specifically geared towards changing the Piwigo configuration.  Very nice, thank you.

On the subject, I think spaces in file names are now a way of life and that Piwigo should support them out of the box, as long as they don't break anything significant.  (I'm certainly used to seeing "%20" in lots of different downloaded files and URLs and it doesn't bother me.)  Just my opinion of course.  :)

 

#9 2014-07-10 09:55:12

MtnBiker
Guest

Re: Spaces in file names

mistic100 wrote:

Please next time seperate yoiur sentences, you post is absolutely unreadable

this config must be done in the file local/config/config.inc.php

the default value is

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/';

in you case it should be

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

(same but with a space at the end)

I'm new to Piwigo and am porting from Gallery 3.

I'm not clear on how to make this change to accept blanks in file names. Do you modify a file? Or is it in the one of the administration panels?

I don't see a config folder, so have things moved? Or?

Thanks. Hoping to give this a try, but want to just FTP sync with my existing files.

 

#10 2014-07-10 10:01:51

flop25
Piwigo Team
2006-07-06
7037

Re: Spaces in file names

take a minute to take a look at our Doc first please


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2014-07-10 10:20:34

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Spaces in file names

MtnBiker wrote:

I'm not clear on how to make this change to accept blanks in file names. Do you modify a file? Or is it in the one of the administration panels?

Activate plugin LocalFiles Editor, then open [Administration > Plugins > LocalFiles Editor > tab "local config"] and have :

Code:

<?php
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
?>

This is what I did when I implemented [extension by plg] Menalto2Piwigo

Offline

 

#12 2014-07-10 23:30:39

MtnBiker
Guest

Re: Spaces in file names

plg wrote:

This is what I did when I implemented extension Menalto2Piwigo

Thank you. Got it. Piwigo offers a handholding step I'm not used to.

And the extension Menalto2Piwigo creates this automatically?

I'm considering using FTP to my Menalto gallery, but does the extension do more than that?

Maybe I'll figure out the answer once I figure out how to add an extension (which I'll figure out moments after posting as usual, but for the moment don't see extensions in the admin panel.

 

#13 2014-07-10 23:47:29

MtnBiker
Member
2014-07-10
35

Re: Spaces in file names

OP here, but now registered.

I see that the extension does a bit more. Any chance it will be updated to Gallery 3? Probably won't help me as I don't need to copy over that much info, but with Menalto Gallery going away many will be looking at Piwigo.

flop25: I have looked at the Docs tab and Extensions doesn't appear. So I must be looking at the wrong docs or? I downloaded the extension and no ReadMe. OK, I figured it out. Extension=Plugin. Confusing.

I'm a newbie here, but maybe all references to Extensions should be changed to Plugins.

Last edited by MtnBiker (2014-07-11 00:50:35)

Offline

 

#14 2014-07-10 23:53:25

flop25
Piwigo Team
2006-07-06
7037

Re: Spaces in file names


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2014-08-15 15:47:28

SnotRocket
Member
2014-08-15
63

Re: Spaces in file names

It looks like Piwigo is about to hit a flood of G3 users...

So, I'm working on my own migration from G3 (about 400k images) and I've worked my way to the point of needing special characters. 

I need to add "  [  "  and "  ]  " to my regex and I think that I'm personally golden on starting my full migration.

I'm currently using:

$conf['sync_chars_regex'] = '/^[[:alpha:][:digit:]-_.\sÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ!\(\)\&\/\°\'\,]+$/';

No matter what I've tried, I can't get the [ and ] characters to work... and I have a LOT of files with that naming scheme.

Example: [./galleries/MyFamily/50-Art-experiments/[Group 1]-7S8C7447_7S8C7464-18 images.jpg] PWG-UPDATE-1 (wrong filename)

Can someone work my tired mind and do a full code line cut and paste with the additional characters thrown in, pretty please?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact