Extension:CategorySuggest

What can this extension do?
Adds input box to edit and upload page which allows users to assign categories to the article. When a user starts typing the name of a category, the extension queries the database to find categories that match the user input.


 * Extension appears to match by prefix only, so on the LabView wiki, typing "bugs" does not offer "LabView bugs".

This extension has been extracted from the code in Extension:SelectCategoryTagCloud.

Bugs/Errors
Please see the GitHub issue tracker to view or report bugs.

Conflicts with other extensions
These are not errors per se, as the extension works with the following extensions, and they work as they are intended as well, but you may have error messages when using the functions of the following extensions (after the extension has been used, to be exact):


 * Extension:CreateRedirect
 * Extension:MassEditRegex

The error messages may be ignored, as these extensions use similar functions as the Category Suggest extension, which causes the error report, but repeated testing has shown no anomalies when using these extensions, and they may be installed safely on the same installation without causing any known instability.

Download instructions
Please clone or download the extension from GitHub and place the files into the extensions folder:. Note: $IP stands for the root directory of your mediawiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

Old To Do List
Please add feature requests or bugs to the GitHub issue tracker.

If necessary, customise the location of the CategorySuggestSuggest.php file on your webserver in CategorySuggest.js. (Obsolete, Lindele 17:49, 10 March 2008 (UTC))
 * Configure the MediaWiki database credentials in CategorySuggestSuggest.php.
 * Categories disappear after clicking on 'Preview' (Completed, Lindele 18:04, 10 March 2008 (UTC))
 * Modify SQL query to allow search for multiple terms (currently search ignores everything after a user entered a space character) (Completed, Lindele 17:49, 10 March 2008 (UTC))
 * Add event to resultsdiv so that hitting ESC clears the div (Completed. ESC not working, but a mouse click outside the results area will clear it (Kudos to Jared Milbank), Lindele 17:49, 10 March 2008 (UTC))
 * Change resultsdiv to display in block (one single column) (Completed, Lindele 17:49, 10 March 2008 (UTC))
 * Make resultsdiv navigateable. Google suggest and other sites allow users to navigate the results list with the arrow keys.
 * Highlight matching characters of user input with results list (user types MI and all results matching MI have the MI part of the word in bold or different color) (Completed (Kudos to Jared Milbank), Lindele 17:49, 10 March 2008 (UTC))
 * Move CategorySuggestSuggest.php page to a Mediawiki Query API based solution. Need to extend API to enable that feature. (Completed (Kudos to Jared Milbank), Lindele 17:49, 10 March 2008 (UTC))
 * Optimise for large category sets. If this extension would be run against Wikipedia, it would be choked by the large number of categories.
 * Adds a space after a < /nowiki> tag for each time the page is edited (Completed, Lindele 17:49, 10 March 2008 (UTC))
 * Adds a line break before each  tag for each time the page is edited,
 * It is tricky to use with and tags, (perhaps there should be a user preference to turn it off, so they can prevent pages being parsed)
 * Categories with characters other than spaces, letters and numbers are not found on the page (e.g. ".", "-") (Completed, Lindele 17:49, 10 March 2008 (UTC))
 * Category lookup is case-sensitive (Completed, Lindele 17:49, 10 March 2008 (UTC))
 * Hard to use with | to reorder categories,
 * Sometimes does not show categories that have just been added (caching issue),
 * does not look up categories including some special characters when you type them (e.g. &),
 * Inserts some special characters in markup format (e.g. & becomes &amp ;),
 * Form should be created by javascript extension so it is not presented to users without javascript (Completed (Kudos Jared Milbank), Lindele 17:49, 10 March 2008 (UTC))
 * Soeren notes that the suggestions are currently sent with no charset specified (Changed to use AJAX API, retest of this bug required, Lindele 17:49, 10 March 2008 (UTC))
 * this extension seems to disable the special:allmessages function: the page comes up blank. I'm not sure if this is a local issue of mine.. mailto:friso.d@gmail.com Friso