We have created the drag and drop functionality for category sorting

Please report bugs here!

Moderator: Thorsten

Post Reply
PaoloKappa
Posts: 11
Joined: Wed Sep 17, 2014 5:35 pm
Location: Stabio, Switzerland, Europe
Contact:

We have created the drag and drop functionality for category sorting

Post by PaoloKappa »

Dearest Thorsten,

our passion for phpMyFAQ is huge and so we realized a feature that we needed a lot: the sorting of FAQ categories through drag & drop.
In order to realize this feature we modified some files and added a file save the sorting on a new database table.

If you want to use this new feature, you must copy the following files into:

index.php under /admin
category.order.php under /admin
category.main.php under /admin
category.php under /src/phpMyFAQ

Look at the zipped attached file (phpmyfaq-dragndrop.zip)

You also need to run the following query to create the new table that will store the category sorting.

CREATE TABLE faqcategoriesorders (
category_id int(11) NOT NULL,
position int(11) NOT NULL,
PRIMARY KEY (category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Bug fix: We also fixed a bug that after adding a new category, by refreshing it, added it again.
With a new validation method we check if the category exists and is not duplicated.

Paolo Caparrelli
GOLINE SA
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: We have created the drag and drop functionality for category sorting

Post by Thorsten »

Hi,

wow, this is awesome!

As it changes the database structure I'll add this for 3.1!

Thank you very much!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: We have created the drag and drop functionality for category sorting

Post by Thorsten »

Hi,

finally your code went into v3.1 with some changes.

Thank you very much!

Cheers
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply