Template:SocialMediaLink: Difference between revisions

From Milliways
Jump to navigation Jump to search
(Created page with "<noinclude> This Template creates a social media link and, if it's used on a User page, adds the relevant Semantic MediaWiki properties. == Usage == The first parameter has to be the service you are linking to, the second the username, the third the server if it is a federated service. <pre><nowiki>{{SocialMediaLink|service|username|server.example.com}}</nowiki></pre> Bei Service sind folgende Einträge möglich bzw. folgende Services werden unterstützt: * dorfgit (al...")
 
No edit summary
 
Line 7: Line 7:


Bei Service sind folgende Einträge möglich bzw. folgende Services werden unterstützt:
Bei Service sind folgende Einträge möglich bzw. folgende Services werden unterstützt:
* dorfgit (alternative Schreibweisen: DorfGit, Git, git)
* github (alternative Schreibweisen: Github, GitHub, gh)
* github (alternative Schreibweisen: Github, GitHub, gh)
* matrix (alternative Schreibweisen: Matrix, mtrx, mx)
* matrix (alternative Schreibweisen: Matrix, mtrx, mx)
Line 15: Line 14:
</noinclude>
</noinclude>
<includeonly>{{#switch: {{{1}}}
<includeonly>{{#switch: {{{1}}}
| dorfgit  | DorfGit  | Git      | git      = [https://chaosdorf.de/git/{{{2}}} {{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:DorfGit={{{2}}}}} {{#set:DorfGitLink={{{2}}}}} {{#set:Has DorfGit=True}} |}}
  | github  | Github  | GitHub  | gh      = [https://github.com/{{{2}}} {{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:GitHub={{{2}}}}} {{#set:GitHubLink={{{2}}}}} {{#set:Has GitHub=True}} |}}
  | github  | Github  | GitHub  | gh      = [https://github.com/{{{2}}} {{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:GitHub={{{2}}}}} {{#set:GitHubLink={{{2}}}}} {{#set:Has GitHub=True}} |}}
  | matrix  | Matrix  | mtrx    | mx      = [https://matrix.to/#/@{{{2}}}:{{{3}}} @{{{2}}}:{{{3}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Matrix=@{{{2}}}:{{{3}}}}} {{#set:MatrixLink={{{2}}}{{{{3}}}} }} {{#set:Has Matrix=True}} |}}
  | matrix  | Matrix  | mtrx    | mx      = [https://matrix.to/#/@{{{2}}}:{{{3}}} @{{{2}}}:{{{3}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Matrix=@{{{2}}}:{{{3}}}}} {{#set:MatrixLink={{{2}}}{{{{3}}}} }} {{#set:Has Matrix=True}} |}}

Latest revision as of 22:33, 30 May 2023

This Template creates a social media link and, if it's used on a User page, adds the relevant Semantic MediaWiki properties.

Usage

The first parameter has to be the service you are linking to, the second the username, the third the server if it is a federated service.

{{SocialMediaLink|service|username|server.example.com}}

Bei Service sind folgende Einträge möglich bzw. folgende Services werden unterstützt:

  • github (alternative Schreibweisen: Github, GitHub, gh)
  • matrix (alternative Schreibweisen: Matrix, mtrx, mx)
  • mastodon (alternative Schreibweisen: Mastodon, mstdn)
  • telegram (alternative Schreibweisen: Telegram)
  • twitter (alternative Schreibweisen: Twitter, tw)