Jump to content

User:WikiWriter/Sandbox/Creating a new Knowledgebase Article Contributor

From Wikipedia, the free encyclopedia

The Knowledgebase Article Contributors appear on the Main Page.

How it works

[edit]

The Main Page comprises a number of templates - one of which is the knowledgebase_article_contributor template - its markup below :

{| style="margin:4px 0px 0px 0px; width:100%; background:none;"
| style="width:100%; border:1px solid #ddcef2; background:#faf5ff; vertical-align:top; color:#000;"|
{| cellpadding="2" cellspacing="5" style="vertical-align:top; background:#faf5ff; color:#000; width:100%"
! <h2 id="mp-tfp-h2" style="margin:0; background:#ddcef2; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding:0.2em 0.4em">Knowledgebase Article Contributor of the month</h2>
|-
| style="color:#000;"| {{kac {{CURRENTYEAR}}-{{CURRENTMONTH}}}}
|}
|}

Most of this markup is just about creating a framework for drawing in another template specified by the line :

| style="color:#000;"| {{kac {{CURRENTYEAR}}-{{CURRENTMONTH}}}}

This line pulls in a date-based template that uses the system date to find the correct template to pull in. For example - on the 30th of September 2008 the Template:Kac 2008-09 template would be pulled in, but on the 1st of October 2008 the Template:Kac 2008-10 template would be pulled in. This allows you to create date-based 'contributor' templates in advance, without needing to modify the Main Page, the knowledgebase_article_contributor template, or anything else - the pulling in is automatic.

Creating a new 'kac' template

[edit]
  1. View an existing 'kac' template - for example Template:kac_2008-10
  2. Click the 'Edit' tab, and copy its markup
  3. Click the 'template' tab
  4. In the browser address bar : edit the name of the template - for example change Template:Kac_2008-10 to Template:Kac_2008-11
  5. Press 'Enter' - a new 'potential' template is created
  6. Click the 'edit' tab
  7. Paste in the template copy
  8. Customise the template for the new 'contributor'
  9. Click the 'Save page' button - the new template is created