Module:Wikipedia ads/list/doc

MyWikiBiz, Author Your Legacy — Friday November 22, 2024
< Module:Wikipedia ads‎ | list
Revision as of 08:00, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is the documentation page for Module:Wikipedia ads/list

This module contains ad data for Module:Wikipedia ads. To add or remove an ad, you need to edit this module.

Adding ads

To add a new banner ad, you first need to create the ad image, and upload it to the English Wikipedia or to Wikimedia Commons. For instructions on how to do this, see Template:Wikipedia ads#Creating ads. Once you have created and uploaded the image, edit this module and add the following code on a new line just before the very last closing curly bracket on the page:

<syntaxhighlight lang="lua"> { id = 285, image = "My banner image filename.gif", link = "My project link", author = "The author's username" }, </syntaxhighlight>

Fields:

  • id - The ID displayed above is calculated from the current ad list, so you shouldn't need to change it.
  • image - The filename of the ad image, without "File:".
  • link - The page that the image should link to. You can use interwiki prefixes, but you should not use square brackets.
  • author - A wikilink or wikilinks for the user(s) who created the ad.

The input should go between the double quote marks (""). If any of your input contains double quotes, you can escape them by using a backslash, like this: <syntaxhighlight lang="lua"> author = "Austin \"Danger\" Powers" </syntaxhighlight>

Removing ads

To remove an ad, simply remove its table from the module. (That's the six lines including opening curly bracket, id, image, link, author, and closing curly bracket.) The other ads will be re-ordered automatically. Note that if any users have explicitly specified that ad in {{Wikipedia ads}} then the module will generate an error of "ID 'id' does not exist", and the transcluding page will show up in Category:Wikipedia ads templates with errors.