Wikipedia:DYK for Portals

From Wikipedia, the free encyclopedia

Whilst the main sequence of DYK for the site works exclusively on new content, few (if any) portals can achieve either the volume of content, or the staffing to maintain new interesting content on a regular basis. This can lead to stagnation.

History[edit]

In order to avoid this, members of The UK Waterways Wikiproject created a new system for the UK Waterways Portal which allows a large number (about 180) of interesting facts to be presented to portal readers in a semi-random fashion. This avoids stagnation, without ongoing effort.

As at least one other project was interested in re-using this, the code has been tidied up, to remove any UKW specific stuff, and can be copied by any project that wants it.

Assumptions[edit]

  • The portal main page transcludes a subpage (such as Portal:Widgets/Did you know), which will contain the core code to incorporate entries into the portal
  • The entries to be incorporated into the portal are subpages of the main Did you know subpage, and will be named in the form g1/01, being the rotation group, and the entry within the group
  • the code assumes that the top two DYK sections (monthly and weekly rotations) will always return a page. It does not assume that the third and 4th rotations will always return a page, and will invite contributions.

Code[edit]

Main DYK Page[edit]

Copy the following into your portal /Did you know page;

Sample main Did you know page

DYK edit page[edit]

Copy the following into your portal /Did you know/list page;

Sample Did you know edit page

Setup[edit]

Having copied the skeletons into place, simply click on one of the "add a DYK" links, and you will be taken to the list page with a series of links to create entries.

Templates[edit]

The code employs Template:DYKED on the list page to transclude the text of the entry with an edit link, or invite an addition as appropriate

Portals using this system[edit]

Questions[edit]

If you have any questions about the code, or suggestions for enhancements, please direct them to User talk:Mayalld