User:Bumsakalaka

From Wikicarpedia
Jump to navigation Jump to search


Hi Carcassonne community. I'm Bumsakalaka (CarcC, CarcCZ)

I discovered Carcassonne couple years ago and during COVID quarantine I discovered a big world of Fan expansions. This totally changed my view to this game. With IT background I joined teams on Czech forum, Carcassonne Central, JCloisterZone and finally WikiCarpedia.

My idea is to choose best fan expansions and update rules for them to allow to play it with other official and also fan expansions. This is not so easy tasks, because some of authors are not active these days. But community which knows official rules and common rules principles helped me and others to make rules consistent and create nice example pictures how it can be played.

Wen you are interested on fan expansions then check:

Translations help to Slovak language

Quick links

Features & Roles / Územia a role

Feature Role Územie Rola Expansion C1 Expansion C2
Road Highwayman Cesta Lupič Base GameBase Game Base GameBase Game
City Knight Mesto Rytier Base GameBase Game Base GameBase Game
Monastery Monk Kláštor Mních Base GameBase Game Base GameBase Game
Field Farmer Lúka Sedliak - The FarmersThe Farmers
Garden 'Monk' Záhrada Mních - The AbbotThe Abbot
Large expansions
Inn - Hostinec - 1. Inns & Cathedrals1. Inns & Cathedrals 1. Inns & Cathedrals1. Inns & Cathedrals
Cathedral - Katedrála - 1. Inns & Cathedrals1. Inns & Cathedrals 1. Inns & Cathedrals1. Inns & Cathedrals
Trade token - Žetón s tovarom - 2. Traders & Builders2. Traders & Builders Exp. 2Exp. 2
Magic portal - Tajná chodba - 3. The Princess & the Dragon3. The Princess & the Dragon Exp. 3Exp. 3
Volcano - Sopka - 3. The Princess & the Dragon3. The Princess & the Dragon Exp. 3Exp. 3
Abbey Monk Opátstvo Mních 5. Abbey & Mayor5. Abbey & Mayor Exp. 5Exp. 5
Shrine Monk Svätyňa Kacír 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
City of Carcassonne - Mesto Carcassonne 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
The castle - Zámok 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
The market - Tržnica 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
The blacksmith - Kováčska dieľňa 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
The cathedral - Katedrála 6. Count, King & Robber6. Count, King & Robber Exp. 6Exp. 6
Bazaar - Bazár 8. Bridges, Castles & Bazaars8. Bridges, Castles & Bazaars Exp. 8Exp. 8
Bridge - Most 8. Bridges, Castles & Bazaars8. Bridges, Castles & Bazaars Exp. 8Exp. 8
Castle - Hrad - 8. Bridges, Castles & Bazaars8. Bridges, Castles & Bazaars Exp. 8Exp. 8
Vineyars - Vinice - 9. Hills & Sheep9. Hills & Sheep Exp. 9Exp. 9
Abrobarts place? - Cvičisko? - - 10. Under the Big Top10. Under the Big Top
Mini expansions
Club Crop Circle ̠ Feature Crop CirclesCrop Circles
Baba Yaga Chalúpka Baby Jagy Russian PromosRussian Promos Solovei Razboynik Slavík lúpežník Russian PromosRussian Promos
Vodyanoy Vodník Russian PromosRussian Promos
Coiners quarter Štvrť minciarov The Markets of LeipzigThe Markets of Leipzig
Tanners quarter Štvrť garbiarov The Markets of LeipzigThe Markets of Leipzig
PnP expansions
Fortune Teller - Veštecký stan Veštkyňa Fortune TellerFortune Teller
Fan expansions
Castle - Hrad - Castle LordsCastle Lords
Castle Road Castle Lord Hradná cesta Hradný pán Castle LordsCastle Lords

Figures / Figúrky & Tokens / Žetóny & Pieces / ?

