Wikia

Wikia Developers Wiki

AdvancedOasisUI

Talk24
685pages on
this wiki
This script is for PERSONAL use only!
You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js) as it would violate Wikia's Terms of Use.
(See the customization policy)
AdvancedOasisUI
TypeJavaScript
DescriptionScript for adding various improvements to Oasis' UI
ScopeFor personal use
Author(s)Porter21 (primary)
Kangaroopower
UltimateSupreme
Using code byRappy 4187 for removing image lightboxes
Updated12:05, September 15, 2013 (UTC)
Code/code.js
SkinsOasis
LanguagesDeutsch
English
Español
Français
Magyar
Italiano
Nederlands
Polski


The AdvancedOasisUI script adds various links and buttons to Oasis' UI. Primarily, it restores functionalities from previous skins which were removed from Oasis.

Features

Adds "contributions" link to account navigation
A link to Special:Contributions/user name is added to the account navigation menu in the top right corner of the page.
Adds "history" and "what links here" links to edit screen
Links to page history and Special:WhatLinksHere/current page are added to the "Preview" dropdown on the edit screen.
Adds button to Special:Search for proceeding to page if it does not exist
Functioning as a replacement for the removed redlink to the search term on Special:Search, a button is added to the right of the search page's main headline which allows users to proceed to the search term-titled page.
Changes publish to save page and rename to move
Changes names of the buttons in the editor
(Optional) Replaces "WikiActivity" button with "recent changes"
The "WikiActivity" button in the wiki header is replaced with a button pointing to Special:RecentChanges.
(Optional) Removes Image Lightboxes
Setting the lightbox option to true removes the image lightboxes which are shown when one clicks on an image.
(Optional) Adds "followed pages" link to account navigation
Optionally, a link to Special:Following is added to the account navigation menu. Disabled by default, but can be enabled via configuration option.
(Optional) Makes Source mode, the default mode for editing.
Optionally, makes Source mode, the default mode for editing. The visual editor can still be accessed by clicking on Visual Tab. Enabled by default.
(Optional) Adds "watchlist" link to account navigation
Optionally, a link to Special:Watchlist is added to the account navigation menu. Disabled by default, but can be enabled via configuration option.
(Optional) Limits "random page" button results to specific namespace
Optionally, the "random page" button is modified so only pages from a chosen namespace are returned. Disabled by default, but can be enabled via configuration option.
(Optional) Turns category links to non-created categories into proper redlinks
Optionally, category links pointing to non-created categories are turned into proper redlinks (in the site-specific color), i.e. the MediaWiki default is restored. Enabled by default, but can be disabled via configuration option.
(Optional) Adds an "Add a Page" button to the "Recent Wiki Activity" module
Add a create page button to the "Recent Wiki Activity" module in the Rail.
Multi-language support
Supports ISO 639-1 localization (see "Adding translations").

Usage

Installation

If you would like to use the script with the default options, simply add the following either to your global.js on Community Central (to make the script available on all wikis) or to Special:MyPage/wikia.js on specific wikis:

importScriptPage('AdvancedOasisUI/code.js', 'dev');

If you would like to change the options then insert the following instead:

dev.AdvancedOasisUI = {
      accountNavFollowedPages: false,
      accountNavWatchlist: false,
      categoryRedlink: true,
      RCHeader: true,
      DefaultSourceMode: true,
      lightbox: true,
      randomPageLimitedTo: '',
      activity2RC: true,
      userLang: true,
};
importScriptPage('AdvancedOasisUI/code.js', 'dev');

For an explanation of the available options, see "Options" below.

Options

accountNavFollowedPages
If set to true, a link to "followed pages" (Special:Following) is added to the account navigation menu. Default: false.
accountNavWatchlist
If set to true, a link to "watchlist" (Special:Watchlist) is added to the account navigation menu. Default: false.
categoryRedlink
If set to true, category links pointing to non-created categories are turned into proper redlinks (in the site-specific color), i.e. the MediaWiki default is restored. Default: true.
RCHeader
If set to true, adds an "Add a Page" button to the Wikia Rail inside the "Recent Wiki Activity" module. Default: true.
DefaultSourceMode
When set to true, makes Source mode, the default mode for editing. The visual editor can still be accessed by clicking on Visual Tab. default: true.
Lightbox
See NoImageLightbox for available options
randomPageLimitedTo
If set to a non-empty value, the "random page" link in the wiki header is modified to yield only results from the chosen namespace. For example, setting it to "Category" will make the button lead only to pages in the "category" namespace. See Help:Random page for valid options. Default: empty.
activity2RC
If set to true, changes the WikiActivity link in the NavBar to Recent Changes. Default: true.
userLang
By default, the script tries to display messages in the following languages (in this order):
  1. Your Wikia configured language (specified in your preferences)
  2. An explicitly selected language (e.g. setting this to 'en' will force English always)
  3. The wiki's content language
  4. English if there are no messages in the desired language.
