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
0 answers

How to constrain page properties to a specific category?

I used the pageforms extension to create a form, template, and properties. My question is how do a limit a "page" property (from the form perspective) to only allow pages from a specific category?
Beans
  • 329
  • 4
  • 16
0
votes
0 answers

Mediawiki API call: Unrecognized parameter: gsrqiprofile

I am attempting to use the related articles plugin on my mediawiki website, I have properly installed the most recent version and am running with the following configuration in the attached screenshot. However when I go to a page that should…
0
votes
1 answer

Check to see if is empty

I would like to include a 'Notes' section in a transcluded template only if there are footnotes in the text entered in the template. How can I create a conditional statement that will include the

Notes

header plus the
0
votes
1 answer

How to find for the wikipedia links in the infobox templates and other templates, using sql dumps

I want to extract the pages mentioned in the infobox and templates of pages. E.g. From this page: https://en.wikipedia.org/wiki/DNA I want to extract all of the links in the infobox, like: "Genetics", "Introduction to Genetics" etc. I want to do it,…
user305883
  • 1,635
  • 2
  • 24
  • 48
0
votes
0 answers

Frequent Logouts in Mediawiki project

Working on mediawiki project facing the issue of frequent logouts where user when login and try some edit and update operation then after spending few minutes users gets automatically signout and redirects it to login page. I have tried the…
0
votes
1 answer

How to use "WHERE column LIKE" sql query in core MediaWiki

I have just started developing and modifying extensions. Currently, I'm modifying an extension in which I have to show matching page results with the searched term entered by the user. Here I'm using the default ORM thing provided by the Mediawiki.…
0
votes
2 answers

Call a hook inside another hook function in MediaWiki

Hello guys I'm new to MediaWiki and trying to build my own extension. Using this extension I'm trying to show some content blow page heading but only to a page specific to a category. For that, I'm using two hooks: onArticleViewHeader ( To add my…
0
votes
1 answer

Semantic MediaWiki Get page links?

I have a page set up as a disambiguation page inside of Category:Disambiguations that looks like this: '''Sword''' may refer to one of the following: * {{Link|Item|Blue Sword}} * {{Link|Item|Yellow Sword}} * {{Link|Item|Green Sword}} Is there a…
0
votes
1 answer

Template loop in Wikipedia modules

I've imported Module:Documentation and Module:Arguments for custom mediawiki from wikipedia. Unfortunately, Lua indicates template loop inside them on also wiki-native pages like Template:Extension, these are not custom templates or pages. Would…
0
votes
1 answer

MediaWiki: why imported template look so terrible?

At the beginning of this page you can see this template which doesn't show properly: https://www.tematichedigenere.com/wiki/Iva_assorbenti_al_4%25,_%C3%A8_una_strumentalizzazione%3F I've copied the template from Wikipedia, but the image (and…
Revious
  • 7,816
  • 31
  • 98
  • 147
0
votes
2 answers

MediaWiki: How can I use the output of {{Special:Editcount/User}} in #expr?

I want to use the output of {{Special:Editcount/User}} in #expr to calculate something. But of course the output is handled as a string, even if I split it into its figures with #sub. So how can I make it being recognized as int? Any idea?
0
votes
2 answers

Making a simpler parser function for a wiki

I need a template on a wiki about a game (Alphabetty Wiki) that gives a range of levels when given a particular level (e.g. "42" -> "1-50") I could make one using many #ifexpr, but I am wondering now if there is a simpler solution. I tried with…
oli_vi_er
  • 57
  • 8
0
votes
1 answer

How can I export a Module from Wikipedia to my self hosted MediaWiki?

I have a template http://wordpress-251650-782015.cloudwaysapps.com/index.php?title=Template:Cita_conferenza Which invokes a LUA module: http://wordpress-251650-782015.cloudwaysapps.com/wiki/Modulo:Citazione I have found informations on that module…
Revious
  • 7,816
  • 31
  • 98
  • 147
0
votes
2 answers

Imported Templates not working on MediaWiki

I am quite new to Mediawiki and am trying to get templates work. I managed to get a simple one working but the templates are shown in a weird way but no error is provided.
Revious
  • 7,816
  • 31
  • 98
  • 147
0
votes
1 answer

MediaWiki Template:Notice import looks different that mediawiki

I imported Template:Notice from Mediawiki to my mediawiki instance, but it doesn't look the same. MediaWiki: My instance: I tried copying Module:Message box/ambox.css to my Mediawiki:Common.css and have set: $wgUseInstantCommons = true; What else…
NLam
  • 537
  • 1
  • 11
  • 25