Author Topic: [REQ] Sort Subcategory by category ID  (Read 4627 times)

0 Members and 1 Guest are viewing this topic.

Offline hantu

  • Pre-Newbie
  • Posts: 3
    • View Profile
[REQ] Sort Subcategory by category ID
« on: November 03, 2005, 07:01:35 PM »
I was wondering how can i sort the subcategory by its ID (cat_id). As currently it was sort by (cat_order).

I have try this MOD ==> http://4homepages.de/forum/index.php?topic=5026.0 but does not solve my problem.

My install version 4images 1.7.1

Any one can help, thanks in advanced  :roll:

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: [REQ] Sort Subcategory by category ID
« Reply #1 on: November 04, 2005, 12:25:52 AM »
Not tested it
in includes/functions.php find:
Code: [Select]
    if (isset($subcat_ids[$category_id])) {Insert below:
Code: [Select]
      sort($subcat_ids[$category_id]);
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 hantu

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [REQ] Sort Subcategory by category ID
« Reply #2 on: November 04, 2005, 07:44:59 AM »
I'm sorry that I gave the wrong information, in fact I was wondering if I can sort the subcategory by descending order, latest added subcategory will appear on top first.

One again so sorry, tks.

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: [REQ] Sort Subcategory by category ID
« Reply #3 on: November 04, 2005, 02:35:48 PM »
If the code above worked, then use rsort instead of sort ;)
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 hantu

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [REQ] Sort Subcategory by category ID
« Reply #4 on: November 14, 2005, 03:52:31 AM »
too bad it does not work, anyway really appreaciated your help.