Wikipédia:LiveRC/Documentation/Installation/en

Une page de Wikipédia, l'encyclopédie libre.
Sauter à la navigation Sauter à la recherche
(fr)(en)(it)[edit]

This page describe the process to install LiveRC on another wiki.

The explanations below are provided for a manual installation or configuration. For an half-automatic installation or configuration, it is possible to use the InstallAndConfigLiveRCExtension extension.

Installation[modifier le code]

To install LiveRC on another wiki, create locally a page named MediaWiki:Gadget-LiveRC.js (you need to be a sysop).

In this page, add the following code :

window.LiveRC_getSiteCustom = function (){
	// Here comes the configuration
}
mw.loader.load( '//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&action=raw&ctype=text/javascript' );

Add this gadget to the gadget definitions and select it, or put it directly in your .../common.js subpage.

Bypass your cache and launch LiveRC (go to Wikipédia:LiveRC page, it doesn't matter if the page is missing).

Once the interface is visible, open the config panel (button Folder-system.png), then click once on the Configuration MW button.
This will create the page named Mediawiki:Gadget-LiveRCSiteConfig.js where your wiki configuration is saved (this avoid to get theses informations every time LiveRC is started through Ajax request on the API).

Now, you are ready to configure LiveRC according to your wiki specificities.

Configuration[modifier le code]

As you could see at the "Installation" step, a function has been created on the MediaWiki:Gadget-LiveRC.js page. This function, called when LiveRC is starting, will permit you to change the default configuration, wich may not match your wiki specificities. Unless the opposite is said, the customized variables have to be set inside this function.

Each variable describe bellow is different. For some of them, you may want to change only some items, for other you will need to change the whole variable. This is explain in the next chapters.

For each customized variable, you should use the following syntax, to prevent errors crashing the whole customization:

try{

// Here is the customized variable

}catch(e){  }

Variables descriptions[modifier le code]

lrcParams[modifier le code]

This variable is about different parameters of LiveRC.

You may want to change some, for example the language, or the name of the page where LiveRC is launched :

lrcParams.Language = 'en';
lrcParams.PageTitle = 'MyWiki:LiveRC';

DO NOT CHANGE THE WHOLE VARIABLE. If you just copy-paste the LiveRC code, changing what you want, the whole variable is reset and you will not have new items. They may be missing somewhere and create errors.

Example :

lrcParams = {
    Language            : 'en',
    PageTitle           : 'MyWiki:LiveRC',
    SandboxPage         : 'MyWiki:Sandbox',
    WikidataURL         : 'https://www.wikidata.org/wiki/$1',
    CommonsURL          : '//upload.wikimedia.org/wikipedia/commons/',
    SearchURL           : 'https://duckduckgo.com/?q=$1',
    TchatURL            : 'https://kiwiirc.com/client/irc.freenode.net/?nick=$2$1',
    TchatChannel        : '#wikipedia-en-liverc'
};

This is WRONG, because all other items in the variable are losts, and this will result in lots of errors when they will be needed. You have to define all items (you want to change) separately, like in the first example.

lrcOptionMenuValues[modifier le code]

This variable is about different options of LiveRC. It commands the initial state of some buttons, checkboxes, selectors, etc.

You may want to change some, for example the state of the "Freeze" check box :

lrcOptionMenuValues.Stop = true;

DO NOT CHANGE THE WHOLE VARIABLE. If you just copy-paste the LiveRC code, changing what you want, the whole variable is reset and you will not have new items. They may be missing somewhere and create errors.

lrcTexts[modifier le code]

This variable contains only texts. The translation is done by another way.

If needed, some new text items can be added with the following syntax:

lrcTexts.MyTextId = 'MyText';

lrcParamDesc[modifier le code]

This variable contains only texts. The translation is done by another way.

If needed, some new text items can be added with the following syntax:

lrcParamDesc'MyTextId = 'MyText';

UnTranslatedTexts[modifier le code]

This variable contains only text. The translation is not done like other text variables as it depends on the wiki.

You may want to change some, for example the comment beginning :

UnTranslatedTexts.RESUMESTART = '[[MyWiki:LiveRC|LiveRC]] : ';

DO NOT CHANGE THE WHOLE VARIABLE. If you just copy-paste the LiveRC code, changing what you want, the whole variable is reset and you will not have new items. They may be missing somewhere and create errors.

lstAverto[modifier le code]

This variable is the list of "Message/Warning" templates that can be sent to users through LiveRC.

Each item is made of four things :

  1. template: the template name
  2. string: a text that appear in the selector
  3. hasPage: an option to add or not the page name to the template
  4. addName: an option to add or not the user name (your name) to the template
  5. addSectionTitle : an option to add a section title before the template

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lstAverto = [
    { template: 'Test 0' , string: 'Test 0' , hasPage: true,  addName: true,  addSectionTitle: false  },
    { template: 'Test 1' , string: 'Test 1' , hasPage: true,  addName: true,  addSectionTitle: false  },
    { template: 'Test 2' , string: 'Test 2' , hasPage: false, addName: false, addSectionTitle: false  },
    { template: 'Test 3' , string: 'Test 3' , hasPage: false, addName: false, addSectionTitle: false  }
];

The template syntax must be :

  • {{TemplateName|1=PageName|user=UserName}}

lstBando[modifier le code]

This variable is the list of templates used when adding a warning template at the top of a page.

Each item is made of three things :

  1. template: the template name
  2. string: a text that appear in the selector
  3. withDate: an option to add or not the date in the template. If empty, the date is not added. "Magic words" can be used to define the date format:
    • $day for the day (here : 20)
    • $month for the month name (firstletter = lower case) (here : août)
    • $Month for the month name (firstletter = upper case) (here : Août)
    • $year for the year (here : 2018)

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lstBando = [
    { template: 'Check admissibility'  , string: 'admissibility'  , withDate: '$month $year' },
    { template: 'Copyright violation'  , string: 'copyvio'        , withDate: ''             },
    { template: 'No source'            , string: 'No source'      , withDate: '$month $year' }
  ];

The template syntax must be :

  • {{TemplateName|date=DateParam}}

lstBlank[modifier le code]

This variable is the list of comments used when blanking a page.

Each item is made of two things :

  1. tooltip: a text that appear in the selector
  2. resume: the comment (in wikitext)

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lstBlank = [
    {tooltip: 'copyvio'      , resume: 'copyvio'          },
    {tooltip: 'not encyclo'  , resume: 'not encyclopedic' },
    {tooltip: 'sandbox'      , resume: 'sandbox'          },
    {tooltip: 'vandalism'    , resume: 'vandalism'        }
];

lrcRevertMessages[modifier le code]

This variable is the list of comments used when reverting a user.

Each item is made of two things :

  1. resume: the comment (in wikitext)
  2. text: a text that appear in the selector

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lrcRevertMessages = [
    { resume: 'Sandbox'               , text: 'Sandbox' },
    { resume: 'Vandalism'             , text: 'Vandalism'  },
    { resume: 'no source'             , text: 'No source'  },
    { resume: 'Automatic translation' , text: 'Auto trans'   }
];

lstReport[modifier le code]

This variable is the list of elements needed to permit a user to ask something that he cannot do because he don't have the right.

Each item is made of eight things :

  1. userright: the userright needed. If the user has the right, this item won't appear in the selector. For a special purpose/request, you can make the item always appear by setting a right that doesn't exist.
    • Beware : the same right cannot be used twice.
  2. text: The text ID of the selector option (defined in lrcTexts)
  3. page: the page where the user can ask. "Magic words" can be used to define a sub-page on a per-date basis:
    • $day for the day (here : 20)
    • $month for the month name (firstletter = lower case) (here : août)
    • $Month for the month name (firstletter = upper case) (here : Août)
    • $year for the year (here : 2018)
  4. template: the template used to ask
  5. parampage: an option to add or not the page that need special care
  6. paramuser: an option to add or not the user that need special care
  7. resume: The comment of the edit, and also the new section title ($1 is the page name, $2 is the user name)
  8. reasonsdropdownname: a system message where can be found some reasons for the demand (optionnal, can be set to an empty string to disable)

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lstReport = [
        {  userright:"delete",
           text:'REPORTING_DELETION',
           page:'MyWiki:Request for deletion/$year/$Month',
           template:'Template:Request for deletion/LiveRC',
           parampage:true,
           paramuser:false,
           resume:'Request for deletion : $1',
           reasonsdropdownname:'deletereason-dropdown'
        },
        {  userright:'anyRight',
           text:'REPORTING_HELP',
           page:'MyWiki:New users forum',
           template:'Template:New user needing help',
           parampage:false,
           paramuser:true,
           resume:'New user need help : $2',
           reasonsdropdownname:''
        }
];

The templates syntax must be :

  • {{TemplateName|page=PageName|user=UserName|raison=Reason}}

lrcIcons[modifier le code]

This variable is the list of icons used by LiveRC.

Each item is made of four things :

  1. type : is the type of icon :
    • 0 for a simple image (default value)
    • 1 for an image surrounded by a <sup> tag
    • 2 for an image surrounded by a <sub> tag
    • -1 for no image at all
  2. src : is the path of the image
    Note : the beginning of the image URL is set in lrcParams.CommonsURL
  3. width : the image width, in pixels (optionnal, default is 14)
  4. height : the image height, in pixels (optionnal, if not set the value of width is applied to height)

You may want to change some, or create new ones, for example the icon for upload logs :

lrcIcons.UploadIcon = {
  type: 0,
  src: 'thumb/8/8f/File_upload.svg/16px-File_upload.svg.png',
  width: 16
};

DO NOT CHANGE THE WHOLE VARIABLE. If you just copy-paste the LiveRC code, changing what you want, the whole variable is reset and you will not have new items. They may be missing somewhere and create errors.

commenttests[modifier le code]

This variable is the list of regexp used to test comments.

Each element is made of five things :

  1. state: The state added to the edit when RegExp is found (an internal variable)
  2. icon: The icon name added in RC line (optionnal, must be defined in lrcIcons)
  3. class: The className added to the line (optionnal)
  4. hide: The default checkbox state in RC checklist
  5. regex: The RegExp to test comment

You may want to modify the RegExp according to the standard comments of your wiki.

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

commenttests = [
    { state: 'REVERT'     , icon:'RevertIcon',           class:'RcRevert',           hide:false, regex: '(LiveRC : )?Révocation |([Bb]ot : )?[Aa]nnulation des modifications|([Bb]ot : )?[Rr]évocation de |^(Undid|Revert to( the)?) revision|^(Undoing|Reverted( \d+)?) edit|^r(e)?v(ert(ing|ed)?)?\b|LiveRC : Blanchiment'},
    { state: 'BLANKING'   , icon:'BlankingIcon',         class:'RcBlanking',         hide:false, regex: '^Résumé automatique : blanchiment|^[Bb]lanchi'},
    { state: 'REPLACED'   , icon:'ReplacedIcon',         class:'RcReplaced',         hide:false, regex: '^Résumé automatique : contenu remplacé par'},
    { state: 'REDIRECTED' , icon:'RedirectedIcon',       class:'RcRedirected',       hide:false, regex: '^Page redirigée vers|^#REDIRECT' },
    { state: 'WPCLEANER'  , icon:'WPCIcon',              class:'RcWPC',              hide:false, regex: '(WPCleaner|Correction syntaxique)'},
    { state: 'AWB'        , icon:'AWBIcon',              class:'RcAWB',              hide:false, regex: '(AWB|AutoWikiBrowser)'},
    { state: 'B_PORTAIL'  , icon:'BandeauxPortailsIcon', class:'RcBandeauxPortails', hide:false, regex: 'BandeauxPortails'},
    { state: 'B_EBAUCHE'  , icon:'BandeauxEbauchesIcon', class:'RcBandeauxEbauches', hide:false, regex: 'BandeauxEbauches'},
    { state: 'HOTCAT'     , icon:'HotCatIcon',           class:'RcHotCat',           hide:false, regex: '(HotCatsMulti|HotCat)'},
    { state: 'LRC'        , icon:'LRCIcon',              class:'RcLRC',              hide:false, regex: '(Live|Patrouille) *(RC)?'},
    { state: 'POPUPS'     , icon:'PopupsIcon',           class:'RcPopups',           hide:false, regex: 'popups' },
    { state: 'CATRENAME'  , icon:'CatRenameIcon',        class:'RcCatRename',        hide:false, regex: 'Renommage de catégorie'}
];

templatestests[modifier le code]

This variable is used to test the inclusion of a specific template in a page.

Each element is made of four things :

  1. state: The state added to the edit when the template is found (an internal variable)
  2. icon: The icon name added in RC line (optionnal, must be defined in lrcIcons)
  3. class: The className added to the line (optionnal)
  4. template: The template to test

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

templatestests = [
    { state: 'PORTAIL'    , icon:''             , class:'RcPortail',   template: 'Méta lien vers portail'           },
    { state: 'RECENT'     , icon:'RecentIcon'   , class:'RcRecent',    template: 'Méta bandeau d\'événement récent' },
    { state: 'R3R'        , icon:'R3RIcon'      , class:'RcR3R',       template: 'Règle des 3 révocations'          },
    { state: 'PAS'        , icon:'PaSIcon'      , class:'RcPaS',       template: 'Suppression'                      },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Copie de site'                    },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Copie à vérifier'                 },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Copyrighté'                       },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Texte copyvio'                    },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Image copyvio'                    },
    { state: 'COPYRIGHT'  , icon:'CopyrightIcon', class:'RcCopyright', template: 'Synopsis'                         }
];

