urlkiller |
|
---|---|
$cfg['defaultskin'] = $_SERVER['HTTP_HOST'] == 'm.example.com' ? 'wap_skin' : 'normal_skin';
this code switches the variable that stores the name of the skin the user (guest) will see on your page.
hope it helps
Added 6 minutes later: ahh yes autodetect. that would need some more work and a list with the browser user-agents (http://de.wikipedia.org/wiki/User_Agent#Mobilfunkger.C3.A4te <= thats german because the list wasnt in the english version!). but that would be the hard way.
Koradhil's solution was to use that little framework for detecting if its a mobile device or not. with that and a little plugin you could do a simple autodetection. Added 8 minutes later:
ok thats so easy stuff... (nice tipp Koradhil) that code changes the var of the skin (yes like above) but it uses $m (that can be TRUE/FALSE) to select either the first or the sencond argument. URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
|
|
Bu gönderi urlkiller tarafından düzenlendi (2011-06-27 02:13, 13 yıllar önce) |