1
builderb
categories and subcategories
  • 2004/5/13 2:51

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


Anyone know how to organize the categories and sub categories in a drop down menu in alphabetical order?

it looks like it organizes the parent categories in alphabetical order but the sub categories are not.

Any help would be appreciated.

-builderb

2
Venezia
Re: categories and subcategories
  • 2004/5/13 3:30

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


It looks like the culprit is in the file XoopsTree.php. Take a look at the function makeMySelBox(). It uses the $order parameter to query the database for the root items but doesn't pass on the $order param to the getChildTreeArray() function.

So to fix it change the line ~170

from:

$arr = $this->getChildTreeArray($catid);

to:

$arr = $this->getChildTreeArray($catid, $order);

and it works nicely.

I'll also post this in the Bug Report forum.

Venezia

3
builderb
Re: categories and subcategories
  • 2004/5/13 4:22

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


Nicely done! I've been looking at that file like a deer in the headlights since Monday trying to figure out what was missing.

I should've posted this question sooner.

Thanks Venezia

-Builderb

4
Venezia
Re: categories and subcategories
  • 2004/5/13 4:39

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Nice to know there are other hapless deers out there besides myself :)

Login

Who's Online

305 user(s) are online (186 user(s) are browsing Support Forums)


Members: 0


Guests: 305


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits