Album keyword matches on substring produces unwanted results Album keyword matches on substring produces unwanted results
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Album keyword matches on substring produces unwanted results

Started by Old RMN, February 11, 2010, 02:17:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Old RMN

-Note: the following coppermine feature has been discussed before in

Topic: Album keyword matches on substring - Intended behavior?
http://forum.coppermine-gallery.net/index.php/topic,49360.0.html

but it still produces unwanted results that I do not consider as being solved.-


Hello,
in my gallery

http://www.primethai.com

some keywords are 100% substrings of other keywords ( I had for example 'park' and 'national_park').
Using these as album keywords produces unwanted results:
all the pictures featuring the keyword with the longer string will be listed as linked files in the album, too, that has the substring as album keyword.

In my example, all the 'national_park' (s) ended up in the album with the keyword 'park' , too.

In the forum comment from adipisicing in the topic mentioned above an album with the Album Keyword "glass" will display images with the keyword "philipglass".

Another example: all 'cartoon' and 'carnival' pictures will end up in an album with the keyword 'car'.

Is there any way to set Coppermine up so that the album keyword matches only the exact string in the keyword list of the pictures?

I am using 1.4.26 with Stramm's modpack and the 'Indexed and organized keyword list on search page' hack.
(http://forum.coppermine-gallery.net/index.php/topic,30900.msg143004.html#msg143004)

Thanks in advancy for any good advice.

( New thread created on Nibbler's hint in
http://forum.coppermine-gallery.net/index.php/topic,63644.msg316341.html#msg316341 )
Sometimes to find the way home one has to leave it.

Joachim Müller

Quote from: Old RMN on February 11, 2010, 02:17:08 AM
but it still produces unwanted results that I do not consider as being solved.-
Nobody said so. The thread you refered to was for cpg1.4.x, and you're running cpg1.4.x, so it applies and hasn't been changed. I said in that thread that it might get changed for cpg1.5.x. Don't expect changes for cpg1.4.x.

blueberg

Hello Old RMN,

I don't have the album keyword code fix for you, but I did come up with a possible workaround for it. I am a nature photographer and I don't want people who go to the "man" album to also get pictures of "manatees", "manta rays" and "mangos" etc ...

Instead of making the album keyword a real word, you could make it a nonsensical string of letters that would never be part of any other string. The problem now, as I understand it, is that you have a word like "car" as an album keyword. But when someone goes into your "car" album ... they are also getting all you images of "carnivals" and anything else that has the c-a-r string as part of the keyword.

What if instead of the album key being "car", it was "cccrr" instead. You would then add "cccrr" to the keyword list of any image that you wanted to show up in the car album. This "cccrr" string would never appear naturally in any word, so it would never return any inappropriate results. It would only return images where you have added "cccrr" to the keywords.

I know it isn't the perfect solution. But as a workaround, I think it will work.

Good Luck

Old RMN

Hello blueberg,

thank you for the suggestion.
It would work as you described and circumvent the problem I am currently experiencing.
What gets messed up then, though, is the breadcrumb navigation.
Maybe album names that use a real world designation as prefix followed by a fourstring number as suffix. Might make things complicated to manage, but the user could still read the real world name in the breadcrumb line.
man_0001
mantaray_0002
manatee_0003
...
Greetings
Sometimes to find the way home one has to leave it.

blueberg

Good idea :-)

I wasn't aware that the album keyword showed up in the breadcrumbs. Your method gets around that :-)

Cheers