https://www.dokuwiki.org/template:monobook
Download : https://andreashaerter.com/downloads/dokuwiki-template-monobook/latest
Pour changer le logo, mettre l'image voulue dans /monobook/user/logo.[png|gif|jpg]
.
If you want to add own tabs, have a look at /monobook/user/tabs.php (NOT /monobook/conf/tabs.php).
If you want to add own buttons (footer), have a look at /monobook/user/buttons.php (NOT /monobook/conf/buttons.php).
If you want to add own boxes (left-column), have a look at /monobook/user/boxes.php (NOT /monobook/conf/boxes.php).
Placeholder → site_notice
Le template n'a pas été prévu pour les fermes de Wiki, si bien que le logo customisé doit être dans le Wiki principal et non dans la ferme de wiki appropriée.
Ci-dessous, une modification du code pour que le template aille chercher le logo à la racine de la ferme plutôt que dans le wiki principal :
Editer le fichier dokuwiki\lib\tpl\monobook\main.php
.
Rechercher le mot “logo”
On tombe sur le code suivant :
<div id="column-one" class="noprint"> <div class="portlet" id="p-logo"> <?php //include default or userdefined logo echo "<a href=\"".wl()."\" "; if (file_exists(DOKU_TPLINC."user/logo.png")){ //user defined PNG echo "style=\"background-image:url(".DOKU_TPL."user/logo.png);\""; }elseif (file_exists(DOKU_TPLINC."user/logo.gif")){ //user defined GIF echo "style=\"background-image:url(".DOKU_TPL."user/logo.gif);\""; }elseif (file_exists(DOKU_TPLINC."user/logo.jpg")){ //user defined JPG echo "style=\"background-image:url(".DOKU_TPL."user/logo.jpg);\""; }else{ //default echo "style=\"background-image:url(".DOKU_TPL."static/3rd/dokuwiki/logo.png);\""; } echo " accesskey=\"h\" title=\"[ALT+H]\"></a>\n"; ?> </div>
Le remplacer par :
<div id="column-one" class="noprint"> <div class="portlet" id="p-logo"> <?php //include default or userdefined logo // AJOUT +++++++++++++++++++++++++++++++++++++ // get logo either out of the template images folder or data/media folder $logoSize = array(); $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize); // display logo and wiki title in a link to the home page tpl_link( wl(), '<img src="'.$logo.'" '.$logoSize[3].' alt="" />', 'accesskey="h" title="[H]"' ); // +++++++++++++++++++++++++++++++++++++++++++ /* echo "<a href=\"".wl()."\" "; if (file_exists(DOKU_TPLINC."user/logo.png")){ //user defined PNG echo "style=\"background-image:url(".DOKU_TPL."user/logo.png);\""; }elseif (file_exists(DOKU_TPLINC."user/logo.gif")){ //user defined GIF echo "style=\"background-image:url(".DOKU_TPL."user/logo.gif);\""; }elseif (file_exists(DOKU_TPLINC."user/logo.jpg")){ //user defined JPG echo "style=\"background-image:url(".DOKU_TPL."user/logo.jpg);\""; }else{ //default echo "style=\"background-image:url(".DOKU_TPL."static/3rd/dokuwiki/logo.png);\""; } echo " accesskey=\"h\" title=\"[ALT+H]\"></a>\n"; */ ?> </div>