When upgrading the core wiki engine, follow these steps:
pico lib/tpl/dokuwiki/script.js
if($toc.length) { $toc[0].setState(1);
if($toc.length) { $toc[0].setState(-1);
Changed lib/tpl/dokuwiki/main.php
from:
<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title'])</title>
to:
<title>West Coast AREDN</title>
<div class="topbar">
<?php tpl_include_page('topbar') /* includes the wiki page "topbar" */ ?>
</div>
<?php tpl_includeFile('topbar.html') ?>
tabs using the WRAP plugins in topbar
<a href="https://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-donate.gif" width="80" height="15" alt="Donate" /></a> <a href="https://php.net" title="Powered by PHP" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a> <a href="//validator.w3.org/check/referer" title="Valid HTML5" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a> <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-css.png" width="80" height="15" alt="Valid CSS" /></a> <a href="https://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a>
Changes to http://va7fi-linux.local.mesh/wiki (only):
<div class="footer"> <?php tpl_include_page('footer') /* includes the wiki page "footer" */ ?> </div>
[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 = '<bdi>' . $fn . '</bdi>'; $out .= ' · '; $out .= $lang['lastmod']; $out .= ' '; $out .= $date; if ($INFO['editor']) { $out .= ' ' . $lang['by'] . ' '; $out .= '<bdi>' . editorinfo($INFO['editor']) . '</bdi>'; } else { $out .= ' (' . $lang['external_edit'] . ')'; } */
#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; }
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]].
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
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.
This Bash script runs at least once a day at 2am to synchronize the Mesh site from the Public site:1)
#!/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