InterWiki

This page contains code examples for Interwiki integration.

Interwiki is a special sidebar block that renders links to other SCP-INT wikis that current opened page translated. You can see it in action on many INT branches (example).

InterWiki is a part of the SCP-RU Web Services, source codes are available on GitHub.

Integration

First step is universal for all branches: add following styles to the component:theme page after @imports (or in the end of the file, but before [[/code]]).

div.scpnet-interwiki-wrapper {
    width: 17em;
    margin-left: -5px;
}

iframe.scpnet-interwiki-frame {
    height: 300px;
    width: 17em;
    border: none;
}

@media (min-width: 768px) {
    iframe.scpnet-interwiki-frame {
        height: 300px;
        width: 18em;
    }
    div.scpnet-interwiki-wrapper {
        width: 18em;
    }
}

Next step is little different for branches: add appropriate code block from below to your nav:side page (it's recommended to add that as the last block).

EN:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-wiki/?lang=en&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

RU:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-ru/?lang=ru&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

KO:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-kr/?lang=en&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

CN:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-wiki-cn/?lang=cn&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

FR:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/fondationscp/?lang=fr&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

PL:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-pl/?lang=pl&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

ES:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/lafundacionscp/?lang=es&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

TH:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-th/?lang=th&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

JP:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-jp/?lang=jp&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

DE:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/scp-wiki-de/?lang=de&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

——

IT:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://scpnet.org/interwiki/fondazionescp/?lang=it&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License