**WARNING**: This hack does not work anymore, but you can now handle mobile skins in a much proper way through the [[https://www.dokuwiki.org/plugin:loadskin|loadskin]] plugin. ====== Making dokuwiki handle mobile devices ====== ===== Install some mobile template ===== Here are some mobile template you can download: * [[http://www.dokuwiki.org/template:dokumobile|dokumobile]] * [[http://www.dokuwiki.org/template:minimal_mobile|minimal_mobile]] ===== Fix dokuwiki ===== The main trick here is that dokuwiki uses a special function, ismobiledevice() to set a global environment variable called "ismobile". This function is called in inc/common.php; unfortunatly, the templating stuff is handled by inc/init.php, which is called before. We need to fix it. ==== inc/init.php ==== Add the following somewhere before the template definition stuff: require_once(DOKU_INC.'inc/common.php'); if (clientismobile()) $conf['template'] = 'dokumobile'; Of course, if you installed [[http://www.dokuwiki.org/template:minimal_mobile|minimal_mobile]], the last line will be: $conf['template'] = 'minimal_mobile';