Soucis d'affichage de l'applet
#1
Big Grin 
Bonjour,


Je viens de trouver un codage de mon applet et j'éprouve un soucis avec l'affiche de celui-ci. La fenetre consacrée à l'irc est vraiment petite et j'arrive pas à comprendre pourquoi. Pouvez-vous me venir en aide ?

Voici le code :
Citation :<div id="lightIRC" style="height:100%; text-align:center;">
 <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>

<script type="text/javascript">
alphabet = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','(',')','~','!','@','#','$','%','^','&','*','-','=','+','_','.',',','`','{','}','[',']','|','\'','\\','\"','/','?',':',';','>','<','!',' ','\n');
tempbin = new Array("0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","a");
binary = new Array();

var encalphabet;
var decrypted;
var encrypted;

function makebinary(l,start,z) {
if (l < 0)
return;

if (tempbin[l] == "1") {
tempbin[l] = "0";
x = makebinary(l-1,start,z);
}else if (tempbin[l] == "0"){
tempbin[l] = "1";
}else if (tempbin[l] == "a"){
tempbin[l] = "0";
}

if (l == start) {
binary[z] = "";
for (i = 0; i <= l; i++)
binary[z] += tempbin[i];
}
return;
}

for (z = 0; z < alphabet.length; z++) {
makebinary(tempbin.length-1,tempbin.length-1,z);
}

function decrypt(encrypted) {
encalphabet = "";
temp = "";
decrypted = "";

for (i = 0; i < encrypted.length; i+=tempbin.length) {
for (z = 0; z < alphabet.length; z++) {
if (encrypted.substr(i,tempbin.length) == binary[z]) {
temp += alphabet[z];
break;
}
}
}

for (i = 0; i < alphabet.length; i++)
encalphabet += temp.substr(i,1);

while (i < encrypted.length) {
for (z = 0; z < encalphabet.length; z++) {
if (temp.substr(i,1) == encalphabet.substr(z,1)) {
decrypted += alphabet[z];
break;
}
}
i++;
}

return decrypted;
}

var params = {};
params.host = "irc.org";
params.accessKey = "Q4B31-DBD9B-1C543";
params.policyPort = "843";
params.rtmp = "212.57.51";
params.port                         = 6667;
params.webcam           = "true";
params.webcamPrivateOnly = "true";
params.webcamPublicOnly = "false";
params.nick                         = "test";
params.password =  "";
params.language           = "fr";
params.realname                     = "34 H Charente-Maritime";
params.showRegisterNicknameButton = "true";
params.showIdentifySelection        = "true";
params.ShowNickSelection            = "true";
params.ShowPasswordSelection        = "true";
params.identifyMessage = "NickServ:Ce pseudo est enregistr? et prot?g?.";
params.identifyCommand = "/msg nickserv identify %pass%";
params.registerNicknameServiceName = "NickServ";
params.registerNicknameCommand = "/msg NickServ register %password% %mail% ";
params.ident          = "Secretchateur";
params.quitMessage                  = "A bientot sur www.s.fr ~~ test ~~";
params.showInfoMessages = "true";
params.perform = "";
params.soundOnNewChannelMessage = "false";
params.styleURL         = "css/blue.css";
params.showJoinPartMessages = "true";
params.showRegisterNicknameButton   = "false";
params.fontSize                     = "12";
params.showNewQueriesInBackground   = "true";
params.showTimestamps               = "true";

params.showNickSelection            = "false";
params.showListButton               = "false";
params.showNickChangeButton         = "true";
params.showJoinChannelButton        = "false";
params.showPartChannelButton        = "true";
params.showRegisterChannelButton = "false";
params.registerChannelServiceName = "ChanServ";
params.registerChannelCommand = "/msg ChanServ register %channel% %password% %description%";
params.showServerPasswordSelection = "false";
params.showOptionsButton            = "true";
params.showChannelCentralButton     = "false";
params.showChannelHeader            = "true";
params.channelHeader                = "<b>Information :</b> Bienvenue sur %channel% , actuellement<b> %users% </b>utilisateurs(trices) connecte(e)s. <b>Sujet de %channel% </b>: %topic% ";
params.autoReconnect                = "true";
params.showSecurityError            = "true";
params.customSecurityErrorMessage   = "Le tchat est actuellement en maintenance...";
params.useUserListIcons             = "true";
params.userListCustomFormatting = "mode=o:userListOperator,mode=v:userListVoice";
params.showSubmitButton             = "true";
params.showEmoticonsButton          = "true";
params.showRichTextControls         = "true";
params.showMenuButton               = "true";
params.showNavigation               = "true";
params.emoticonPath                 = "images/";
params.iconPath                     = "images/";
params.loopClientCommands = "true";
params.charset = "UTF-8";
params.userListInformationPopupItems       = "nick,realname,ident";
params.performContinousWhoRequests         = "true";
params.showUserListInformationPopup        = "true";

/* Position of the navigation container (where channel and query buttons appear). Valid values: left, right, top, bottom */
params.navigationPosition           = "bottom";

params.performContinousWhoRequests = "true";
params.userListCustomFormatting = "realname=[0-9]\\W[H](.*?):userListMan,realname=[0-9]\\W[F](.*?):userListWoman,ident=guest:userListGuest";
params.emoticonList = "(censure)->censureb.swf,:zik:->zika.swf,<3->coeura.swf,(h)->coola.swf,:vomi:->maladea.swf,:cafe:->cafea.swf,:rose:->rosea.swf,:fuck:->fucka.swf,Smile->smilea.swf,Wink->winka.swf,Very Happy->sdenta.swf,Razz->languea.swf,Sad->tristea.swf,:$->rougea.swf,:O->etonea.swf,(H)->coola.swf,Neutral->decua.swf,O_o->blinka.swf,:'(->pleurea.swf,:S->unsurea.swf,:[->colerea.swf";


