Template:CodeRequest: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
No edit summary
imported>StDoodle
m Protected "Template:CodeRequest": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite))
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="float: right; height: 10px; position: absolute: left: 20px; font-size: 10px;">Needs Code Sample!</div>
<includeonly><div style="border: dotted 1px red; color: black; float: right; padding: 0px 5px; 0px 5px; position: absolute; right: 12px; top: 5px; font-size: 12px;"><span style="color: blue;">needs</span>(<span style="color: green;">{{#if: {{{better|}}}|better_code_samples|code_samples}}</span>);</div>[[Category:Needs Code Sample]]</includeonly>
<noinclude>
This function can be called without parameters, in which case the page will get a fancy "needs(code_samples)" notification near the upper-right.
 
If called with the parameter "better" equal to anything, it will instead print "needs(better_code_samples)".
 
To use this template in a function page, don't call it directly. Instead, add the parameter assignment <nowiki>"needscode=yes|"</nowiki> for a code request or <nowiki>"improvecode=yes|"</nowiki> for a request to improve the current sample(s). These lines can go anywhere inside the "FunctionPage" template call (ie not the first couple of lines) as long as they aren't inside another template call. For simplicity, just stick them right after the line that reads <nowiki>"{{FunctionPage|"</nowiki>.
[[Category:Notification Templates]]
</noinclude>

Latest revision as of 06:23, 14 March 2010


This function can be called without parameters, in which case the page will get a fancy "needs(code_samples)" notification near the upper-right.

If called with the parameter "better" equal to anything, it will instead print "needs(better_code_samples)".

To use this template in a function page, don't call it directly. Instead, add the parameter assignment "needscode=yes|" for a code request or "improvecode=yes|" for a request to improve the current sample(s). These lines can go anywhere inside the "FunctionPage" template call (ie not the first couple of lines) as long as they aren't inside another template call. For simplicity, just stick them right after the line that reads "{{FunctionPage|".