Template:CodeRequest: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>StDoodle No edit summary |
||
Line 1: | Line 1: | ||
<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><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>. | |||
</noinclude> |
Revision as of 01:50, 3 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|".