/* See more parameters at http://redmine.lightirc.com/projects/lig...parameters */
for(var key in params) {
 params[key] = params[key].toString().replace(/%/g, "%85");
}
function sendCommand(command) {
 swfobject.getObjectById('lightIRC').sendCommand(command);
}

function onContextMenuSelect(nick) {
//  alert("onContextMenuSelect: "+nick);
}




function PopupWindow(source, strWindowToOpen) {
var strWindowFeatures = "toolbar=no,resize=no,titlebar=no,";
strWindowFeatures = strWindowFeatures + "menubar=no,width=800,height=600,maximize=null";
window.open(strWindowToOpen, '', strWindowFeatures);
}
function quitter() {
document.location.href="../../index.php"
}

/* This method gets called if you use the parameter loopClientCommands */
function onClientCommand(command) {
return command;
}

/* This method gets called if you use the parameter contextMenuExternalEvent */
function onContextMenuSelect(type, nick) {
 alert("onContextMenuSelect: "+nick+" for type "+type);
}

/* This method gets called if you use the parameter loopServerCommands */
function onServerCommand(command) {
var reg0=new RegExp("(skyrock)", "gi");
var reg1=new RegExp("(witix)", "gi");
var reg2=new RegExp("(chat-land)", "gi");
var reg3=new RegExp("(mimacy)", "gi");
var reg4=new RegExp("(europnet)", "gi");
var reg5=new RegExp("(blueirc)", "gi");
var reg6=new RegExp("(media-tchat)", "gi");
var reg7=new RegExp("(dreamchat)", "gi");
var reg8=new RegExp("(irc-service)", "gi");
var reg9=new RegExp("(euro-tchat)", "gi");
var reg10=new RegExp("(bite)", "gi");
var reg11=new RegExp("(pute)", "gi");
var reg12=new RegExp("(batard)", "gi");
var reg13=new RegExp("(encule)", "gi");
var reg14=new RegExp("(dial-sympa)", "gi");
var reg15=new RegExp("(dialova)", "gi");
var reg16=new RegExp("(pussy)", "gi");
var reg17=new RegExp("(bitch)", "gi");
var reg18=new RegExp("(biatch)", "gi");
var reg19=new RegExp("(salop)", "gi");
command = command.replace(reg0, "(censure) ");
command = command.replace(reg1, "(censure) ");
command = command.replace(reg2, "(censure) ");
command = command.replace(reg3, "(censure) ");
command = command.replace(reg4, "(censure) ");
command = command.replace(reg5, "(censure) ");
command = command.replace(reg6, "(censure) ");
command = command.replace(reg7, "(censure) ");
command = command.replace(reg8, "(censure) ");
command = command.replace(reg9, "(censure) ");
command = command.replace(reg10, "(censure) ");
command = command.replace(reg11, "(censure) ");
command = command.replace(reg12, "(censure) ");
command = command.replace(reg13, "(censure) ");
command = command.replace(reg14, "(censure) ");
command = command.replace(reg15, "(censure) ");
command = command.replace(reg16, "(censure) ");
command = command.replace(reg17, "(censure) ");
command = command.replace(reg18, "(censure) ");
command = command.replace(reg19, "(censure) ");
return command;
}


function sendMessageToActiveWindow(message) {
 swfobject.getObjectById('lightIRC').sendMessageToActiveWindow(message);
}

function open_infos(page) {
width = 400;
height = 850;
if(window.innerWidth) {
var left = (window.innerWidth-width)/2;
var top = (window.innerHeight-height)/2;
} else {
var left = (document.body.clientWidth-width)/2;
var top = (document.body.clientHeight-height)/2;
}
window.open(page,'nom_de_ma_popup','menubar=no, scrollbars=no, top='+top+', left='+left+', width='+width+', height='+height+'');
}

function open_ext(page) {
width = 600;
height = 800;
if(window.innerWidth) {
var left = (window.innerWidth-width)/2;
var top = (window.innerHeight-height)/2;
} else {
var left = (document.body.clientWidth-width)/2;
var top = (document.body.clientHeight-height)/2;
}
window.open(page,'nom_de_ma_popup','menubar=no, scrollbars=yes, top='+top+', left='+left+', width='+width+', height='+height+'');
}

function faq() {
open_ext('faq.php');
swfobject.getObjectById('lightIRC').sendCommand('/join #!Olympe!');
swfobject.getObjectById('lightIRC').sendCommand('/join #!CSAdmins!');
}

window.onbeforeunload = function() {
 swfobject.getObjectById('lightIRC').sendQuit();
}

function open_profils(nick) {
width = 800;
height = 700;
if(window.innerWidth) {
var left = (window.innerWidth-width)/2;
var top = (window.innerHeight-height)/2;
} else {
var left = (document.body.clientWidth-width)/2;
var top = (document.body.clientHeight-height)/2;
}
profil = '../../index.php?menu=trombi&ssmenu=show&pseudo=';
caract = '#show';
profil = profil+nick+caract;
window.open(profil,'nom_de_ma_popup','menubar=no, scrollbars=no, top='+top+', left='+left+', width='+width+', height='+height+'');
}

window.onbeforeunload = function() {
 swfobject.getObjectById('lightIRC').sendQuit();
}

/* This loop escapes % signs in parameters. You should not change it */
for(var key in params) {
 params[key] = params[key].toString().replace(/%/g, "%95");
}

swfobject.embedSWF("lightIRC.swf", "lightIRC", "100%", "100%", "10.0.0", "expressInstall.swf", params, {wmode:"transparent"});
</script>
  Répondre   Avertir


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)