* @ALL Read (change from default upload to Read to prevent spam) * @user Create (allow other reg user to create page) * userA Delete (allow some power user to delete page) categoryNameSpace:* @ALL None (to limit public access on some sub folder content) categoryNameSpace:* @user Upload (free reg user to access sub folder content)
hide sitemap index from non-login user
start page customize
$conf['start'] = 'Welcome'; //name of start page
change wiki page width
<style> .fullpageOn{ max-width: 100% !important; } </style> <script> // standard javascript here function toggleFullPage() { var myPageClasses = document.getElementById("dokuwiki__site").classList; if (myPageClasses.contains("fullpageOn")) { myPageClasses.remove("fullpageOn"); } else { myPageClasses.add("fullpageOn"); } } </script>
/* find css file in default template folder with class dokuwiki__site
#dokuwiki__site {
max-width: 100% !important;
}
__site_width__ = "100%" ; @ini_site_width #defaut __site_width__ = "75em" ; @ini_site_width
change “doku.php” in URL (you need repeat steps if you update dokuwiki)
<?php if(!defined('DOKU_SCRIPT')) define('DOKU_SCRIPT','newName.php');
change wiki URL format
$conf['userewrite'] = 2;
change 2013 or later DokuWiki homepage logo (further if you want to change the favicon)
DokuWiki Favicon
change 2013 or later DokuWiki theme, top “Media Manager” link for non-user (repeat after each update)
tpl_action('recent', 1, 'li'); if(!empty($INFO['userinfo']['name'])){ tpl_action('media', 1, 'li'); tpl_action('index', 1, 'li'); } // note: $INFO['client'] will give ip or username // ref: $INFO variable in dokuwiki: https://www.dokuwiki.org/devel:environment
# change tpl_toolsevent('sitetools', array( tpl_action('recent', true, 'li', true), tpl_action('media', true, 'li', true), tpl_action('index', true, 'li', true) )); # into if(!empty($INFO['userinfo']['name'])){ tpl_toolsevent('sitetools', array( tpl_action('recent', true, 'li', true), tpl_action('media', true, 'li', true), tpl_action('index', true, 'li', true) )); } else{ tpl_toolsevent('sitetools', array( tpl_action('recent', true, 'li', true) )); }
#!/bin/bash cleanup() { # $1 ... full path to data directory of wiki # $2 ... number of days after which old files are to be removed # purge files older than $2 days from the attic (old revisions) find "$1"/attic/ -type f -mtime +$2 -print0 | xargs -0r rm -f # remove stale lock files (files which are 1-2 days old) find "$1"/locks/ -name '*.lock' -type f -mtime +1 -print0 | xargs -0r rm -f # remove empty directories find "$1"/{attic,cache,index,locks,media,meta,pages,tmp}/ \ -mindepth 1 -type d -empty -print0 | xargs -0r rmdir # remove files older than $2 days from the cache find "$1"/cache/?/ -type f -mtime +$2 -print0 | xargs -0r rm -f }
# cleanup DokuWiki installations (path to datadir, number of days) # some examples: cleanup /home/user1/htdocs/doku/data 256 cleanup /home/user2/htdocs/mywiki/data 180 cleanup /var/www/superwiki/data 180
# back inside wiki folder cd /path/to/folder/to/copy tar cvpzf put_your_name_here.tar.gz . # restore inside wiki folder cd /path/to/destination/folder tar xpvzf put_your_name_here.tar.gz
<?php /** * Fix modification times based on timestamps. Run from within DokuWiki installation directory. * @Author: dreamlusion <http://dreamlusion.eucoding.com> * last modified: 2008-09-05 4:15:00 */ function WalkDirectory($parentDirectory) { global $_weeds; foreach(array_diff(scandir($parentDirectory), $_weeds) as $directory) { $path = $parentDirectory . '/'. $directory; if(is_dir($path)) { WalkDirectory($path); } else { // Calculate changes file path. $path_parts = pathinfo($path); // Remove pages path. global $_pagesPath; $relativePath = substr($path_parts['dirname'], strlen($_pagesPath), strlen($path_parts['dirname'])); // Add <filename>.changes $filename = $path_parts['filename']; // Requires PHP 5.2.0 (http://gr2.php.net/manual/en/function.pathinfo.php) $relativePath .= '/' . $filename . '.' . 'changes'; global $_metaPath; $changelog = $_metaPath . '/' . $relativePath; if (is_file($changelog)) { $handle = @fopen($changelog, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle); preg_match('/(?<timestamp>\d+)/', $buffer, $matches); if ($matches['timestamp'] != '') $timestamp = $matches['timestamp']; } fclose($handle); } // At this point we have our timestamp. echo 'Updating ' . $path . '<br />'; echo ' Timestamp in changelog: ' . $timestamp . '<br />'; echo ' Old modification time: ' . filemtime($path) . '<br />'; if (touch($path, $timestamp)) { // In my host, although the timestamp had changed successfully (checked manually), running filemtime($path) at this point // did not return the correct timestamp, so use I use $timestamp instead of filemtime($path) to avoid confusing the user. echo ' New modification time: ' . $timestamp . '<br />'; } else { echo ' Could not change modification time for page ' . $filename; } } else { echo 'Changelog not found: ' . $changelog . '<br />'; } } } } $_weeds = array('.', '..'); $_pagesPath = getcwd() . '/data/pages'; $_metaPath = getcwd() . '/data/meta'; WalkDirectory($_pagesPath); ?>
Google Side
dokuwiki side:
cd /path/to/folder/to/copy tar cvpzf put_your_name_here.tar.gz . cd /path/to/destination/folder tar xpvzf put_your_name_here.tar.gz
# check existing htdoc file the_same_user:the_same_group info ls -l # then for wiki folder, fix own and permission # ref: https://www.dokuwiki.org/install:permissions cd wiki/ chmod -R 775 data/ sudo chown -R the_same_user:the_same_group data/ cd data/ chmod 2775 {attic,cache,index,locks,media,meta,pages,tmp} chown the_same_user:the_same_group {attic,cache,index,locks,media,meta,pages,tmp}
// if you just need to change and match the group name, then this way // cd to the plugins's parent folder and do sudo chown -R :the_group_name_that_works ./plugins/* // if you need user name change as well sudo chown -R the_user_name_that_works:the_group_name_that_works ./plugins/* // and check now permission with ls -l // you can check all user name by cat /etc/passwd
http://your_site.com/wiki/data/pages/subFolder/pageName.txt
<Directory /web_root_path/wiki/data> order allow,deny deny from allow satisfy all </Directory>
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)"> Require all denied </Files>
chmod 775 local.php chmod 775 local.php.bak
more syntax at http://www.dokuwiki.org/syntax
edit bar at http://www.dokuwiki.org/toolbar
page creation at http://www.dokuwiki.org/page
comparison of wiki http://www.wikimatrix.org/compare/DokuWiki+PmWiki+WikkaWiki
no way but plugin
name then size
{{wiki:dokuwiki-128.png?20x50}}
"2 spaces followed by * or -" at line start will create unordered or ordered list;
“2 extra spaces” in front will indent it to sub-level.
There are 4 ways to create a line break, or a blank line.
type "<code language> content </code>" to create code like block
Plain code text here
type "<file language fileName.txt> content </file>" to create downloadable code
Plain code text here
Supported:
4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80
Method:
* [[:start|Home]] * DokuWiki * [[:wiki:welcome]] * [[:wiki:syntax]] * [[:wiki:welcome]] * [[:playground:playground]] ~~NOCACHE~~