Category Ordering Improvements

You have a suggestion for a future version of phpMyFAQ? Then post it here!

Moderator: Thorsten

Post Reply
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Category Ordering Improvements

Post by dajoker » Sat May 22, 2010 9:54 pm

As I was writing a post a few seconds ago about category ordering I though of another test to do and now I think I have it worked out. The long and short of it is that, by default, phpMyFAQ presents categories ordered by the faqcategories table's id column. While that works and changing the ordering of the categories in the UI appears to also work (by replacing every instance of the category ID in the faqcategoryrelations, faqcategory_group, faqcategory_user, along with faqcategories itself) it seems like a lot of operations making things happen in a certain order and currently there is only the ability to swap places of groups rather than specify where one goes in a list (from what I can tell) which makes adding a new category down the road in an otherwise-alphabetized list quite painful (insert new which goes to the end of the line, swap new with one higher in the list which is currently where the new one belongs, then that one with the one where it belongs.... until all of the groups from <new> to the end have been swapped) unless the new category goes at the very end of the list.

Is there another way this can be implemented? Maybe a table that just has a parent-category, order number and then the category ID which could be joined in fairly quickly? I'd be willing to hack this together for PostgreSQL or MySQL if it seems like a fair enhancement. I doubt the code involved would have a problem being applicable to any database decided-upon. I have not checked but I'm guessing that the performance hit for doing this would be fairly minimal as well. If there is already an enhancement request in for this then let me know where that is in case my searching throughout the forums has not turned up what it should have.

Thanks.

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Category Ordering Improvements

Post by dajoker » Sun May 23, 2010 6:33 am

Perhaps another idea would be to enable a sort-alphabetically option disabling the option to rearrange the order of categories but instead sorting via the 'ORDER' section of the SQL which pulls in categories. That would probably be a fairly trivial change overall. Any thoughts?
Thanks.

Thorsten
Posts: 14718
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Category Ordering Improvements

Post by Thorsten » Sun May 23, 2010 3:09 pm

Hi,

you know that you can change the ordering of all categories by yourself in the administration frontend?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Category Ordering Improvements

Post by dajoker » Mon May 24, 2010 12:31 am

Yes, that was the bit I addressed in my first post, though.

Thorsten
Posts: 14718
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Category Ordering Improvements

Post by Thorsten » Mon May 24, 2010 7:13 pm

Hi,

ah, okay, I got it. You can try to add the improvement for 2.7, but please note, that we rewrote the whole code base in 2.7.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Category Ordering Improvements

Post by dajoker » Thu May 27, 2010 4:10 am

Fair enough; where do I find it? Also I'm interested in some search improvements performance-wise. What can I do to make the searching happen as quickly as possible? For example, pretend I have 61,000 documents and the database is (currently, but changeable) PostgreSQL and I want searches to be faster and more intelligent (better answers first). Any hope for me? I'll start a new thread if appropriate but so far this size of database has caused slowness on searches (and not the best results, unfortunately) along with problems during FAQ creation mostly-related to the loading of the list of previous FAQs which I'm not quite clever enough to disable (I commented out the line in tinyMCE that loads that list but it still shows up after clearing out my cache and restarting the server just in case).

I can e-mail you with specifics if that would help. I'd like to win a bid using this software but it's going to be tough as it's against some big competitors.

Thanks.

Thorsten
Posts: 14718
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Category Ordering Improvements

Post by Thorsten » Thu May 27, 2010 10:00 am

Hi,

you can e-mail me at thorsten AT phpmyfaq DOT de.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply