15
votes
Accepted
How can I list all templates available on a MediaWiki Wiki?
Because templates are just normal pages with a specific type of content on them, there is no one set-in-stone way of finding a list of templates. However, the majority of MediaWiki sites will use a ...
6
votes
Accepted
How can I see all pages that were created by a specific Wikipedia user?
There's a tool for that: https://tools.wmflabs.org/xtools/pages/
(XTools has some other useful tools as well)
Alternatively, on any specific wiki, you can also show all pages created by any named ...
4
votes
Accepted
How do I create a simple template that adds a category in a Mediawiki template?
Square brackets instead of braces.
<noinclude>This is a template to mark articles that needs an update. All these articles are listed under [[:Category:Articles that needs update]]</...
4
votes
Accepted
Is it possible to do basic transformation of text in a MediaWiki template?
For lower case use {{lc:...}} parser function.
For replacement in the string, use {{#replace:(string)|<nowiki> </nowiki>|-}}. Note that the space as parser function parametre has to be ...
4
votes
Is there a way to filter Wikipedia tables?
The Wikipedia Table filter Greasemonkey script does what you want:
Script Summary: Filters wikipedia tables by removing all rows that have an undesired value, or by deleting certain rows and ...
4
votes
Line by line display of author responsible for contribution on MediaWiki page
Inspired by previous answers, I've adapted the Mercurial script (Pastebin) shared in @eug's solution to instead use Git as backend.
mediawiki2git * GitLab
Simple Python script to convert MediaWiki ...
3
votes
Accepted
How to upload a "fair use" image to Wikipedia - Wikimedia does not allow it
"Fair use" media files are not allowed on Commons
https://commons.wikimedia.org/wiki/Commons:Fair_use
If you want to include a fair use image in Wikipedia, you'll have to use the local language ...
3
votes
Accepted
Can I remove a template from a category in MediaWiki?
This sounds like a job for the <includeonly> tag. Anything in it will only be included when the template is transcluded, not on the template page itself. For your example, the template code would ...
3
votes
Accepted
Is it possible to search MediaWiki sites using regular expressions?
It's available and powered by the CirrusSearch (based on ElasticSearch) which is the used search engine in the MediaWiki sites, and the Wikimedia platform.
Some usage examples:
Note: Full guide ...
2
votes
Is there a way to download a list of all Wikipedia categories?
Use the API. A list of API clients is here: https://www.mediawiki.org/wiki/API:Client_code
For example, using the command-line wikiget:
./wikiget.awk -z wiktionary -c "Spanish proper nouns" > ...
2
votes
Line by line display of author responsible for contribution on MediaWiki page
You might prefer to convert the history of the page to Git, and then use your favourite IDE/command-line tools to search the history.
Python Script
Save the following script in mwdump on your PATH:
#!/...
2
votes
How do I write an asterisk at the beginning of a line in wiki syntax without transforming into a list item?
The other answers didn't seem to work for me in an Azure DevOps\VSTS wiki (which purports to be 'markdown'). What did work was using '\' as an escape character i.e.
\* Hello world, this sentence is ...
2
votes
How to export all pages from MediaWiki to hierarchy of HTML files
I recently had the task to export a small MediaWiki to HTML.
I wrote a script in Python.
It is not perfect, but covers links between the pages even with anchors and links to non-existing pages, images,...
2
votes
Accepted
About installing SimpleMathJax extension for Mediawiki
I'm the one of the authors of SimpleMathJax.
"Heavy" means MathJax has many resources including styles, scripts and fonts(!). So, I recommended using CDN. But MathJax is much faster now. ( Actually, "...
2
votes
Preventing hackers from ruining my MediaWiki site
The way to do this is:
Check your backups.
Subscribe to the MediaWiki mailinglist (in order to be informed of security issues and other updates).
Install a new clean MediaWiki
Configure the user ...
2
votes
Accepted
How can you search meta-data tags in Media Wiki / Wikipedia?
In Wikipedia, the information from infoboxes is often retrieved from WikiData. It can be queried there.
If you have your own installation of MediaWiki, you can install Semantic MediaWiki and enrich ...
1
vote
How can I get rid of Dark Mode from MinervaNeue on Desktop Wikipedia?
I found the issue myself. Ensure that you are not using the Dark Mode gadget from User:Volker E. (WMF). You can toggle this gadget by navigating to the gadget subsection of user preferences and ...
1
vote
How to automatically show an outdated warning message after "n" days in MediaWiki?
An ArticleViewHeader hook maybe?
$wgHooks['ArticleViewHeader'][] = function ( &$article, &$outputDone, &$pcache ) {
$lastUpdate = new DateTime( $article->getTimestamp() );
$...
1
vote
MediaWiki plural links
No. If you really want you can write a template that containes something like [[{{{1}}}s|{{{1}}}]] and is called like {{p|widget}}. Probably does way more problems than worth it though. Or you can ...
1
vote
Accepted
Transclude a page from another language or another project
It's not possible. As specified in the documentation:
The general syntax for transclusion on Wikipedia is {{Namespace:Pagename}}, where Namespace:Pagename describes the title of a Wikipedia page.
...
1
vote
Is there a tool to clean up Wikipedia articles where there are duplicate references?
I've written a tool for this purpose, but it can only do exact match on <ref> tags (at least for now). It's not smart enough to detect, for example, two different references having say 90% ...
1
vote
Is there a tool to clean up Wikipedia articles where there are duplicate references?
I went on the wikipedia-en-help IRC and asked.
Someone suggested using Refill as a solution and it worked quite well but is exceptionally slow so I hope to find an alternative.
1
vote
Accepted
What is the easiest way to fix multiple dead links a article Wikipedia?
InternetArchiveBot for example has a bunch of link rot related services.
1
vote
Accepted
How to cancel MediaWiki's password reset’s email count?
Via user_newpass_time, e.g. UPDATE user SET user_newpass_time = 20000101000000' WHERE user_name = '...';
1
vote
Accepted
Wikipedia API - get random page(s) using rest api
Using the command line:
curl -sL "https://en.wikipedia.org/api/rest_v1/page/random/summary" | jq
Using the Python programming language:
import requests
page = requests.get("https://en.wikipedia.org/...
1
vote
Wikipedia API - get random page(s) using rest api
Simply add the -L option and, usually, you don't need the -X GET option, because it's the default:
curl -L "https://en.wikipedia.org/api/rest_v1/page/random/summary"
or simply use wget:
wget "...
1
vote
MediaWiki: activate Visual Editor for all NameSpaces by default
The idea is to use the namespace id in your LocalSettings.php. As a consequence, you can configure your future namespaces in advance. When you will create your next namespace, it will be already ...
1
vote
Accepted
Multiple uses of the same footnote
Use <ref name="name"></ref> with the footnote you intend to reuse. For the example reference:
<ref name="name">{{Cite web|url=http://stackexchange.com/sites?view=list#traffic|title=...
1
vote
How to get a list of all users having contributed to the current page shown on page?
If you can install extensions, the contributors extension will allow that.
You could also get the data via the API. Media Wiki documents it here.
In Wikipedia the following URL will get the ...
1
vote
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mediawiki × 127wikipedia × 51
wiki × 12
wikimedia-commons × 7
mediawiki-extensions × 7
search × 6
mediawiki-templates × 4
formatting × 3
regex × 3
email × 2
rss × 2
links × 2
export × 2
passwords × 2
markdown × 2
customization × 2
access-control × 2
latex × 2
google-maps × 1
images × 1
wordpress × 1
url × 1
login × 1
html × 1
user-interface × 1