Template:SVN link: Difference between revisions
Jump to navigation
Jump to search
Red Leader (talk | contribs) m (Usage) |
(Not showing error message as the template still would link to defaults; Changing the link label; Doc style; +-Issues: Template:Clarify) |
||
Line 5: | Line 5: | ||
| flightgear/fgaddon = tree/trunk/Aircraft | | flightgear/fgaddon = tree/trunk/Aircraft | ||
}}<!-- | }}<!-- | ||
-->/{{{path| | -->/{{{path|}}}<!-- Path to file/directory | ||
-->{{#if:{{{line|}}}|#l{{{line}}}}}<!-- Specific lines | -->{{#if:{{{line|}}}|#l{{{line}}}}}<!-- Specific lines | ||
--> {{{text|{{{pre|{{{reponame|flightgear/fgaddon}}}}}}/ | --> {{{text|{{{pre|{{{reponame|flightgear/fgaddon}}}}}}/{{{rev|HEAD}}}{{{path|/tree/trunk/Aircraft}}}}}}]<!-- Link text | ||
--><noinclude> | --><noinclude> | ||
{{Informative template|1= | {{Informative template|1= | ||
Line 19: | Line 18: | ||
== Usage == | == Usage == | ||
<nowiki>{{</nowiki>'''SVN link''' | <nowiki>{{</nowiki>'''SVN link''' | ||
<nowiki>|</nowiki> | <nowiki>|</nowiki> path = | ||
<nowiki>|</nowiki> ''reponame'' | <nowiki>|</nowiki> ''reponame'' = | ||
<nowiki>|</nowiki> ''rev'' | <nowiki>|</nowiki> ''rev'' = | ||
<nowiki>|</nowiki> ''line'' | <nowiki>|</nowiki> ''line'' = | ||
<nowiki>|</nowiki> ''text'' | <nowiki>|</nowiki> ''text'' = | ||
<nowiki>|</nowiki> ''pre'' | <nowiki>|</nowiki> ''pre'' = | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
All parameters are optional. If no parameters are given, the template will link to the <code>Aircraft</code> folder in the official aircraft repository at SourceForge. | |||
; path | ; path | ||
: | : Path to the file or directory. | ||
; reponame | ; reponame | ||
: | : Path to the repository. Defaults to '''flightgear/fgaddon'''. | ||
; rev | ; rev | ||
: | : Revision number. Defaults to '''HEAD'''. | ||
; line | ; line | ||
: | : Line to go to on the page. | ||
; text | ; text | ||
: | : Alternative label for the link text. Will override all other parameters. | ||
; pre | ; pre | ||
: | : Prefix for the links label. Defaults to '''flightgear/fgaddon'''. | ||
== Examples == | == Examples == | ||
Line 54: | Line 55: | ||
<nowiki>{{SVN link|path=Mirage-2000/m2000-5-set.xml|line=7|text=Mirage 2000-5's set.xml file}}</nowiki> | <nowiki>{{SVN link|path=Mirage-2000/m2000-5-set.xml|line=7|text=Mirage 2000-5's set.xml file}}</nowiki> | ||
{{SVN link|path=Mirage-2000/m2000-5-set.xml|line=7|text=Line 7 of the Mirage 2000-5's set.xml file}} | {{SVN link|path=Mirage-2000/m2000-5-set.xml|line=7|text=Line 7 of the Mirage 2000-5's set.xml file}} | ||
== Known issues == | == Known issues == | ||
It appears that '''link''' does not work with files that are not XML. This seems to be a | It appears that '''link''' does not work with files that are not XML.{{clarify|Link does not work|Nov 2014}} This seems to be a SourceForge specific problem though. | ||
== Related templates == | == Related templates == |
Revision as of 19:14, 14 November 2014
flightgear/fgaddon/HEAD/tree/trunk/Aircraft
The following template description is not displayed when the template is inserted in an article.
Goal
This template allows easy links to SVN-managed files or projects located at SourceForge.
Caution Using this will add an external link; make sure to enter the appropriate security question after hitting "Save page", or your changes will be lost!
Usage
{{SVN link | path = | reponame = | rev = | line = | text = | pre = }}
All parameters are optional. If no parameters are given, the template will link to the Aircraft
folder in the official aircraft repository at SourceForge.
- path
- Path to the file or directory.
- reponame
- Path to the repository. Defaults to flightgear/fgaddon.
- rev
- Revision number. Defaults to HEAD.
- line
- Line to go to on the page.
- text
- Alternative label for the link text. Will override all other parameters.
- pre
- Prefix for the links label. Defaults to flightgear/fgaddon.
Examples
{{SVN link}}
flightgear/fgaddon/HEAD/tree/trunk/Aircraft
{{SVN link|path=Mirage-2000/m2000-5-set.xml|pre=$FGDATA}}
$FGDATA/HEADMirage-2000/m2000-5-set.xml
{{SVN link|path=Mirage-2000/m2000-5-set.xml|line=7|text=Mirage 2000-5's set.xml file}}
Line 7 of the Mirage 2000-5's set.xml file
Known issues
It appears that link does not work with files that are not XML.[clarify] This seems to be a SourceForge specific problem though.
Related templates
- {{Git link}}