QOTD

From Community Pnut.io Wiki
Revision as of 07:19, 24 September 2018 by 33MHz (talk | contribs)
Jump to: navigation, search


?

Initial release. Current status: Random edits in progress!
Developed originally for the ADN Wiki, and intended to generate a pithy or useful quotation every day of the month. Useful, pnut-specific facts would be nice to show on the Main Page.

Quotation-Of-The-Day

For the Pnut Wiki, of course.
A live example:


Pnut of the day:
Pnut has apps and services!



It uses code like the following, the middle is removed for brevity:

{{#switch: {{CURRENTDAY}}
 |0=Something went wrong. Bend over.
 |1=What's happening? [[Events|This is.]]
 ...
 |31=The pnut.io Wiki has [[ToDo|pages that need work.]]
 |32=Something went wrong. Hands up!
}}

The 'switch' command uses a system variable 'CURRENTDAY' and looks through a list of entries starting with a "|" and a number which corresponds to the CURRENTDAY of the month. '0' and '32' are superfluous.