categoriestests[modifier le code]

This variable is used to test if the page belongs to a specific category.

Each element is made of four things :

  1. state: The state added to the edit when the template is found (an internal variable)
  2. icon: The icon name added in RC line (optionnal, must be defined in lrcIcons)
  3. class: The className added to the line (optionnal)
  4. regex: The category to test (regexp format)

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

categoriestests = [
    { state: 'ADQ'       , icon:'AdQIcon'      , class:'RcADQ',       regex: 'Article de qualité( contesté|)$'                },
    { state: 'BA'        , icon:'BAIcon'       , class:'RcBA',        regex: 'Bon article$'                                   },
    { state: 'APDQ'      , icon:'APDQIcon'     , class:'RcAPDQ',      regex: 'Article potentiellement (bon|de qualité)'       },
    { state: 'STUB'      , icon:'StubIcon'     , class:'RcStub',      regex: 'Wikipédia:ébauche'                              },
    { state: 'COPYRIGHT' , icon:'CopyrightIcon', class:'RcCopyright', regex: 'Article soupçonné de travail sous copyright'    },
    { state: 'PAS'       , icon:'PaSIcon'      , class:'RcPaS',       regex: 'Page proposée à la suppression'                 }
];

watchCategories[modifier le code]

This variable is used to test if the user belongs to a specific category (the category members are loaded once at LiveRC loading).

