XTools/Development/Configuration

As part of the installation of XTools, you'll need to provide values for various configuration options. Sensible defaults are included, but at minimum you should have your own database connection. All configuration is done in the  file, which should be initially copied from.

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.


 * – The data source path of the mailer, including any necessary credentials.

Caching
In development, the filesystem is used as the caching adapter. In production, it uses APCu. Since XTools version 3.17, the adapters are no longer configurable.

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

 * – Use  for local environments.
 * – 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.

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 Largest pages tool.
 * – Enable the Meta tool, which tracks usage of the XTools installation.
 * – Enable the Pages Created tool.
 * – Enable the Bash Quotes tool.
 * – Enable the Simple Counter tool.
 * – Enable the Top Edits tool.