4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Kjeld on April 21, 2006, 06:59:57 PM

Title: [MOD-REQ] Automatically order keywords
Post by: Kjeld on April 21, 2006, 06:59:57 PM
Would it be possible to automatically order the keywords alphabetically?

This way the data will be correct even when the data entry person makes mistakes.

Either done globally on the whole database once every often by the administrator clicking a 'sort' link.
Or automatically done in the array that prints the keywords on the page.
Title: Re: [MOD-REQ] Automatically order keywords
Post by: mawenzi on April 21, 2006, 07:59:25 PM
... all keywords in alphabetically order ... here ... http://www.4homepages.de/forum/index.php?topic=3850.0
Title: Re: [MOD-REQ] Automatically order keywords
Post by: Kjeld on April 21, 2006, 08:19:15 PM
Thanks, mawenzi.

I actually have been using that mod for years.

But I am afraid that it is not what I meant with my question.

I want the keywords on details.html sorted.
Title: Re: [MOD-REQ] Automatically order keywords
Post by: V@no on April 21, 2006, 11:56:50 PM
in includes/functions.php find:
Code: [Select]
    $split_keywords = explode(" ", $image_row['image_keywords']);
insert below:
Code: [Select]
    sort($split_keywords);
Title: Re: [MOD-REQ] Automatically order keywords
Post by: Kjeld on April 22, 2006, 01:47:57 AM
V@no,

You are the king! Wonderful. It works like a charm. The result is beautiful.  :D

I knew there had to be an easy solution. I didn't imagine it was THIS easy.
Man, I really have to buy myself a good book about PHP and mySQL!

Thanks again, V@no.