Fork me on GitHub

Rapport de message :*
 

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") == -1window.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") == -1window.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") == -1window.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") == -1window.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") == -1window.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"'; }

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

37 Personne(s) en ligne (30 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 37 | Plus ...