Sorting Order of Categories

Does anyone have any idea how to Sort the Categories alphabetically. I've added a few categories & they are completely out of order in the settings & categories block.


Quote · 2 Feb 2012

Try this:
Quote · 4 Feb 2012

That mod changes the order of categories in the drop down list when creating a listing, but doesn't effect the order of categories on the category page blocks for the various boonex modules.

I need a way to sort the categories when displayed on the Page Blocks.

Quote · 5 Feb 2012

I think each category list is set within different module settings.

I know that for example, where you change the list order for boonex modules, is different to where you set the order for modules from some other developers!


Quote · 5 Feb 2012

There doesn't seems to be the possibility at all to set the category order even within the Module settings which is very frustrating.

Is there someone that have found a way?

7.1 My favorite number
Quote · 9 Aug 2012

That's my biggest complaint with this system. NO logical sorting.

I have spent COUNTLESS hours modifying database calls to include ORDER BY `field` ASC at the end.

I cannot remember off hand where it is, but there's a database call to read categories, you'll just have to add the above code (replacing field with the field you want sorted).

If you can't find it, shoot me a message, I'll dig thru my notes.

remember grep is your best friend.  ;)
Quote · 9 Aug 2012

I'd love to know how to sort categories alphabetically for when members select them? I tinkered a little but with no luck. How is this done? Cheers.

Quote · 18 Jan 2022

I went into the sys_categories table and ordered them by number which helps when displaying categories on the homepage. However, the categories are not in the same order when selecting a category for a photo from the list of categories that show in the 'drop down' menu. Anyone know how I can fix this?

Quote · 19 Jan 2022

Hello callum!


You may apply this solution:


1) find in the file inc/classes/BxDolFilesModule.php the following line:


$aCategories['value'] = explode(CATEGORIES_DIVIDER, $aInfo['Categories']);


2) and change it like:


$aCategories['value'] = explode(CATEGORIES_DIVIDER, $aInfo['Categories']);

Quote · 20 Jan 2022

Hi Leonid -- Thanks for you help. I made the changes as suggested, and cleared the cache, but when I upload a photo and select a category the categories are still not in alphabetical order Frown

Quote · 20 Jan 2022

Plz PM me your CPanel and Dolphin admin access, I'll check it.

Quote · 20 Jan 2022

I found that I had an old module that was not fully uninstalled due to hard code changes which I reverted back and now the categories are listed alphabetically with this:




Change Line 106 (approx): 


From This:   if ($aParam['orderby'] == 'popular')


To This:       if ($aParam['orderby'] == 'ASC')

Quote · 22 Jan 2022

It would be great to have the code to sort the categories alphabetically in the administration settings (settings > category settings). I think the file is here: /public_html/administration/categories.php but I'm not sure what code to add.

Quote · 22 Jan 2022


For Dolphin 7.3.5 you need to find in this file;


The following code:

$aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'active' AND `Owner` = 0 AND `Type` = '$sModule'");

And replace it with this one:

$aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'active' AND `Owner` = 0 AND `Type` = '$sModule' ORDER BY `Category` ASC");

Quote · 31 Jan 2022
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.