This is an extension to celebrate Wikipedia's 25th birthday, featuring an animated page companion that appears on specific articles with theme-aware animations.
This extension requires:
# LocalSettings.php # Add this to your LocalSettings.php to configure Wikibase Repository and Client # for local development. This config imitates enwiki to some extent by setting # up a local entity source with the same site ID. wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" ); wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" ); require_once "$IP/extensions/Wikibase/repo/config/Wikibase.example.php"; require_once "$IP/extensions/Wikibase/client/config/WikibaseClient.example.php"; $entitySources = [ 'local' => [ 'repoDatabase' => $wgDBname, 'baseUri' => $wgServer . '/entity/', 'entityNamespaces' => [ 'item' => 120, 'property' => 122, ], 'rdfNodeNamespacePrefix' => 'wd', 'rdfPredicateNamespacePrefix' => '', 'interwikiPrefix' => '', ], ]; $wgWBRepoSettings['entitySources'] = $entitySources; $wgWBRepoSettings['localEntitySourceName'] = 'local'; $wgWBClientSettings['entitySources'] = $entitySources; $wgWBClientSettings['itemAndPropertySourceName'] = 'local'; $wgWBClientSettings['siteGlobalID'] = 'enwiki'; $wgWBClientSettings['siteLinkGroups'] = [ 'wikipedia' ];
# Source: https://www.mediawiki.org/wiki/Wikibase/Installation#Run_maintenance_scripts php maintenance/run.php update php maintenance/run.php ./extensions/Wikibase/lib/maintenance/populateSitesTable.php php maintenance/run.php ./extensions/Wikibase/repo/maintenance/rebuildItemsPerSite.php php maintenance/run.php populateInterwiki
-- Run these SQL queries to set up test data for the extension -- This registers the wikibase-item content model and creates site links -- for the test pages (Sleep, Nap, Birthday, Newspaper) with their Wikidata QIDs INSERT INTO content_models (model_id, model_name) VALUES (2, 'wikibase-item'); INSERT INTO wb_items_per_site (ips_item_id, ips_site_id, ips_site_page) VALUES (202833, 'enwiki', 'Social media'), (17517, 'enwiki', 'Mobile phone'), (144334, 'enwiki', 'Printing press'), (5891, 'enwiki', 'Philosophy'), (2927074, 'enwiki', 'Internet meme'), (36348, 'enwiki', 'Dream'), (1, 'enwiki', 'Universe'), (638, 'enwiki', 'Music'), (183998, 'enwiki', 'Camera obscura'), (164444, 'enwiki', 'Funk'), (200538, 'enwiki', 'Party'), (47223, 'enwiki', 'Birthday');
Special:CommunityConfiguration/WP25EasterEggs to enable the extensioneverywhere/allowFilter/blockFilter) via isCompanionEnabled()phone, newspaper, book, etc.) to find the first match using getCurrentCompanionConfig()defaultPages checks if the current page's QID maps to a companion state in default-companion-configs.json.wp25eastereggs-companion-enabled, wp25eastereggs-companion-dreaming).prefers-color-scheme media query and client preference radio buttons.The extension can be configured via Community Configuration with the following options:
everywhere - Show on all eligible pagesallowFilter - Only show on specified pagesblockFilter - Show everywhere except specified pagesphone, newspaper, book, etc.) has individual configuration with:defaultPages - Whether to use default QID mappingsallowPages - Additional pages to show this stateblockPages - Pages to exclude from this stateThe extension allows for the following configuration options in LocalSettings.php:
true: The "Birthday Mode" appearance toggle switch and the Baby Globe companion are displayed (subject to Community Configuration "EnableExtension" setting).false (default): The extension's functionality and visual interventions are disabled, but the extension is still loaded and available for configuration.true: The default companion is shown on all configured pages (unless a specific configuration of the companion is displayed).false (default): The companion is only shown on pages that have a specific configuration (via Community Configuration and predefined pages).