Each element is made of four things :

  1. state: The state added to the edit when the user belongs to the category (an internal variable)
  2. icon: The icon name added in RC line (optionnal, must be defined in lrcIcons)
  3. class: The className added to the line (optionnal)
  4. category: The category to test

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

watchCategories = [
    { state: 'SCOLARIP'      , icon:'ScolarIPIcon'      , class:'RcScolarIP',      category: 'Adresse IP scolaire'                  },
    { state: 'SHAREDIP'      , icon:'SharedIPIcon'      , class:'RcSharedIP',      category: 'Adresse IP partagée'                  },
    { state: 'COPYRIGHTUSER' , icon:'CopyrightUserIcon' , class:'RcCopyrightUser', category: 'Utilisateur enfreignant un copyright' },
    { state: 'PEDIAPROJECT'  , icon:'PediaProjectIcon'  , class:'RcPediaProject',  category: 'Utilisateur projet pédagogique'       }
];

lrcExtensions[modifier le code]

This variable is the list of available extensions.

Each element is made of three things :

  1. name: The name of the extension
  2. url: The url where the extension code can be found
  3. desc: The default description of the extension (the translation can be managed through Wikipédia:LiveRC/Documentation/Traduction/en process)
  4. neededright : A mediawiki right needed to the extension. If prefixed with a !, the extension will only work if the user do not have this right

