dienste:wiki

Wiki

Wir verwenden DokuWiki in der nachfolgend dokumentierten Konfiguration.

Name Anwendung Kommentar
Codemirror Enhances DokuWiki's Editor with syntax highlighting funktioniert mit aktueller DokuWiki-Version, wird aber nicht aktiv weiterentwickelt, im Wiki wird auf prosemirror verwiesen
Code Replacement This plugin replaces the current DokuWiki handlers for code & file markup. It adds ability to recognize and render a title above the code box.
editTable This plugin adds an additional edit button to every table. Using this button the table can be edited in an Excel-like visual interface. The plugin also adds a button to the standard toolbar for inserting new tables using this editor.
tableWidth The plugin allows to specify width for a DokuWiki table and its columns.
Wrap Universal plugin which combines the functionality of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction.
MobileTable This plugin creates a second representation of a table, where all columns are stacked on top of each other, which is only shown for mobile devices. This improves the mobile experience for wide tables as it prevents horizontal scrolling.
Move Move pages, media files and namespaces while maintaining the link structure
Searchindex Manager This admin plugin allows you to rebuild the index used by the fulltext search.
SMTP This plugin replaces the way DokuWiki sends emails. Instead of relying on PHP's built-in mail function, it will contact a configured SMTP server directly to send emails.
simplenavi Create a simple navigation tree based on namespaces
attribute Arbitrary attribute definition and storage for user associated data wird für das 2FA-Plugin benötigt, um Daten abspeichern zu können
Two Factor Authentication - Core Plugin Provides modular two factor authentication functionality to DokuWiki wird als Grundlage für die verschiedenen 2FA-Methoden benötigt
Two Factor Authentication - Google Authenticator Plugin Google Authenticator support plugin for the Twofactor authentication plugin. Implementiert die App-Veriante von 2FA. Es gibt auch noch eine Variante für 2FA per E-Mail, dieses ist jedoch aktuell nicht installiert.
  • hidepages: :(navbar|sidebar)
  • nativeeditor: [X]
  • conf/scheme.local.conf angelegt und um „webcal“ erweitert
  • smtp_host: mail.bytespeicher.org
  • smtp_port: 465
  • smtp_ssl: SSL
  • smtp_auth_user: XXX@technikkultur-erfurt.de
  • smtp_auth_user: PASSWORT fuer XXX
  • enable: [X]
  • optinout: opt-in
  • otpsubject: OTP Verification Code
  • otpcontent: $otp is your verification code.
  • generatorexpiry: 2
  • otplength: 7
  • sentexpiry: 5
  • loginnotice: User
  • loginsubject: Login Successful
  • logincontent: Your account was logged into at $time.
  • refreshexpiry: 240
  • logging_level: None
  • logging_path: 2fa_audit.txt
  • enable: [X]
  • fixedTopNavbar: [X]
  • showHomePageLink: [X]
  • showUserHomeLink: [X]
  • showIndividualTool: [X] user, [X] page, [X] site
  • showAdminMenu: [X]

Layout

  • tableFullWidth: [X]
  • tableStyle: [X] striped, [X] hover, [X] responsive
  • showPageId: [X]

Others

  • showPageInfo: [X]
  • tagsOnTop: [X]
  • useAnchorJS: [X]

Dateien

Folgende Dateien sind für die Darstellung der linken Sidebar notwendig:

  • lib/tpl/bootstrap3/sidebarfooter.html
  • conf/userall.css

Um das Menü in der linken Sidebar darzustellen muss ein Wiki-Artikel „sidebar“ mit folgendem Inhalt existieren:

sidebar

{{simplenavi>}}

Der Raum-Status und die Social-Media-Links liegen in der Datei lib/tpl/bootstrap3/sidebarfooter.html. Der PHP-Code des Raum-Status ist identisch mit dem im Wordpress verwendeten.

lib/tpl/bootstrap3/sidebarfooter.html

<!-- ***** Info-Box  *****  -->
<div class="well" style="color: #999; padding: 10px;">
  <h3 style="text-align: center; font-weight: bold;">
        <a href="http://technikkultur-erfurt.de/_media/verein:mitgliedsantrag.pdf">Mitglied werden</a>
        <hr style="margin: 5px auto;" />
        <a href="https://technikkultur-erfurt.de/kontakt">Kontakt & Social Media</a>
  </h3>
</div>
<!-- ***** Raumstatus ***** -->
<div class="well" style="color: #999; padding: 10px;">
<?php

// Spaces
$spaces = [
    'Bytespeicher' => 'http://status.bytespeicher.org',
    'Makerspace' => 'http://status.makerspace-erfurt.de',
];

// Max width of icon (small = 100, large = 200)
$cssMaxWidth = 100;

// JSON path for URI
$statusJsonPath = '/status-minimal.json';

// Create stream context with low timeout
$context = stream_context_create([
    'http' => [
        'method' => "GET",
        'timeout' => 1
    ]
]);

