Template:SocialMediaLink: Difference between revisions

Template page
(Added DorfGit, GitHub, Matrix, Mastodon & Twitter support)
(Added Telegram support)
 
Line 11: Line 11:
* matrix (alternative Schreibweisen: Matrix, mtrx, mx)
* matrix (alternative Schreibweisen: Matrix, mtrx, mx)
* mastodon (alternative Schreibweisen: Mastodon, mstdn)
* mastodon (alternative Schreibweisen: Mastodon, mstdn)
* telegram (alternative Schreibweisen: Telegram)
* twitter (alternative Schreibweisen: Twitter, tw)
* twitter (alternative Schreibweisen: Twitter, tw)
</noinclude>
</noinclude>
Line 18: Line 19:
  | 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}} |}}
  | mastodon | Mastodon | mstdn              = [https://{{{3}}}/@{{{2}}} @{{{2}}}@{{{3}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Mastodon=@{{{2}}}:{{{3}}}}} {{#set:MastodonLink={{{2}}}{{{{3}}}} }} {{#set:Has Mastodon=True}} |}}
  | mastodon | Mastodon | mstdn              = [https://{{{3}}}/@{{{2}}} @{{{2}}}@{{{3}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Mastodon=@{{{2}}}:{{{3}}}}} {{#set:MastodonLink={{{2}}}{{{{3}}}} }} {{#set:Has Mastodon=True}} |}}
| telegram | Telegram                      = [https://t.me/{{{2}}} @{{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Telegram=@{{{2}}}}} {{#set:TelegramLink={{{2}}}}} {{#set:Has Telegram=True}} |}}
  | twitter  | Twitter  | tw                  = [https://twitter.com/{{{2}}} @{{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Twitter=@{{{2}}}}} {{#set:TwitterLink={{{2}}}}} {{#set:Has Twitter=True}} |}}
  | twitter  | Twitter  | tw                  = [https://twitter.com/{{{2}}} @{{{2}}}] {{#ifeq: {{NAMESPACE}}|User|{{#set:Twitter=@{{{2}}}}} {{#set:TwitterLink={{{2}}}}} {{#set:Has Twitter=True}} |}}
}}</includeonly>
}}</includeonly>

Latest revision as of 07:02, 14 October 2022

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

Usage[edit source]

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:

  • dorfgit (alternative Schreibweisen: DorfGit, Git, git)
  • 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)