Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
public:dokuwiki_goes_mobile [2010/04/25 15:57] – created Nico | public:dokuwiki_goes_mobile [2012/03/24 12:03] – Nico | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== Fix dokuwiki ===== | ===== Fix dokuwiki ===== | ||
The main trick here is that dokuwiki uses a special function, ismobiledevice() to set a global environment variable called " | The main trick here is that dokuwiki uses a special function, ismobiledevice() to set a global environment variable called " | ||
- | ==== doku.php ==== | ||
- | Swap the 2 following include lines to load common.php before init.php: | ||
- | < | ||
- | require_once(DOKU_INC.' | ||
- | require_once(DOKU_INC.' | ||
- | </ | ||
==== inc/ | ==== inc/ | ||
Add the following somewhere before the template definition stuff: | Add the following somewhere before the template definition stuff: | ||
< | < | ||
+ | require_once(DOKU_INC.' | ||
if (clientismobile()) | if (clientismobile()) | ||
$conf[' | $conf[' | ||
</ | </ | ||
- | ==== lib/ | + | |
- | these files don't call common.php, so let's add it (before init.php): | + | Of course, if you installed [[http://www.dokuwiki.org/ |
< | < | ||
- | require_once(DOKU_INC.'inc/ | + | $conf['template'] = 'minimal_mobile'; |
- | require_once(DOKU_INC.'inc/ | + | |
</ | </ |