• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..11-Oct-2021-

conf/H27-Apr-2020-695340

lang/H27-Apr-2020-3,0041,523

static/H27-Apr-2020-6,2375,572

user/H27-Apr-2020-349278

.htaccessH A D09-Feb-2014687 1514

COPYINGH A D09-Feb-201417.6 KiB341281

CREDITSH A D09-Feb-20142.5 KiB12350

READMEH A D09-Feb-201418.1 KiB394317

VERSIONH A D09-Feb-201411 21

detail.phpH A D09-Feb-2014956 326

inc_cite.phpH A D09-Feb-20147.5 KiB181144

inc_detail.phpH A D09-Feb-20143.7 KiB9966

index.htmlH A D09-Feb-2014292 108

main.phpH A D09-Feb-201436.1 KiB860496

mediamanager.phpH A D09-Feb-20144.4 KiB10257

style.iniH A D09-Feb-20144 KiB11188

template.info.txtH A D09-Feb-2014262 87

README

1
2  I. About
3
4    "monobook" brings you the traditional MediaWiki/Wikipedia look and feel for
5    DokuWiki.
6
7    Website:     <https://www.dokuwiki.org/template:monobook>
8    Maintainer:  ARSAVA <https://dev.arsava.com/>
9    Contact:     See "IV. Support" and "V. Contact".
10
11    It is heavily inspired and partially based on the great "Monobook for
12    DokuWiki" template, originally maintained by Terence J. Grant [1] from 2006
13    until the end of 2009.
14
15    [1] <http://tjgrant.com/>
16
17
18
19  II. Installation and update
20
21    The installation works as described [1] on DokuWiki.org. Extract the
22    downloaded archive into your DokuWiki's "lib/tpl/" folder. Then select the
23    template in the Config Manager by adjusting the template option.
24
25    See the monobook template website for update instructions [2].
26
27    [1] <https://www.dokuwiki.org/template>
28    [2] <https://www.dokuwiki.org/template:monobook#update>
29
30
31
32  III. Customizing the template
33
34    In order to make updates of your installed "monobook" template easy, follow
35    these hints for customizing the template:
36
37    - Place your files in "monobook/user"
38      The place to store *all* user-defined, custom stuff is the "monobook/user"
39      directory because your files will not be touched or overwritten on
40      template updates! So you normally can copy all new files into "monobook/"
41      to update the template without loosing your changes.
42      Note: There are example files helping you modifying the template.
43            The are delivered with the ".dist" extensions. Just remove the
44            ".dist" extension to use them.
45
46    - Own logo
47      If you want to replace the default logo showed in the upper left, simply
48      create a "logo.[png|gif|jpg]" in "monobook/user". The template recognizes
49      the file automatically and will use it instead of the default logo.
50      Note: Do not forget to empty your browser's cache if you cannot see any
51            effect.
52
53    - Own favicon
54      If you want to replace the default favicon, simply create a "favicon.ico"
55      in "monobook/user". The template recognizes the file automatically and
56      will use it instead of the default one. You might find the online FavIcon
57      Generator [1] useful.
58      Note: "favicon.png" is also possible but not recommended (because it is
59            not supported by older MSIE versions).
60
61    - Own CSS
62      To apply additional CSS rules, create a
63        - "monobook/user/screen.css" file to influence the normal layout. You
64          can rename the "screen.css.dist" to "screen.css" as starting point.
65        - "monobook/user/print.css" file to influence the print layout. You
66          can rename the "print.css.dist" to "print.css" as starting point.
67        - "monobook/user/rtl.css" file to influences "right-to-left" languages
68          like Hebrew. You can rename the "rtl.css.dist" to "rtl.css" as
69          starting point.
70      The file(s) will be included automatically (as the last ones for the
71      relevant media, therefore you are able to overrule existing styles).
72      Note: Do not forget to empty your browser's cache if you cannot see any
73            effect.
74
75    - Own JavaScript
76      To load additional JavaScript, create a "monobook/user/user.js" file. You
77      can rename the "user.js.dist" to "user.js" as starting point (it contains
78      some examples and useful comments how to define your own JavaScript).
79      ATTENTION: You have to activate the template option "monobook_loaduserjs"
80                 (->"Load 'monobook/user/user.js'?") in the DokuWiki Config
81                 Manager!
82
83    - Own CSS, language specific
84      To apply additional CSS rules only for a specific language, edit/create
85      "monobook/lang/<your-language>/style.css". This file will be included
86      automatically if DokuWiki runs/shows a page in the language of choice (as
87      the last one, therefore you are able to overrule existing styles).
88      Note: Do not forget to empty your browser's cache if you cannot see any
89            effect.
90
91    - Own tabs
92      To apply own tabs, create a "monobook/user/tabs.php" file. You can rename
93      the "tabs.php.dist" to "tabs.php" as a good starting point (it contains
94      some examples and useful comments how to define your own tabs). If you
95      still have questions after playing with the examples, see "IV. Support"
96      on how to get help.
97
98    - Own footer buttons
99      To apply own buttons/graphics in the footer (-> these small 80x15 pics),
100      create a "monobook/user/buttons.php" file. You can rename the
101      "buttons.php.dist" to "buttons.php" as a good starting point (it contains
102      some examples and useful comments how to define your own buttons). If you
103      still have questions after playing with the examples, see "IV. Support"
104      on how to get help.
105
106    - Own boxes
107      To apply own boxes in the left column/sidebar, create a
108      "monobook/user/boxes.php" file. You can rename the "boxes.php.dist" to
109      "boxes.php" as a good starting point (it contains some examples and useful
110      comments how to define your own boxes). If you still have questions after
111      playing with the examples, see "IV. Support" on how to get help.
112
113    - Web analytics software (Piwik, Google Analytics etc.)
114      Tools like Piwik and Google Analytics normally provide a small code
115      snippet ("tag") which you have to include at your website to make
116      everything work. If you want to use such software with this template,
117      create a "monobook/user/tracker.php.dist". You don't have to deliberate
118      where you have to copy and  paste the code, simply do it there. You can
119      rename the "tracker.php.dist" to "tracker.php" as a good starting point
120      (it contains some examples and useful comments how to define your own
121      boxes).
122
123    - Own Apple Touch Icon
124      If you want to replace the default Apple Touch Icon, simply create a
125      "apple-touch-icon.png" in "monobook/user". The template recognizes the
126      file automatically and will use it instead of the default one. Have a look
127      at Apple's developer database (cf. "Configuring Web Applications" [2]) if
128      you need more information.
129
130    [1] <http://tools.dynamicdrive.com/favicon/>
131    [2] <http://j.mp/sx3NMT>
132
133
134
135  IV. Support
136
137    If you need help, check the FAQ [1] and try to find useful information by
138    using the DokuWiki Search page [2]. If you found nothing helpful, ask your
139    question at the DokuWiki forum [3] (preferred) or IRC channel [4].
140
141    [1] <https://www.dokuwiki.org/template:monobook#faq>
142    [2] <http://search.dokuwiki.org/>
143    [3] <https://forum.dokuwiki.org/>
144    [4] <https://www.dokuwiki.org/irc>
145
146
147
148  V. Contact
149
150    If you think you have found a bug or have a useful idea (a.k.a. "feature
151    request"), create an issue [1] on GitHub (preferred), or contact us by
152    mail [2].
153
154    Feel free to submit patches as GitHub pull requests (preferred) or by mail
155    as well. However, please try to respect the DokuWiki coding style [3] as
156    this template follows its rules.
157
158    [1] <https://github.com/arsava/dokuwiki-template-monobook/issues>
159    [2] ARSAVA <dokuwiki@dev.arsava.com>
160    [3] <https://www.dokuwiki.org/devel:coding_style>
161
162
163
164  VI. Other notes
165
166    If you like this free project, you might buy us a coffee [1], or get some
167    cool QR Code merchandise [2]. Thank you! :-)
168
169    Do not hesitate to contact ARSAVA [3] if you need professional DokuWiki
170    support, training or if you think we are the ones to get your project done.
171
172    [1] <https://donate.arsava.com/dokuwiki-template-monobook/>
173    [2] <http://goqr.me/>
174    [3] <https://dev.arsava.com/>
175
176
177
178  VII. Explanatory notes about the dirs of this template
179
180    - "monobook/conf"
181      Contains some configuration files (do NOT edit them!), especially
182        - default.php: default settings [1]
183        - metadata.php: configuration metadata [2]
184
185    - "monobook/lang"
186      Language files (subdir names = language code). You may copy the English
187      language files and translate them if your language is missing. Simply send
188      us the translated files (cf. "V. Contact") and I will include them in the
189      next release :-D.
190
191    - "monobook/static"
192      Static files (images, CSS, JavaScript). The interesting stuff is located
193      in subdirs (as described below).
194      - "3rd"
195        Static files originally taken from a third party like MediaWiki or
196        DokuWiki. The subdir "dokuwiki" contains files originally taken from the
197        DokuWiki "default" or "starter" template. The subdir "monobook" contains
198        files taken from the MediaWiki "monobook" skin.
199      - "css"
200        All non-3rd-party Cascading Style Sheets (CSS). See my tutorial [3] for
201        more information about how the CSS is handled.
202      - "img"
203        All non-3rd-party images files.
204      - "js"
205        All non-3rd-party JavaScript files.
206
207    - "monobook/user"
208      Place for userdefined stuff. E.g. if you want use an own logo, simply copy
209      a logo.[png|gif|jpg] in here. See "III. Customizing the template" for
210      details.
211
212    [1] <https://www.dokuwiki.org/devel:configuration#default_settings>
213    [2] <https://www.dokuwiki.org/devel:configuration#configuration_metadata>
214    [3] <http://j.mp/eq8zSo>
215
216
217
218  VIII. Creation transcript
219
220    Some developers may find this interesting. Additionally, I am very oblivious
221    :-P.
222
223    After some discussion and a quick release as "monodoku", this template was
224    renamed to "monobook" to replace the existing "Monobook for DokuWiki" by
225    Terence J. Grant because Terence got no more time for maintenance (BTW:
226    Terence, thank you for your work and your great(!) ideas I got from your
227    "Monobook for DokuWiki"). To cut a long story short: you may call this
228    template a rewrite/successor of Terence J. Grant's "Monobook for DokuWiki".
229
230    There are some reasons for a complete rewrite (instead of improving/patching
231    Terence J. Grant's one), let me explain the initial situation:
232    - "monobook" is a wide-spread skin for the MediaWiki-Software. It is also
233      used by Wikipedia right now (Jan 2010).
234    - Terence J. Grant created "monobook for DokuWiki". He emulated some missing
235      MediaWiki features within the DokuWiki environment with his template
236      (e.g.: discussion pages) - he did a great job! The styles themselves are a
237      relatively hard copy of the original "monobook" css- and js-files from
238      MediaWiki's "monobook" and the Wikipedia website. IMHO Terence had quick
239      updates in mind when doing this (means: when Wikipedia is updating its
240      styles, he might just want to copy the static stuff, comment out some
241      lines and the "porting" would be done). You will find some information
242      about his actions in the README of the replaced "monobook for DokuWiki"
243      by Terence J. Grant.
244    - Terence J. Grant does not have enough time for maintenance (as he said on
245      his website at the end of 2009). Additionally, the roughly wrapped
246      Wikipedia/monobook-styles and the structure were makinging some trouble:
247      - The styles were bloated (-> they are not designed for DokuWiki, most
248        styles are simply not used plus they are specialized for Wikipedia's
249        websites, not even MediaWiki in special).
250      - Hardcoded URLs within some css-files were resulting in problems in SSL
251        environments (-> loading unencrypted content from
252        http://upload.wikimedia.org... additionally, calling third party hosts
253        is bad behaviour + LAN-only environments simply will not get needed
254        files).
255      - The styles.ini was not used, leading to *much* bigger stylesheets and
256        much more HTTP requests because some nice DokuWiki features were not
257        used and/or "Monobook for DokuWiki" was not compatible to (-> "Compact
258        CSS and javascript output").
259     - Terence J. Grant's template needed the "Display Wiki Page"-plugin (which
260       is/was developed by him, too). Right now, this is simply not needed
261       anymore: DokuWiki got a core function named "tpl_include_page()" to do
262       this.
263    That is why I decided to take the great ideas plus some lines of code of
264    Terence J. Grant's "monobook for DokuWiki" to rewrite it, following the
265    official DokuWiki template structure guidelines.
266    The downside of this desicion is, that if Wikipedia updates its styles,
267    reverse engineering instead of simple file copying is needed if the new
268    rules should be applied. But I think this is not really dramatic because
269    not every pinch of change should be ported (and if Wikipedia would get a
270    completely new layout, a new DokuWiki template should be created instead
271    of forcing people to decide: a) not using updates or b) using a style the
272    might not like). I want an optical, not a technical clone.
273
274    - Installed DokuWiki (Release "2009-12-25", "Lemming") + Terence J. Grant's
275      "monobook" template for testing purpose.
276
277    - Copied the default template from DokuWiki (Release "2009-12-25") as
278      mentioned at <https://www.dokuwiki.org/devel:templates> and renamed the
279      copy to "monobook". Afterwards, the following files/dirs where deleted:
280      - monobook/images
281      - monobook/_admin.css
282      - monobook/design.css
283      - monobook/footer.html
284      - monobook/layout.css
285      - monobook/_linkwiz.css
286      - monobook/media.css
287      - monobook/print.css
288      - monobook/rtl.css
289
290    - Created the dirs mentioned in "II. Some notes about the dirs of this
291      template".
292
293    - Created "index.html" files in all subdirs of the template to prevent
294      directory browsing. Plus "deny from all" .htaccess files in all relevant
295      template subdirs containing PHP (this is simply some ADDITIONAL security
296      precaution - everything should also be save without these files. But
297      better safe than sorry).
298
299    - Configured DokuWiki to use Terence J. Grant's "monobook" template to
300      determine which styles/files copied from the MediaWiki monobook and/or
301      Wikipedia are really in use (after looking and understanding the template
302      itself, for sure).
303      The interesting folders (as mentioned in the README by Terence J. Grant):
304      - common is from mediawiki
305      - monobook is from mediawiki
306      - wikipedia is from wikipedia
307      After this, I looked at "monobook/lang/*" and "monobook/conf*" (from
308      Terence J. Grant's "monobook") to take some ideas.
309
310    - After investigation, some files were copied into the provided places
311      within "/monobook/static/3rd":
312
313      - The following 3rd-party styles and files were used/are needed for
314        further development and therefore were copied from Terence J. Grant's
315        "monobook" template:
316        - /monobook/monobook/buttonshadow.png
317        - /monobook/monobook/bullet.gif
318        - /monobook/monobook/discussionitem_icon.gif
319        - /monobook/monobook/external.png
320        - /monobook/monobook/file_icon.gif
321        - /monobook/monobook/headbg.jpg
322        - /monobook/monobook/IE50Fixes.css
323        - /monobook/monobook/IE55Fixes.css
324        - /monobook/monobook/IE60Fixes.css
325        - /monobook/monobook/IE70Fixes.css
326        - /monobook/monobook/IEMacFixes.css
327        - /monobook/monobook/lock_icon.gif
328        - /monobook/monobook/main.css
329        - /monobook/monobook/news_icon.gif
330        - /monobook/monobook/rtl.css
331        - /monobook/monobook/user.gif
332      - The following files were copied from Andreas Gohr's "default" template:
333        - /default/*.css (see <http://j.mp/eq8zSo> why I did that)
334        - /default/images/closed.gif
335        - /default/images/favicon.ico
336        - /default/images/open.gif
337        - /default/images/tocdot2.gif
338      - The following files were copied from Anika Henke's's "starter" template:
339        - /starter/images/external-link.png
340        - /starter/images/unc.png
341        - /starter/images/email.png
342      - The following files were downloaded from Wikipedia
343        - http://de.wikipedia.org/skins-1.5/common/IEFixes.js
344        - http://de.wikipedia.org/skins-1.5/common/commonPrint.css
345
346    - Edited "monobook/static/3rd/monobook/main.css"
347      - All url() rules were edited (-> "static/3rd/...").
348      - "#catlinks" was replaced with ".catlinks" because the styles are needed
349        for more than one element.
350      To make this clear, a comment was added at the top of the files.
351
352    - Edited "monobook/static/3rd/dokuwiki/design.css"
353      All url() rules were edited (-> replaced "url(images/" through
354      "url(static/3rd/dokuwiki/").
355      To make this clear, a comment was added at the top of the files.
356
357    - Edited "monobook/static/3rd/monobook/IE60Fixes.css"
358      - "#catlinks" was replaced with ".catlinks" because the styles are needed
359        for  more than one element. To make this clear, a comment was added at
360        the top of the files.
361
362    - Created
363      - "monobook/static/css/print.css"
364      - "monobook/static/css/rtl.css"
365      - "monobook/static/css/screen.css"
366      All relevant information should be found within the inline comments.
367
368    - Created the "main.php" for "monobook". Used the main.php of the "default"
369      template as base (as mentioned on the DokuWiki template developer sites),
370      and doing some cherry picking on the Terence J. Grant's "monobook"
371      main.php. After few hours and some coffees later, work was done.
372
373    - Placed the obligatory 80x15 buttons in "/static/img". I copied them
374      from the "default" DokuWiki template (exept "button-monobook.png", for
375      sure). Added the needed markup in the "main.php".
376
377    - Took Andreas Gohr's original "mediamanager.php" and "detail.php" out of
378      the "default" template. After working a little bit, I found a way to
379      prevent additional work and/or redundant code to realize the output of
380      these files. Everything is described through the PHP comments in the
381      files... look at them if needed. I mainly choose the same way like
382      Terence J. Grant.
383
384    - Copied the "do_cite.php" from Terence J. Grant's "monobook", renamed it to
385      "inc_cite.php", and edited everything until it was useful for my template.
386
387    - Worked worked worked.... and done! :-P
388
389    - After ~1 year, I switched the CSS base from DokuWiki's default template
390      to <https://www.dokuwiki.org/template:starter>. See <http://j.mp/f7V4ES>
391      for more information about this. I edited some files, see
392      "monobook/static/3rd/dokuwiki/00_starter-tmpl-notes.txt" for details.
393
394