Skip to content

Commit

Permalink
New handling of /user files (-> *.dist files for easier updates)
Browse files Browse the repository at this point in the history
I provided two separate archives until now: One for installation,
one for update. The only difference between them was that the update
archive did not contain the /user sub-directory to keep use-defined
changes.

However, this was too complicated for many users as only my templates
were delivered with as two separate archives. So I changed my mind
and use /user/*.dist files to provide examples and templates. These
files are dummies and may be overwritten. However, the user can take
and just remove the ".dist" extension to use them as starting point
for own modifications.
  • Loading branch information
andreashaerter committed Feb 9, 2014
1 parent 73263c1 commit dbc0eb3
Show file tree
Hide file tree
Showing 20 changed files with 233 additions and 331 deletions.
97 changes: 54 additions & 43 deletions README
Expand Up @@ -35,38 +35,47 @@
these hints for customizing the template:

- Place your files in "monobook/user"
The place for *all* userdefined, custom stuff is "monobook/user".
Reason: this folder will not be touched on updates. Therefore you may
delete everything except "monobook/user" and copy all new files into
"monobook/" to update without loosing your changes. Do not forget to
empty your browser's cache afterwards.
The place to store *all* user-defined, custom stuff is the "monobook/user"
directory because your files will not be touched or overwritten on
template updates! So you normally can copy all new files into "monobook/"
to update the template without loosing your changes.
Note: There are example files helping you modifying the template.
The are delivered with the ".dist" extensions. Just remove the
".dist" extension to use them.

- Own logo
If you want to replace the default logo showed in the upper left, simply
create a "logo.[png|gif|jpg]" in "monobook/user". The template recognizes
the file automatically and will use it instead of the default text. Do not
forget to empty your browser's cache afterwards.
the file automatically and will use it instead of the default logo.
Note: Do not forget to empty your browser's cache if you cannot see any
effect.

- Own favicon
If you want to replace the default favicon, simply create a "favicon.ico"
in "monobook/user". The template recognizes the file automatically and
will use it instead of the default one. Do not forget to empty your
browser's cache afterwards. By the way: you might find the online
FavIcon Generator [1] useful.
will use it instead of the default one. You might find the online FavIcon
Generator [1] useful.
Note: "favicon.png" is also possible but not recommended (because it is
not supported by older MSIE versions).

- Own CSS
To apply additional CSS rules, edit "monobook/user/screen.css"
(influences normal layout) and/or "monobook/user/print.css" (influences
print layout) and/or "monobook/user/rtl.css" (influences "right-to-left"
languages like Hebrew). These files will be included automatically (as the
last ones for the relevant media, therefore you are able to overrule
existing styles). Do not forget to empty your browser's cache afterwards.
To apply additional CSS rules, create a
- "monobook/user/screen.css" file to influence the normal layout. You
can rename the "screen.css.dist" to "screen.css" as starting point.
- "monobook/user/print.css" file to influence the print layout. You
can rename the "print.css.dist" to "print.css" as starting point.
- "monobook/user/rtl.css" file to influences "right-to-left" languages
like Hebrew. You can rename the "rtl.css.dist" to "rtl.css" as
starting point.
The file(s) will be included automatically (as the last ones for the
relevant media, therefore you are able to overrule existing styles).
Note: Do not forget to empty your browser's cache if you cannot see any
effect.

- Own JavaScript
To load additional JavaScript, edit "monobook/user/user.js". Do not
forget to empty your browser's cache afterwards.
To load additional JavaScript, create a "monobook/user/user.js" file. You
can rename the "user.js.dist" to "user.js" as starting point (it contains
some examples and useful comments how to define your own JavaScript).
ATTENTION: You have to activate the template option "monobook_loaduserjs"
(->"Load 'monobook/user/user.js'?") in the DokuWiki Config
Manager!
Expand All @@ -75,46 +84,48 @@
To apply additional CSS rules only for a specific language, edit/create
"monobook/lang/<your-language>/style.css". This file will be included
automatically if DokuWiki runs/shows a page in the language of choice (as
the last one, therefore you are able to overrule existing styles). Do
not forget to empty your browser's cache afterwards.
the last one, therefore you are able to overrule existing styles).
Note: Do not forget to empty your browser's cache if you cannot see any
effect.

- Own tabs
To apply own tabs, have a look at "monobook/user/tabs.php". Don't worry:
you will find some examples how to define the tabs. If you still have
questions after playing with the examples, see "IV. Support" on how to get
help. If "monobook/user/tabs.php" does not exist, simply copy it out of
the current actual installation archive.
To apply own tabs, create a "monobook/user/tabs.php" file. You can rename
the "tabs.php.dist" to "tabs.php" as a good starting point (it contains
some examples and useful comments how to define your own tabs). If you
still have questions after playing with the examples, see "IV. Support"
on how to get help.

- Own footer buttons
To apply own buttons/graphics in the footer (-> these small 80x15 pics),
have a look at "monobook/user/buttons.php". Don't worry: you will find
some examples how to define the buttons. If you still have questions
after playing with the examples, see "IV. Support" on how to get help.
If "monobook/user/buttons.php" does not exist, simply copy it out of the
current actual installation archive.
create a "monobook/user/buttons.php" file. You can rename the
"buttons.php.dist" to "buttons.php" as a good starting point (it contains
some examples and useful comments how to define your own buttons). If you
still have questions after playing with the examples, see "IV. Support"
on how to get help.

- Own boxes
To apply own boxes in the left column/sidebar, have a look at
"monobook/user/boxes.php". Don't worry: you will find some examples how to
define the boxes. If you still have questions after playing with the
examples, see "IV. Support" on how to get help.
If "monobook/user/boxes.php" does not exist, simply copy it out of the
current actual installation archive.
To apply own boxes in the left column/sidebar, create a
"monobook/user/boxes.php" file. You can rename the "boxes.php.dist" to
"boxes.php" as a good starting point (it contains some examples and useful
comments how to define your own boxes). If you still have questions after
playing with the examples, see "IV. Support" on how to get help.

- Web analytics software (Piwik, Google Analytics etc.)
Tools like Piwik and Google Analytics normally provide a small code
snippet ("tag") which you have to include at your website to make
everything work. If you want to use such software with this template, have
a look at "monobook/user/tracker.php". This file exists to make it easier
for you. You don't have to deliberate where you have to copy and paste the
code, simply do it there.
everything work. If you want to use such software with this template,
create a "monobook/user/tracker.php.dist". You don't have to deliberate
where you have to copy and paste the code, simply do it there. You can
rename the "tracker.php.dist" to "tracker.php" as a good starting point
(it contains some examples and useful comments how to define your own
boxes).

- Own Apple Touch Icon
If you want to replace the default Apple Touch Icon, simply create a
"apple-touch-icon.png" in "monobook/user". The template recognizes the
file automatically and will use it instead of the default one. Have a
look at Apple's developer database (cf. "Configuring Web Applications"[2])
if you need more information.
file automatically and will use it instead of the default one. Have a look
at Apple's developer database (cf. "Configuring Web Applications" [2]) if
you need more information.

[1] <http://tools.dynamicdrive.com/favicon/>
[2] <http://j.mp/sx3NMT>
Expand Down
144 changes: 0 additions & 144 deletions README-de

This file was deleted.

9 changes: 9 additions & 0 deletions conf/buttons.php
Expand Up @@ -74,6 +74,15 @@
$_monobook_btns["dw"]["nofollow"] = !(cleanID(getID()) === "start");


//W3C (X)HTML validator button
$_monobook_btns["valid_xhtml"]["img"] = DOKU_TPL."static/img/button-xhtml.png";
$_monobook_btns["valid_xhtml"]["href"] = "http://validator.w3.org/check/referer";
$_monobook_btns["valid_xhtml"]["width"] = 80;
$_monobook_btns["valid_xhtml"]["height"] = 15;
$_monobook_btns["valid_xhtml"]["title"] = "Valid XHTML";
$_monobook_btns["valid_xhtml"]["nofollow"] = true;



/******************************************************************************
******************************** ATTENTION *********************************
Expand Down
33 changes: 33 additions & 0 deletions conf/tabs.php
Expand Up @@ -131,6 +131,39 @@
}
}


//ODT plugin: export tab
//see <https://www.dokuwiki.org/plugin:odt> for info
if (file_exists(DOKU_PLUGIN."odt/syntax.php") &&
!plugin_isdisabled("odt")){
$_monobook_tabs["tab-export-odt"]["text"] = $lang["monobook_tab_exportodt"];
$_monobook_tabs["tab-export-odt"]["href"] = wl(cleanID(getId()), array("do" => "export_odt"), false, "&");
$_monobook_tabs["tab-export-odt"]["nofollow"] = true;
}


//html2pdf plugin: export tab (thanks to Luigi Micco <l.micco@tiscali.it>)
//see <https://www.dokuwiki.org/plugin:html2pdf> for info
if (file_exists(DOKU_PLUGIN."html2pdf/action.php") &&
!plugin_isdisabled("html2pdf")){
$_monobook_tabs["tab-export-pdf"]["text"] = $lang["monobook_tab_exportpdf"];
$_monobook_tabs["tab-export-pdf"]["href"] = wl(cleanID(getId()), array("do" => "export_pdf"), false, "&");
$_monobook_tabs["tab-export-pdf"]["nofollow"] = true;
}

//(un)subscribe namespace tab
if (!empty($conf["useacl"]) &&
!empty($conf["subscribers"]) &&
!empty($loginname)){ //$loginname was defined within main.php
if (empty($INFO["subscribedns"])){ //$INFO comes from DokuWiki core
$_monobook_tabs["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "subscribens"), false, "&");
$_monobook_tabs["ca-watchns"]["text"] = $lang["btn_subscribens"]; //language comes from DokuWiki core
}else{
$_monobook_tabs["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "unsubscribens"), false, "&");
$_monobook_tabs["ca-watchns"]["text"] = $lang["btn_unsubscribens"]; //language comes from DokuWiki core
}
}

}


Expand Down

0 comments on commit dbc0eb3

Please sign in to comment.