3,288 bytes added,
11:55, 25 October 2017 <h3>Site: SourceForge</h3>
{{#ifeq: {{{user|1}}} | 1 |
==== Project vs. developer page ====
For a normal SourceForge project and a SourceForge developer page, the base URL is respectively constructed as:
<nowiki>https://sourceforge.net/p/</nowiki>{{{proj|<proj>}}}/{{{repo|<repo>}}}/
<nowiki>https://sourceforge.net/u/</nowiki>{{{user|<user>}}}/{{{repo|<repo>}}}/
This will be abstracted as:
<nowiki>https://sourceforge.net/<u|p>/</nowiki>{{{user|<user>}}}{{!}}{{{proj|<proj>}}}/{{{repo|<repo>}}}/
|
==== Project page ====
For a normal SourceForge project page, the base URL is respectively constructed as:
<nowiki>https://sourceforge.net/p/</nowiki>{{{proj|<proj>}}}/{{{repo|<repo>}}}/
}}
{{#ifeq: {{{git|1}}} | 1 |
==== SourceForge git <URL> ====
For the svn repository type, the <code><URL></code> value will be:
{{#ifeq: {{{user|1}}} | 1
|{{#tag:pre|<nowiki>https://sourceforge.net/<u|p>/</nowiki>{{{user|<user>}}}{{!}}{{{proj|<proj>}}}/{{{repo|<repo>}}}/ci/<commit>}}
|{{#tag:pre|<nowiki>https://sourceforge.net/p/</nowiki>{{{proj|<proj>}}}/{{{repo|<repo>}}}/ci/<commit>}}
}}}}
{{#ifeq: {{{svn|1}}} | 1 |
==== SourceForge svn <URL> ====
For the svn repository type, the <code><URL></code> value will be:
{{#ifeq: {{{user|1}}} | 1
|{{#tag:pre|<nowiki>https://sourceforge.net/<u|p>/</nowiki>{{{user|<user>}}}{{!}}{{{proj|<proj>}}}/{{{repo|<repo>}}}<nowiki>/<commit|HEAD></nowiki>}}
|{{#tag:pre|<nowiki>https://sourceforge.net/p/</nowiki>{{{proj|<proj>}}}/{{{repo|<repo>}}}<nowiki>/<commit|HEAD></nowiki>}}
}}}}
{{#ifeq: {{{git|1}}} | 1 |
==== SourceForge URL <TEXT> ====
The link text <code><TEXT></code>, if the {{param|text}} parameter is not set, will simply be:
{{{label|MISSING}}} commit <nowiki><commit></nowiki>
Or if the {{param|text}} parameter is supplied, the <code><TEXT></code> is simply:
<nowiki><text></nowiki>
}}<noinclude>
{{Informative template|1=
== Goal ==
To provide documentation of the design of the {{tl|repo link}} family of templates. This is only for use within documentation of the subtemplates. This is for use by the SourceForge specific {{obr}}* commit{{cbr}} set of subtemplates.
== Usage ==
{{obr}}repo link/doc design sourceforge commit
{{!}} label =
{{!}} ''proj'' =
{{!}} ''repo'' =
{{!}} ''user'' =
{{!}} ''git'' =
{{!}} ''svn'' =
{{cbr}}
; label: The name of the repository, for use in the <TEXT> documentation.
; proj: The optional project name.
; repo: The optional repository name.
; user: If set to 1, then both the user and project pages will be part of the description. Otherwise only the project pages will be described.
; git: If set to 1, then git instructions will be included.
; svn: If set to 1, then svn instructions will be included.
== Examples ==
=== Git project pages ===
{{obr}}repo link/doc design sourceforge commit
{{!}} label = relax website
{{!}} proj = {{project infrastructure/proj}}
{{!}} repo = {{project infrastructure/repo website}}
{{!}} user = 0
{{!}} git = 1
{{!}} svn = 0
{{cbr}}
{{repo link/doc design sourceforge commit
| label = relax website
| proj = {{project infrastructure/proj}}
| repo = {{project infrastructure/repo website}}
| user = 0
| git = 1
| svn = 0
}}
}}
[[Category:Repository link templates]]
</noinclude>