DO NOT CHANGE THE WHOLE VARIABLE. If you just copy-paste the LiveRC code, changing what you want, the whole variable is reset and you will not have new items.

  • If you want to add an extension, use this syntax :
var MyExtension = {
  "name"        : "ProposeTranslationExtension",
  "url"         : "//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js/Extensions/ProposeTranslationExtension.js",
  "desc"        : "Ajoute un formulaire pour proposer une traduction de l’interface.",
  "neededright" : ""
}
LiveRC_AddNewExtension(MyExtension);
  • If you want to delete an extension, use this syntax :
LiveRC_DeleteExtension('ProposeTranslationExtension');

lrcCSSstyles[modifier le code]

This variable is the list of available CSS styles that can be customized.

As it is linked to LiveRC CSS styles, you should not customize it.

The translations can be managed through Wikipédia:LiveRC/Documentation/Traduction/en process

lrcSupprLineParams[modifier le code]

This variable is a list of elements needed to create the "delete line(s)" buttons in RC control panel.

Each element is made of four things :

  1. textid: The text ID of the button tooltip (defined in lrcTexts)
  2. color: The color applied to the button text
  3. class: The className of the RC lines to be deleted
  4. separator: A separator to be added after the button (optional)

YOU HAVE TO SET THE WHOLE VARIABLE, like this :