English Slovak Type Player
color
Limited
Features
Introducing
Expanion
Prináša
rozšírenie
Tile Kartička krajiny Tile - - Base GameBase Game Base GameBase Game
Figure Figúrka Figure - - Base GameBase Game Base GameBase Game
Follower Spoločník Meeple Yes - Base GameBase Game Base GameBase Game
Abbot Opát Meeple Yes Monastery, Garden The AbbotThe Abbot The AbbotThe Abbot
Large expansions
Large Meeple Veľký spoločník Meeple - - Exp. 1Exp. 1 Exp. 1Exp. 1
Trade tokens Žetóny tovaru Special token - - Exp. 2Exp. 2 Exp. 2Exp. 2
Supporting figure ??? Supporting figure - - Exp. 2Exp. 2 Exp. 2Exp. 2
Pig Prasiatko Supporting figure Yes - Exp. 2Exp. 2 Exp. 2Exp. 2
Builder Staviteľ Supporting figure Yes - Exp. 2Exp. 2 Exp. 2Exp. 2
Special figure Špeciálna figúrka Special figure - - Exp. 3Exp. 3 Exp. 3Exp. 3
Dragon Drak Neutral figure - - Exp. 3Exp. 3 Exp. 3Exp. 3
Fairy Víla Neutral figure - - Exp. 3Exp. 3 Exp. 3Exp. 3
Mayor Starosta Meeple Yes City Exp. 5Exp. 5 Exp. 5Exp. 5
Wagon Voz Meeple Yes - Exp. 5Exp. 5 Exp. 5Exp. 5
Barn Statok Supporting figure Yes - Exp. 5Exp. 5 Exp. 5Exp. 5
Count Gróf Neutral figure - - Exp. 6Exp. 6 Exp. 6Exp. 6
Special Tile Špeciálna kartička Special tile - - Exp. 6Exp. 6 Exp. 6Exp. 6
King Tile Kartička Kráľ Special tile - - Exp. 6Exp. 6 Exp. 6Exp. 6
Robber Tile Kartička Lúpežný rytier Special tile - - Exp. 6Exp. 6 Exp. 6Exp. 6
Scoring Marker Žetón bodov Special token - - Exp. 6Exp. 6 Exp. 6Exp. 6
King Marker Žetón Kráľ Special token - - Exp. 6Exp. 6 Exp. 6Exp. 6
Robber Marker Žetón Lúpežný rytier Special token - - Exp. 6Exp. 6 Exp. 6Exp. 6
Castle token Žetón hradu Special token - - Exp. 8Exp. 8 Exp. 6Exp. 6
Wooden bridge Drevený most Neutral piece - - Exp. 8Exp. 8 Exp. 6Exp. 6
Mini expansions
Gold piece Zlatá tehlička Neutral piece - - Mini #4 - The GoldminesMini #4 - The Goldmines
Change Position Zmena pozície Card - - The GiftsThe Gifts
Road Sweeper Zametač ciest Card - - The GiftsThe Gifts
Synod Synoda Card - - The GiftsThe Gifts
PnP expansions
Fan expansions

Turn phases / Fázy ťahu

English Slovak
1. Placing a tile 1. Priloženie kartičky
2. Placing a follower 2. Umiestnenie figúrky spoločníka
2. Placing a figure X 2. Umiestnenie figúrky X
3. Scoring a feature 3. Započítanie bodov

Expansions / Rozšírenia