You can configure this by setting userLang to true to use your configured language. Set userLang to a language code to force that language always. Set userLang to false to always use the same language as the Wiki content. The script will fallback onto English if it lacks translations for the chosen language.
Example:
// Use your personal language (default).
dev.AdvancedOasisUI = {
    userLang: true
};
// Use the Wiki's language
dev.AdvancedOasisUI = {
    userLang: false
};
// Force the script to always display in German
dev.AdvancedOasisUI = {
    userLang: 'de'
};


langCode (e.g. 'de', 'en', 'fr') — Translation overriding
Localized messages can be added or changed using the language code as a key (e.g. AdvancedOasisUIConfig.en for English) and then creating an object for the messages. You do not need to override every message, if your language already has a translation but you don't like one of the messages then you can change just that one message. See the below example for how to override the default messages used for the English language.
Example:
dev.AdvancedOasisUI = {
   // Other config options here
   // ...
   'en': {
         addPage: 'Add a Page',
         movePage: 'Move',
         contributions: "Contributions",
         followedPages: "Followed pages",
         goToPage: "Go to page",
         history: "History",
         recentChanges: "Recent Changes",
         Save Page: "Save Page",
         watchlist: "Watchlist",
         whatLinksHere: "What links here"
      }
}

Adding translations

The following messages are used by the script:

  • "Add a Page"
  • "Move [this page]"
  • "Contributions"
  • "Followed pages"
  • "Go to page"
  • "History"
  • "Recent changes"
  • "Save Page"
  • "Watchlist"
  • "What links here"

The process for creating a translation is identical to the langCode option above. You can use that feature to test your translation then post it on the script's talk page so it can be made available to everyone who speaks your language (or add them to the correct part of /code.js directly if you are comfortable with doing so).

Updates

28 October 2013
UltimateSupreme: Added fix for wikia's lazy loading sidebar.
15 September 2013
UltimateSupreme: Added script to make sorce mode as default.
5 January 2013
Seaside98: Added activity2RC configuration and fixed the function.
11 December 2012
Kangaroopower: Revamped language check function to make much simpler.
10 August 2012
Lunarity: Revamped language checking function, bugfixes and made configurations backwards-compatible
23 July 2012
Kangaroopower: Revamped the script to be object oriented, pushed some bugfixes.
10 May 2012
Kangaroopower: Fixed the go to page in the new search and replaced superfluous search icon button in regular page search with a go button.
15 March 2012
Kangaroopower: Added translations for Save Page, however the code was wrong so Grunny came and fixed them
10 March 2012
Kangaroopower: Added a show page in monobook link in the global nav.
31 January 2012
Leviathan_89: Added Italian translations.
29 January 2012
Kangaroopower: Added a create page button in the recent changes module in the sidebar.
12 January 2012
Kangaroopower: Added the ability to disable image lightboxes
10 December 2011
Kangaroopower: Added publish to save and rename to move
19 November 2011
MarkosBoss: Added Polish translations.
6 October 2011
Porter21: Adapted edit page enhancements to work with new Wikia editor.
5 September 2011
Porter21: Added option (enabled by default) to turn category links to non-created categories into redlinks.
21 August 2011
MarkvA: Added Dutch translations.
30 June 2011
Porter21: Made account navigation menu options work again after skin changes (removal of "followed pages" link) and added "followed pages" option.
22 May 2011
Porter21: Small change to address warnings which appeared in the error console of certain browsers.
24 January 2011
Porter21: Added option to limit "random page" button results to a specific namespace.
20 January 2011
Porter21: Created.

References

Around Wikia's network

Random Wiki