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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=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://interwiki.scpdb.org/?wiki=fondazionescp&lang=it&page=%%category%%:%%name%% class="scpnet-interwiki-frame"]]
[[/module]]
[[/div]]

PT-BR:

[[div class="scpnet-interwiki-wrapper"]]
[[module ListPages range="." limit="1"]]
      [[iframe http://interwiki.scpdb.org/?wiki=scp-pt-br&lang=pt_br&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