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
Next revisionBoth sides next revision
dokuwiki:server [2022/10/09 19:10] – [Customization] Bernard Condraudokuwiki:server [2024/04/25 18:56] Bernard Condrau
Line 38: Line 38:
 ==== Customization ==== ==== Customization ====
 There are a few core hacks required to make my template work properly, both for a regular wiki as well as for a help server. <span orange>**Note: you need to verify below modifications after every DokuWiki upgrade.**</span> There are a few core hacks required to make my template work properly, both for a regular wiki as well as for a help server. <span orange>**Note: you need to verify below modifications after every DokuWiki upgrade.**</span>
-  Install my {{ :dokuwiki:tpl_bethico.zip |Bethico Template}} into ''/lib/tpl/''. Current version is 2022-10-09 suitable for DokuWiki "Igor"+  Install my {{ :dokuwiki:tpl_bethico.zip |Bethico Template}} into ''/lib/tpl/''. Current version is 2022-10-09 suitable for DokuWiki "Igor"
-  * Copy 'doku.php' to 'help.php' in the DokuWiki root folder +  Add the following lines in ''doku.php'' in DokuWiki's root after line ''$ID = getID();'' at the beginning...<file>require_once(template('dispatcher.php'));
-  * Add the following lines in ''doku.php'' in DokuWiki's root after line ''$ID = getID();''...<file>require_once(template('dispatcher.php'));+
 $langcode = bethico_language();</file> $langcode = bethico_language();</file>
-  ...and replace line ''act_dispatch();'' with<file>init_lang($langcode);+  ...and replace at the end line ''act_dispatch();'' with<file>init_lang($langcode);
 bethico_dispatch(basename(__FILE__));</file> bethico_dispatch(basename(__FILE__));</file>
 +  - Copy ''doku.php'' to ''help.php'' in the DokuWiki root folder
 +  - Modify ''/inc/template.php'' and add before line ''Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);'' in function ''tpl_toc''. This is a non-destructive change which fixes an issue in the table of contents if plugin ''condition'' is installed in the wiki<file>if (@include_once(template('dispatcher.php'))) bethico_update_toc($toc, $TOC);</file>
 +  - Copies of the modified files for "Igor" are in folder ''/lib/tpl/bethico/core/'', copy them with<file>cp -R /lib/tpl/bethico/core/* /</file>
 +  - After a DokuWiki upgrade check and change if necessary
 +    - Check ''/inc/actions.php'' and change ''/lib/tpl/bethico/dispatcher.php''
 +    - Check ''/inc/template.php'' and change
 +    - Check ''/doku.php'' and change then copy to ''/help.php''
 +  - Optional: replace favicon and logo in '/lib/tpl/bethico/images/'.
  
-  * Create the language fallback to English for non-existent translation pages by adding 3 lines to /help.php at line #41, just below '$ID = getID();'. Remember to update after you add or remove languages.<code>// bco: 20181114. Get requested language and set language fallback 
-require_once(template('dispatcher.php')); 
-$langcode = help_language();</code> 
-  * Modify 'help.php' and replace line #119+4 and #120+4<code>//do the work (picks up what to do from global env) 
-act_dispatch();</code>with<code>// bco: 20181114. Set language and load act_dispatch override 
-init_lang($langcode); 
-help_dispatch();</code> 
-  * Modify '/inc/template.php' and add after line #130 ($toc = $TOC) in function tpl_toc<code>// bco: 20181116. Fix toc issues due to use of condition Plugin 
-require_once(template('dispatcher.php')); 
-help_toc($toc); 
-</code> 
-  * After a DokuWiki upgrade make sure that 
-    * If '/inc/actions.php' has been upgraded, reflect the changes in '/lib/tpl/bethico/dispatcher.php' 
-    * If '/inc/template.php' has been upgraded, reflect the changes in function tpl_toc 
-    * If '/doku.php' has been upgraded, reflect the changes in '/help.php' 
-  * If you use a template other than 'bethico', you must copy '/lib/tpl/bethico/css/userstyle.css' to '/conf' 
-  * Optional: replace favicon and logo in '/lib/tpl/bethico/images/'. 
  
-==== The following files must be checked against the previous version after upgrading ==== 
-^ File ^ DokuWiki File ^ Todo ^ 
-| help.php | doku.php | line 12: $updateVersion and verify content (compare doku.php to previous version) | 
-| inc/template.php | inc/template.php | line 131-133: call to //help_toc// in function //tpl_toc// | 
-| lib/tpl/bethico/dispatcher.php | inc/actions.php | verify function //help_dispatch// | 
 ===== Joomla Access ===== ===== Joomla Access =====
   * Set the Help URL in the component configuration of com_bethico to<code>'https://your.wiki.server/help.php?id={langcode}:{keyref}'</code>   * Set the Help URL in the component configuration of com_bethico to<code>'https://your.wiki.server/help.php?id={langcode}:{keyref}'</code>
Line 86: Line 71:
 | {minor} | Joomla minor version number || | {minor} | Joomla minor version number ||
 | {maintenance} | Joomla maintenance version number || | {maintenance} | Joomla maintenance version number ||
 +
 +===== Backup with zip =====
 +  * use the following command to backup an entire wiki with zip<code>$ sudo zip -r my_wiki my_wiki -x my_wiki/data/cache/**\* my_wiki my_wiki -x my_wiki/data/log/error/**\* my_wiki my_wiki -x my_wiki/data/log/deprecated/**\*</code>
  
 ===== Upgrade to Version 2020-07-29 "Hogfather" ===== ===== Upgrade to Version 2020-07-29 "Hogfather" =====
Line 104: Line 92:
   * [[https://www.dokuwiki.org/tips:safely_include_php_code|Safely include PHP code]]   * [[https://www.dokuwiki.org/tips:safely_include_php_code|Safely include PHP code]]
   * [[https://www.splitbrain.org/personal|Andreas Gohr]]   * [[https://www.splitbrain.org/personal|Andreas Gohr]]
 +  * [[https://www.plothost.com/kb/update-dokuwiki-command-line/|How to update DokuWiki from the command line]]
 ===== PHP 8.1 issues ===== ===== PHP 8.1 issues =====
 ==== Plugin condition ==== ==== Plugin condition ====
Line 111: Line 99:
 ==== Plugin html5video ==== ==== Plugin html5video ====
   * Put brackets enclosing the expressions on line 190 and 191 of ''plugins/html5video/syntax/video.php'' if you run your webserver with PHP 8.   * Put brackets enclosing the expressions on line 190 and 191 of ''plugins/html5video/syntax/video.php'' if you run your webserver with PHP 8.
 +
 +===== davcal =====
 +==== Check when a date entry was made ====
 +  - Copy ''/data/meta/davcal.sqlite3'' to D:\
 +  - Open ''sqlite3.exe'' command line tool from D:\PortableCustom\sqlite3, then enter the following commands to see entries made after 2023-01-01:<code>.open /davcal.sqlite3
 +SELECT calendardata FROM calendarobjects WHERE datetime(lastoccurence, 'unixepoch') > '2023-01-01 00:00:00';
 +.quit</code>