Extension talk:TitleKey
Add topic|
Archives
|
|---|
Removing Namespace From Results Display
My image focused wiki is a bit unusual in that I don't have any articles in the main namespace. Instead everything is in NS_FILE. As such I have $wgNamespacesToBeSearchedDefault = [NS_ARTIST => true]; and $wgContentNamespaces = [NS_FILE];
I have titlekey installed and I love that I don't need to type the prefix "File:" before every search. However, is it possible to remove the namespace prefix from the results display?
I was playing around with extensions/TitleKey/includes/TitleKey.php and I was thinking I could control it where by modifying the script at one of the two places where Title::makeTitle( $row->page_namespace, $row->page_title ); is returned, but I haven't been able to make it work. 70.160.223.43 00:44, 12 March 2025 (UTC) Reply
Installation instructions incorrect for MW1.39?
1. I used REL1_39 even though I think REL1_42's extension.json still required only 1.39 (REL1_43 started to require 1.42). Did I make the right choice?
2. I got the error Error: Class 'MediaWiki\Extension\TitleKey\SearchEngine' not found on search, and no search suggestions appeared. This resolved itself when I removed the line $wgSearchType = MediaWiki\Extension\TitleKey\SearchEngine::class; from LocalSettings.php.
3. Is there anything else I should be aware of? Thanks. Jonathan3 (talk) 10:48, 25 May 2025 (UTC) Reply
- @Jonathan3: As of phab:T377286 it sets the searchType automatically. But it hasn't been backported to 1.42. But are you saying you're using it with MW 1.39? Or using that version on a later core version? It wouldn't surprise me if the instructions are a bit wonky. :( Sam Wilson 11:26, 25 May 2025 (UTC) Reply
- I'm using MW1.39, and branch MW1_39.
- I guess the recommended setting was wrong, and also that branch doesn't need $wgSearchType to be set.
- Sometimes it's good to use the latest branch possible, so I wondered whether REL1_40, REL1_41 or REL1/42 would be better. But REL1_39 seems to work so maybe I should just leave it. Jonathan3 (talk) 22:40, 26 May 2025 (UTC) Reply
Please include diacritic-insensitive search
Hi,
Your extension is great but it could become even better if it could allow diacritic-insensitive searches too, which would require a tiny modification to your code.
At the database level, Mediawiki is notoriously not made to handle other languages, which is obviously a problem. Even a case-insensitive search is a problem, that's why your extension exists.
As described by Ilmari Karonen in this thread (https://stackoverflow.com/questions/16014167/how-to-do-an-accent-and-case-insensitive-search-in-mediawiki-database?rq=1), it is very easy to modify your extension in order to also allow for a diacritic-insensitive search and I think that would be a great addition to your extension which could be used in any non-English wiki on this planet.
I hope you will see this suggestion in a favorable way and have a nice day. Steff-X-FR (talk) 13:27, 15 July 2026 (UTC) Reply