因為最近開始使用 hTC Incredible S , 有這樣的需求, 很快找了一些現成的資料, 立即實現這樣的功能.
cd /var/www/html/wiki/lib/tpl wget http://kjh.ca/dokumobile_2010_02_28.zip unzip dokumobile_2010_02_28.zip
<td width="33%" style="border:0;" align="left"><img src="<?php echo DOKU_TPL?>images/icon_left.png" id="toggle_toc" /></td> <td width="33%" style="border:0;" align="center"><img src="<?php echo DOKU_TPL?>images/icon_middle.png" id="toggle_admin" /></td> <td width="33%" style="border:0;" align="right"><img src="<?php echo DOKU_TPL?>images/icon_right.png" id="toggle_nav" /></td>
cd /var/www/html/wiki/conf wget http://php-mobile-detect.googlecode.com/files/Mobile_Detect.php
vi /var/www/html/wiki/inc/init.php
// for Mobile http://www.dokuwiki.org/template:dokumobile include(DOKU_CONF . "Mobile_Detect.php"); $mdetect = new Mobile_Detect(); if ($mdetect->isMobile()) {$conf['template']='dokumobile';}
#// define Template baseURL #if(!defined('DOKU_TPL')) define('DOKU_TPL', # DOKU_BASE.'lib/tpl/'.$conf['template'].'/'); #// define real Template directory #if(!defined('DOKU_TPLINC')) define('DOKU_TPLINC', # DOKU_INC.'lib/tpl/'.$conf['template'].'/');