====== Admin ======
===== Wiki Tools =====
* [[/home?do=media |media manager]]
* [[/home?do=admin&page=move_tree |move tree]]
* [[/home?do=admin&page=confmanager |configuration file manager]]
===== Upgrating the Wiki Engine =====
When upgrading the core wiki engine, follow these steps:
- [[?do=admin&page=extension |Update all plugins]] **before** updating the wiki itself
- Install the [[https://www.dokuwiki.org/plugin:htmlok |htmlok plugin]]
- Install the [[https://www.dokuwiki.org/plugin:searchindex |SearchIndex plugin]]. You'll need to "Rebuild Index" **after** the wiki is updated.
- [[?do=admin&page=upgrade |Upgrade the Wiki]]
- Enable the htmlok plugin in the [[?do=admin&page=config#plugin____confightmlok____plugin_settings_name|config manager]]
- [[?do=admin&page=searchindex |Rebuild Index]]
- Follow the steps below to re-modify the template.
===== Template Mods =====
==== Collapse TOC automatically ====
* open
pico lib/tpl/dokuwiki/script.js
* find
if($toc.length) {
$toc[0].setState(1);
* replace with
if($toc.length) {
$toc[0].setState(-1);
==== Browser
====
Changed ''lib/tpl/dokuwiki/main.php''
from:
[
to:
West Coast AREDN
==== Top Bar ====
* Added this file
* Added this line of code at the end of
* Add links as ''tabs'' using the WRAP plugins in [[/topbar]]
==== Footer ====
* Removed extra buttons in footer by removing these lines
>
>
>
>
>
* and also remove the second to last line: '' ''
=== For Static Site Only ===
Changes to [[aredn>http://va7fi-linux.local.mesh/wiki]] (only):
* Created a [[aredn>http://va7fi-linux.local.mesh/wiki/footer |footer]] page on the AREDN site (only) that will be automatically updated by the sync script.
* Created this file:
* Around line 955, added a line commented some lines out to remove ''[page] Last Modified: [date] by [user]'' in the footer. Be careful not to add extra lines at the top or none of the pictures will show
// print it
$out=tpl_includeFile('footer.html');
if ($INFO['exists']) {
/*
$out = '' . $fn . '';
$out .= ' ยท ';
$out .= $lang['lastmod'];
$out .= ' ';
$out .= $date;
if ($INFO['editor']) {
$out .= ' ' . $lang['by'] . ' ';
$out .= '' . editorinfo($INFO['editor']) . '';
} else {
$out .= ' (' . $lang['external_edit'] . ')';
}
*/
==== Header Spacing ====
* Edited this file:
#dokuwiki__header {
padding: 2em 0 0; // padding (top, left, bottom) of logo
.headings,
.tools {
margin-top: 0em; // padding at the top of the logo and title
margin-bottom: 0em; // padding at the bottom of the logo and title
width: 49%; // width of logo
}
.tools {
margin-top: .2em; // padding between first line and search bar
}
h1 {
margin: 0em; // top-left corner margin of logo and title
margin-top: 0em; // padding above logo and title
margin-bottom: 2em; // padding below logo and title
font-size: 1.5em;
font-weight: normal;
img { //postion of logo only
float: left;
margin-right: .5em;
margin-top: 0em;
}
==== Editing Window Message ====
Edited the following file to:
Edit the page (only if you can **improve** it) and hit ''Save''.
For help, see the [[/wikisyntax/home|Syntax page]].
If you want to test some things, use the
[[/wikisyntax/playground|Playground page]].
==== AREDN links ====
Created an AREDN link type with a different icons to show which links require connection to AREDN. The syntax is:
[[aredn>link]]
Created this file:
aredn {NAME}
And copied the favicon.ico to a different folder as a different name:
cp ./data/media/favicon.ico ./lib/images/interwiki/aredn.svg
==== Troubleshooting ====
=== Broken Images ===
If after tweaking the template files the images don't show anymore, it might be that there are extra lines or spaces on some of the php files.
* Copy [[https://www.dokuwiki.org/tips:findbadphp.php|this script]] to the /wiki/ folder and fix its permissions.
* Call the script from the browser. It'll produce a list of php files that have issues.
* Manually fix each file.
===== Update Script =====
This Bash script runs at least once a day at 2am to synchronize the [[aredn>http://va7fi-linux.local.mesh/wiki |Mesh site]] from the [[https://wcaredn.ca |Public site]]:((Must be run as root))
#!/bin/bash
# Navigate to wiki data pages
cd /var/www/html/wiki/data/pages/
# Sync the text pages that have changed from server, excluding the about page
# (which are different), and the footer page.
rsync -apP -e ssh --delete --exclude 'about/home.txt' --exclude 'footer.txt' \
--exclude 'nextcloud/login.txt' \
patrick@scarcs.ca:~/sites/aredn/data/pages/ /var/www/html/wiki/data/pages/
# Sync the media files that have changed from server.
rsync -apP -e ssh --delete patrick@scarcs.ca:~/sites/aredn/data/media/ \
/var/www/html/wiki/data/media/
# Write custom footer page to note the date of last sync.
echo 'Last synchronized from [[https://wcaredn.ca]] on' \
$(date) '' > footer.txt
# Update ownership and permissions that might have been lost during the sync
chown aredn:www-data -R /var/www/html/wiki/data/
chmod 770 -R /var/www/html/wiki/data/
# Refresh the cache to make the changes visible.
touch /home/aredn/html/wiki/conf/local.php
To add cronjob, add:
0 2 * * * . /home/aredn/Scripts/SyncWiki.sh