lrcSupprLineParams = [
  {textid:'HIDE_ALL'      , color:'red'              , class:'*'          , separator:'|' },
  {textid:'HIDE_REVIEWED' , color:'rgb(255,235,71)'  , class:'RcChecked'  , separator:''  },
  {textid:'HIDE_REVERTS'  , color:'rgb(255,99,83)'   , class:'RcRevert'   , separator:''  },
  {textid:'HIDE_NEW'      , color:'rgb(178,243,113)' , class:'RcNew'      , separator:''  },
  {textid:'HIDE_BLANKING' , color:'white'            , class:'RcBlanking' , separator:''  },
  {textid:'HIDE_LOG'      , color:'blue'             , class:'RcLog'      , separator:''  }
];

Note : you would better keep the first line, as it is used to delete all RC lines

Other settings[modifier le code]

Prior settings[modifier le code]

Unlike other configuration settings, these customizations must be done BEFORE the LiveRC code request and OUT of the LiveRC_getSiteCustom() function. It is also needed to set the global variable LiveRC_Config, wich doesn't exist at this step. An installation of this type must be done with the following syntax:

/* ===== Prior settings ===== */

window.LiveRC_Config = {};
LiveRC_Config.SiteConfigPage = 'User:MyName/LiveRCSiteConfig.js'; // Local config page
LiveRC_Config.CSSPage = 'User:MyName/LiveRCSiteConfig.css';       // Local CSS page
LiveRC_Config.UserParamPage = '/LiveRCPersonalConfig';            // User config subpage

/* ===== Posterior settings ===== */

window.LiveRC_getSiteCustom = function (){

  // Here comes the settings

}

/* ===== Request LiveRC code ===== */

mw.loader.load('//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&action=raw&ctype=text/javascript');
Local config page[modifier le code]

The page where is stored the mediawiki local configuration (default is Mediawiki:Gadget-LiveRCSiteConfig.js) can be modified. This can be used when installing LiveRC on a wiki where you don't have the right to edit MediaWiki: namespace pages. It is then possible to choose another page from User: namespace and if LiveRC found that it is one of your personal sub-page, the button MW configuration will appear to you (it will appear too to sysops using the code, as they have the right to edit other users' personal .js pages).

The page name must end with .js. If not, anyone would be able to edit it.

Local CSS page[modifier le code]

The page where is stored local CSS (default is MediaWiki:Gadget-LiveRC-local.css) can be modified. This can be used when installing LiveRC on a wiki where you don't have the right to edit MediaWiki: namespace pages. It is then possible to choose another page from User: namespace.

The page name must end with .css. If not, anyone would be able to edit it.

User config subpage[modifier le code]

The subpage where users store their configs (default is, /LiveRCparam) can be modified.

The page extension (.js) or (.css) is automatically added, so it is useless to add it.

Posterior settings[modifier le code]

These settings are to be stored INSIDE the LiveRC_getSiteCustom() function.

Page content ids[modifier le code]

According to the used skin, the id of the node containing the page content changes. The LiveRC_Config["PageContentIds"] variable define the ids that must be researched to get the page content.

If the site provides additional skins, it may be needed to add one or several other id(s) to the list.

  • The syntax to use to add a new id is:
  /* Page content ids  */
  LiveRC_Config["PageContentIds"].push("mynewid");
Tracking categories[modifier le code]

LiveRC can tag edits made on pages that belongs to these categories with a specific icon. The category list is avaliable at Special:TrackingCategories. The list is actually made of systeme messages (2nd column of the table) wich content set the category. List only non disabled categories (no matters if the category exists or not).

  • Example:
    // Catégories de suivi ([[Special:TrackingCategories]])
  LiveRC_Config["TrackingCategories"] = [
    "expensive-parserfunction-category",
    "post-expand-template-argument-category",
    "post-expand-template-inclusion-category",
    "hidden-category-category",
    "broken-file-category",
    "node-count-exceeded-category",
    "expansion-depth-exceeded-category",
    "score-error-category",
    "massmessage-list-category",
    "commonsmetadata-trackingcategory-no-license",
    "commonsmetadata-trackingcategory-no-description",
    "commonsmetadata-trackingcategory-no-author",
    "commonsmetadata-trackingcategory-no-source",
    "geodata-broken-tags-category",
    "geodata-unknown-globe-category",
    "geodata-unknown-region-category",
    "geodata-unknown-type-category",
    "scribunto-common-error-category",
    "scribunto-module-with-errors-category"
  ];
User groups filtering[modifier le code]

It is possible to define different user groups:

  • The group members list will be populated at LiveRC lauching (do not set a group with too much members or LiveRC will last a long time to start).
  • RC lines styles made by these groups can be styliszed by a classname
  • A icon can be added near the username of the members of these groups
  • The user selector works with these groups

