Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| public:computers:dokuwiki_tweaks [29/01/26 17:55 GMT] – [Monobook user/screen.css] john | public:computers:dokuwiki_tweaks [02/02/26 18:19 GMT] (current) – john | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== DokuWiki Tweaks ====== | ====== DokuWiki Tweaks ====== | ||
| + | ===== Vector / Monobook tweaks ===== | ||
| + | |||
| + | I like the Vector and Monobook templates, very similar feel to Wikipedia | ||
| + | |||
| + | ==== Logout errors with later versions of Dokuwiki ==== | ||
| + | |||
| + | After upgrading Dokuwiki to //Igor// it became impossible to log out due to a warning | ||
| + | |||
| + | <note warning> | ||
| + | Security Token did not match. Possible CSRF attack. | ||
| + | </ | ||
| + | |||
| + | I initially ignored it but then downgraded back to // | ||
| + | |||
| + | I recently upgraded to the latest Dokuwiki (Jack Jackrum), and upgraded all plugins and templates where possible. However the problem with logout with Vector and Monobook re-appeared. | ||
| + | |||
| + | I found there was a fix described on the forum: | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | and the cure is to edit the appropriate line in '' | ||
| + | |||
| + | The FIXME does work, though... | ||
| + | |||
| + | For Vector edit ''/ | ||
| + | |||
| + | <code php> | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | and the same for '' | ||
| + | <code php> | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Monospace font ==== | ||
| + | |||
| + | I found the style applied to '' | ||
| + | |||
| + | I found the place to change it: | ||
| + | |||
| + | '' | ||
| + | |||
| + | add the the following and adjust as needed: | ||
| + | |||
| + | <code css> | ||
| + | |||
| + | div#content .dokuwiki code { | ||
| + | font-size: 100%; | ||
| + | padding-left: | ||
| + | padding-right: | ||
| + | background-color: | ||
| + | color: #00f; | ||
| + | direction: ltr; | ||
| + | text-align: left; | ||
| + | } | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Footer Buttons ==== | ||
| + | |||
| + | Remove the default footer buttons by editing '' | ||
| + | |||
| + | <note tip> | ||
| + | For Monobook, change to < | ||
| + | </ | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | //delete all (defaults) | ||
| + | $_vector_btns = array(); | ||
| + | </ | ||
| + | |||
| + | this suppresses the inclusion of footer buttons from '' | ||
| + | |||
| + | === Add just the Dokuwiki and Vector/ | ||
| + | |||
| + | Edit '' | ||
| + | |||
| + | <note tip> | ||
| + | Swap '' | ||
| + | </ | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | <?php | ||
| + | |||
| + | //check if we are running within the DokuWiki environment | ||
| + | if (!defined(" | ||
| + | die(); | ||
| + | } | ||
| + | //delete all (defaults) | ||
| + | $_vector_btns = array(); | ||
| + | |||
| + | //note: The buttons will be rendered in the order they were defined. Means: | ||
| + | // first button will be rendered first, last button will be rendered at | ||
| + | // last. | ||
| + | //DokuWiki button | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | |||
| + | //" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | |||
| + | </ | ||
| + | ==== Mobile Scaling ==== | ||
| + | |||
| + | The layout on a phone isn't too good, and can't be zoomed/ | ||
| + | |||
| + | I found this thread: | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | and applied the comment-out of the line : | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | //echo "< | ||
| + | </ | ||
| + | |||
| + | in '' | ||
| + | |||
| + | the page now scales/ | ||
| ===== Monobook user/ | ===== Monobook user/ | ||
| Line 476: | Line 612: | ||
| * it seems necessary to disable '' | * it seems necessary to disable '' | ||
| - | ===== Vector / Monobook tweaks ===== | ||
| - | |||
| - | I like the Vector and Monobook templates, very similar feel to Wikipedia | ||
| - | |||
| - | ==== Logout errors with later versions of Dokuwiki ==== | ||
| - | |||
| - | After upgrading Dokuwiki to //Igor// it became impossible to log out due to a warning | ||
| - | |||
| - | <note warning> | ||
| - | Security Token did not match. Possible CSRF attack. | ||
| - | </ | ||
| - | |||
| - | I initially ignored it but then downgraded back to // | ||
| - | |||
| - | I recently upgraded to the latest Dokuwiki (Jack Jackrum), and upgraded all plugins and templates where possible. However the problem with logout with Vector and Monobook re-appeared. | ||
| - | |||
| - | I found there was a fix described on the forum: | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | and the cure is to edit the appropriate line in '' | ||
| - | |||
| - | The FIXME does work, though... | ||
| - | |||
| - | For Vector edit ''/ | ||
| - | |||
| - | <code php> | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | and the same for '' | ||
| - | <code php> | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | ==== Monospace font ==== | ||
| - | |||
| - | I found the style applied to '' | ||
| - | |||
| - | I found the place to change it: | ||
| - | |||
| - | '' | ||
| - | |||
| - | add the the following and adjust as needed: | ||
| - | |||
| - | <code css> | ||
| - | |||
| - | div#content .dokuwiki code { | ||
| - | font-size: 100%; | ||
| - | padding-left: | ||
| - | padding-right: | ||
| - | background-color: | ||
| - | color: #00f; | ||
| - | direction: ltr; | ||
| - | text-align: left; | ||
| - | } | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | ==== Footer Buttons ==== | ||
| - | |||
| - | Remove the default footer buttons by editing '' | ||
| - | |||
| - | <note tip> | ||
| - | For Monobook, change to < | ||
| - | </ | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | //delete all (defaults) | ||
| - | $_vector_btns = array(); | ||
| - | </ | ||
| - | |||
| - | this suppresses the inclusion of footer buttons from '' | ||
| - | |||
| - | === Add just the Dokuwiki and Vector/ | ||
| - | |||
| - | Edit '' | ||
| - | |||
| - | <note tip> | ||
| - | Swap '' | ||
| - | </ | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | <?php | ||
| - | |||
| - | //check if we are running within the DokuWiki environment | ||
| - | if (!defined(" | ||
| - | die(); | ||
| - | } | ||
| - | //delete all (defaults) | ||
| - | $_vector_btns = array(); | ||
| - | |||
| - | //note: The buttons will be rendered in the order they were defined. Means: | ||
| - | // first button will be rendered first, last button will be rendered at | ||
| - | // last. | ||
| - | //DokuWiki button | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | |||
| - | //" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | |||
| - | </ | ||
| - | ==== Mobile Scaling ==== | ||
| - | |||
| - | The layout on a phone isn't too good, and can't be zoomed/ | ||
| - | |||
| - | I found this thread: | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | and applied the comment-out of the line : | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | //echo "< | ||
| - | </ | ||
| - | |||
| - | in '' | ||
| - | |||
| - | the page now scales/ | ||
| ==== Alternative ==== | ==== Alternative ==== | ||