User Tools

Site Tools


synology:dokuwiki

This is an old revision of the document!


DokuWiki on Synology

Admin, extensions:

uninstall active directory auth plugin

uninstall ldap auth plugin

uninstall mysql auth plugin

uninstall postgresql auth plugin

uninstall popularity feedback plugin

note: upgrade plugin by andreas gohr does not work on synology.

Install changes plugin. manually via:

https://github.com/cosmocode/changes/zipball/master

PreserveFilenames Plugin. manually via:

https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/zipball/master

fix for php7, edit action.php, action_angua.php and action_anteater.php function register call from:

    function register(&$controller)

to:

    function register(Doku_Event_Handler $controller)

also change lines 257 and 264 in action_antheater.php as following:

#line 257
#from
            array('self::_replaceLinkURL_callback_a'),
#to:
            array('self','_replaceLinkURL_callback_a'),


#line 264
#from
            array('self::_replaceLinkURL_callback_img'),
#to:
            array('self','_replaceLinkURL_callback_img'),

and change line 26 common.php as following:

#from
            array(self, '_correctBasename_callback'),
#to:
            array('self', '_correctBasename_callback'),

Ensure to force-reload the embedded jquery javascript files as they are cached.

source: https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/pull/5/commits/4a1e9a395bc2a2d76d50b3094b9b6856f34d8b84

Install EditX Plugin by danny0838 (Danny Lin)

simplenavi plugin by Andreas Gohr

Create page sidebar and put:

{{simplenavi>}}

Create page start and put:

Something introduction etc...

{{changes>type = create&render = list(dayheaders)}}

~~NOCACHE~~

Install xbr plugin, enable it in admin config, change the renderer_xhtml setting to 'xbr'.
This renders newlines in entry source without need for double-backslashes.

Go to admin, config settings:

Change Display, Recent changes to keep to 60

Change Display, showuseras to User's Full Name (to protect login user name)

Change Display, use first heading for pagenames to Navigation Only

Change Display, hidepages and enter sidebar

Change Links, target window for external links to _blank

Change changes, oldest changes to show to 60*24*60*60

Theme Adjustment

The easiest way to adjust the theme to a darker version is to create the file “style.local.ini” and place it into the dokuwiki/lib/tpl/dokuwiki directory. (Doesn't seem to work after update to latest wiki version. Using style addon stores it as style.ini in /web/dokuwiki/conf/tpl/dokuwiki instead).

An example file with a darker theme ini file is below. Furthermore, replacing the favicon.ico, logo.png and apple-touch-icon.png in the template image folder with alternative versions and overwriting the dokuwiki-128.png file in the media manager will change the logo and favicon. You can also just store these in the 'root' or the 'wiki' section without adjusting or replacing the template files.

Here are the images for the blue world icon:


dokuwiki-128.png
logo.png
apple-touch-icon.png
favicon.ico

/web/dokuwiki/conf/tpl/dokuwiki/style.ini
[replacements]
;--------------------------------------------------------------------------
;------ guaranteed dokuwiki color placeholders that every plugin can use

; main text and background colors
__text__            = "#eeeeee"
__background__      = "#222222"
; alternative text and background colors
__text_alt__        = "#dddddd"
__background_alt__  = "#444444"
; neutral text and background colors
__text_neu__        = "#cccccc"
__background_neu__  = "#333333"
; border color
;__border__          = "#f90"
__border__          = "#90b3da"

; highlighted text (e.g. search snippets)
__highlight__       = "#aaaa66"

;--------------------------------------------------------------------------

__background_site__ = "#000000"

; these are used for links
;__link__            = "#ff9900"
__link__            = "#90b3da"
__existing__        = "#ffff88"
__missing__         = "#ff4433"

; site and sidebar widths
__site_width__      = "100%"
__sidebar_width__   = "22%"

Hack for edittable with dark theme:

/web/dokuwiki/conf/userstyle.css
.handsontable td {
    color: #222;
}

Remove footer buttons and license:

/web/dokuwiki/lib/tpl/dokuwiki/tpl_footer.php
#remove everything between
<!-- ********** FOOTER ********** -->
#and
<!-- /footer -->

Remove Media Manager link for non-logged-in/view-only users:

/web/dokuwiki/lib/tpl/dokuwiki/tpl_header.php
#surround:
                        tpl_action('admin', 1, 'li');
                        tpl_action('profile', 1, 'li');
                        tpl_action('register', 1, 'li');
                        tpl_action('login', 1, 'li');

#with
if ($INFO['isadmin'] {
#and 
}

For 2020 Hogfather templates should be updated to replace the 4 tpl_action lines with:

                        echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');

and the similar action line in site-tools under the search form should contain:

                <?php 
                    if (!empty($_SERVER['REMOTE_USER'])) {
                        echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false);
                    }
                ?>

Allow additional file types:

Log into synology via ssh or access the dokuwiki folder.

cd /volume1/web/dokuwiki/conf
sudo cp mime.conf mime.local.conf
sudo vi mime.local.conf
#delete all but the text files towards the end of the file and enable them
#add json text/json

Blank page issue after upgrade:

https://www.dokuwiki.org/faq:blankpage

synology/dokuwiki.1596044011.txt.gz · Last modified: (external edit)