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
Last revisionBoth sides next revision
dokuwiki:server [2024/06/10 15:30] – [Customization] Bernard Condraudokuwiki:server [2024/06/11 09:27] – [Customization] Bernard Condrau
Line 42: Line 42:
   * Language detection and fallback added to ''doku.php'' in the root directory which then dispatches ''doku.php'' in the template directory   * Language detection and fallback added to ''doku.php'' in the root directory which then dispatches ''doku.php'' in the template directory
   * Language detection and fallback added to ''help.php'' (copy of ''doku.php'') in the root directory which then dispatches ''help.php'' in the template directory   * Language detection and fallback added to ''help.php'' (copy of ''doku.php'') in the root directory which then dispatches ''help.php'' in the template directory
-=== Install ===+ 
 +=== Core hacks ===
   - Install my {{ :dokuwiki:tpl_bethico.zip |Bethico Template}} into ''/lib/tpl/''. Current version is v55.1 / 2024-06-09 suitable for DokuWiki "Kaos".   - Install my {{ :dokuwiki:tpl_bethico.zip |Bethico Template}} into ''/lib/tpl/''. Current version is v55.1 / 2024-06-09 suitable for DokuWiki "Kaos".
   - 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();'' at the beginning...<file>require_once(template('dispatcher.php'));
Line 49: Line 50:
   - ...and replace at the end 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 +  - Add a line to file ''/lib/scripts/page.js'' in function ''makeToggle'' to allow the template to set the table of contents to //open// or //closed//<file>$handle[0].setState = function(state){ 
-  - 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> +            var hidden; 
-  - 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>+        --> if(!state && JSINFO.toc) state = JSINFO.toc.initial_state; 
 +            if(!state) state = 1;</file> 
 + 
 +=== Fix toc handling in core === 
 +  - Modify ''/inc/template.php'' in function ''tpl_toc'' add before line ''Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);'':<file>if (@include_once(template('dispatcher.php'))) bethico_update_toc($toc, $TOC);</file>This is a non-destructive change which fixes an issue in the table of contents if plugin:condition is installed. 
 + 
 +=== Fix toc handling in plugin:toctweak === 
 + 
 +=== Install === 
 +  - Copies of the modified files for "Kaos" are in folder ''/lib/tpl/bethico/core/v551/'', copy them with<file>cp -R /lib/tpl/bethico/core/v551/* /</file>then check file permissions
   - After a DokuWiki upgrade check and change if necessary   - After a DokuWiki upgrade check and change if necessary
     - Check ''/inc/actions.php'' and change ''/lib/tpl/bethico/dispatcher.php''     - Check ''/inc/actions.php'' and change ''/lib/tpl/bethico/dispatcher.php''