My Projects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:dokuwiki_mods [2023/04/07 21:24] – [CSS dropshadow code] tonywiki:dokuwiki_mods [2026/09/27 00:13] (current) – tony
Line 1: Line 1:
 +\\
 +\\
 +<html><p style="text-align:center"><b><font size="5">Customizations to dokuwiki for this site</font></b></p></html>
 +\\
 +\\
 +
 +===== Allow Upper/lowercase pagenames =====
 +Needed to allow upper/lowercase pagenames:\\
 +Commented out one line in the /var/lib/dokuwiki/inc/pageutils.php about line 109:\\
 +$id = utf8_strtolower($id);
 +
 +Also similar line in /usr/share/dokuwiki/HTTPClient.php\\
 +commented out strtolower() function calls.
 +
 +
 +But may have side effects with filename matching when other bits of code assume lowercase.
 +
 +===== Allow upload of specific text file filetypes =====
 +Edited /etc/dokuwiki/mime.local.conf and added:\\
 +<code>
 +cpp      text/plain
 +h        text/plain
 +</code>
 +
 +===== Allow images with uppercase filename extension =====
 +Edited /etc/dokuwiki/mime.local.conf and added:\\
 +<code>
 +JPG      image/jpeg
 +</code>
 +
 +(doesn't work 100%, eg doesn't show image preview in media manager)
 +
 +===== Add symbol for degrees =====
 +Edited /etc/entities.local.conf and added:\\
 +<code>
 +(deg)    °
 +</code>
 +
 +===== Background wallpaper =====
 +Copied wallpaper background image to:\\
 +/usr/share/dokuwiki/lib/images/paper.gif
 +
 +Inserted ito /etc/dokuwiki/userstyle.css
 +<code>
 +  body {background-image:url(/dokuwiki/lib/images/paper.gif) !important;}
 +</code>
 +
 +see https://www.dokuwiki.org/devel:css
 +
 +===== Embedded HTML =====
 +Edited /etc/dokuwiki/local.php to allow embedded HTML code within wiki pages:\\
 +<code>
 +$conf['htmlok']      = 1;
 +</code>
 +
 +To insert HTML code in wiki pages surround blocks of code with: 
 +<code>
 +<HTML>
 +(your code)
 +</HTML>
 +</code>
 +
 +or inline
 +<code>
 +<html>(your code)</html>
 +</code>
 +
 +see https://www.dokuwiki.org/faq:html
 +
 +===== Nice URLs =====
 +Edited /etc/dokuwiki/local.php to allow url paths without doku.php?id= type code:\\
 +<code>
 +$conf['userewrite']      = 1;
 +$conf['useslash']        = 1;
 +</code>
 +
 +===== CSS dropshadow code =====
 +Inserted into /etc/dokuwiki/userstyle.css
 +
 +<code>
 +  body {margin:25px;}
 +
 +  div.shadows {
 +    padding-top: 10px;
 +    width: 90%;
 +    background-color: white;
 +    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
 +    margin-bottom: 25px;
 +  }
 +
 +  div.container {
 +    text-align: center;
 +    padding: 10px 5px;
 +  }
 +</code>
 +
 +Invoke this with:
 +<code>
 +<HTML>
 +<div class="shadows" style="text-align:center; margin-left: auto;  margin-right: auto; ">
 +</HTML>
 +{{wiki:NAMESPACE:IMAGE.JPG?WIDTH|ALT-DESCRIPTION}} (can have multiple images here)
 +<HTML>
 +  <div class="container">
 +    LONG-CAPTION-TO-DISPLAY-BELOW-IMAGE(S)
 +  </div>
 +</div>
 +</HTML>
 +</code>
 +
 +or
 +
 +<code>
 +<HTML>
 +<div class="shadows" style="text-align:center; margin-left: auto;  margin-right: auto; ">
 +  <a href="/dokuwiki/_detail/PATH-TO-IMAGE.jpg" class="media"><img width="45%" src="/dokuwiki/_media/PATH-TO-IMAGE.jpg" class="media" title="IMAGE-TITLE" alt="IMAGE-TITLE" /></a>
 +  <div class="container">
 +    LONG-CAPTION-TO-DISPLAY-BELOW-IMAGE(S)
 +  </div>
 +</div>
 +</HTML>
 +</code>
 +
 +see https://www.dokuwiki.org/devel:css
 +
 +
 +===== Old Revisions : Removing old documents ====
 +
 +To remove any of the contents of the attic you can manually remove the corresponding files and sub-directories from the system.
 +
 +To also remove the list from DokuWiki, edit the metafile ./data/meta/<namespace>.changes
 +
 +===== Installation customizations =====
 +
 +Installed the Debian distribution default dokuwiki package
 +Downloaded dokuwiki-2012-10-13.tgz ("Adora Belle"), unpacked manually copied across files to debian structure.
 +logged in and opened the configure page and checked all working ok.
 +Downloaded dokuwiki-2013-05-10.tgz ("Weatherwax"), unpacked manually copied across files to debian structure.
 +logged in and opened the configure page and checked all working ok.
 +
 +Files were manually copied as per:
 +<code>
 +bin -> /usr/share/dokuwiki/bin
 +conf -> /etc/dokuwiki (excluding acronyms.conf as don't want all those abbreviations highlighted)
 +data -> /var/lib/dokuwiki/data
 +inc -> /usr/share/dokuwiki/inc
 +lib/plugins -> /var/lib/dokuwiki/lib/plugins
 +lib/tpl -> /var/lib/dokuwiki/lib/tpl
 +lib/exe, images, scripts, styles, index.html -> /usr/share/dokuwiki/lib
 +* -> /usr/share/dokuwiki/
 +</code>
 +
 +Downloaded and unpacked zenlike template into /var/lib/dokuwiki/lib/tpl/zenlike.
 +Edited colour of :
 +zenlike/images/buttonbg.gif
 +zenlike/images/db1.gif
 +zenlike/images/db2.gif
 +zenlike/images/menubg.gif
 +
 +Replaced :
 +zenlike/images/hdrpic.jpg
 +
 +Edited :
 +zenlike/css/zenlike.css
 +zenlike/lang/en/lang.php and  changed 
 +<code>
 +  ⇐ $lang['discussion']        = 'Discussion';
 +  ⇒ $lang['discussion']        = 'Feedback';
 +</code>
 +zenlike/style.ini
 +
 +===== Changes to fix footer overlapping sidebar when sidebar extends beyond bottom of normal content =====
 +Edited:
 +zenlike/css/zenlike.css
 +
 +  <     background: #000000 url('images/bg1.jpg');
 +  >     background: #000000 url('images/paper.gif');
 +
 +  <     width: 82%;
 +  >     width: 95%;
 +
 +  <     background: #000 url('images/bg1.jpg') !important;
 +  >     background: #000 url('images/paper.gif') !important;
 +
 +  <     width: 82%;
 +  >     width: 95%;
 +
 +Added two more lines into footer style:
 +   #dokuwiki__footer {
 +      position: relative;
 +  + width: 70%;
 +  + left: 21em;
 +      height: 2.0em;
 +      clear: both;
 +      padding-top: 5.0em;
 +      padding-bottom: 2em;
 +      background: #fff url('images/border2.gif') repeat-x 0 2.5em;
 +      font-size: 0.8em;
 +   }
 +
 +\\
 +----
 +<HTML><div style="width: 50%; margin-left: auto;  margin-right: auto; ">&nbsp;</HTML>[[:start|Home Page]]<html>&nbsp;&nbsp;&nbsp;</html>[[:about|About this Site]]<html>&nbsp;&nbsp;&nbsp;</html>[[:copyright|Copyright Questions]]<html>&nbsp;&nbsp;&nbsp;</html>[[:contact|Contact Us]]<html></div></html>\\
 +\\