echo " "logout", 'sectok' => getSecurityToken()))."\" rel=\"nofollow\">".hsc($lang["btn_logout"])." \n"; //language comes from DokuWiki core
and the same for ''Monobook''
echo " "logout", 'sectok' => getSecurityToken()))."\" rel=\"nofollow\">".hsc($lang["btn_logout"])." \n"; //language comes from DokuWiki core
==== Monospace font ====
I found the style applied to ''monospace'' text was a little underwhelming.
I found the place to change it:
'' /var/www/html/dokuwiki/lib/tpl/{vector|monobook}/user/screen.css ''
add the the following and adjust as needed:
div#content .dokuwiki code {
font-size: 100%;
padding-left: 5px;
padding-right: 5px;
background-color: #eee;
color: #00f;
direction: ltr;
text-align: left;
}
==== Footer Buttons ====
Remove the default footer buttons by editing ''{vector|monobook}/user/buttons.php'' and adding
$_monobook_btns = array();
//delete all (defaults)
$_vector_btns = array();
this suppresses the inclusion of footer buttons from ''vector/conf/buttons.php''
=== Add just the Dokuwiki and Vector/Monobook Buttons ===
Edit ''{vector|monobook}/user/buttons.php''
==== Mobile Scaling ====
The layout on a phone isn't too good, and can't be zoomed/scaled.
I found this thread:
[[https://forum.dokuwiki.org/d/12469-vector-template-doesn-t-display-correctly-on-mobile-devices/6]]
and applied the comment-out of the line :
//echo "";
in ''main.php'' and ''mediamanager.php''
the page now scales/zooms okay to make it useable on a phone.
===== Monobook user/screen.css =====
/* Give sidebar more space.
Default widths:
- 12.2em as left spacer for the content area. This example is using 14.2em
instead.
- 11.6em as sidebar width. This example is using 13.6em instead.
- 10.9em as width for the search input field. This example is using 12.9em
instead.
- 150px as left spacer for the Ajax searchbox. This example is using 180px.
*/
/* move content container more to the right */
#content {
margin: 2.8em 0 0 14.2em;
}
#column-content {
margin: 0 0 .6em -14.2em;
}
#column-content #content {
margin-left: 14.2em !important; /* adjustment for IE (7) */
}
/* redefine sidebar width + tab bar position */
.portlet {
width: 13.6em;
}
#p-cactions {
left: 13.6em; /* tab bar */
}
/* search input field */
#qsearch__in {
width: 11.5em;
}
/* ajax "matching pagename" searchbox */
#qsearch__out {
left: 180px
}
div.dokuwiki #dw__toc {
margin: 1.2em 0 0 2em;
float: right;
width: 200px;
font-size: 100%;
clear: both;
background-color: __background__;
}
div#content .dokuwiki code {
font-size: 1.1em;
padding-left: 5px;
padding-right: 5px;
background-color: #eee;
color: #22f;
border-radius: 4px;
direction: ltr;
text-align: left;
white-space: pre;
}
div#content .dokuwiki pre {
border-radius: 5px;
background-color: #faffff !important;
}
.pBody {
font-size: 1.1em;
padding-bottom: 1em;
}
#bodyContent {
font-size: 1.1em;
}
kbd.__keyboard {
color: #0000ff;
background-color: #defede !important;
text-align: center;
border-left: 1px solid #cfcfcf;
border-top: 1px solid #cfcfcf;
border-right: 3px solid #666666;
border-bottom: 3px solid #666666;
-moz-border-radius: 4px 4px 4px 4px;
border-radius: 6px 6px 6px 6px !important;
padding-left: 3px;
padding-top: 0px;
padding-right: 3px;
padding-bottom: 0px;
margin-left: 2px;
margin-right: 2px;
vertical-align: top;
font-family: sans-serif;
white-space: nowrap;
font-size: 1.1em !important;
}
div.qq-upload-button {
border: 1px solid __border__;
}
===== Dokuwiki Template CSS =====
Standard settings for font sizes etc. for different elements is here:
''/var/www/html/dokuwiki/lib/tpl/dokuwiki/css/design.less''
* add any modified tweaks to the CSS to a ''userstyle.css'' i.e. ''/var/www/html/dokuwiki/conf/userstyle.css''
* ''font-size'' etc
pre {
border-radius: 10px;
background-color: #fcffff
}
code {
color: #c72522;
font-size: 1.1em;
padding: 0.1em 0.3em;
border-radius: 0px;
}
.dokuwiki .aside {
font-size: 90%;
}
body {
font-size: 90%;
}
.dokuwiki div.breadcrumbs {
font-size: 90%;
}
See also [[#Dokuwiki Template monospace font]]
==== Dokuwiki Template Tagline ====
Try to learn something about everything, and everything about something
-Thomas Huxley “Darwin's bulldog” (1824-1895)
===== Dokuwiki Timezone =====
* I noticed the timestamps on file creation/modification were in UTC
* I'd rather have "local time" so I don't have to think too hard
* The answer is here -> [[https://www.dokuwiki.org/tips:timezone]]
* I used the first option, after successfully testing the second (editing ''php.ini'')
* I created ''conf/local.protected.php'' with
* I did ''sudo chown www-data:www-data local.protected.php'' too, just to be sure
* All looks good - pages created/modified while in //summer time// show the time in ''BST'' and pages modified in //winter time// show the time in ''GMT''
===== Add DW2PDF =====
- To allow export of pages from Wiki -> PDF format install plugin [[https://www.dokuwiki.org/plugin:dw2pdf|dw2pdf]]
- to enable functionality it was necessary to install ''php-mbstring'' package on the VPS
- sudo apt-get install php-mbstring
- sudo service apache2 restart
==== UPDATE====
--- //John Pumford-Green 26/04/23 10:04//
removed ''dw2pdf'' plugin, it is largely unused and adds pointless bloat.
===== Increase maximum file size upload for Media Manager =====
- edit ''php.ini''
- sudo vi /etc/php/XX/apache2/php.ini
- change ''upload_max_filesize = 2M'' to ''upload_max_filesize = 20M''
- change ''post_max_size = 2M'' to ''post_max_size = 20M''
- sudo service apache2 restart
===== Allow any file-type upload =====
From [[https://forum.dokuwiki.org/d/3318-allow-upload-of-any-filetype/5]]
Edit ''/var/www/html/www/dokuwiki/inc/media.php'' and comment out :
// because a temp file was created already
//if (!preg_match('/\.(' . $regex . ')$/i', $fn)) {
// return [$lang['uploadwrong'], -1];
//}
===== Acronyms & Abbreviations =====
I find the underlining and "explanation" of some abbreviations/acronyms by dokuwiki, when rendering a page, to be annoying.
such as DNS and ACL
The process is described [[https://www.dokuwiki.org/abbreviations | HERE ]]
To disable this I simply copied the default ''conf/acronyms.conf'' to a local version ''conf/acronyms.local.conf'' and then edited the ''local'' version to remove all the explanations.
# Acronyms.
ACL
AFAICS
AFAIK
AFAIR
API
ASAP
ASCII
BTW
CMS
CSS
DNS
EOF
EOL
EOM
EOT
FAQ
FTP
FOSS
FLOSS
FUD
FYI
GB
GHz
GPL
GUI
HTML
IANAL
IE
IIRC
IMHO
IMO
IOW
IRC
IRL
KISS
LAN
LGPL
LOL
MathML
MB
MHz
MSIE
OMG
OS
OSS
OTOH
PITA
RFC
ROTFL
RTFM
spec
TIA
TL;DR
TOC
URI
URL
W3C
WTF?
WYSIWYG
YMMV
This supresses the annoyance.
--- //John Pumford-Green 30/04/23 13:49//
===== Add folded plugin =====
make a clickable hide/reveal section with
%%
++++ visible text |
hidden text blah blah
++++
%%
e.g.
++++
There is a table here... |
^Col1^Col2^Col3^
|one|two|three|
def func():
print "hello world"
++++
===== Increase TAGCLOUD font size =====
edit ''/var/www/html/dokuwiki/lib/plugins/cloud/style.less''
increase ''size factor''
/* Size factor. */
@sF: 1.2;
force re-fresh of browser to show new font size.
===== Keyboard Plugin =====
* tweak the size, border and colour
=== example keys ===
C+'C'
=== Tweaks ===
''/var/www/html/dokuwiki/lib/plugins/keyboard/all.css''
kbd.__keyboard {
color: #0000ff;
background-color: #defede !important;
text-align: center;
border-left: 1px solid #cfcfcf;
border-top: 1px solid #cfcfcf;
border-right: 3px solid #666666;
border-bottom: 3px solid #666666;
-moz-border-radius: 4px 4px 4px 4px;
padding-left: 3px;
padding-top: 0px;
padding-right: 3px;
padding-bottom: 0px;
margin-left: 2px;
margin-right: 2px;
vertical-align: top;
font-family: sans-serif;
white-space: nowrap;
font-size: 1.2em;
}
===== Dokuwiki Template monospace font =====
* the colour of the mono font is the same as general text and doesn't stand out as well as in other templates.
* edit ''/var/www/html/dokuwiki/lib/tpl/dokuwiki/css/basic.less'' with a hex code for a better colour
* but see below for a better place to do the configuraiton
code {
color: #c72522;
font-size: 1.1em;
padding: 0.1em 0.3em;
border-radius: 0;
}
* To prevent upgrades overwriting these changes - add them to ''/var/www/html/dokuwiki/conf/userstyle.css''
* ''pre'' relates to the blocks of %% ////// %%
* ''code'' relates to ''monospaced text''
pre {
border-radius: 10px;
background-color: #fcffff
}
code {
color: #c72522;
font-size: 1.1em;
padding: 0.1em 0.3em;
border-radius: 0px;
}
===== Remove Dokuwiki template footer buttons =====
* edit ''/var/www/html/dokuwiki/lib/tpl/dokuwiki/tpl_footer.php''
* comment out ( %%%% ) the license stanza **and/or** the %%%% that contains the "buttons"
===== Bootstrap3 ThemeByNamespace =====
To force specific ''bootstrap/bootswatch'' themes dependant on the namespace
* enable ''ThemeByNamespace'' option
* create a file in ''/conf'' called ''bootstrap3.themes.conf''
* ''chown www-data:www-data bootstrap3.themes.conf''
* add the required theme/namespace mapping:
# Namespace Bootswatch Theme
start bootswatch/darkly
public bootswatch/darkly
public:calculator bootswatch/slate
public:journal bootswatch/journal
private bootswatch/flatly
playground bootswatch/united
private:wire2waves bootswatch/paper
blog bootswatch/yeti
* it seems necessary to disable ''showThemeSwitcher'' and to select a default theme to be used outside of any listed in the conf file
==== Alternative ====
** Using the ''loadskin'' plugin **
it's possible to switch to the default ''dokuwiki'' template when on a mobile device and the ''vector'' template when on a computer.
The ''loadskin'' plugin seems to lead to problems switching between ''monobook'' and ''vector'' - the **navigation sidebar** seems to disappear on one or the other. Not sure where the problem is.
===== Note Plugin =====
Various Coloured notes:
This is my note ! Remember it!!
Warning ! You're about to lose your mind ;-)
The clues are in the images.
Beware of the cat when you open the door !!
++++Note in a Folded section|
Ça fonctionne seulement avec le //div// pas le //span//.
++++
This is my note ! Remember it!!
Warning ! You're about to lose your mind ;-)
The clues are in the images.
Beware of the cat when you open the door !!
++++Note in a Folded section|
Ça fonctionne seulement avec le //div// pas le //span//.
++++
===== Monobook Tweaks =====
==== PDF Export Tab ====
The ''dw2pdf'' plugin provides a button on many templates to trigger export to ''PDF'' but not on ''monobook''. It's possible to add a tab to the top of the page, beside the ''edit'' etc. tabs, to do the the ''pdf export'' function.
add the following code to to ''monobook/user/tabs.php''
//PDF plugin: export tab
if (file_exists(DOKU_PLUGIN."dw2pdf/action.php") &&
!plugin_isdisabled("dw2pdf")){
$_monobook_tabs["tab-export-pdf"]["text"] = "pdf export";
$_monobook_tabs["tab-export-pdf"]["href"] = wl(getID(), array("do" => "export_pdf"), false, "&");
}
===== Vector Interwiki Icons =====
The icon shown on interwiki links almost always appears as a small "lock" rather than the correct icon
commenting out the ''.link-https'' section in ''/vector/static/3rd/vector/main-ltr.css'' stops this :
div#content a.external,
div#content a[href ^="gopher://"] {
background: url(static/3rd/vector/external-link-ltr-icon.png) center right no-repeat;
padding: 0 13px 0 0;
}
/*
div#content a[href ^="https://"],
.link-https {
background: url(static/3rd/vector/lock-icon.png) center right no-repeat;
padding: 0 13px 0 0;
}
*/
div#content a[href ^="mailto:"],
.link-mailto {
background: url(static/3rd/vector/mail-icon.png) center right no-repeat;
padding: 0 13px 0 0;
}
Page Updated: ~~LASTMOD~~
{{tag>dokuwiki}}