Tag names with spaces in them

cygnl7
cygnl7's picture

Joined: 2009-07-09
Posts: 5
Posted: Thu, 2009-07-09 01:35

Gallery3 supports tags with spaces in their names if they came from the image metadata (e.g., IPTC keywords). However, if you add tags manually you cannot include spaces in the name since space is considered a delimiter. This is different from gallery2, and is different from how other sites that allow tags work (although I must confess this last point I only offer from hearsay; I don't have much experience myself).

I believe spaces should be allowed in tag names when entering them manually, even if only to make it work the same way as the IPTC keyword -> tag import. But I also happen to believe this is an important feature in and of itself. Unfortunately it seems there are no plans to support this as is evidenced by the issue at http://sourceforge.net/apps/trac/gallery/ticket/523 .

Am I the only one who wants to have tag names with spaces in them? Go ahead, I can take it. The cheese stands alone... ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-09 03:25

You are not alone in wanting multi word tags!
See if adding quotes (") like:

Quote:
"tag1 tag2"

not tested recently but it might work in Beta2:
http://sourceforge.net/apps/trac/gallery/ticket/193

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
cygnl7
cygnl7's picture

Joined: 2009-07-09
Posts: 5
Posted: Thu, 2009-07-09 03:35

Thanks for your reply.

I cloned from git yesterday and tried it but it still splits on ',', ' ', and ';'. So I end up with two tags:
- "tag1
- tag2"

For now I just took the splitting on ' ' out of my instance and use ',' or ';' to separate.

I really don't care if it's that way or if it's the double-quote way (although the double-quote way seems like more work both on the code side (but not much) and on the user's side to me), as long as I can do multi-word tags.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-09 04:09

This debate has gone on for a few years now:
http://www.37signals.com/svn/archives2/tag_formats_cant_we_all_just_get_along.php

From what I can see reading that is the consensus should be quotes around phrases or multi word tags.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
cygnl7
cygnl7's picture

Joined: 2009-07-09
Posts: 5
Posted: Thu, 2009-07-09 04:44

That would be great. The only problem is the issue I logged was closed. Hopefully it gets picked up somewhere. Maybe there's already another that covers it.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-09 13:42

This ticket: http://sourceforge.net/apps/trac/gallery/ticket/193
is closed as well, but is says a milestone of Beta2 so lets hope.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kylehase
kylehase's picture

Joined: 2005-09-15
Posts: 38
Posted: Thu, 2009-08-06 06:10

Beta2 still treats tags with a space as two separate tags even if enclosed in quotes. It should treat quoted strings as one tag.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-08-06 13:01

kylehase,
please upgrade as the behavior has chanaged since beta2:
upgrade to the latest code

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kylehase
kylehase's picture

Joined: 2005-09-15
Posts: 38
Posted: Fri, 2009-08-07 02:22

Floridave,
Just checked out the latest code.

foreach (split(",", $form->add_tag->inputs["name"]->value) as $tag_name)

Looks like tags can only be delimited by comma now. I still would rather have space delimiting with the option to enclose multiple word tags with quotes.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-08-07 03:15
Quote:
Looks like tags can only be delimited by comma now

yes you are right.

Quote:
I still would rather have space delimiting with the option to enclose multiple word tags with quotes.

It was a fight to get multi word tags. Just a big a fight to have multiword tags imported form G2 to be multi word tags in G3.

Please feel free to file a feature request but unless you or you find somebody to code the behavior, it will just get moved to 'field of dreams'. I would like to behavior as well, but....I am just lucky/happy that multi work tags work.

I think the issue is that the G2->G3 tags import had comma and semi colon separators with spaces for multi work tags. Having this import properly and having a UI to add new tags was very complex and there is far bigger issues to resolve at this time.

Feel free to fork G3 in GIT and create/copy the tags module with the G2 import module to behave the way you would like.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team