Difference between revisions of "Template:SourceLink/github"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{#vardefine:slbrev|{{#if:{{{Rev|}}}|{{{Rev|}}}|{{#if:{{{rev|}}}|{{{rev|}}}|master}}}}}}{{#vardefine:SourceLinkPath|https://github.com/{{#if:{{{user|}}}{{{User|}}}|{{{user|}}}...")
 
Line 1: Line 1:
{{#vardefine:slbrev|{{#if:{{{Rev|}}}|{{{Rev|}}}|{{#if:{{{rev|}}}|{{{rev|}}}|master}}}}}}{{#vardefine:SourceLinkPath|https://github.com/{{#if:{{{user|}}}{{{User|}}}|{{{user|}}}{{{User|}}}|secondlife}}/{{{1|viewer}}}/src/{{#var:slbrev}}/{{{2|}}}#{{#if:{{{line|}}}{{{Line|}}}|cl-{{{line|}}}{{{Line|}}}}}}}<span class="plainlinks">[{{#var:SourceLinkPath}} {{#if:{{{text|}}}|<span title="{{#if:{{{hover|}}}|{{{hover|}}}|Git: {{#replace:{{#var:SourceLinkPath}}|{{=|*}}|&#61;}}}}">{{{text|}}}</span>|<span title="GitHub">Git:</span><span title="Branch: {{{1|}}}" style="border-bottom:1px solid #B8B8B8;">{{{1|}}}</span>{{#if:{{{User|}}}|(<span title="Branch owned by: {{{user|}}}{{{User|}}}" style="border-bottom:1px solid #B8B8B8;">{{{user|}}}{{{User|}}}</span>)}}{{#if:{{{Rev|}}}|@{{{rev|}}}{{{Rev|}}}}} - <span title="{{{2|}}} {{#if:{{{Rev|}}}|in revision {{#var:slbrev}}}} {{#if:{{{Line|}}}|on line {{{line|}}}{{{Line|}}}}}" style="border-bottom:1px solid #B8B8B8;">{{{2|}}} {{#if:{{{Line|}}}|Line {{{line|}}}{{{Line|}}}}}</span>}}]</span><noinclude>
{{#vardefine:slbrev|{{#if:{{{Rev|}}}|{{{Rev|}}}|{{#if:{{{rev|}}}|{{{rev|}}}|master}}}}}}{{#vardefine:SourceLinkPath|https://github.com/{{#if:{{{user|}}}{{{User|}}}|{{{user|}}}{{{User|}}}|secondlife}}/{{{1|viewer}}}/blob/{{#var:slbrev}}/{{{2|}}}#{{#if:{{{line|}}}{{{Line|}}}|cl-{{{line|}}}{{{Line|}}}}}}}<span class="plainlinks">[{{#var:SourceLinkPath}} {{#if:{{{text|}}}|<span title="{{#if:{{{hover|}}}|{{{hover|}}}|Git: {{#replace:{{#var:SourceLinkPath}}|{{=|*}}|&#61;}}}}">{{{text|}}}</span>|<span title="GitHub">Git:</span><span title="Branch: {{{1|}}}" style="border-bottom:1px solid #B8B8B8;">{{{1|}}}</span>{{#if:{{{User|}}}|(<span title="Branch owned by: {{{user|}}}{{{User|}}}" style="border-bottom:1px solid #B8B8B8;">{{{user|}}}{{{User|}}}</span>)}}{{#if:{{{Rev|}}}|@{{{rev|}}}{{{Rev|}}}}} - <span title="{{{2|}}} {{#if:{{{Rev|}}}|in revision {{#var:slbrev}}}} {{#if:{{{Line|}}}|on line {{{line|}}}{{{Line|}}}}}" style="border-bottom:1px solid #B8B8B8;">{{{2|}}} {{#if:{{{Line|}}}|Line {{{line|}}}{{{Line|}}}}}</span>}}]</span><noinclude>
== Usage ==
== Usage ==
<pre>
<pre>

Revision as of 14:00, 17 November 2022

Git: -

Usage

{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|rev=master|line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|Rev=d31a83f|line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|Rev=d31a83f|Line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|rev=d31a83f|Line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|rev=d31a83f|line=99|text=What Ever:p}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|rev=d31a83f|line=99|text=What Ever:p|hover=My United States of What Ever!}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|user=lindenlab|Line=99}}
{{SourceLink/github|viewer|indra/llmessage/llpartdata.h|User=lindenlab|Line=99}}

Note: when referring to source code on the viewer, the first parameter ought to be viewer for the currently released viewer, or viewer-dev for the version under development.

For other projects, see Second Life's project page at GitHub.