// Check every space
// No output on errors
foreach ($spaces as $spaceName => $statusUrl) {
    // Get minimal status from spacestatus webpage
    $jsonContent = file_get_contents($statusUrl . $statusJsonPath, false, $context);
    if ($jsonContent === false) {
        // Status could not be received, skip it
        continue;
    }

    // Decode JSON with max depth of 2
    $jsonContent = json_decode($jsonContent, false, 2);
    if (is_null($jsonContent) || !isset($jsonContent->open) || !isset($jsonContent->icon)) {
        // JSON could not be decoded or entries missing
        continue;
    }

    // Output spaces
    $text = 'Der ' . $spaceName . ' ist ' . ($jsonContent->open === true ? 'offen' : 'geschlossen') . '!';
    echo '<a href=\'' . $statusUrl . '\'>';
    echo '<img src=\'' . $jsonContent->icon . '\' title=\'' . $text . '\' alt=\'Raumstatus des ' . $spaceName . '\' style=\'width:100%;max-width:' . $cssMaxWidth . 'px;\' />';
    echo '</a>';
}

?>
</div>

Folgendes CSS formatiert das Menü in der Sidebar:

conf/userall.css

.plugin__simplenavi {
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
    margin-bottom: 20px;
    min-height: 20px;
}

.plugin__simplenavi ul.nav {
    padding-left: 0px;
}

.plugin__simplenavi a.wikilink2:link, .plugin_simplenavi a.wikilink2:visited {
    border-bottom: 0px none;
}

.plugin__simplenavi > ul a[data-curid] {
    background: #08c;
    color: #fff;
}

.plugin__simplenavi > ul.nav li a {
    display: block;
}

.plugin__simplenavi > ul.nav li a::before {
    font-family: FontAwesome;
}

.plugin__simplenavi > ul.nav li.open > strong > a::before {
    font-family: FontAwesome;
}

.plugin__simplenavi > ul.nav li.closed > a::before {
    font-family: FontAwesome;
}

.plugin__simplenavi > ul.nav > ul.nav > li a {
    padding-left: 10px !important;
}
.plugin__simplenavi > ul.nav > ul.nav > li.open > ul.nav > li a {
    padding-left: 20px !important;
}
.plugin__simplenavi > ul.nav > ul.nav > li.open > ul.nav > li > ul.nav > li a {
    padding-left: 30px !important;
}
.plugin__simplenavi > ul.nav > ul.nav > li.open > ul.nav > li > ul.nav > li > ul.nav > li a {
    padding-left: 40px !important;
}
.plugin__simplenavi > ul.nav > ul.nav > li.open > ul.nav > li > ul.nav > li > ul.nav > li > ul.nav > li a {
    padding-left: 50px !important;
}
.plugin__simplenavi > ul.nav > ul.nav > li.open > ul.nav > li > ul.nav > li > ul.nav > li > ul.nav > li > ul.nav > li a {
    padding-left: 60px !important;
}

Die Verlinkungen zu bytespeicher.org und zum Pad erfolgen über den Wiki-Artikel „navbar“:

sidebar

  * [[https://bytespeicher.org|Bytespeicher]]
  * [[https://www.makerspace-erfurt.de|Makerspace]]
  * [[https://pad.technikkultur-erfurt.de|Etherpad]]
~~NOCACHE~~

Die Konfiguration beinhaltet oben erwähnte Konfigurationen:

local.php

$conf['title'] = 'Technikkultur in Erfurt';
$conf['lang'] = 'de';
$conf['template'] = 'bootstrap3';
$conf['license'] = '0';
$conf['savedir'] = '../data/';
$conf['youarehere'] = 1;
$conf['dformat'] = '%d.%m.%Y %H:%M';
$conf['hidepages'] = ':(navbar|sidebar)';
$conf['useacl'] = 1;
$conf['passcrypt'] = 'sha512';
$conf['superuser'] = '@admin';
$conf['mediarevisions'] = 0;
$conf['mailfrom'] = 'noreply@technikkultur-erfurt.de';
$conf['htmlmail'] = 0;
$conf['userewrite'] = '1';
$conf['plugin']['codemirror']['nativeeditor'] = 1;



**Location**: {location_link}\\\\

{description}';
$conf['plugin']['dw2pdf']['template'] = 'technikkultur';
$conf['plugin']['dw2pdf']['output'] = 'browser';
$conf['plugin']['dw2pdf']['qrcodesize'] = '160x160';
$conf['plugin']['captcha']['mode'] = 'math';
$conf['plugin']['iframe']['js_ok'] = 1;
$conf['tpl']['bootstrap3']['useLocalBootswatch'] = 0;
$conf['tpl']['bootstrap3']['fixedTopNavbar'] = 1;
$conf['tpl']['bootstrap3']['showHomePageLink'] = 1;
$conf['tpl']['bootstrap3']['showAdminMenu'] = 1;
$conf['tpl']['bootstrap3']['pageOnPanel'] = 0;
$conf['tpl']['bootstrap3']['tableStyle'] = 'striped,hover,responsive';
$conf['tpl']['bootstrap3']['showBadges'] = 0;

  • dienste/wiki.txt
  • Zuletzt geändert: 13.02.2021 11:38
  • von mape2k