Difference between revisions of "QOTD"

From Community Pnut.io Wiki
Jump to: navigation, search
m (Started to edit. Randomly)
m (Fixed text added in wrong place)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{Template:Banner|'''?'''|<strong>Initial release contains only broken links and history.</strong> 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.}}
+
{{Template:Banner|'''?'''|<strong>Initial release contains only broken links and history.</strong> Current status: Random edits in progress!<br>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.}}
== A sample Quotation-Of-The-Day snippet for transclusion into another page. Current status: Random edits in progress. ==
+
== A sample Quotation-Of-The-Day snippet for transclusion into another page ==
 
For the pnut.io Wiki, of course.<br>
 
For the pnut.io Wiki, of course.<br>
 
An example:<br>
 
An example:<br>

Revision as of 00:06, 28 September 2017


?

Initial release contains only broken links and history. 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.

A sample Quotation-Of-The-Day snippet for transclusion into another page

For the pnut.io Wiki, of course.
An example:


New to ADN? Try our resources.



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

{{#switch: {{CURRENTDAY}}
 |0=Something went wrong. Bend over.
 |1=What's happening? [[App.Net_Wiki:Current_events|This is.]]
 ...
 |31=The App.net Wiki has [[Pages_that_need_work|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.