Re: Theme iphone | Titre du sujet : Re: Theme iphone par Franck0768 sur 28/11/2010 10:47:12
Citation : grosdunord a écrit : en effet au lieu de indexd j'ai mi le lien vers montheme mobile et j'ai placer le script dans mon théme pc
<SCRIPT language="Javascript">
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.vistaide.com/index.php?xoops_theme_select=xdt_mobile";
}
if((navigator.userAgent.match(/iPad/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.vistaide.com/index.php?xoops_theme_select=xdt_mobile";
}
if((navigator.userAgent.match(/iPod/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.vistaide.com/index.php?xoops_theme_select=xdt_mobile";
}
if((navigator.userAgent.match(/mobile/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.vistaide.com/index.php?xoops_theme_select=xdt_mobile";
}
if((navigator.userAgent.match(/SAMSUNG/i)) ) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.vistaide.com/index.php?xoops_theme_select=xdt_mobile";
}
</SCRIPT>
Dans les script Java, peut on utiliser les balises Smarty et donc avoir quelque chose du genre:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1)
window.location = '<{$xoops_url>}."index.php?xoops_select=xdt_mobile"'; }
|
|