XTools/Development/Configuration

As part of the installation of XTools,  or   may prompt you for configuration options.

XTools database
XTools records basic usage stats in its own database. As a developer, unless you are working on this feature (see https://xtools.wmflabs.org/meta), you can leave these options blank.


 * – Hostname for the server with the XTools database.
 * – Port for the server with the XTools database.
 * – Database name of the XTools database.
 * – Username for the XTools database.
 * – Password for the user for the XTools database.

Database replicas

 * – Username for the replica databases. Use the credentials specified in the  file, located in the home directory of your Toolforge account.
 * – Password for the replica databases.
 * ,  – Host and port for the s1 slice. Repeat for all 8 slices. See XTools/Development for more. In production these values should be   (replacing   with the corresponding slice), and all ports should be.

Tools-db
Some parts of XTools such as the Page History tool communicate with the Toolforge user databases, such as checkwiki.


 * – MySQL host name ( if connecting to the replicas via SSH tunnel). On production this should be
 * – MySQL port number. Use 3306 in production.

Authentication and email
OAuth is used to allow users to make unlimited requests, and to allow them to see detailed statistics of their own account. The credentials need to be requested from meta:Special:OAuthConsumerRegistration. If you are developing locally, you can leave these options blank.


 * – Oauth consumer key.
 * – Oauth consumer secret.

Email is only used to send error reports to the maintainers. If you don’t care about this (such as in development installations), you can use the defaults for all mailer options and no emails will be sent. Note the 'from' and 'to' emails must have valid addresses.


 * – Software for the mailer.
 * – Hostname for the mailer.
 * – Username for the mailer software.
 * – Password for the mailer software.
 * – The 'from' email.
 * – The 'to' email.

Caching
These options are available if you wish to use a cache provider such as Redis. However, XTools will function well using only the file system for caching.


 * – A cache adapter supported by Symfony's Cache Component.  is the default and should work well, but in production we recommend   for better performance.
 * – The DSN of the Redis server, if  is used as the  . If you’re not using Redis, this parameter can be ignored.

Wiki configuration

 * – Full URL of the wiki, used only if  is set to  . The title of pages are attached to the end.
 * – The API path for the projects, usually.
 * – The base URL of whatever wiki you consider to be the “default”. This will be the default value for the “Project” field in the forms. On the Wikimedia installation,  is used because it is the most popular wiki. For single-wiki installations, the “Project” field in the forms are hidden, but you still need to provide this value for.
 * – Which wiki should be used for CentralAuth (if applicable), and also for OAuth authentication. You may want this to be the same as the.
 * – A list of database names of projects that will display restricted statistics regardless of individual users' preferences. For developers working off of the replicas, use

Application

 * – A secret key that’s used to generate certain security-related tokens, and as the secret for the internal API. This can be any non-blank value. If you are using a separate API server (see Wikitech docs), this parameter must have the same value on both the app server and API server. nux.net/secret can auto-generate a secure token for you.
 * – This is used to broadcast a notice at the top of XTools. Set to  to turn this feature on.
 * – Style of the notice banner, correlating to the Bootstrap contextual classes. Available options include,  ,   and.
 * – Message shown to the user. If you provide a valid i18n message key, it will display that message instead.
 * – Point XTools to a single wiki, instead of using a meta database. Use  if you are developing against the wiki replicas.
 * – Whether XTools lives on the Wikimedia Foundation Cloud Services environment. If you are developing against the wiki replicas through an SSH tunnel, set this to
 * – Number of seconds to consider the replicas as "lagged", and show a warning to the user that the data may be out of date. For WMF installations, this parameter is obsolete and can be left blank, as the new replicas do not suffer from noticeable lag.
 * – Maximum allowed time for queries to run. This is to ensure database quota is not exceeded.
 * – Used for rate limiting. This parameter is the number of minutes during which  requests from the same user are allowed. Set this to   to disable rate limiting.
 * – Number of requests from the same user that are allowed during the time frame specified by . Set this to   to disable rate limiting.
 * – Set a maximum number of revisions to process for pages. This is to safeguard against unnecessarily consuming too many resources for queries that will most surely timeout. Set this to  to disable all limitations.
 * – Querying a user that has more edits than this will be rejected. This is to safeguard against unnecessarily consuming too many resources for queries that will most surely timeout. Set this to  to disable all limitations.
 * – Used to get around rate-limiting of the WikiWho API, which is used by the Authorship tool, which is also used in the Page History tool. Leave blank if you're working in a development environment, or are using a non-WMF installation of XTools.
 * – Used to get around rate-limiting of the WikiWho API, which is used by the Authorship feature of the ArticleInfo tool. Leave blank if you're working in a development environment, or are using a non-WMF installation of XTools.
 * – This should be left blank for any non-WMF installation. This is used only to convert legacy XTools URL parameters to the modern equivalents, listing any wikis where there is no specific language associated with it. "meta.wikimedia.org" is intentionally not included. Developers may also leave this value blank.

Tools
Selectively choose which tools to enable within XTools.


 * – Enable the Admin Score tool.
 * – Enable the Admin Statistics tool.
 * – Enable the Page History (aka ArticleInfo) tool.
 * – Enable the Authorship tool (WMF-only).
 * – Enable the Automated Edits tool.
 * – Enable the Blame tool (WMF-only).
 * – Enable the Category Edits tool.
 * – Enable the Edit Counter tool.
 * – Enable the Edit Summaries tool.
 * – Enable the Global Contributions tool.
 * – Enable the Meta tool, which tracks usage of the XTools installation.
 * – Enable the Pages Created tool.
 * – Enable the Bash Quotes tool.
 * – Enable the RfX Analysis tool.
 * – Enable the RfX Vote Calculator tool.
 * – Enable the Simple Counter tool.
 * – Enable the Top Edits tool.