Topic: [extension request] iphone view
Is-it possible to have an extension who will show the forum with an iphone view like twitter or facebook (ex: http://mobile.twitter.com/lbouriez)
Not with a style because it should appear only when the visitor come from a mobile.
For the redirection, i found this:
PHP:
function isMobileBrowser()
{
return strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'android');
}
JS:
if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i) ) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://iphone.monsite.net";
}
But for the forum, i don't know how to do it