How to list Forum categories by order Profile Arranged
Jamroom Developers
'forum_cat' and 'forum_cat_url' are stored in the jrForum datastore, the order is not. Its a performance thing.
If we stored the forum_cat_order in the jrForum datastore, when the order was changed every datatore item would need to be updated.
Performance wise its better as is. You can write a smarty function to get the categories and their order first if needed:
Docs "Defining your own smarty function"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1569/defining-your-own-smarty-function
Then run a foreach loop over the returned categories to get the contents for each of them.
The forum categories are stored in the 'jr_jrforum_category' table so a query like this will get the order your after:
SELECT * FROM `jr_jrforum_category` WHERE cat_profile_id = 1 ORDER BY cat_order asc