Table of Contents

Admin

Wiki Tools

Upgrating the Wiki Engine

When upgrading the core wiki engine, follow these steps:

  1. Update all plugins before updating the wiki itself
  2. Install the htmlok plugin
  3. Install the SearchIndex plugin. You'll need to “Rebuild Index” after the wiki is updated.
  4. Enable the htmlok plugin in the config manager
  5. Follow the steps below to re-modify the template.

Template Mods

Collapse TOC automatically

Browser <head>

Changed lib/tpl/dokuwiki/main.php

from:

<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title'])</title>

to:

<title>West Coast AREDN</title>

Top Bar

For Static Site Only

Changes to http://va7fi-linux.local.mesh/wiki (only):

Header Spacing

Editing Window Message

Edited the following file to:

inc/lang/en/edit.txt
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]].

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:

conf/interwiki.local.conf
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.

Update Script

This Bash script runs at least once a day at 2am to synchronize the Mesh site from the Public site:1)

AREDNSync.sh
#!/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 '<WRAP rightalign><fs x-small>Last synchronized from [[https://wcaredn.ca]] on' \
  $(date) '</fs></WRAP>' > 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
1)
Must be run as root