ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:SourceCode: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Correcting...
Vinifera7 (talk | contribs)
m Removed linebreak.
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{BigHorizontalBar|Source Code Available| Original code for this functionality has been reverse-engineered and is available [{{{1|http://www.example.com}}} here].
{{#ifeq:{{{tr|no}}}|yes|{{BigHorizontalBar|Needs Transcribing|[[Pseudocode]] relevant to this article is available at [{{{1|http://www.example.com}}} {{{1|http://www.example.com}}}]. Please update this article with information revealed by the pseudocode.}}<includeonly>[[Category:Needs Transcribing]]</includeonly>|Relevant [[pseudocode]] is available at [{{{1|http://www.example.com}}} {{{1|http://www.example.com}}}].}}<includeonly>[[Category:Source Code]]</includeonly><noinclude>
{{#ifeq:{{{tr|1}}}|0|If you can, please transcribe the relevant bits into pseudocode and add them to this page. [[Category:Needs Transcribing]]|[[Category:Source Code]]}}}}</includeonly>
==Usage==
<noinclude>'''Usage''':<pre>{{SourceCode|url}}</pre> Creates a simple box linking to the source code and include the page in [[:Category:Contains Source Code]], <pre>{{SourceCode|url|tr=0}}</pre> Creates a box and add the page to [[:Category:Needs Transcribing]].</noinclude>
The following code creates a standardized external link to relevant pseudocode, which should be placed in an article's references section. The URI should be replaced with one that links directly to the appropriate pseudocode. This template automatically includes the article in [[:Category:Source Code]].
<pre>{{SourceCode|http://www.example.com}}</pre>
 
The addition of <code>tr=yes</code> instead creates a box that points to an external link to relevant pseudocode, but indicates that the article should be updated to include information revealed by the pseudocode. This automatically includes the article in [[:Category:Source Code]] and [[:Category:Needs Transcribing]].
<pre>{{SourceCode|http://www.example.com|tr=yes}}</pre>
</noinclude>

Latest revision as of 02:49, 14 December 2009

Relevant pseudocode is available at http://www.example.com.

Usage

The following code creates a standardized external link to relevant pseudocode, which should be placed in an article's references section. The URI should be replaced with one that links directly to the appropriate pseudocode. This template automatically includes the article in Category:Source Code.

{{SourceCode|http://www.example.com}}

The addition of tr=yes instead creates a box that points to an external link to relevant pseudocode, but indicates that the article should be updated to include information revealed by the pseudocode. This automatically includes the article in Category:Source Code and Category:Needs Transcribing.

{{SourceCode|http://www.example.com|tr=yes}}