User Tools

Site Tools


synology:dokuwiki

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
synology:dokuwiki [2020/07/29 18:33] Wulf Rajeksynology:dokuwiki [2024/04/09 23:35] (current) – [Allow additional file types] Wulf Rajek
Line 1: Line 1:
-====== DokuWiki on Synology ======+====== DokuWiki Configuration ======
  
-Admin, extensions:\\ +Admin, extensions: 
-uninstall active directory auth plugin\\ +uninstall active directory auth plugin 
-uninstall ldap auth plugin\\ +uninstall ldap auth plugin 
-uninstall mysql auth plugin\\ +uninstall mysql auth plugin 
-uninstall postgresql auth plugin\\ +uninstall postgresql auth plugin 
-uninstall popularity feedback plugin\\+uninstall popularity feedback plugin
  
-**note: upgrade plugin by andreas gohr does not work on synology.** +Install changes plugin. manually via:
- +
- +
-Install changes plugin. manually via:\\+
 https://github.com/cosmocode/changes/zipball/master https://github.com/cosmocode/changes/zipball/master
  
-**PreserveFilenames Plugin. manually via:**\\ +Install EditX Plugin by danny0838 (Danny Lin)
-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: +
-<code> +
-    function register(&$controller) +
-</code> +
-to: +
-<code> +
-    function register(Doku_Event_Handler $controller) +
-</code> +
-also change lines 257 and 264 in action_antheater.php as following: +
-<code> +
-#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'), +
- +
-</code> +
-and change line 26 common.php as following: +
-<code> +
-#from +
-            array(self, '_correctBasename_callback'), +
-#to: +
-            array('self', '_correctBasename_callback'), +
-</code> +
-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 simplenavi plugin by Andreas Gohr
  
Line 91: Line 51:
 {{:config:favicon.ico?linkonly|}} {{:config:favicon.ico?linkonly|}}
  
-<code /web/dokuwiki/conf/tpl/dokuwiki/style.ini>+<code ini /web/dokuwiki/conf/tpl/dokuwiki/style.ini>
 [replacements] [replacements]
 ;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
Line 128: Line 88:
  
 Hack for edittable with dark theme: Hack for edittable with dark theme:
