Extension talk:Link Suggest
Wow! Brilliant idea! I'll try give it a bash on my wiki this coming weekend when I have some free time and let you know how i get on!
Generic version of this extension
editI will probably use this extension as a model/prototype for a translation function, some day soon. Initial thoughts reagrding this are:
Please if you can provide with any insight as to how things could be done a bit more generic, using Ajax/CCS - help would be appreciated a lot. --Asset 18:23, 28 July 2008 (UTC)
Extension:GoogleTranslate is now working for FireFox, while not for IE :( --Asset 11:11, 29 August 2008 (UTC)
Focus
editI suggest giving the search box "focus" each time +LINK is clicked, so you don't have to click in the box manually.
Just add:
document.getElementById( 'link_search_input' ).focus();
immediately above:
x.onkeyup = function(){ LinkSearchCall();
More dynamic while editing
editI'd like to see the suggestion list pop up when the user types "[[" in the edit box, and have the behavior be turned on/off by a user preference. Maiden taiwan 20:49, 1 August 2008 (UTC)
An extension with this function exists, it's called LinkSuggest and is by Inez Korczyński. The code is available here; I can't get it to work under my MediaWiki though, probably because it's a Wikia extension. You guys have more luck? Thanks! Hywel 11:29, 9 January 2009 (UTC)
- This sound interesting. Is it currently activated on wikia.com? If so, how can I trigger it? When I just type "[[" nothing happens. -- Matsch 14:40, 9 January 2009 (UTC)
- It's working with me here (you may need to be registered, and the option enabled in preferences), just type [[ then at least three characters. What I'm missing, though, it's how to install it under a Mediawiki. Hywel 23:14, 10 January 2009 (UTC)
I'm coding the [[ trigger. So far it works showing a link list in the right side of the textarea. It needs a litte bit debugging, it is very alpha now. But I might be uploading a packaged version in the next few days. --Kanor 15:02, 19 November 2009 (UTC)
Done. I requested commit access to upload the new version. You might like to see it working in my site: Subtrama.net. However I don't really like the [[ trigger, it is somehow intrusive. I'm thinking of changing it to Ctrl+Enter, or something easy like that. I don't know if that sequence is used somewhere, Cmd+Enter is used in Macs for Spotlight. And now the extension works somehow like Spotlight, so it makes sense :) --Kanor 17:20, 21 November 2009 (UTC)
Adding a "Section" tool would be great
editThis tool is really helpful ! Thanks for it.
Another great improvement would be to add a way to dig for Section within the article !
Bugfix
editI had to change the query to look like this (notice the CONVERT(page_title using latin1) part):
$res = $db->select( 'page', 'page_title', array( 'page_namespace' => 0, "UPPER(CONVERT(page_title using latin1)) LIKE '%". $db->strencode( strtoupper($term)) ."%'" ), array( 'LIMIT' => $limit ) );
Reason is that page_title is defined as varbinary and UPPER is ineffective on binary strings.
Atli - 22. March 2009
- I whish I had read this before speding three hours debugging =) --Kanor 15:04, 19 November 2009 (UTC)
Title Search
editHello, what do you think about following:
$titleMatches = PrefixSearch::titleSearch( $term, $limit, array(NS_MAIN) );
$r = "";
if( $titleMatches){
foreach ($titleMatches as $key => $val){
$r .= '<li>
<a href="javascript:Insertlink(\''.addslashes(str_replace('_', ' ', $val)).'\')">'.str_replace('_', ' ', $val).
"</li>\n";
}
}
if ($r == "") $r = "<li><none></li>";
$html ='<ul>' .$r .'</ul>';
return $html;
Simon Litt 08 October 2009.
Further development of this extension
editHi you all. As it seems the developer gave up the extension, I'm working on a new version. It is called QuickLink. Feature requests and bug reports are very welcome in the talk page.