Wie schon via Discord angekündigt stellen wir dieses Wochenende unser Wiki Modul zum Download und stellen pro Kunden eine kostenlose Aktivierung/Lizenz aus. Das Wiki ist kostenfrei und nutzen wir selbst unter support.teklab.de. Hier folgt nun eine Installationsanleitung sowie Hinweise zur Nutzung. Das Wiki nutzt Jquery.
Installation
0. https://teklab.s3.amazonaws.com/tekbase_wiki.zip
1. Die Zip Datei entpacken und die Ordner mytekbase, modules sowie scripts kopiert ihr in eure aktuelle TekBASE Installation.
2. Den Inhalt des theme Ordners (nicht den theme Ordner selbst) kopiert ihr in euer aktuell genutztes CMS Design (themes/aktuelles_Design/).
3. Folgenden Inhalt fügt bitte der style.css des CMS Designs hinzu:
#wiki_mainmenu,#wiki_contentmenu {color:#71878e;border:0 solid #DBDBDB;background:none;border-radius:4px;padding:15px;margin-bottom:20px;width:270px}
#wiki_mainmenu ul,#wiki_contentmenu ul {margin:0;padding:0;list-style:none}
#wiki_mainmenu li,#wiki_contentmenu li {font-size:.857em;font-weight:400;line-height:1.5em}
#wiki_mainmenu li li,#wiki_contentmenu li li {font-size:1em;line-height:1.5em}
#wiki_mainmenu ol,#wiki_contentmenu ol {margin:0;padding:0 0 0 15px}
#wiki_mainmenu b,#wiki_contentmenu b {color:#586265}
#wiki_mainmenu a,#wiki_contentmenu a {color:#71878e;padding:2px 0;display:block}
#wiki_mainmenu a:hover,#wiki_contentmenu a:hover {color:#30464b}
#wiki_fixed {position:fixed}
#wiki_content {line-height:24px}
#wiki_content h1 {margin-bottom:40px;line-height:40px;font-weight:200}
#wiki_content h2 {margin-bottom:30px;height:35px;line-height:30px;font-weight:200;border-bottom:2px solid #DBDBDB}
#wiki_content h3 {margin-bottom:20px;line-height:30px;font-weight:200;border-bottom:2px dashed #DBDBDB}
#wiki_content h4 {margin-bottom:20px;line-height:24px;font-weight:200;border-bottom:2px dotted #DBDBDB}
#wiki_content hr,#wiki_mainmenu hr {border:0;height:1px;margin-top:20px;margin-bottom:20px;background:#DBDBDB}
#wiki_content ul,#wiki_content ol {margin:0 0 20px;padding:0 0 0 40px}
#wiki_content li {font-size:1.1em}
#wiki_content li li {font-size:1em}
#wiki_content .col-md-3,#wiki_content .col-md-4,#wiki_content .col-md-6 {margin-bottom:0}
#wiki_content pre {margin-top:20px;margin-bottom:20px}
#wiki_content a:not(.btn) {color:#71878e;text-decoration:underline}
#wiki_content a:hover:not(.btn) {color:#30464b}
#wiki_content ul.nav.nav-pills {margin:0;padding:0}
#wiki_content ul.nav.nav-pills a {text-decoration:none;padding:6px 12px}
#wiki_content ul.nav-pills li.active a {color:#fff;background-color:#30383b}
#wiki_content img {border-radius:4px;border:1px solid #DBDBDB}
#wiki_content .tab-content {border:0;border-radius:0;box-shadow:none;padding:0}
#wiki_content .label.label-lg {font-size:.9em}
.wiki_list {line-height:20px!important}
.wiki_list b {font-size:1.1em}
.wiki_list hr {margin:10px 0!important}
.wiki_errorbox,.wiki_infobox {padding:10px;font-size:1em;border-radius:3px;margin-top:20px;margin-bottom:20px;line-height:1.5em
.wiki_errorbox {background-color:#ffc6c6;color:#620f0f;border-left:3px solid #cc9393;}
.wiki_infobox {background-color:#ffeec6;color:#624b0f;border-left:3px solid #ccbb93;}
.wiki_codebox {font-family:'Monaco','Menlo','Ubuntu Mono','Consolas','source-code-pro',monospace;font-size:.9em;border-left:3px solid #c2c2c2;line-height:1.5em;padding:10px!important;overflow:auto;white-space:pre;resize:none;background:#f5f5f5!important;border-radius:3px}
.wiki_colorstd {color:#182225}
.wiki_colorone {color:#b22222}
.wiki_colortwo {color:#b22222}
.wiki_colorthree {color:#b22222}
.wiki_space {height:40px;line-height:40px}
.wiki_xsmall.wiki_space {height:20px;line-height:20px}
.wiki_small.wiki_space {height:30px;line-height:30px}
.wiki_normal.wiki_space {height:40px;line-height:40px}
.wiki_big.wiki_space {height:50px;line-height:50px}
.wiki_xsmall li {line-height:16px}
.wiki_small li {line-height:20px}
.wiki_normal li {line-height:24px}
.wiki_big li {font-size:26px}
.wiki_xsmall {font-size:.8em!important}
.wiki_small {font-size:1em!important}
.wiki_normal {font-size:1.1em!important}
.wiki_big {font-size:1.3em!important}
.wiki_p {font-size:1.1em}
.wiki_p .wiki_xsmall {font-size:.6em}
.wiki_p .wiki_small {font-size:.8em}
.wiki_p .wiki_big {font-size:1.1em}
.wiki_img {width:100%;height:auto;margin-bottom:20px}
@media (max-width:1199px) {
#wiki_mainmenu,#wiki_contentmenu {width:222px}
}
@media (max-width:991px) {
#wiki_contentmenu {width:100%;position:relative}
}
@media (max-width:767px) {
#wiki_mainmenu,#wiki_contentmenu {border:1px solid #dbdbdb;background-color:#fefefe}
#wiki_content h1 {margin-bottom:30px;font-size:2em;line-height:32px;height:35px}
#wiki_content h2 {margin-bottom:25px;font-size:1.8em;line-height:28px;height:33px}
#wiki_content h3 {margin-bottom:15px;font-size:1.5em;line-height:28px;height:31px}
#wiki_content h4 {margin-bottom:15px;font-size:1.4em;line-height:24px;height:24px}
.wiki_space {height:30px;line-height:30px}
.wiki_xsmall.wiki_space {height:10px;line-height:10px}
.wiki_small.wiki_space {height:20px;line-height:20px}
.wiki_normal.wiki_space {height:30px;line-height:30px}
.wiki_big.wiki_space {height:40px;line-height:40px}
}
@media (max-width:479px) {
#wiki_mainmenu li,#wiki_contentmenu li {font-size:.923em}
#wiki_content {line-height:22px}
#wiki_content h1 {margin-bottom:25px;font-size:1.8em;line-height:28px;height:33px}
#wiki_content h2 {margin-bottom:20px;font-size:1.6em;line-height:24px;height:28px}
#wiki_content h3 {font-size:1.4em;line-height:22px;height:25px}
#wiki_content h4 {font-size:1.3em;line-height:22px;height:22px}
#wiki_content li {font-size:1.1em}
.wiki_space {height:25px;line-height:25px}
.wiki_xsmall.wiki_space {height:5px;line-height:5px}
.wiki_small.wiki_space {height:15px;line-height:15px}
.wiki_normal.wiki_space {height:25px;line-height:25px}
.wiki_big.wiki_space {height:35px;line-height:35px}
.wiki_p {font-size:1em}
.wiki_errorbox,.wiki_infobox {font-size:1em}
.wiki_codebox {font-size:.9em;line-height:20px}
}
.hljs,.hljs-subst {color:#5e5e5e}
Alles anzeigen
4. Falls ihr kein Design verwenden, welches Bootstrap nutzt, müsst ihr der style.css noch folgendes hinzufügen:
* {-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
::after, ::before {-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
.row::after {clear:both;}
.row::after, .row::before {display: table;content: " ";}
.col-md-3, .col-md-4, .col-md-6, .col-md-9, .col-sm-1, .col-sm-12, .col-sm-6 {position: relative;min-height: 1px;padding-right: 15px;padding-left: 15px;}
.aside {display: block;}
5. Jetzt müsst ihr in eurer Datenbank eine neue Tabelle erstellen. Dies geht zum Beispiel via phpMyAdmin ganz einfach. Dort die TekBASE Datenbank auswählen und dann über den SQL Tab im Hauptbereich folgendes einfügen:
CREATE TABLE `teklab_wiki` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(70) DEFAULT '',
`content` text DEFAULT NULL,
`description` tinytext DEFAULT NULL,
`keywords` tinytext DEFAULT NULL,
`seourl` varchar(255) DEFAULT '',
`language` varchar(20) DEFAULT '',
`typ` smallint(1) NOT NULL DEFAULT 0,
`date` int(11) NOT NULL DEFAULT 0,
`counter` int(11) NOT NULL DEFAULT 0,
`articleid` int(11) NOT NULL DEFAULT 0,
`active` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
);
INSERT INTO `teklab_cms_modules` VALUES (NULL, 'wiki', '1', '0');
Alles anzeigen
6. In der themes/aktuelles_Design/templates/overall_footer.tpl fügt ihr noch den Syntax Highlighter hinzu. Entweder direkt oder aber innerhalb einer if ($name == "wiki") {....} Anweisung. Das hat den Vorteil, dass diese zusätzlichen Java Script Dateien auch nur im Wiki geladen werden. Wenn wir php Code in der tpl Datei verwenden, dann müsst ihr den nachfolgenden Code in ein echo '....'; packen.
<link rel="stylesheet" href="themes/aktuelles_Design/highlight/styles/default.css">
<script src="themes/aktuelles_Design/highlight/highlight.pack.js"></script>
<script>
$(document).ready(function() {
$("pre code").each(function(i, block) {
hljs.highlightBlock(block);
});
});
</script>
7. Damit die Suchmaschinenfreundlichen Links im Wiki funktionieren, benötigt ihr eine .htacces Datei im TekBASE Hauptverzeichnis mit dem nachfolgenden Inhalt: