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.
Thanks..
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. Thanks.. |
http://www.adultasiantube.net |
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. |
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!
|
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 |
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. ;)
http://www.mytikibar.com |
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. |
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? |
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']); asort($aCategories['value']); |
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 |
Plz PM me your CPanel and Dolphin admin access, I'll check it. |
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:
/public_html/inc/classes/BxDolCategories.php
Change Line 106 (approx):
From This: if ($aParam['orderby'] == 'popular')
To This: if ($aParam['orderby'] == 'ASC') |
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. |
UPDATE: For Dolphin 7.3.5 you need to find in this file; administration/categories.php 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"); |