Eh bien bonjour, je viens demander de l'aide sur un script que je me suis efforcé de construire, vu que personne n'a encore réussit à créer un sélecteur de thèmes qui fonctionne pour forumactif.

Alors voilà ... J'ai mon script, la fonction du sélecteur marche bien, mais voilà le hic ... Incompatibilité notoire avec internet explorer ... Mmmm ...

Bien ... le soucis est que sur IE, je ne vois que la bannière du forum concerné ... Sous firefox ça marche bien mais sous IE ça rend le fofo inaccessible ...

Je me doute évidemment que ce genre de fonction cookie (puisque selon moi c'est de cela qu'il est question), n'est pas compatible. C'est pourquoi, je souhaitai demander l'aide d'un codeur afin de trouver une alternative à ce code ... Un autre script, une correction de celui-là ... Je ne sais pas si c'est possible, mais cela ne me semble pas pire que tout.

Merci de m'éclairer ...
Ci joint, le script en question, censé changer de css à volonté.

D'ailleurs, j'ai remarqué qu'il ne permettait pas de changer les images du fofo (bannière et boutons) ... Est-il possible de le faire ?? Boaf, au pire je me contenterai de changer les couleurs, mais si il existe mieux, tant qu'à faire ...

Voilà ... Merci de m'avoir lu jusqu'au bout, et d'avance merci pour vos réponses ! Tchoooo !

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
document.write('<style body {margin-top:250px !important;}</style>'); document.write('<div style="position: absolute; width: 304px; height: 38px; z-index: 1; left: -60px; top: 15px" id="skinselector"><form><select onchange="changeskin(this.options[this.selectedIndex].value); window.location.reload();"><option> Change Skin </option><option value="DELTA"> DELTA </option><option value="ATLANTIS"> ATLANTIS </option><option value="LEMURIA"> LEMURIA </option><option value="ABYDOSS"> ABYDOSS </option><option value="CYDONIA"> CYDONIA </option><option value="SOLARIS"> SOLARIS </option><option value="ORIGYA"> ORIGYA </option></select></form></div>');
var scheme = getCookie('template1');
if (scheme == 'DELTA') {
document.write('<link MEDIA="screen" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841012931.css">');
} else if (scheme == 'ATLANTIS') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841013438.css">');
} else if (scheme == 'LEMURIA') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841013838.css">');
} else if (scheme == 'ABYDOSS') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841015301.css">');
} else if (scheme == 'CYDONIA') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841015613.css">');
} else if (scheme == 'SOLARIS') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841015802.css">');
} else if (scheme == 'ORIGYA') {
document.write('<link MEDIA="screen" REL="stylesheet" REL="stylesheet" TYPE="text/css" HREF="http://pmsc.free.fr/CSS/0841020021.css">');
}
 
//No need to modify anything below this line
function changeskin(change) {
var scheme = change;
var name = 'template1';
var pathname = location.pathname;
var myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
var ExpDate = new Date ();
ExpDate.setTime(ExpDate.getTime() + (180 * 24 * 3600 * 1000));
setCookie(name,scheme,ExpDate,myDomain);
}
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
return null;
}
 
function setCookie(name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) +
((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
((path == null) ? "" : "; path=" + path) +
((domain == null) ? "" : "; domain=" + domain) +
((secure == null) ? "" : "; secure");
}