Template Expansion EN C1 Rozšírenie SK C1 Expansion EN C2 Rozšírenie SK C2
{{BaseGameLink}} edit Base GameBase Game Base GameBase Game Base GameBase Game Base GameBase Game
{{FarmersLink}} edit - - The FarmersThe Farmers The FarmersThe Farmers
{{RiverLink}} edit RiverRiver RiverRiver RiverRiver RiverRiver
{{AbbotLink}} edit - - The AbbotThe Abbot The AbbotThe Abbot
Standalone playable expansions
{{WheelFortuneLink}} edit The Wheel of FortuneThe Wheel of Fortune The Wheel of FortuneThe Wheel of Fortune - -
{{MistsOverCarcassonneLink}} edit - - Mists over Carcassonne [[Mists over Carcassonne/sk|Duchovia Carcassonne]]
Large Expansions (expansion number order)
{{InnsCathedralsLink}} edit Inns & CathedralsInns & Cathedrals Inns & CathedralsInns & Cathedrals Inns & CathedralsInns & Cathedrals Inns & CathedralsInns & Cathedrals
{{TradersBuildersLink}} edit Traders & BuildersTraders & Builders Traders & BuildersTraders & Builders Traders & BuildersTraders & Builders Traders & BuildersTraders & Builders
{{PrincessDragonLink}} edit The Princess & the DragonThe Princess & the Dragon The Princess & the DragonThe Princess & the Dragon The Princess & the DragonThe Princess & the Dragon The Princess & the DragonThe Princess & the Dragon
{{TowerLink}} edit The TowerThe Tower The TowerThe Tower The TowerThe Tower The TowerThe Tower
{{AbbeyMayorLink}} edit Abbey & MayorAbbey & Mayor Abbey & MayorAbbey & Mayor Abbey & MayorAbbey & Mayor Abbey & MayorAbbey & Mayor
{{CountKingRobberLink}} edit Count, King & RobberCount, King & Robber Count, King & RobberCount, King & Robber Count, King & RobberCount, King & Robber Count, King & RobberCount, King & Robber
{{BridgesCastlesBazaarsLink}} edit Bridges, Castles & BazaarsBridges, Castles & Bazaars Bridges, Castles & BazaarsBridges, Castles & Bazaars Bridges, Castles & BazaarsBridges, Castles & Bazaars Bridges, Castles & BazaarsBridges, Castles & Bazaars
{{HillsSheepLink}} edit Hills & SheepHills & Sheep Hills & SheepHills & Sheep Hills & SheepHills & Sheep Hills & SheepHills & Sheep
{{UnderBigTopLink}} edit - - Under the Big TopUnder the Big Top Under the Big TopUnder the Big Top
Mini expansions (alphabetical order)
{{BesiegersLink}} edit The BesiegersThe Besiegers The BesiegersThe Besiegers - -
{{CatharsLink}} edit The CatharsThe Cathars The CatharsThe Cathars - -
{{SiegeLink}} edit SiegeSiege SiegeSiege - -
{{LabyrinthLink}} edit - - The LabyrinthThe Labyrinth The LabyrinthThe Labyrinth
{{RiverLink}} edit RiverRiver RiverRiver RiverRiver RiverRiver
{{RiverLink|variant=I}} edit RiverRiver RiverRiver RiverRiver RiverRiver
{{RiverLink|variant=II}} edit RiverRiver RiverRiver RiverRiver RiverRiver
{{RiverLink|variant=III}} edit RiverRiver RiverRiver - -
{{RiverLink|variant=20}} edit - - RiverRiver RiverRiver
{{SpielPromosLink}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2014}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2015}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2016}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2017}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2018}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2019}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2020}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
{{SpielPromosLink|variant=2021}} edit - - Spiel PromosSpiel Promos Spiel PromosSpiel Promos
PnP expansions (alphabetical order)
{{CityGatesLink}} edit The City GatesThe City Gates The City GatesThe City Gates - -
{{FortuneTellerLink}} edit - - Fortune TellerFortune Teller Fortune TellerFortune Teller
{{LandSurveyorsLink}} edit - - The Land SurveyorsThe Land Surveyors The Land SurveyorsThe Land Surveyors
Fan expansions (alphabetical order)
{{CastleLordsLink}} edit Castle LordsCastle Lords Castle LordsCastle Lords
{{PorxadaLink}} edit La PorxadaLa Porxada La PorxadaLa Porxada
{{RobbersSonLink}} edit Robber's SonRobber's Son Robber's SonRobber's Son Robber's SonRobber's Son Robber's SonRobber's Son
{{WellsLink}} edit The WellsThe Wells The WellsThe Wells The WellsThe Wells The WellsThe Wells

Wiki / WiCa / WikiMedia

Topic URL Description
ExpansionLink Template:ExpansionLink Description of ExpansionLink template
Tables [[2]] colspan for table cell
Carcassonne Boxes [[3]] Murphy031:Boxes
Unfinished [[4]] Open pages for translation into Slovak
Page Language [[5]] Possible usage of languaage code in Templates
Translation of language [[6]] Translation of language to page language
numbered Numbered name of expansion
full Full name of expansion
short Short name of expansion
abbr Abbr. of expansion
name Name of expansion
Magic words [[7]]
Conditionals and parsing [[8]]
Translating wiki [[9]]
Convert template to text [[10]] - using {{subst:teamplte name}}
Formating Help:Formating
Substituing Substitution
Image Extended syntax Images syntax
Sitemap sitemap.xml
Collapsible content Manual:Collapsible_elements
Grammar forms of words for translators Manual:$wgGrammarForms

Some texts

