Fandom Developers Wiki
(Created page with "{{Infobox JavaScript | Description = adds list of matching pagenames to fulltext search | Scope = personal use | Author = User talk:Pecoes | Updated = 6 Dec. 2012 | Code =...")
 
No edit summary
Line 1: Line 1:
 
{{Infobox JavaScript
 
{{Infobox JavaScript
 
| Description = adds list of matching pagenames to fulltext search
 
| Description = adds list of matching pagenames to fulltext search
| Scope = personal use
+
| Scope = personal or wiki-wide
 
| Author = [[User talk:Pecoes]]
 
| Author = [[User talk:Pecoes]]
| Updated = 6 Dec. 2012
+
| Updated = 28 Dec 2012
 
| Code = [[/code.js]]
 
| Code = [[/code.js]]
 
| Skins = Wikia/Oasis
 
| Skins = Wikia/Oasis
| Languages = English/German (translatable)
+
| Languages = English<br/>German<br/>...
 
}}
 
}}
   
Line 26: Line 26:
   
 
:''See also: [[Help:JavaScript and CSS Cheatsheet]]''
 
:''See also: [[Help:JavaScript and CSS Cheatsheet]]''
To install SearchSuggest, simply add the appropriate row to your <code>importArticles()</code> call in [[w:Special:MyPage/global.js|your global.js]].
+
To install SearchSuggest, simply add the appropriate row to your <code>importArticles()</code> call in [[w:Special:MyPage/global.js|your global.js]].
 
<source lang="javascript">
 
<source lang="javascript">
 
importArticles({
 
importArticles({

Revision as of 09:55, 28 December 2012

Wikia's fulltext search doesn't pay attention to page titles. So while it's easy to find pages where your search term was mentioned multiple times, it's sometimes impossible to find pages that are about your search term. This tool adds the list of best-matching pagenames to the results page.

Example

To understand the problem, go to the 24 wiki and search for Beau. There are - at the time of this writing - four pages with the word "Beau" in the page title:

Beau Bowden, Beau Dremann, Beau Smith, Beaumont

The fulltext search only finds the first of these.

And here's a screenshot of the results page with the best-matching pagenames added in:

File:Try-instead.png

Installation

See also: Help:JavaScript and CSS Cheatsheet

To install SearchSuggest, simply add the appropriate row to your importArticles() call in your global.js.

importArticles({
    type: 'script',
    articles: [
        'u:dev:SearchSuggest/code.js'
    ]
});

Localisation

Post translations on the talk page, please!

See Also

SearchGoButton