-<code /web/dokuwiki/conf/userstyle.css>+<code css /web/dokuwiki/conf/userstyle.css>
 .handsontable td { .handsontable td {
     color: #222;     color: #222;
Line 135: Line 95:
  
 Remove footer buttons and license: Remove footer buttons and license:
-<code /web/dokuwiki/lib/tpl/dokuwiki/tpl_footer.php>+<code php /web/dokuwiki/lib/tpl/dokuwiki/tpl_footer.php>
 #remove everything between #remove everything between
 <!-- ********** FOOTER ********** --> <!-- ********** FOOTER ********** -->
Line 144: Line 104:
  
 Remove Media Manager link for non-logged-in/view-only users: Remove Media Manager link for non-logged-in/view-only users:
-<code /web/dokuwiki/lib/tpl/dokuwiki/tpl_header.php>+<code php /web/dokuwiki/lib/tpl/dokuwiki/tpl_header.php>
 #surround: #surround:
                         tpl_action('admin', 1, 'li');                         tpl_action('admin', 1, 'li');
Line 157: Line 117:
 </code> </code>
 For 2020 Hogfather templates should be updated to replace the 4 tpl_action lines with: For 2020 Hogfather templates should be updated to replace the 4 tpl_action lines with:
-<code>+<code php>
                         echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');                         echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
 </code> </code>
 and the similar action line in site-tools under the search form should contain: and the similar action line in site-tools under the search form should contain:
-<code>+<code php>
                 <?php                  <?php 
                     if (!empty($_SERVER['REMOTE_USER'])) {                     if (!empty($_SERVER['REMOTE_USER'])) {
Line 169: Line 129:
 </code> </code>
  
-Allow additional file types:\\  +Geshi Syntax Highlight changes for dark theme: 
-Log into synology via ssh or access the dokuwiki folder.\\ +add file /web/dokuwiki/lib/tpl/dokuwiki/css/_geshi_dark.less 
 +<code css /web/dokuwiki/lib/tpl/dokuwiki/css/_geshi_dark.less> 
 +/** 
 + * This file provides styles for syntax highlighting in dark mode 
 + * Syntax highlighting is done by GeShi 
 + * It doesn't change the default style light theme style 
 + */ 
 + 
 +@brackets#bfbfbf; 
 +@comments: #7a7a75; 
 +@strings: #ff4444; 
 +@methods: #ffffff; 
 +@methods2: #ffcc66; 
 +@keyword1: #99ee00; 
 +@keyword2: #eeaa22; 
 +@keyword3: #dd88ff; 
 +@keyword4: #ff7744; 
 +@operators: #44ffbb; 
 +@numbers: #ff2288; 
 +@variables: #88c0ff; 
 +@variables2: #ccddff; 
 +@variables5: #ddddff; 
 +@lines: #252525; 
 +@lines2: #272727; 
 +@lines3: var(--background_site); 
 +@lines-xtra: #494d26; 
 + 
 +.dokuwiki{ 
 + 
 +    /* lines        */ 
 +    .li1 { 
 +        background: @lines; 
 +    } 
 +    .li2 { 
 +        background: @lines2; 
 +    } 
 +    .li1 .de1 { 
 +        background: @lines3; 
 +    } 
 +    .li1.ln-xtra .de1, .ln-xtra{ 
 +        background: @lines-xtra; 
 +    } 
 + 
 +    /* brackets     */ 
 +    .br0 { 
 +        color: @brackets; 
 +    } 
 +    /* comments     */ 
 +    .co0, .co1, .coMULTI { 
 +        color: @comments; 
 +    } 
 + 
 +    /* strings      */ 
 +    .st0, .st_h { 
 +        color: @strings; 
 +    } 
 + 
 +    /* methods      */ 
 +    .me0, .me1 { 
 +        color: @methods; 
 +    } 
 +    .me2 { 
 +        color: @methods2; 
 +    } 
 + 
 +    /* keywords     */ 
 +    .kw1 { 
 +        color: @keyword1; 
 +    } 
 +    .kw2 { 
 +        color: @keyword2; 
 +    } 
 +    .kw3 { 
 +        color: @keyword3; 
 +    } 
 +    .kw4 { 
 +        color: @keyword4; 
 +    } 
 + 
 +    /* operators        */ 
 +    .sy0 { 
 +        color: @operators; 
 +    } 
 + 
 +    /* numbers      */ 
 +    .nu0 { 
 +        color: @numbers; 
 +    } 
 + 
 +    /* variables        */ 
 +    .re0, .re1, .re3, .re4 { 
 +        color: @variables; 
 +    } 
 +    .re2 { 
 +        color: @variables2; 
 +    } 
 +    .re5 { 
 +        color: @variables5; 
 +    } 
 + 
 + 
 +
 + 
 +/* dark theme and automatic is switched off*/ 
 +&:root[theme="dokuwiki"] { 
 +    .dokuwiki(); 
 +
 + 
 +/* User prefers dark theme and automatic is switched on*/ 
 +@media (prefers-color-scheme: dark){ 
 +    &:root[theme="auto"] { 
 +        .dokuwiki(); 
 +    } 
 +
 +</code> 
 + 
 +edit /web/dokuwiki/lib/tpl/dokuwiki/style.ini and add to the stylesheets section 
 +<code ini /web/dokuwiki/lib/tpl/dokuwiki/style.ini> 
 +css/_geshi_dark.less      = screen 
 +</code> 
 +===== Add icon for Shortcut on Homescreen on Android =====
 <code> <code>
-cd /volume1/web/dokuwiki/conf +vi lib/tpl/dokuwiki/main.php 
-sudo cp mime.conf mime.local.conf +</code> 
-sudo vi mime.local.conf+insert after line 23 relating to favicon: 
 +<code php> 
 +<?php 
 +    $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.png'); 
 +    echo '<link rel="apple-touch-icon-precomposed" href="'.tpl_getMediaFile($look).'" />'.NL; 
 +?> 
 +</code> 
 + 
 + 
 +===== Allow additional file types ===== 
 +<code> 
 +cd dokuwiki/conf 
 +cp mime.conf mime.local.conf 
 +vi mime.local.conf
 #delete all but the text files towards the end of the file and enable them #delete all but the text files towards the end of the file and enable them
 #add json text/json #add json text/json
 </code> </code>
  
-Blank page issue after upgrade:\\ +===== Blank page issue after upgrade =====
 https://www.dokuwiki.org/faq:blankpage https://www.dokuwiki.org/faq:blankpage
 +
 +===== Changes & Pagelist plugin =====
 +https://www.dokuwiki.org/plugin:pagelist
 +
 +<code>
 +Here are the most recent changes and additions:
 +{{changes>count=30&type = create, edit, minor&render = pagelist(header,nouser)}}
 +</code>
 +
 +Adjustment hack to show parent namespace:
 +dokuwiki/lib/plugins/pagelist/helper.php line 656 function printPageCell (as of Feb 2024)
 +<code php>
 +// produce output
 +        $parentnamespace = getNS($id);
 +        if(useHeading('navigation')) {
 +            // get page title
 +            $parenttitle = p_get_first_heading($parentnamespace.":start", METADATA_RENDER_USING_SIMPLE_CACHE);
 +            if($parenttitle) {
 +                $parentnamespace = $parenttitle;
 +            }
 +        }
 +        if($parentnamespace!="") {
 +            $parentnamespace.=' -> ';
 +        }
 +        $section = !empty($this->page['section']) ? '#' . $this->page['section'] : '';
 +        $content = '<a href="' . wl($id) . $section . '" class="' . $class . '" title="' . $id . '"  data-wiki-id="' . $id . '">' . $parentnamespace.$title . '</a>';
 +        if ($this->style == 'list') {
 +            $content = '<ul><li>' . $content . '</li></ul>';
 +        }
 +        return $this->printCell('page', $content);
 +    }
 +</code>
 +
 +===== Install plugins via CLI =====
 +
 +Examples to install plugins via the CLI by name (available) or specific ones by URL (available in releases after Sept 2021).
 +<code>
 +php bin/plugin.php extension install https://github.com/.../support_keycloak10.zip # installs from the URL
 +php bin/plugin.php extension install addnewpage # finds the download URL, install from it
 +</code>
 +
synology/dokuwiki.1596044011.txt.gz · Last modified: (external edit)