English Slovak
Back of tile Rub kartičky (svetlý / tmavý)
Starting tile Štartovacia kartička
showing / depicing vyznačené (v zmysle zobrazené napr. kláštory)
Large city tiles Dosky mesta
Points tile Kartička bodov 50/100
Small city Malé mesto
Content Herný materiál
* '''X new land tiles''' depicting XYZ. * '''X kartičky krajiny''' s XYZ.
New land tiles Nové kartičky krajiny
New land tiles are played.. mix ... Nové kartičky krajiny sa prikladajú k hernému plánu podľa obvyhlých pravidiel zo {{BasicGameLink/sk|text=základnej hry}}.
Rules Pravidlá
Tile distribution Zoznam kartičiek
Total tiles Celkovo kartičiek
... Niektoré kartičky krajiny znázorňujú dodatečné ilustrácie, ktoré môžu mať význam v kombinácii s niektorým z ďalších rozšírení. Označenie písmenami ponechávame v pôvodnom znení:
... G - záhrada, B - farma, T - vodná veža, S - kravín
... Voz sa premiestňuje
... Územie sa uzatvára
draw tile otočenie artičky (v zmysle potiahnutia si novej)
väčšina prevaha
Final scoring Záverečné vyhodnotenie
Completly surround Úplne obklopený
Completed/Finished Uzavretý
Unfinished Neuzavretý
Occupied Obsadený
.... ... obsadí ako mních
??? Susedné kartičky
capture meeple zajať spoločníka
... získa body
{{#translation:}}
Extended variant Pokročilý variant The LabyrinthThe Labyrinth
Extended variant Pokročilý variant The LabyrinthThe Labyrinth
Double tile Dvojkartička Castles in GermanyCastles in Germany

Some codes

Include example image with larger image, needs to shring it

[[File:Gambler%27s_Luck_C2_Example_01.png|400px|thumb|frame|none|'''Example:''' Example description will be wrapped into width of image frame.]]

Example: Example description will be wrapped into width of image frame.

Total tiles: 12
River II C1 Tile 02.jpg ×1
River II C1 Tile 05.jpg ×1
River II C1 Tile 06.jpg ×1
River II C1 Tile 07.jpg ×1
River II C1 Tile 08.jpg ×1
River II C1 Tile 09.jpg ×1
River II C1 Tile 10.jpg ×1
River II C1 Tile 11.jpg ×1
River II C1 Tile 12.jpg ×1


Special:Permanentlink/223426

How to add links for loged user but hidden for all others

[telegram] <jhsoby> ok. then CSS is your best bet.
[telegram] <jhsoby> In the template, you do something like this:
[telegram] <jhsoby> 
[telegram] <jhsoby> `<span class="templateedit">[edit link here]</span>
[telegram] <jhsoby> 
[telegram] <jhsoby> `then in MediaWiki:Common.css, you put:
[telegram] <jhsoby> 
[telegram] <jhsoby> ```
[telegram] <jhsoby> .templateedit { display: none; }
[telegram] <jhsoby> 
[telegram] <jhsoby> ```
[telegram] <jhsoby> And then in MediaWiki:Group-sysop.css, you put:
[telegram] <jhsoby> 
[telegram] <jhsoby> `.templateedit { display: block; }`
[telegram] <jhsoby> Maybe there's a different group that can edit templates on your wiki. In that case, substitute "sysop" with the canonical name of that group (find the canonical name by going to Special:Listusers, choosing the group that can edit templates, and look in the URL what that group is called in the software
[telegram] <jhsoby> `<span class="plainlinks templateedit">[{{fullurl:Template:Prague/̣̪{{PAGELANGUAGE}}|action=edit}} edit]</span>`
[telegram] <jhsoby> the `plainlinks` class makes it so there's no external link icon before the link, since this is technically an external link

Version selector

As responsive grid

20AE Base Game C2 Tile O.png Tieto pravidlá sú k dizajnu týchto kartičiek Base Game C2 Tile O.jpg
Base Game C1 Tile 10.jpg Ak majú vaše kartičky tento dizajn, otvorte si pravidlá Base Game Base Game Base Game C1 Tile 10.jpg
Alebo majú vaše kartičky úplne iný dizajn? Potom si vyberte z hier rodiny Carcassonne Rule selection by design Spin-offs.png

By template

{{ChooseDesign}}

[[File:{{{image}}}|x75px|class=notpageimage|link=]] You are reading the rules for this tile design.
If your tiles have a different design, then choose a game from Spin-offs.Rule selection by design Spin-offs.png

{{ChooseDesign|image=20AE_Base_Game_C2_Tile_O.png|image2=Base_Game_C2_Tile_O.jpg}}

20AE Base Game C2 Tile O.png You are reading the rules for this tile design. Base Game C2 Tile O.jpg
If your tiles have a different design, then choose a game from Spin-offs.Rule selection by design Spin-offs.png

{{ChooseDesign|image=20AE_Base_Game_C2_Tile_O.png|image2=Base_Game_C2_Tile_O.jpg|otherimage=Base_Game_C1_Tile_10.jpg|otherlink={{BaseGameLink|edition=C1|logo=noborder}}}}

20AE Base Game C2 Tile O.png You are reading the rules for this tile design. Base Game C2 Tile O.jpg
Base Game C1 Tile 10.jpgRead the following rules if your tiles look like this.
Base Game Base Game
If your tiles have a different design, then choose a game from Spin-offs.Rule selection by design Spin-offs.png

{{ChooseDesign|image=Princess_And_Dragon_C2_Tile_M.jpg|otherimage=Princess_And_Dragon_C1_Tile_17.jpg|otherlink={{PrincessDragonLink|edition=C1|logo=noborder}}}}

Princess And Dragon C2 Tile M.jpg You are reading the rules for this tile design.
Princess And Dragon C1 Tile 17.jpgRead the following rules if your tiles look like this.
The Princess & the Dragon The Princess & the Dragon
If your tiles have a different design, then choose a game from Spin-offs.Rule selection by design Spin-offs.png

{{ChooseDesign|image=Home_Page_The_Castle_Zamek.jpg|image2=Home_Page_The_Castle.jpg}}

Home Page The Castle Zamek.jpg You are reading the rules for this tile design. Home Page The Castle.jpg
If your tiles have a different design, then choose a game from Spin-offs.Rule selection by design Spin-offs.png


Fan Expansions Summary Table

Test how will be output of table for Fan Expansions with Complete Rules when designed as table.

Expansion Author(s) C1 C2 C3 New tiles New features New figures New game mechanics
Bards of CarcassonneBards of Carcassonne Trebuchet Yes - - Yes - - Yes
Castle LordsCastle Lords Trebuchet Yes - - Yes Yes - Yes
The City GatesThe City Gates PresetM Yes - - Yes Yes - Yes
COVID-19COVID-19 Danka/šmoula - - Yes Yes - - Yes
Easter in CarcassonneEaster in Carcassonne Fritz_Spinne Yes - - Yes Yes Yes Yes
Family FeudFamily Feud Frédérick Renaud/Novelty Yes - - Yes - - Yes
Fortune TellerFortune Teller Jeffrey Putnam Yes Yes - Yes Yes - Yes
The LabyrinthsThe Labyrinths Stalcupojoy Yes - - Yes - - -
La PorxadaLa Porxada Oriol Comas i Coma Yes - - Yes - - Yes
Robber's SonRobber's Son Snearone Yes Yes - Yes - - Yes
The WellsThe Wells meepleater/novelty Yes - - Yes - - Yes

Link Attributes / Breadcrumbs tests

Link Attributes

External link carcassonnecentral.com|itemprop=item with itemprop=item (text from link |itemprop=item has to be hidden)
Internal link Main Page|itemprop=item with itemprop=item (text from link |itemprop=item has to be hidden)

Breadcrumbs

- this has to be replaced with {{TranslatedPageNameLink|type=breadcrumbs}}
  1. About the author
  2. Foreword to the first edition
  3. Foreword to the second edition

Other expansions



Transmogrifying...

Meeple on Piece

Figure Meeple red.png
Figure Bridge.png
Figure Wagon red.png
Figure Bridge.png
Figure Ringmaster red.png
Figure Bridge.png
Figure Guard Meeple red.png
Figure Bridge.png
Figure Guard Meeple red.png
Figure Bridge.png
Figure Guard Meeple red.png
Figure Bridge.png
Figure Guard Meeple red.png
Figure Bridge.png

Basic width of Piece|name=Bridge is 150px

Figure Guard Meeple red.png
Figure Bridge.png

Basic width of Piece|name=CityBridge is 195px

Figure Mayor red.png
Figure City Bridge.png
Figure Mayor red.png
Figure City Bridge.png
Figure Mayor red.png
Figure City Bridge.png
Figure MeepleLarge red.png
Figure Tower.png
Figure Tower.png
Figure Meeple red.png
Figure Tower black.png
Figure Tower.png
Figure Guard Meeple red.png
Figure Tower black.png
Figure Tower.png

Multiple features template prototype

Peasant Revolts C2 Revolt Symbol Cities.png
Peasant Revolts C2 Revolt Symbol Roads.png
Peasant Revolts C2 Revolt Symbol Monasteries.png

SVG Image test

File:Symbol Black Dragon.svg

Ideas for MediaWiki extensions

Automatic purge page after mark for translations

  • Automatic purge page after mark for translations - this will speed up distribution of changes of translated page, specially for templates
https://www.mediawiki.org/wiki/Manual:Pywikibot/touch.py
[telegram] <jhsoby> 
[telegram] <jhsoby> `python3 pwb.py touch -transcludes:"your template's name" 

Developer Search

  • Search over source codes like Special:ReplaceText but without possibility of accidentally replacing text.

Mobile depends parsing, which stores two version of same page. One for mobile devices and one for desktops. It allows to change styles etc. directly in Templates and in content

  • Styles for mobile view like data-mobile-style="blah blah" which will be used on mobile view and will rewrite style if any
  • Find a way how to generate mobile device cache and desktop device cache file and provide it be template
    • Example for show different cache for mobile and desktop by MobileDetect extention
$mobile = wfMobileDetect();
$cacheKey = $title->getPrefixedDBkey();
if ($mobile) {
    $cacheKey .= '-mobile';
} else {
    $cacheKey .= '-desktop';
}
$page = $cache->get($cacheKey);
if (!$page) {
    // Generate the page and store it in the cache
    $page = generatePage($title);
    $cache->set($cacheKey, $page);
}
// Output the page
echo $page;
    • Example by MobileContext extension which is part of MediaWiki
$context = MobileContext::singleton();
$isMobile = $context->shouldDisplayMobileView();
if ($isMobile) {
    // Code for mobile devices
} else {
    // Code for non-mobile devices
}
    • New parser function which test if current user is mobile device or not usage {{#ifmobile:stuff for mobiles|stuff for destop}}
		$parser->setFunctionHook( 'ifmobile', static function ( Parser $parser, $mobile_input = '', $nomobile_input = '' ) {
			if ( wfMobileDetect() ) {
				return $parser->recursiveTagParse( $mobile_input );
			} else {
				return $parser->recursiveTagParse( $mobile_input );
			}
		} );
    • Delete cache for both page $title = /* the title of the page to purge */;

$cacheKeyDesktop = $title->getPrefixedDBkey() . '-desktop';
$cacheKeyMobile = $title->getPrefixedDBkey() . '-mobile';
$cache->delete($cacheKeyDesktop);
$cache->delete($cacheKeyMobile);

    • Call public static function onArticlePurge( &$article ) { ... }

extension.json
{
  "Hooks": {
    "ArticlePurge": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticlePurge"
  }
}
extenstion file
namespace MediaWiki\Extension\MyExtension;
class Hooks {
    public static function onArticlePurge( $wikiPage ) {
        $title = $wikiPage->getTitle();
        $cache = \MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache();
        // Get the cache keys for mobile and desktop versions
        $cacheKeyDesktop = $cache->makeKey( 'page', $title->getPrefixedDBkey(), 'desktop' );
        $cacheKeyMobile = $cache->makeKey( 'page', $title->getPrefixedDBkey(), 'mobile' );
        // Delete both caches
        $cache->delete( $cacheKeyDesktop );
        $cache->delete( $cacheKeyMobile );
        return true;
    }
}

    • Another solution CustomCacheKey,but it looks like not used that $thatus->value['cacheKey'] value when reading the cache, need to be tests. If this is working, this will be best solution.
<?php
extensions/CustomCacheKey/CustomCacheKey.php
class CustomCacheKey {
    public static function onPageContentSaveComplete($wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, $status) {
        // Your custom logic here
        // Modify the cache key based on the page content, user, or other factors
        $cacheKey = $wikiPage->getTitle()->getPrefixedDBkey();
        if (wfMobileDetect()) {
            $cacheKey .= '_mobile'; // Add your custom suffix
        }
        // Set the modified cache key
        $status->value['cacheKey'] = $cacheKey;
    }
}
extension.json
{
    "Hooks": {
        "PageContentSaveComplete": "CustomCacheKey::onPageContentSaveComplete"
    }
}
  • Final solution IfMobile extension. Which is total easy.

Storage

1. Mists over Carcassonne - Slovak introduction - https://www.youtube.com/watch?v=bUBT6ohid6k