6,858 bytes added,
18:59, 7 March 2016 <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><protocol>://<DOMAIN>/p/<proj>/<repo>/</nowiki>
<nowiki><protocol>://<DOMAIN>/u/<user>/<repo>/</nowiki>
This will be abstracted as:
<nowiki><protocol>://<DOMAIN>/<u|p>/<user|proj>/<repo>/</nowiki>
|
==== Project page ====
For a normal SourceForge project page, the base URL is respectively constructed as:
<nowiki><protocol>://<DOMAIN>/p/<proj>/<repo>/</nowiki>
}}
For the {{param|type}} parameter value of {{#ifeq:{{{git|1}}}|1|'''git''' {{#ifeq:{{{svn|1}}}|1|<nowiki></nowiki> or <nowiki></nowiki>}}}}{{#ifeq:{{{svn|1}}}|1|'''svn'''}}, a login is allowed:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://[<login>@]<DOMAIN>/<u|p>/<user|proj>/<repo>/</nowiki></pre>
|<pre><nowiki><protocol>://[<login>@]<DOMAIN>/p/<proj>/<repo>/</nowiki></pre>
}}
{{#ifeq: {{{git|1}}} | 1 |
==== SourceForge <URL> for 'type=git' ====
For this parameter value, the complete <code><URL></code> value will be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://[<login>@]git.code.sf.net/<u|p>/<user|proj>/<repo>/</nowiki></pre>
|<pre><nowiki><protocol>://[<login>@]git.code.sf.net/p/<proj>/<repo>/</nowiki></pre>
}}
==== SourceForge <URL> for 'type=git web' ====
For this parameter value, the <code><URL></code> value will be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/ci/<commit|branch>/<VIEW>/<path>[#l<line>]</nowiki></pre>
|<pre><nowiki><protocol>://sourceforge.net/p/<proj>/<repo>/ci/<commit|branch>/<VIEW>/<path>[#l<line>]</nowiki></pre>
}}
The <code><VIEW></code> value for different values of '''view''' is:
; tree: <code>tree/</code>.
; log: <code>log/?path{{=}}</code>.
; commit: nothing.
If the parameter setting '''view=rss''' is used, a different <code><URL></code> value is produced:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/feed/</nowiki></pre>
|<pre><nowiki><protocol>://sourceforge.net/p/<proj>/<repo>/feed/</nowiki></pre>
}}}}
{{#ifeq: {{{svn|1}}} | 1 |
==== SourceForge <URL> for 'type=svn' ====
For this parameter value, the <code><URL></code> value will instead be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://[<login>@]svn.code.sf.net/<u|p>/<user|proj>/<repo>/<branch>[/<path>][@<commit>]</nowiki></pre>
|<pre><nowiki><protocol>://[<login>@]svn.code.sf.net/p/<proj>/<repo>/<branch>[/<path>][@<commit>]</nowiki></pre>
}}
==== SourceForge <URL> for 'type=svn web' ====
For this parameter value, the <code><URL></code> value will be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/<commit|HEAD>/<VIEW>/<branch>[/<path>][#l<line>]</nowiki></pre>
|<pre><nowiki><protocol>://sourceforge.net/p/<proj>/<repo>/<commit|HEAD>/<VIEW>/<branch>[/<path>][#l<line>]</nowiki></pre>
}}
The <code><VIEW></code> value for different values of '''view''' is:
; tree: <code>tree/</code>.
; log: <code>log/?path{{=}}</code>.
If the parameter setting '''view=commit''' is used, a truncated <URL> value is produced:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/<commit|HEAD>/</nowiki></pre>
|<pre><nowiki><protocol>://sourceforge.net/p/<proj>/<repo>/<commit|HEAD>/</nowiki></pre>
}}
If the parameter setting '''view=rss''' is used, a different <URL> value is produced:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/feed/</nowiki></pre>
|<pre><nowiki><protocol>://sourceforge.net/p/<proj>/<repo>/feed/</nowiki></pre>
}}}}
{{#ifeq: {{{git|1}}} | 1 |
==== SourceForge URL <TEXT> for 'type=git' and 'type=git web' ====
The link text <code><TEXT></code>, if the '''full''' parameter is not set, will be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><user|proj>/<repo>/<commit|branch>[/<path>][#l<line>] <DESC></nowiki></pre>
|<pre><nowiki><proj>/<repo>/<commit|branch>[/<path>][#l<line>] <DESC></nowiki></pre>
}}
If the '''simplepath''' parameter is set, this changes to:
<nowiki>[/<path>][#l<line>] <DESC></nowiki>
If the '''pre''' parameter is supplied, this changes to:
<nowiki><pre>[/<path>][#l<line>] <DESC></nowiki>
The RSS feed is a special case in that <code><TEXT></code> will be one of:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><user|proj>/<repo> <DESC></nowiki></pre>
|<pre><nowiki><proj>/<repo> <DESC></nowiki></pre>
}}
<nowiki><pre> <DESC></nowiki>
The description <code><DESC></code> is dependent on the '''view''' parameter:
; tree: Nothing.
; log: <code>log view</code>.
; commit: <code>commit view</code>.
; rss: <code>RSS feed</code>.
The '''text''' parameter trumps all, and <code><TEXT></code> is simply:
<nowiki><text></nowiki>
}}
{{#ifeq: {{{svn|1}}} | 1 |
==== SourceForge URL <TEXT> for 'type=svn' and 'type=svn web' ====
The link text <code><TEXT></code>, if the '''full''' parameter is not set, will be:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><user|proj>/<repo>/<branch>[/<path>][#l<line>][@r<commit>] <DESC></nowiki></pre>
|<pre><nowiki><proj>/<repo>/<branch>[/<path>][#l<line>][@r<commit>] <DESC></nowiki></pre>
}}
If the '''simplepath''' parameter is set, this changes to:
<nowiki>[/<path>][#l<line>][@r<commit>] <DESC></nowiki>
If the '''pre''' parameter is supplied, this changes to:
<nowiki><pre>[/<path>][#l<line>][@r<commit>] <DESC></nowiki>
The RSS feed is a special case in that <code><TEXT></code> will be one of:
{{#ifeq: {{{user|1}}} | 1
|<pre><nowiki><user|proj>/<repo> <DESC></nowiki></pre>
|<pre><nowiki><proj>/<repo> <DESC></nowiki></pre>
}}
<nowiki><pre> <DESC></nowiki>
The description <code><DESC></code> is dependent on the '''view''' parameter:
; tree: Nothing.
; log: <code>log view</code>.
; commit: <code>commit view</code>.
; rss: <code>RSS feed</code>.
The '''text''' parameter trumps all, and <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.
== Usage ==
{{obr}}repo link/doc design sourceforge
{{!}} user =
{{!}} git =
{{!}} svn =
{{cbr}}
; 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
{{!}} user = 0
{{!}} git = 1
{{!}} svn = 0
{{cbr}}
{{repo link/doc design sourceforge|user=0|git=1|svn=0}}
}}
[[Category:Repository link templates]]
</noinclude>