LiveRC has two default groups : sysop and bot.


The example below show an installation with an additionnal group named patroller.

Notas:

  • The variable LiveRC_Config["UserGroupList"] is entirely reset to keep the bot group at the end of the list.
  • If no icon is wanted, just set the type item to -1
  • The styles linked to the classname are optionals
  • Beware to the first letter case in the group name: minus for LiveRC_Config["UserGroupList"] (unless defined othewise in Mediawiki installation), capital in other cases.


In the javascript config, in the LiveRC_getSiteCustom() function:
   // User groups lists
  LiveRC_Config["UserGroupList"] = {
    "patroller" : { list: [], show : true  },
    "sysop"     : { list: [], show : false },
    "bot"       : { list: [], show : false },
  };

   // Icon
  lrcIcons["PatrollerIcon"] = {
      type:0,
      src:"thumb/5/5d/Gnome-stock_person_target.svg/16px-Gnome-stock_person_target.svg.png",
      width:16,
      height:16
  };

   // Texts (default texts : ask translations at [[Discussion MediaWiki:Gadget-LiveRC.js]])
  lrcTexts['PatrollerIcon_Title'] = 'Patroller';
  lrcParamDesc['DescPatrollerIcon'] = 'Patroller';
  lrcParamDesc['DescPatrollerIcon_Title'] = 'Patroller icon tooltip';

   // Customizable class (optional)
  lrcCSSstyles.push({
     target:".RcPatroller .td2RC",
     style:"background-color:#a2a2a2;",
     desc:"RC line : Patroller user" // (default text : ask translations at [[Discussion MediaWiki:Gadget-LiveRC.js]])
    });
In local CSS page or a .css file to be loaded with the gadget using the mw.loader.load() method:
   /* Customizable class (optional) */

/* RC line : Patroller user */
.RcPatroller .td2RC {
  background-color:#a2a2a2;
}
Flagged revisions extension[modifier le code]

If the mediawiki extension Extension:FlaggedRevs is available on your wiki, it is necessary to set its configuration for LiveRC adaptation. Two variables are needed:

  • LiveRC_Config.FlagRevNamespaces : The list of all namespaces where the extension is active. This param match the PHP variable $wgFlaggedRevsNamespaces.
  • LiveRC_Config.FlagRevProtection : Tell if the extension is a part of the protection tool or if the stabilization is set by a dedicated special page, Special:Stabilization. This param match the PHP variable $wgFlaggedRevsProtection

For a Wikimedia Fundation wiki, see this configuration file to know the revelant values.

The correct syntax is the following one, here with the default params:

  /* Flagged Revisions  */
  LiveRC_Config.FlagRevNamespaces = [0, 6, 10, 828];   // Namespaces where Flagged Revs is active
  LiveRC_Config.FlagRevProtection = false;             // Stabilization is part of protection tool ?
Flow extension[modifier le code]

If the mediawiki extension Extension:Flow is available on your wiki, it is necessary to set its configuration for LiveRC adaptation. Three variables are needed:

  • LiveRC_Config["FlowOccupyPages"] : The list of all pages where the extension is active. This param match the PHP variable $wgFlowOccupyPages.
  • LiveRC_Config["FlowOccupyNamespaces"] : The list of all namespaces where the extension is active. This param match the PHP variable $wgFlowOccupyNamespaces.
  • LiveRC_Config["FlowCoreActionWhitelist"] : The list of all actions allowed where the extension is active. This param match the PHP variable $wgFlowCoreActionWhitelist

For a Wikimedia Fundation wiki, see this configuration file to know the revelant values.

The correct syntax is the following one, here with the default params:

  /* Flow  */
  LiveRC_Config.FlowOccupyPages = []; // List of all pages where the extension is active 
  LiveRC_Config.FlowOccupyNamespaces = [2600]; // List of all namespaces where the extension is active   
  LiveRC_Config.FlowCoreActionWhitelist = ['info', 'history', 'protect', 'unprotect', 'unwatch', 'watch']; // List of all actions allowed where the extension is active
Other[modifier le code]

The global config variable LiveRC_Config.CustomCatTemplate is used by LiveRC to categorize the different .js or .css sub-pages it creates like user config sub-pages or translation pages created with ProposeTranslation extension.

By default, its value is "Catégorisation JS", wich will add the {{Catégorisation JS}} template to these pages. The categorization is then managed within the template.