ZenphotoCMS Forum
Tags order - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Tags order (/thread-6194.html)



Tags order - olihar - 2009-11-26

I came by a strange thing, tags are displayed not always in the same order. Even using the same tags on images.

http://img.skitch.com/20091126-n7g7e1us7jwk82i71g77wdbjin.jpg

See here.

http://moment.is/galleri/




Tags order - sbillard - 2009-11-26

What functions are you using?




Tags order - olihar - 2009-11-26

Do you mean

`

`




Tags order - sbillard - 2009-11-26

Got it--a coding error in the printTags function. Will get a fix in the nightly.




Tags order - olihar - 2009-11-26

great, thanks. I will upgrade tomorrow and see how goes.




Tags order - olihar - 2009-11-26

I guess its worth noting as well if you use truncate on image titles.

`

`
and the title includes ... in the name it does not truncate, funny bug I have to say.




Tags order - acrylian - 2009-11-26

Not sure if a bug but that function does not truncate excatly anyway as it tries to take care of spaces between words, too. (if I remember correctly).




Tags order - olihar - 2009-11-26

Its just something I noticed, if the name of image is

123456789

and the code used would be

the results will be

12345...

However if the name of the image is

123456789...

then the results would be

123456789...

I don't really see it as that much of a bug, but like I said I did notice this as a user of mine used ... in the name of a file and for some reason it did not truncate.




Tags order - acrylian - 2009-11-26

Well, that looks actually like a little bug. I guess we will need to take a look at it...




Tags order - sbillard - 2009-11-27

Not sure what you are seeing. The code is as follows:

function truncate_string($string, $length, $elipsis='...') { if (strlen($string) > $length) { $pos = strpos($string, ' ', $length); if ($pos === FALSE) return substr($string, 0, $length) . $elipsis; return substr($string, 0, $pos) . $elipsis; } return $string; }
This will find the last space prior to the designated length and truncate there or it will chop at the lenght, so I do not see how the example you show could have occurred.