Extension talk:Link Suggest

Latest comment: 15 years ago by Kanor in topic Further development of this extension

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

edit

I 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)Reply

Extension:GoogleTranslate is now working for FireFox, while not for IE :( --Asset 11:11, 29 August 2008 (UTC)Reply

Focus

edit

I 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();

--Maiden taiwan 20:48, 1 August 2008 (UTC)Reply

More dynamic while editing

edit

I'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)Reply

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)Reply

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)Reply
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)Reply

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)Reply

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)Reply

Adding a "Section" tool would be great

edit

This tool is really helpful ! Thanks for it.

Another great improvement would be to add a way to dig for Section within the article !


Bugfix

edit

I 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)Reply
edit

Hello, 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

edit

Hi 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.

--Kanor 23:37, 25 November 2009 (UTC)Reply

Return to "Link Suggest" page.