As an user I would like to be shown links that will help me remove the blocks for my current account.
The information provided to us are:
Deny vanishing submissions if the user’s account is not in good standing
If the user has local blocks or global blocks, we should not give them the option to vanish their account.
In such cases we should simply show them a link for each wiki that they are blocked on to help them unblock the account. Please use the following logic to determine which links to guide the user to for a block on a given Wikipedia:
- For each Wikipedia that has a specific page for appealing a block: https://www.wikidata.org/wiki/Q13360396
- For each Wikipedia that does not have a page for appealing a block: https://www.wikidata.org/wiki/Q175291
- For some reason if none of these exist, please default to the English version: https://en.wikipedia.org/wiki/Wikipedia:Appealing_a_block
To use the above wikidata entry you have to use the API as shown in the following example:
URL string:
https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&ids=Q13360396&props=sitelinks%7Csitelinks%2Furls&formatversion=2
JSON:
{
"action": "wbgetentities",
"format": "json",
"ids": "Q13360396",
"props": "sitelinks|sitelinks/urls",
"formatversion": "2"
}PHP:
[ "action" => "wbgetentities", "format" => "json", "ids" => "Q13360396", "props" => "sitelinks|sitelinks/urls", "formatversion" => "2" ]
Outputs something like the following:
{
"entities": {
"Q13360396": {
"type": "item",
"id": "Q13360396",
"sitelinks": {
"dewiki": {
"site": "dewiki",
"title": "Wikipedia:Sperrprüfung",
"badges": [],
"url": "https://de.wikipedia.org/wiki/Wikipedia:Sperrpr%C3%BCfung"
},
"enwiki": {
"site": "enwiki",
"title": "Wikipedia:Appealing a block",
"badges": [],
"url": "https://en.wikipedia.org/wiki/Wikipedia:Appealing_a_block"
}
}
}
},
"success": 1
}- For some reason if none of these exist, please default to the English version: https://en.wikipedia.org/wiki/Wikipedia:Appealing_a_block
AC:
- Crete a method that create a list of "links" for the blocked wikis
- Show this links on the page (the one showed when the user tries to do a request but has blocks).