Author Topic: [MOD-REQ] Automatically order keywords  (Read 6276 times)

0 Members and 1 Guest are viewing this topic.

Offline Kjeld

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • iKjeld.com
[MOD-REQ] Automatically order keywords
« 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.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD-REQ] Automatically order keywords
« Reply #1 on: April 21, 2006, 07:59:25 PM »
... all keywords in alphabetically order ... here ... http://www.4homepages.de/forum/index.php?topic=3850.0
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Kjeld

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • iKjeld.com
Re: [MOD-REQ] Automatically order keywords
« Reply #2 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.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD-REQ] Automatically order keywords
« Reply #3 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);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Kjeld

  • Newbie
  • *
  • Posts: 27
    • View Profile
    • iKjeld.com
Re: [MOD-REQ] Automatically order keywords
« Reply #4 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.