Questions tagged [mediawiki-templates]

In MediaWiki, templates provide a way to include one page into other pages. This tag is for questions about template code and functionality.

From Help:Templates:

If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play.

Templates are standard wiki pages whose content is designed to be transcluded (embedded) inside other pages. Templates follow a convention that the name is prefixed with "Template:", assigning it to that namespace; besides this, you can create them like any other wiki page.

191 questions
0
votes
1 answer

How to translate this group name in mediawiki?

I installed Extension:CommentStreams of mediawiki and it adds an user group called staff. How can I translate this group name in mediawiki? Any other group names are translated by default as I chose my language in LocalSettings.php but this group…
0
votes
1 answer

Why the wiki conditional table template looks weired?

On my wiki I am trying to create a conditional table template. Here is the template code: {| class="wikitable" {{#if:{{{bazikade1|}}}{{{bazikade2|}}}| {{!}}- ! بازیکده {{!}} {{{bazikade1}}} {{!}}…
0
votes
0 answers

How to have badges on mediawiki articles pages?

Most badge creators just creates static image and force us to download the graphic. shields.io is only for projects. We need to show dynamic badges with just a number on it on our articles pages in our mediawiki. Mediawiki has an extension which…
0
votes
1 answer

How do you edit a Scribunto-based MediaWiki template?

I have imported a few templates to my wiki from Wikipedia. I believe most of them use Scribunto. None of this was a problem until recently, when I needed to edit one of them. The template in question is Wikipedia's {{Key press}}. The source code…
Llamax
  • 313
  • 2
  • 13
0
votes
1 answer

How can I upload images and add Cargo metadata to them at the same time?

I can upload an image, then on its File page I can transclude a Cargo-enabled template that stores some metadata about that image, and later query that template's table in order to create a gallery. However, the manual addition of the template to…
Sparr
  • 7,489
  • 31
  • 48
0
votes
1 answer

How to Resize Images in Infobox in Mediawiki?

I managed to create an infobox in my Mediawiki after performing hours of code as I am a beginner, but now I am facing issue with the image resizing in that infobox. In other words, I want to resize the image which I put in the infobox. I saw that in…
0
votes
1 answer

Meta tags in skin from MediaWiki template

Let's say i have a template in my MediaWiki like
* Birthday: {{#if: {{{birth date|}}} | {{#ol-time:|{{{birth date}}}}} | — }} {{#if: {{{full name|}}} | * full name: {{{full…
Headshaker
  • 51
  • 4
0
votes
1 answer

Mediawiki Infoboxes CSS

I'm new to mediawiki and I'm having trouble in the Infoboxes. I've tried the versions 1.31 and 1.33 but both of them just give the same output. which is like this My local infobox and I wanted to make it look like this: Liquipedia's Infobox And…
0
votes
1 answer

String-mapping-table in wikimedia-template

I would like to replace the contents of a variable with a value that can be found in a mapping-table. For example: Variable priority contains the value 3, and should be replaced with the string medium according to the following table: key …
user2033412
  • 1,950
  • 2
  • 27
  • 47
0
votes
1 answer

Use OSM-Tags in Wikimedia-Template

I would love to be able to create templates in Wikimedia that get their variables filled from the tags of an OSM-feature. Herefor I would provide an ID like n4741336025 and fetch the data from https://www.openstreetmap.org/node/4741336025 The tags…
0
votes
1 answer

Mediawiki's Navbox template not displaying boxes in personal wiki

I'm using Mediawiki and am having trouble with the Navbox template working correctly. I exported the templates/modules and they seem to be working alright. When I use the following as an example: {{Navbox |name = Navbox/doc |state =…
Michael
  • 1
  • 1
0
votes
1 answer

How to fix a corrupted MediaWiki page?

One of our templates seems corrupted. We can't edit the page, even not show (yes, it exists) and so on. All this results in a time-out. Now we try to import a back-up version but also Special:Import gives a time-out. How do I fix this?
waanders
  • 8,907
  • 22
  • 70
  • 102
0
votes
2 answers

Regex to match MediaWiki template without certain named parameter

I’ll get to the point: I need a regex that matches any template out of a list that have a date parameter - so assuming that my (singleton for now) list of templates is “stub”, the things below that are in bold should be…
AbyxDev
  • 1,363
  • 16
  • 30
0
votes
0 answers

Mediawiki - Create a link to a template's edit page

I'm making a template, in this template I want to include a link that will send me to its own edit page so that it can be easily accessible from the pages it is included in (very similar to Wikipedia's "view - edit - discuss" links), but I want to…
0
votes
1 answer

Changing the position and styling of particular label or button for a particular template in mediawiki?

I have an ApprovedRevs extension on my wiki and i want to change its position and color for a particular template. Currently, it is shown as a subtitle alongside the Title. I also want to convert it in a blue tick sign rather than an approved…