Extension:WikimediaCampaignEvents

This page is a translated version of the page Extension:WikimediaCampaignEvents and the translation is 8% complete.
Příručka k rozšířením MediaWiki
WikimediaCampaignEvents
Stav rozšíření: stabilní
Implementace Speciální stránka
Popis Provides Wikimedia specific features for the CampaignEvents extension.
Autoři Tým kampaní
Zásady kompatibility Vydání snímků současně s MediaWiki. Hlavní vývojová větev není zpětně kompatibilní.
Změny v databázi Ano
Licence GNU General Public License 2.0 nebo novější
Stáhnout
  • $wgWikimediaCampaignEventsFluxxOauthUrl
  • $wgWikimediaCampaignEventsSparqlEndpoint
  • $wgWikimediaCampaignEventsFluxxClientSecret
  • $wgWikimediaCampaignEventsFluxxClientID
  • $wgWikimediaCampaignEventsFluxxBaseUrl
Čtvrtletní stahování 1 (Ranked 132nd)
Přeložte rozšíření WikimediaCampaignEvents, používá-li lokalizaci z translatewiki.net
Problémy Otevřené úkoly · Nahlásit chybu
  • Stáhněte soubor/y a vložte je do adresáře pojmenovaného WikimediaCampaignEvents ve vaší složce extensions/.
    Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaCampaignEvents
  • Na konec vašeho souboru LocalSettings.php přidejte následující kód:
    wfLoadExtension( 'WikimediaCampaignEvents' );
    
  • Spusťte aktualizační skript, který automaticky provede všechny nezbytné databázové změny, jaké rozšíření vyžaduje.
  • Add the credentials for the Fluxx API to your LocalSettings.php
  • Yes Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.

Dependencies

Configuration

Setting name Default value Description
$wgWikimediaCampaignEventsFluxxOauthUrl 'https://wmf.fluxx.io/oauth/token' Oauth URL for the Fluxx API.
$wgWikimediaCampaignEventsFluxxBaseUrl 'https://wmf.fluxx.io/api/rest/v2/' Base URL of the Fluxx API.
$wgWikimediaCampaignEventsFluxxClientID null Client ID to use for the Fluxx API.
$wgWikimediaCampaignEventsFluxxClientSecret null Client secret to use for the Fluxx API.
$wgWikimediaCampaignEventsSparqlEndpoint 'https://query-main.wikidata.org/sparql' The URL of the primary SPARQL endpoint.

API

Integration with the Wikidata Query Service

The extension integrates with the Wikidata Query Service to show a list of all WikiProjects on Special:AllEvents. This functionality is implemented via the WikiProjectIDLookup class, which is based on SparqlClient.

WikiProjects are stored in the main stash for up to one week. However, the list is regenerated as soon as the value is older than one hour. All the value regenerations happen in a deferred update that does not block the main request: the user might be served a stale value while the fresh list is regenerated asynchronously.

Note that, if nobody visits the Special:AllEvents page for a whole week, the list of WikiProjects would expire, and an error would be shown upon loading the page. A data update should be enqueued at the same time, so the data should become available again shortly afterwards.

See also