Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [1169] trunk (Page 5)
Status: Beta
Brought to you by:
kerphi
From: <gpi...@us...> - 2007-08-30 19:17:27
|
Revision: 1169 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1169&view=rev Author: gpinzone Date: 2007-08-30 12:17:03 -0700 (Thu, 30 Aug 2007) Log Message: ----------- Updated rest of files that use both class and className. Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php trunk/demo/demo50_data/mytheme/customize.js.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-08-30 16:40:39 UTC (rev 1168) +++ trunk/data/public/js/pfcclient.js 2007-08-30 19:17:03 UTC (rev 1169) @@ -1197,18 +1197,18 @@ var nickidlst = this.getChanMeta(chanid,'users')['nickid']; var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); - if (is_ie) - ul.setAttribute('className', 'pfc_nicklist'); // IE + if (! is_ie) + ul.setAttribute('class', 'pfc_nicklist'); else - ul.setAttribute('class', 'pfc_nicklist'); + ul.setAttribute('className', 'pfc_nicklist'); // for IE for (var i=0; i<nickidlst.length; i++) { var nickid = nickidlst[i]; var li = this.buildNickItem(nickid); - if (is_ie) - li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE + if (! is_ie) + li.setAttribute('class', 'pfc_nickitem_'+nickid); else - li.setAttribute('class', 'pfc_nickitem_'+nickid); + li.setAttribute('className', 'pfc_nickitem_'+nickid); // for IE ul.appendChild(li); } var fc = nickdiv.firstChild; @@ -1231,24 +1231,24 @@ var usermeta = this.getAllUserMeta(nickid); var div = document.createElement('div'); - if (is_ie) + if (! is_ie) + div.setAttribute('class', 'pfc_nickwhois'); + else div.setAttribute('className', 'pfc_nickwhois'); // for IE - else - div.setAttribute('class', 'pfc_nickwhois'); var p = document.createElement('p'); - if (is_ie) + if (! is_ie) + p.setAttribute('class', 'pfc_nickwhois_header'); + else p.setAttribute('className', 'pfc_nickwhois_header'); // for IE - else - p.setAttribute('class', 'pfc_nickwhois_header'); div.appendChild(p); // add the close button var img = document.createElement('img'); - if (is_ie) + if (! is_ie) + img.setAttribute('class', 'pfc_nickwhois_close'); + else img.setAttribute('className', 'pfc_nickwhois_close'); // for IE - else - img.setAttribute('class', 'pfc_nickwhois_close'); img.pfc_parent = div; img.onclick = function(evt){ this.pfc_parent.style.display = 'none'; @@ -1279,15 +1279,15 @@ { var tr = document.createElement('tr'); var td1 = document.createElement('td'); - if (is_ie) + if (! is_ie) + td1.setAttribute('class', 'pfc_nickwhois_c1'); + else td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE + var td2 = document.createElement('td'); + if (! is_ie) + td2.setAttribute('class', 'pfc_nickwhois_c2'); else - td1.setAttribute('class', 'pfc_nickwhois_c1'); - var td2 = document.createElement('td'); - if (is_ie) td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE - else - td2.setAttribute('class', 'pfc_nickwhois_c2'); td1.appendChild(document.createTextNode(k)); td2.appendChild(document.createTextNode(v)); tr.appendChild(td1); @@ -1301,10 +1301,10 @@ if (pfc.getUserMeta(nickid,'nick') != this.nickname) { var p = document.createElement('p'); - if (is_ie) + if (! is_ie) + p.setAttribute('class', 'pfc_nickwhois_pv'); + else p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE - else - p.setAttribute('class', 'pfc_nickwhois_pv'); var a = document.createElement('a'); a.setAttribute('href', ''); a.pfc_nickid = nickid; @@ -1358,20 +1358,20 @@ else img.setAttribute('src', this.res.getFileUrl('images/user.gif')); img.style.marginRight = '5px'; - if (is_ie) + if (! is_ie) + img.setAttribute('class', 'pfc_nickbutton'); + else img.setAttribute('className', 'pfc_nickbutton'); // for IE - else - img.setAttribute('class', 'pfc_nickbutton'); a.appendChild(img); // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule var nobr = document.createElement('nobr'); var span = document.createElement('span'); - if (is_ie) + if (! is_ie) + span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); + else span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE - else - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); span.appendChild(document.createTextNode(nick)); nobr.appendChild(span); a.appendChild(nobr); Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-08-30 16:40:39 UTC (rev 1168) +++ trunk/data/public/js/pfcgui.js 2007-08-30 19:17:03 UTC (rev 1169) @@ -81,8 +81,10 @@ if (this.tabids[i] == tabid) { // select the tab - tabtitle.setAttribute('class', 'selected'); - tabtitle.setAttribute('className', 'selected'); // for IE6 + if (! is_ie) + tabtitle.setAttribute('class', 'selected'); + else + tabtitle.setAttribute('className', 'selected'); // for IE //Element.addClassName(tabtitle, 'selected'); tab_to_show = tabcontent; this.current_tab = this.tabs[i]; @@ -91,8 +93,10 @@ else { // unselect the tab - tabtitle.setAttribute('class', ''); - tabtitle.setAttribute('className', ''); // for IE6 + if (! is_ie) + tabtitle.setAttribute('class', ''); + else + tabtitle.setAttribute('className', ''); // for IE //Element.removeClassName(tabtitle, 'selected'); tabcontent.style.display = 'none'; } @@ -133,8 +137,10 @@ // if the chat content doesn't exists yet, just create a cached one cc = document.createElement('div'); cc.setAttribute('id', 'pfc_chat_'+tabid); - cc.setAttribute('class', 'pfc_chat'); - cc.setAttribute('className', 'pfc_chat'); // for IE6 + if (! is_ie) + cc.setAttribute('class', 'pfc_chat'); + else + cc.setAttribute('className', 'pfc_chat'); // for IE // Element.addClassName(cc, 'pfc_chat'); cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) @@ -151,8 +157,10 @@ oc = document.createElement('div'); oc.setAttribute('id', 'pfc_online_'+tabid); - oc.setAttribute('class', 'pfc_online'); - oc.setAttribute('className', 'pfc_online'); // for IE6 + if (! is_ie) + oc.setAttribute('class', 'pfc_online'); + else + oc.setAttribute('className', 'pfc_online'); // for IE //Element.addClassName(oc, 'pfc_online'); // I set the border style here because seting it in the CSS is not taken in account // oc.style.borderLeft = "1px solid #555"; @@ -226,8 +234,10 @@ li_title.appendChild(li_div); var a1 = document.createElement('a'); - a1.setAttribute('class', 'pfc_tabtitle'); - a1.setAttribute('className', 'pfc_tabtitle'); // for IE6 + if (! is_ie) + a1.setAttribute('class', 'pfc_tabtitle'); + else + a1.setAttribute('className', 'pfc_tabtitle'); // for IE a1.setAttribute('href', '#'); a1.pfc_tabid = tabid; a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;} @@ -263,8 +273,10 @@ } a2.alt = pfc.res.getLabel('Close this tab'); a2.title = a2.alt; - a2.setAttribute('class', 'pfc_tabclose'); - a2.setAttribute('className', 'pfc_tabclose'); // for IE6 + if (! is_ie) + a2.setAttribute('class', 'pfc_tabclose'); + else + a2.setAttribute('className', 'pfc_tabclose'); // for IE var img = document.createElement('img'); img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif')); a2.appendChild(img); @@ -274,8 +286,10 @@ var div_content = document.createElement('div'); div_content.setAttribute('id', 'pfc_channel_content'+tabid); // Element.addClassName(div_content, 'pfc_content'); - div_content.setAttribute('class', 'pfc_content'); - div_content.setAttribute('className', 'pfc_content'); // for IE6 + if (! is_ie) + div_content.setAttribute('class', 'pfc_content'); + else + div_content.setAttribute('className', 'pfc_content'); // for IE div_content.style.display = 'none'; var div_chat = this.getChatContentFromTabId(tabid); @@ -354,13 +368,17 @@ { if (div.blinkstat == true) { - div.setAttribute('class', 'pfc_tabblink1'); - div.setAttribute('className', 'pfc_tabblink1'); // for IE6 + if (! is_ie) + div.setAttribute('class', 'pfc_tabblink1'); + else + div.setAttribute('className', 'pfc_tabblink1'); // for IE } else { - div.setAttribute('class', 'pfc_tabblink2'); - div.setAttribute('className', 'pfc_tabblink2'); // for IE6 + if (! is_ie) + div.setAttribute('class', 'pfc_tabblink2'); + else + div.setAttribute('className', 'pfc_tabblink2'); // for IE } div.blinkstat = !div.blinkstat; div.blinktimeout = setTimeout('pfc.gui.notifyTab(\''+tabid+'\');', 500); @@ -389,8 +407,10 @@ var div = $('pfc_tabdiv'+tabid); if (div) { - div.removeAttribute('class'); - div.removeAttribute('className'); // for IE6 + if (! is_ie) + div.removeAttribute('class'); + else + div.removeAttribute('className'); // for IE clearTimeout(div.blinktimeout); } }, @@ -432,8 +452,10 @@ var bbc = clist_v[i]; var elt = document.createElement('img'); elt.bbc = bbc; - elt.setAttribute('class', 'pfc_color'); - elt.setAttribute('className', 'pfc_color'); // for IE6 + if (! is_ie) + elt.setAttribute('class', 'pfc_color'); + else + elt.setAttribute('className', 'pfc_color'); // for IE elt.setAttribute('id', 'pfc_color_'+bbc); elt.style.backgroundColor = '#'+bbc; elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif')); Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169) @@ -32,16 +32,20 @@ else img.setAttribute('src', this.res.getFileUrl('images/user.gif')); img.style.marginRight = '5px'; - img.setAttribute('class', 'pfc_nickbutton'); - img.setAttribute('className', 'pfc_nickbutton'); // for IE6 + if (! is_ie) + img.setAttribute('class', 'pfc_nickbutton'); + else + img.setAttribute('className', 'pfc_nickbutton'); // for IE a.appendChild(img); // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule var nobr = document.createElement('nobr'); var span = document.createElement('span'); - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); - span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE6 + if (! is_ie) + span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); + else + span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE span.appendChild(document.createTextNode(nick)); nobr.appendChild(span); a.appendChild(nobr); Modified: trunk/demo/demo50_data/mytheme/customize.js.php =================================================================== --- trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168) +++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169) @@ -3,18 +3,24 @@ var usermeta = this.getAllUserMeta(nickid); var div = document.createElement('div'); - div.setAttribute('class', 'pfc_nickwhois'); - div.setAttribute('className', 'pfc_nickwhois'); // for IE6 + if (! is_ie) + div.setAttribute('class', 'pfc_nickwhois'); + else + div.setAttribute('className', 'pfc_nickwhois'); // for IE var p = document.createElement('p'); - p.setAttribute('class', 'pfc_nickwhois_header'); - p.setAttribute('className', 'pfc_nickwhois_header'); // for IE6 + if (! is_ie) + p.setAttribute('class', 'pfc_nickwhois_header'); + else + p.setAttribute('className', 'pfc_nickwhois_header'); // for IE div.appendChild(p); // add the close button var img = document.createElement('img'); - img.setAttribute('class', 'pfc_nickwhois_close'); - img.setAttribute('className', 'pfc_nickwhois_close'); // for IE6 + if (! is_ie) + img.setAttribute('class', 'pfc_nickwhois_close'); + else + img.setAttribute('className', 'pfc_nickwhois_close'); // for IE img.pfc_parent = div; img.onclick = function(evt){ this.pfc_parent.style.display = 'none'; @@ -46,11 +52,15 @@ { var tr = document.createElement('tr'); var td1 = document.createElement('td'); - td1.setAttribute('class', 'pfc_nickwhois_c1'); - td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6 + if (! is_ie) + td1.setAttribute('class', 'pfc_nickwhois_c1'); + else + td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE var td2 = document.createElement('td'); - td2.setAttribute('class', 'pfc_nickwhois_c2'); - td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6 + if (! is_ie) + td2.setAttribute('class', 'pfc_nickwhois_c2'); + else + td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE td1.appendChild(document.createTextNode(k)); td2.appendChild(document.createTextNode(v)); tr.appendChild(td1); @@ -65,8 +75,10 @@ { var img = document.createElement('img'); img.setAttribute('src',this.getUserMeta(nickid,'avatar')); - img.setAttribute('class', 'pfc_nickwhois_avatar'); - img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE6 + if (! is_ie) + img.setAttribute('class', 'pfc_nickwhois_avatar'); + else + img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE div.appendChild(img); } @@ -74,8 +86,10 @@ if (pfc.getUserMeta(nickid,'nick') != this.nickname) { var p = document.createElement('p'); - p.setAttribute('class', 'pfc_nickwhois_pv'); - p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6 + if (! is_ie) + p.setAttribute('class', 'pfc_nickwhois_pv'); + else + p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE var a = document.createElement('a'); a.setAttribute('href', ''); a.pfc_nickid = nickid; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gpi...@us...> - 2007-08-31 01:32:18
|
Revision: 1170 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1170&view=rev Author: gpinzone Date: 2007-08-30 18:32:18 -0700 (Thu, 30 Aug 2007) Log Message: ----------- Much cleaner way of resolving class/className dependencies. Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php trunk/demo/demo50_data/mytheme/customize.js.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-08-30 19:17:03 UTC (rev 1169) +++ trunk/data/public/js/pfcclient.js 2007-08-31 01:32:18 UTC (rev 1170) @@ -1194,21 +1194,17 @@ */ updateNickListBox: function(chanid) { + var className = (! is_ie) ? 'class' : 'className'; + var nickidlst = this.getChanMeta(chanid,'users')['nickid']; var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); - if (! is_ie) - ul.setAttribute('class', 'pfc_nicklist'); - else - ul.setAttribute('className', 'pfc_nicklist'); // for IE + ul.setAttribute(className, 'pfc_nicklist'); for (var i=0; i<nickidlst.length; i++) { var nickid = nickidlst[i]; var li = this.buildNickItem(nickid); - if (! is_ie) - li.setAttribute('class', 'pfc_nickitem_'+nickid); - else - li.setAttribute('className', 'pfc_nickitem_'+nickid); // for IE + li.setAttribute(className, 'pfc_nickitem_'+nickid); ul.appendChild(li); } var fc = nickdiv.firstChild; @@ -1228,27 +1224,20 @@ updateNickWhoisBox: function(nickid) { + var className = (! is_ie) ? 'class' : 'className'; + var usermeta = this.getAllUserMeta(nickid); var div = document.createElement('div'); - if (! is_ie) - div.setAttribute('class', 'pfc_nickwhois'); - else - div.setAttribute('className', 'pfc_nickwhois'); // for IE + div.setAttribute(className, 'pfc_nickwhois'); var p = document.createElement('p'); - if (! is_ie) - p.setAttribute('class', 'pfc_nickwhois_header'); - else - p.setAttribute('className', 'pfc_nickwhois_header'); // for IE + p.setAttribute(className, 'pfc_nickwhois_header'); div.appendChild(p); // add the close button var img = document.createElement('img'); - if (! is_ie) - img.setAttribute('class', 'pfc_nickwhois_close'); - else - img.setAttribute('className', 'pfc_nickwhois_close'); // for IE + img.setAttribute(className, 'pfc_nickwhois_close'); img.pfc_parent = div; img.onclick = function(evt){ this.pfc_parent.style.display = 'none'; @@ -1279,15 +1268,9 @@ { var tr = document.createElement('tr'); var td1 = document.createElement('td'); - if (! is_ie) - td1.setAttribute('class', 'pfc_nickwhois_c1'); - else - td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE + td1.setAttribute(className, 'pfc_nickwhois_c1'); var td2 = document.createElement('td'); - if (! is_ie) - td2.setAttribute('class', 'pfc_nickwhois_c2'); - else - td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE + td2.setAttribute(className, 'pfc_nickwhois_c2'); td1.appendChild(document.createTextNode(k)); td2.appendChild(document.createTextNode(v)); tr.appendChild(td1); @@ -1301,10 +1284,7 @@ if (pfc.getUserMeta(nickid,'nick') != this.nickname) { var p = document.createElement('p'); - if (! is_ie) - p.setAttribute('class', 'pfc_nickwhois_pv'); - else - p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE + p.setAttribute(className, 'pfc_nickwhois_pv'); var a = document.createElement('a'); a.setAttribute('href', ''); a.pfc_nickid = nickid; @@ -1329,6 +1309,8 @@ buildNickItem: function(nickid) { + var className = (! is_ie) ? 'class' : 'className'; + var nick = this.getUserMeta(nickid, 'nick'); var isadmin = this.getUserMeta(nickid, 'isadmin'); if (isadmin == '') isadmin = false; @@ -1351,27 +1333,20 @@ } li.appendChild(a); - var img = document.createElement('img'); if (isadmin) img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); else img.setAttribute('src', this.res.getFileUrl('images/user.gif')); img.style.marginRight = '5px'; - if (! is_ie) - img.setAttribute('class', 'pfc_nickbutton'); - else - img.setAttribute('className', 'pfc_nickbutton'); // for IE + img.setAttribute(className, 'pfc_nickbutton'); a.appendChild(img); // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule var nobr = document.createElement('nobr'); var span = document.createElement('span'); - if (! is_ie) - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); - else - span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE + span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid); span.appendChild(document.createTextNode(nick)); nobr.appendChild(span); a.appendChild(nobr); Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-08-30 19:17:03 UTC (rev 1169) +++ trunk/data/public/js/pfcgui.js 2007-08-31 01:32:18 UTC (rev 1170) @@ -65,6 +65,8 @@ setTabById: function(tabid) { + var className = (! is_ie) ? 'class' : 'className'; + // first of all save the scroll pos of the visible tab var content = this.getChatContentFromTabId(this.current_tab_id); this.scrollpos[this.current_tab_id] = content.scrollTop; @@ -81,10 +83,7 @@ if (this.tabids[i] == tabid) { // select the tab - if (! is_ie) - tabtitle.setAttribute('class', 'selected'); - else - tabtitle.setAttribute('className', 'selected'); // for IE + tabtitle.setAttribute(className, 'selected'); //Element.addClassName(tabtitle, 'selected'); tab_to_show = tabcontent; this.current_tab = this.tabs[i]; @@ -93,10 +92,7 @@ else { // unselect the tab - if (! is_ie) - tabtitle.setAttribute('class', ''); - else - tabtitle.setAttribute('className', ''); // for IE + tabtitle.setAttribute(className, ''); //Element.removeClassName(tabtitle, 'selected'); tabcontent.style.display = 'none'; } @@ -130,6 +126,8 @@ getChatContentFromTabId: function(tabid) { + var className = (! is_ie) ? 'class' : 'className'; + // return the chat content if it exists var cc = this.chatcontent[tabid]; if (cc) return cc; @@ -137,10 +135,7 @@ // if the chat content doesn't exists yet, just create a cached one cc = document.createElement('div'); cc.setAttribute('id', 'pfc_chat_'+tabid); - if (! is_ie) - cc.setAttribute('class', 'pfc_chat'); - else - cc.setAttribute('className', 'pfc_chat'); // for IE + cc.setAttribute(className, 'pfc_chat'); // Element.addClassName(cc, 'pfc_chat'); cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) @@ -151,16 +146,15 @@ }, getOnlineContentFromTabId: function(tabid) { + var className = (! is_ie) ? 'class' : 'className'; + // return the online content if it exists var oc = this.onlinecontent[tabid]; if (oc) return oc; oc = document.createElement('div'); oc.setAttribute('id', 'pfc_online_'+tabid); - if (! is_ie) - oc.setAttribute('class', 'pfc_online'); - else - oc.setAttribute('className', 'pfc_online'); // for IE + oc.setAttribute(className, 'pfc_online'); //Element.addClassName(oc, 'pfc_online'); // I set the border style here because seting it in the CSS is not taken in account // oc.style.borderLeft = "1px solid #555"; @@ -211,6 +205,8 @@ createTab: function(name, tabid, type) { + var className = (! is_ie) ? 'class' : 'className'; + // do not create empty tabs if(name == '') return; if(tabid == '') return; @@ -234,10 +230,7 @@ li_title.appendChild(li_div); var a1 = document.createElement('a'); - if (! is_ie) - a1.setAttribute('class', 'pfc_tabtitle'); - else - a1.setAttribute('className', 'pfc_tabtitle'); // for IE + a1.setAttribute(className, 'pfc_tabtitle'); a1.setAttribute('href', '#'); a1.pfc_tabid = tabid; a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;} @@ -273,10 +266,7 @@ } a2.alt = pfc.res.getLabel('Close this tab'); a2.title = a2.alt; - if (! is_ie) - a2.setAttribute('class', 'pfc_tabclose'); - else - a2.setAttribute('className', 'pfc_tabclose'); // for IE + a2.setAttribute(className, 'pfc_tabclose'); var img = document.createElement('img'); img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif')); a2.appendChild(img); @@ -286,10 +276,7 @@ var div_content = document.createElement('div'); div_content.setAttribute('id', 'pfc_channel_content'+tabid); // Element.addClassName(div_content, 'pfc_content'); - if (! is_ie) - div_content.setAttribute('class', 'pfc_content'); - else - div_content.setAttribute('className', 'pfc_content'); // for IE + div_content.setAttribute(className, 'pfc_content'); div_content.style.display = 'none'; var div_chat = this.getChatContentFromTabId(tabid); @@ -346,6 +333,8 @@ */ notifyTab: function(tabid) { + var className = (! is_ie) ? 'class' : 'className'; + // first of all be sure the tab highlighting is cleared this.unnotifyTab(tabid); @@ -368,17 +357,11 @@ { if (div.blinkstat == true) { - if (! is_ie) - div.setAttribute('class', 'pfc_tabblink1'); - else - div.setAttribute('className', 'pfc_tabblink1'); // for IE + div.setAttribute(className, 'pfc_tabblink1'); } else { - if (! is_ie) - div.setAttribute('class', 'pfc_tabblink2'); - else - div.setAttribute('className', 'pfc_tabblink2'); // for IE + div.setAttribute(className, 'pfc_tabblink2'); } div.blinkstat = !div.blinkstat; div.blinktimeout = setTimeout('pfc.gui.notifyTab(\''+tabid+'\');', 500); @@ -390,6 +373,8 @@ */ unnotifyTab: function(tabid) { + var className = (! is_ie) ? 'class' : 'className'; + var tabpos = indexOf(this.tabids, tabid); var tabtype = this.tabtypes[tabpos]; @@ -407,10 +392,7 @@ var div = $('pfc_tabdiv'+tabid); if (div) { - if (! is_ie) - div.removeAttribute('class'); - else - div.removeAttribute('className'); // for IE + div.removeAttribute(className); clearTimeout(div.blinktimeout); } }, @@ -444,6 +426,8 @@ loadBBCodeColorList: function() { + var className = (! is_ie) ? 'class' : 'className'; + // color list var clist = $('pfc_colorlist'); var clist_v = pfc_bbcode_color_list; @@ -452,10 +436,7 @@ var bbc = clist_v[i]; var elt = document.createElement('img'); elt.bbc = bbc; - if (! is_ie) - elt.setAttribute('class', 'pfc_color'); - else - elt.setAttribute('className', 'pfc_color'); // for IE + elt.setAttribute(className, 'pfc_color'); elt.setAttribute('id', 'pfc_color_'+bbc); elt.style.backgroundColor = '#'+bbc; elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif')); Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-31 01:32:18 UTC (rev 1170) @@ -1,5 +1,7 @@ pfcClient.prototype.buildNickItem = function(nickid) { + var className = (! is_ie) ? 'class' : 'className'; + var nick = this.getUserMeta(nickid, 'nick'); var isadmin = this.getUserMeta(nickid, 'isadmin'); if (isadmin == '') isadmin = false; @@ -25,27 +27,20 @@ */ li.appendChild(a); - var img = document.createElement('img'); if (isadmin) img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); else img.setAttribute('src', this.res.getFileUrl('images/user.gif')); img.style.marginRight = '5px'; - if (! is_ie) - img.setAttribute('class', 'pfc_nickbutton'); - else - img.setAttribute('className', 'pfc_nickbutton'); // for IE + img.setAttribute(className, 'pfc_nickbutton'); a.appendChild(img); // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule var nobr = document.createElement('nobr'); var span = document.createElement('span'); - if (! is_ie) - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); - else - span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE + span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid); span.appendChild(document.createTextNode(nick)); nobr.appendChild(span); a.appendChild(nobr); Modified: trunk/demo/demo50_data/mytheme/customize.js.php =================================================================== --- trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169) +++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-31 01:32:18 UTC (rev 1170) @@ -1,26 +1,19 @@ pfcClient.prototype.updateNickWhoisBox = function(nickid) { + var className = (! is_ie) ? 'class' : 'className'; + var usermeta = this.getAllUserMeta(nickid); var div = document.createElement('div'); - if (! is_ie) - div.setAttribute('class', 'pfc_nickwhois'); - else - div.setAttribute('className', 'pfc_nickwhois'); // for IE + div.setAttribute(className, 'pfc_nickwhois'); var p = document.createElement('p'); - if (! is_ie) - p.setAttribute('class', 'pfc_nickwhois_header'); - else - p.setAttribute('className', 'pfc_nickwhois_header'); // for IE + p.setAttribute(className, 'pfc_nickwhois_header'); div.appendChild(p); // add the close button var img = document.createElement('img'); - if (! is_ie) - img.setAttribute('class', 'pfc_nickwhois_close'); - else - img.setAttribute('className', 'pfc_nickwhois_close'); // for IE + img.setAttribute(className, 'pfc_nickwhois_close'); img.pfc_parent = div; img.onclick = function(evt){ this.pfc_parent.style.display = 'none'; @@ -52,15 +45,9 @@ { var tr = document.createElement('tr'); var td1 = document.createElement('td'); - if (! is_ie) - td1.setAttribute('class', 'pfc_nickwhois_c1'); - else - td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE + td1.setAttribute(className, 'pfc_nickwhois_c1'); var td2 = document.createElement('td'); - if (! is_ie) - td2.setAttribute('class', 'pfc_nickwhois_c2'); - else - td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE + td2.setAttribute(className, 'pfc_nickwhois_c2'); td1.appendChild(document.createTextNode(k)); td2.appendChild(document.createTextNode(v)); tr.appendChild(td1); @@ -75,10 +62,7 @@ { var img = document.createElement('img'); img.setAttribute('src',this.getUserMeta(nickid,'avatar')); - if (! is_ie) - img.setAttribute('class', 'pfc_nickwhois_avatar'); - else - img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE + img.setAttribute(className, 'pfc_nickwhois_avatar'); div.appendChild(img); } @@ -86,10 +70,7 @@ if (pfc.getUserMeta(nickid,'nick') != this.nickname) { var p = document.createElement('p'); - if (! is_ie) - p.setAttribute('class', 'pfc_nickwhois_pv'); - else - p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE + p.setAttribute(className, 'pfc_nickwhois_pv'); var a = document.createElement('a'); a.setAttribute('href', ''); a.pfc_nickid = nickid; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gpi...@us...> - 2007-09-03 14:16:10
|
Revision: 1176 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1176&view=rev Author: gpinzone Date: 2007-09-03 07:16:03 -0700 (Mon, 03 Sep 2007) Log Message: ----------- Fixed spelling and grammar. Modified Paths: -------------- trunk/misc/generate-doc.inc.php trunk/src/pfcglobalconfig.class.php Modified: trunk/misc/generate-doc.inc.php =================================================================== --- trunk/misc/generate-doc.inc.php 2007-09-02 18:07:59 UTC (rev 1175) +++ trunk/misc/generate-doc.inc.php 2007-09-03 14:16:03 UTC (rev 1176) @@ -2,7 +2,7 @@ /** * This script is used to parse the parameter descriptions in pfcglobalconfig.class.php - * So that the official doc is keept up to date. + * in order to keep the official documentation up to date. */ function pfc_generate_doc($f = NULL) { Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-09-02 18:07:59 UTC (rev 1175) +++ trunk/src/pfcglobalconfig.class.php 2007-09-03 14:16:03 UTC (rev 1176) @@ -44,7 +44,7 @@ /** * <p>Used to translate the chat text and messages. Accepted values are the <code>i18n/</code> sub directories names. - * (by default this is the local server language)</p> + * (By default, this is the local server language.)</p> */ var $language = ''; @@ -53,7 +53,7 @@ * This is really useful when the Web page embedding the chat is not UTF-8 encoded. * This parameter should be the same as the chat web page. * Could be ISO-8859-1 or anything else but it must be supported by iconv php module. - * ( UTF-8 by default )</p> + * (Default value: UTF-8)</p> */ var $output_encoding = 'UTF-8'; @@ -63,34 +63,34 @@ * <p>Warning : Nicknames must be encoded in UTF-8. * For example, if you get nicks from a databases where they are ISO-8859-1 encoded, * you must convert it: <code>$params["nick"] = iconv("ISO-8859-1", "UTF-8", $bdd_nickname);</code> - * (of course, change the <code>$bdd_nickname</code> parameter for your needs)</p> - * <p>("" value by default - means users must choose a nickname when s/he connects)</p> + * (Of course, change the <code>$bdd_nickname</code> parameter for your needs.)</p> + * <p>(Default value: "" - means users must choose a nickname when s/he connects.)</p> */ var $nick = ""; /** * <p>This is the maximum nickname length, a longer nickname is forbidden. - * ( 15 characters by default)</p> + * (Default value: 15)</p> */ var $max_nick_len = 15; /** * <p>Setting this to true will forbid the user to change his/her nickname later. - * (false value by default)</p> + * (Default value: false)</p> */ var $frozen_nick = false; /** * <p>Contains some extra data (metadata) about the user that can be used to customize the display. - * For example: the user's gender, age, real name ... can be setup in order to display it in the user's info box. + * For example: the user's gender, age, real name, etc. can be setup in order to display it in the user's info box. * A example for gender is : <code>$params["nickmeta"] = array('gender'=>'f');</code> - * (by default, the array is empty)</p> + * (Default value: empty array)</p> */ var $nickmeta = array(); /** * <p>Can be used to set user metadata that is only visible to admins. - * (by default, <code>array('ip')</code> means that the user's IP address is shown to admins only)</p> + * (Default value: <code>array('ip')</code> - means that the user's IP address is shown to admins only)</p> */ var $nickmeta_private = array('ip'); @@ -98,58 +98,59 @@ * <p>Set this parameter to true if you want to give admin rights to the connected user. * Attention : if you don't use any external registration system, all your users will be admins. * You have to test current user rights before setting this parameter to true. - * (default value is false)</p> + * (Default value: false)</p> */ var $isadmin = false; /** * <p>This parameter contains a list of key/value that identify admin access. * The keys are the nicknames and the values are the corresponding passwords. - * (by default, the admin/nopassword account is available, don't forget to change it)</p> + * Note: The "isadmin" parameter does not depend on this variable. + * (Default value: No admin/password accounts are available. Don't forget to change it.)</p> */ var $admins = array("admin" => ""); /** * <p>When this parameter is true, it gives admin rights to the first connected user on the server. - * (default value is false)</p> + * (Default value: false)</p> */ var $firstisadmin = false; /** * <p>Used to change the chat title that is visible just above the messages list. - * ("My Chat" by default)</p> + * (Default value: "My Chat")</p> */ var $title = ''; /** * <p>Used to create default rooms (auto-joined at startup). It contains an array of rooms names. - * (by default, only one room is created named "My room")</p> + * (Default value: one room is created named "My room")</p> */ var $channels = array(); /** * <p>This parameter can be used to restrict channels to users. * If the array is empty, it allows users to create their own channels. - * (by default, it's empty)</p> + * (Default value: empty array)</p> */ var $frozen_channels = array(); /** * <p>The maximum number of allowed channels for each user. - * (10 by default)</p> + * (Default value: 10)</p> */ var $max_channels = 10; /** * <p>This array contains the nicknames list you want to initiate a private message at chat loading. * Of course, the listed nicknames should be online or it will just be ignored. - * (by default, the array is empty)</p> + * (Default value: empty array)</p> */ var $privmsg = array(); /** * <p>This is the maximum number of private message allowed at the same time for one user. - * (5 by default)</p> + * (Default value: 5)</p> */ var $max_privmsg = 5; @@ -157,7 +158,7 @@ * <p>This is the time to wait between two refreshes. * A refresh is an HTTP request which asks the server if there are new messages to display. * If there are no new messages, then an empty HTTP response is returned. - * ( 5000 by default, 5000ms = 5s)</p> + * (Default value: 5000 - 5,000ms = 5 seconds)</p> */ var $refresh_delay = 5000; @@ -165,29 +166,29 @@ * <p>Indicate the maximum number of seconds to wait before the server response. * If the latest refresh command is not received in this delay an other one will be created. * This parameter is not implemented in the current version of phpfreechat. - * (by default 60000ms, it means 60 seconds)</p> + * (Default value: 60000 - 60,000ms = 60 seconds)</p> */ - var $max_refresh_delay = 60000; // in mili-seconds (60 seconds) + var $max_refresh_delay = 60000; /** * <p>This is the time of inactivity to wait before a user is disconnected (in milliseconds). * A user is inactive only if s/he closed his/her chat window. * A user with an open chat window is not inactive because s/he sends each <code>refresh_delay</code> an HTTP request. - * ( 20000 by default, 20000ms = 20s)</p> + * (Default value: 20000 - 20000ms = 20 seconds)</p> */ var $timeout = 20000; /** * When this parameter is true, all the chatters will be redirected * to the url indicated by the <code>lockurl</code> parameter. - * (false by default)</p> + * (Default value: false)</p> */ var $islocked = false; /** * This url is used when <code>islocked</code> parameter is true. * The users will be redirected (http redirect) to this url. - * (by default, it is http://www.phpfreechat.net) + * (Default value: http://www.phpfreechat.net) */ var $lockurl = 'http://www.phpfreechat.net'; @@ -196,7 +197,7 @@ * For example: append 'censor' to the list to disable words censoring. * The list of system proxies can be found in src/proxies/. * Attention: 'checktimeout' and 'checknickchange' proxies should not be disabled or the chat will not work anymore. - * (by default no proxy will be skiped)</p> + * (Default value: empty array - no proxies will be skipped)</p> */ var $skip_proxies = array(); @@ -204,14 +205,14 @@ * <p>This array contains the proxies that will be handled just before to process a command * and just after the system proxies. * You can use this array to execute your own proxy. - * (by default empty array)</p> + * (Default value: empty array)</p> */ var $post_proxies = array(); /** * <p>This array ocntains the proxies that will be handled just before system proxies. * You can use this array to execute your own proxy. - * (by default empty array)</p> + * (Default value: empty array)</p> */ var $pre_proxies = array(); @@ -230,7 +231,7 @@ /** * <p>A custom proxies path. Used to easily plugin your own proxy to the chat without modifying the code. - * (by default empty path)</p> + * (Default value: empty path)</p> */ var $proxies_path = ''; @@ -238,17 +239,17 @@ * <p>Contains the default proxies location. * Do not change this parameter if you don't know what you are doing. * If you try to add your own proxy, check the <code>proxies_path</code> parameter. - * (by default <code>dirname(__FILE__).'/proxies'</code>)</p> + * (Default value: <code>dirname(__FILE__).'/proxies'</code>)</p> */ var $proxies_path_default = ''; /** - * <p>This parameter indicate your own commands directory location. + * <p>This parameter indicates your own commands directory location. * The chat uses commands to communicate between client and server. * As an example, when a message is sent, the <code>/send your message</code> command is used, - * when a nickname is changed the <code>/nick newnickname</code> command is used. - * To create a new command you have to write it and indicate in this parameter where it is located. - * (by default empty string, taht means no custom command path is used)</p> + * when a nickname is changed, the <code>/nick newnickname</code> command is used. + * To create a new command, you have to write it and indicate in this parameter where it is located. + * (Default value: empty string - means no custom command path is used)</p> */ var $cmd_path = ''; @@ -256,37 +257,37 @@ * <p>Contains the default command path used by the system. * Do not change this parameter if you don't know what you are doing. * If you try to add your own command, check the <code>cmd_path</code> parameter. - * (by default <code>dirname(__FILE__).'/commands'</code>)</p> + * (Default value: <code>dirname(__FILE__).'/commands'</code>)</p> */ var $cmd_path_default = ''; /** - * <p>This is the maximum message length. A longer message is forbidden. - * (400 characters by default)</p> + * <p>This is the maximum message length in characters. A longer message is forbidden. + * (Default value: 400)</p> */ var $max_text_len = 400; /** - * <p>This is the number of messages keept in the history. + * <p>This is the number of messages kept in the history. * This is what you see when you reload the chat. * The number of messages s/he can see is defined by this parameter. - * (20 lines by default)</p> + * (Default value: 20</p> */ var $max_msg = 20; /** - * <p>It is the maximum number of displayed lines in the window. + * <p>The maximum number of lines displayed in the window. * Old lines will be deleted to save browser's memory on clients. - * (by default 150 lines are keept)</p> + * Default value: 150)</p> */ var $max_displayed_lines = 150; /** * <p>Setting this to true will send a <code>/quit</code> command when the user closes his/her window. - * (doesn't work on Firefox). + * (NOTE: Doesn't work on Firefox). * This parameter isn't true by default because on IE and Konqueror/Safari, * reloading the window (F5) will generate the same event as closing the window which can be annoying. - * (false value by default)</p> + * (Default value: false)</p> */ var $quit_on_closedwindow = true; @@ -294,26 +295,25 @@ * <p>Setting this to true will give the focus to the input text box when connecting to the chat. * It can be useful not to touch the focus when integrating the chat into an existing website * because when the focus is changed, the viewport follows the focus location. - * (true value by default)</p> + * (Default value: true)</p> */ var $focus_on_connect = true; /** * <p>Setting this to false will oblige user to click on the connect button if s/he wants to chat. - * (true value by default means when the chat web page is open, - * a connection to the chat is automaticaly performed)</p> + * (Default value: true - a connection to the chat is automaticaly performed)</p> */ var $connect_at_startup = true; /** * <p>Setting it to true will start the chat minimized. - * (false value by default)</p> + * (Default value: false)</p> */ var $start_minimized = false; /** * <p>Height of the chat area. - * ("440px" by default)</p> + * (Default value: "440px")</p> */ var $height = "440px"; @@ -322,53 +322,52 @@ * <li>Setting it to 1 will show nicknames changes.</li> * <li>Setting it to 2 will show connect/disconnect notifications.</li> * <li>Setting it to 3 (1+2) will show nicknames and connect/disconnect notifications.</li></ul> - * (3 by default)</p> + * (Default value: 3)</p> */ var $shownotice = 3; /** * <p>Setting it to false will disable nickname colorization. - * (true value by default)</p> + * (Default value: true)</p> **/ var $nickmarker = true; /** * <p>Setting it to false will hide the date/hour column. - * (true value by default)</p> + * (Default value: true)</p> */ var $clock = true; /** * <p>Setting it to false will start the chat without sound notifications. - * (true by default)</p> + * (Default value: true)</p> */ var $startwithsound = true; /** - * <p>Setting it to true will add the <code>target="_blank"</code> into parsed links. - * This attribute can be used to open the followed link in a new window. - * (true value by default)</p> + * <p>Setting it to true will open all links in a new window. + * (Default value: true)</p> */ var $openlinknewwindow = true; /** - * <p>Seting it to false will disable the window title nofitifaction. + * <p>Setting it to false will disable the window title notification. * When a message is received and this parameter is true, the window title is modified with <code>[n]</code> * (n is the number of new posted messages). - * (true by default)</p> + * (Default value: true)</p> */ var $notify_window = true; /** - * <p>Setting it to true will shortens long urls entered by users in the chat area. - * (true by default)</p> + * <p>Setting it to true will shorten long URLs entered by users in the chat area. + * (Default value: true)</p> */ var $short_url = true; /** - * <p>Final width of the shortened url. - * This parameter is taken into accound only when <code>short_url</code> is true. - * (40 by default)</p> + * <p>Final width of the shortened URL in characters. (This includes the elipsis on shortened URLs.) + * This parameter is taken into account only when <code>short_url</code> is true. + * (Default value: 40)</p> */ var $short_url_width = 40; @@ -376,49 +375,49 @@ * <p>Used to hide the phpfreechat linkback logo. * Be sure that you are conform to the <a href="http://www.phpfreechat.net/license.en.html">license page</a> * before setting this to false! - * (true by default)</p> + * (Default value: true)</p> */ var $display_pfc_logo = true; /** * <p>Used to show/hide the images in the channels and pv tabs. - * (true by default)</p> + * (Default value: true)</p> */ var $displaytabimage = true; /** * <p>Used to show/hide the close button in the channels tabs. - * (true by default)</p> + * (Default value: true)</p> */ var $displaytabclosebutton = true; /** * <p>Used to show/hide online users list at startup. - * (true value by default)</p> + * (Default value: true)</p> */ var $showwhosonline = true; /** * <p>Used to show/hide the smiley selector at startup. - * (true value by default)</p> + * (Default value: true)</p> */ var $showsmileys = true; /** * <p>Used to show/hide the showwhosonline button. - * (true value by default)</p> + * (Default value: true)</p> */ var $btn_sh_whosonline = true; /** * <p>Used to show/hide the showsmileys button. - * (true value by default)</p> + * (Default value: true)</p> */ var $btn_sh_smileys = true; /** * <p>This is the list of colors that will appears into the bbcode palette. - * (by default it contains a list of basic colors: '#FFFFFF', '#000000', ...)</p> + * (Default value: contains an array of basic colors: '#FFFFFF', '#000000', ...)</p> */ var $bbcode_colorlist = array('#FFFFFF', '#000000', @@ -439,7 +438,7 @@ /** * <p>This is the list of colors that will be used to automaticaly and randomly colorize the nicknames in the chat. - * (by default it contains a list of basic colors: '#CCCCCC','#000000')</p> + * (Default value: contains an array of basic colors: '#CCCCCC','#000000')</p> */ var $nickname_colorlist = array('#CCCCCC', '#000000', @@ -462,7 +461,7 @@ * <p>This parameter specifies which theme the chat will use. * A theme is a package that makes it possible to completly change the chat appearance (CSS) and the chat dynamics (JS) * You can find official themes in the <code>themes/</code> directory on your local phpfreechat distribution. - * ('default' by default)</p> + * (Default value: 'default')</p> */ var $theme = 'default'; @@ -478,7 +477,7 @@ * It will be used by the browser to load theme resources : images, css, js. * If this parameter is not indicated, the themes will be copied to <code>data_public_path/themes</code> * and this parameter value will be set to <code>data_public_url/theme</code>. - * (empty by default)</p> + * (Default value: '')</p> */ var $theme_url = ''; @@ -486,7 +485,7 @@ * <p>Indicate where the official pfc default theme is located. * Do not change this parameter if you don't know what you are doing. * If you try to add your own theme, check the <code>theme_path</code> parameter. - * (<code>dirname(__FILE__).'/../themes'</code> by default)</p> + * (Default value: '' - empty string means <code>dirname(__FILE__).'/../themes'</code> is used automatically)</p> */ var $theme_default_path = ''; @@ -494,7 +493,7 @@ * <p>This url indicates the <code>theme_default_path</code> location. * Do not change this parameter if you don't know what you are doing. * If you try to add your own theme, check the <code>theme_path</code> parameter. - * (by default the theme is copied into <code>data_public_path/themes</code> + * (Default value: the theme is copied into <code>data_public_path/themes</code> * and this parameter will be set to <code>data_public_url/theme</code>)</p> */ var $theme_default_url = ''; @@ -502,30 +501,30 @@ /** * <p>Used to specify the chat container (chat database). * Accepted containers are : File and Mysql (maybe others in the future). - * ("File" by default)</p> + * (Default value: 'File')</p> */ var $container_type = 'File'; /** * <p>Used to specify the script that will handle asynchronous requests. * Very useful when the chat (client) script is resource consuming (ex: forum or portal chat integration). - * (by default this parameters is calculated automaticaly)</p> + * (Default value: '' - means this parameter is automatically calculated)</p> */ var $server_script_path = ''; /** * <p>This url indicates the <code>server_script_path</code>. - * It will be used to do AJAX requests from the browser. So this url should be a browsable public url. - * This parameter is useful when using url rewriting because basic auto-calculation will certainly fail. - * (by default this parameters is automaticaly calculated)</p> + * It will be used to do AJAX requests from the browser. Therefore, this URL should be a browsable public url. + * This parameter is useful when using URL rewriting because basic auto-calculation will fail. + * (Default value: '' - means this parameter is automatically calculated)</p> */ var $server_script_url = ''; /** * <p>Used to specify the script path which first displays the chat. - * This path will be used to calculate relatives paths for resources : javascript lib and images. - * Useful when the php configuration is uncommon, this option can be used to force the automatic detection process. - * (by default this parameters is auto-detected)</p> + * This path will be used to calculate relatives paths for resources: javascript lib and images. + * Useful when the php configuration is uncommon. This option can be used to force the automatic detection process. + * (Default value: '' - means this parameter is automatically calculated)</p> */ var $client_script_path = ''; @@ -533,54 +532,54 @@ * <p>Used to store private data like cache, logs and chat history. * Tip: you can optimize your chat performances, * see <a href="http://www.phpfreechat.net/faq.en.html#tmpfs">this FAQ entry</a>. - * (<code>dirname(__FILE__)."/../data/private"</code> by default)</p> + * (Default value: '' - means <code>dirname(__FILE__)."/../data/private"</code> is used automatically)</p> */ var $data_private_path = ''; /** * This path must be reachable by your web server. * Javascript and every resources (theme) files will be stored here. - * (dirname(__FILE__)."/../data/public" by default) + * (Default value: '' - means dirname(__FILE__)."/../data/public" is used automatically) */ var $data_public_path = ''; /** - * This url should link to the <code>data_private_path</code> directory. - * So that the clients browsers will be able to load needed javascript files and theme resources. + * This URL should link to the <code>data_private_path</code> directory so that + * the clients' browsers will be able to load needed javascript files and theme resources. * It can be useful when url rewriting is done on the server. - * (by default this parameters is calculated automaticaly from <code>data_private_path</code>) + * (Default value: '' - means this parameter is automatically calculated from <code>data_private_path</code>) */ var $data_public_url = ''; /** - * <p>This is the prototype javascript library url. + * <p>This is the prototype javascript library URL. * Use this parameter to use your external library. - * (default is <code>data/js/prototype.js</code>)</p> + * (Default value: '' - means <code>data/js/prototype.js</code> is used automatically)</p> */ - var $prototypejs_url = ''; + var $prototypejs_url = ''; /** * <p>When debug is true, some traces will be shown on the chat clients - * (default is false)</p> + * (Default value: false)</p> */ var $debug = false; /** * <p>Can be used to setup the chat time zone. * It is the difference in seconds between chat clock and server clock. - * (0 by default)</p> + * (Default value: 0)</p> */ var $time_offset = 0; /** * <p>How to display the dates in the chat. - * (<code>'d/m/Y'</code> by default)</p> + * (Default value: <code>'d/m/Y'</code>)</p> */ var $date_format = 'd/m/Y'; /** * <p>How to display the time in the chat - * (<code>'H:i:s'</code> by default)</p> + * (Default value: <code>'H:i:s'</code>)</p> */ var $time_format = 'H:i:s'; @@ -589,7 +588,7 @@ * forwards client ip address in HTTP_X_FORWARDED_FOR http header. * Some discutions about this parameter are available * on <a href="http://www.phpfreechat.net/forum/viewtopic.php?id=1344">the forum</a>. - * (default value is false)</p> + * (Default value: false)</p> */ var $get_ip_from_xforwardedfor = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gpi...@us...> - 2007-09-04 13:57:17
|
Revision: 1146 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1146&view=rev Author: gpinzone Date: 2007-08-26 09:23:20 -0700 (Sun, 26 Aug 2007) Log Message: ----------- Added JavaScript to remove auto-linked entries from PHP, if desired. Currently never used. Restored double-space to " " JavaScript that was erroneously commented out. Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/pfcurlprocessing.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-08-24 15:13:24 UTC (rev 1145) +++ trunk/data/public/js/pfcclient.js 2007-08-26 16:23:20 UTC (rev 1146) @@ -1424,11 +1424,21 @@ replace = replace + '>$2</a>$3'; msg = msg.replace(rx_url, replace); } - +*/ + + // Remove auto-linked entries. + if ( false ) + { + rx = new RegExp('<a href="mailto:(.*?)".*?>.*?<\/a>','ig'); + msg = msg.replace(rx, '$1'); + rx = new RegExp('<a href="(.*?)".*?>.*?<\/a>','ig'); + msg = msg.replace(rx, '$1'); + } + // replace double spaces by entity rx = new RegExp(' ','g'); msg = msg.replace(rx, ' '); -*/ + // try to parse bbcode rx = new RegExp('\\[b\\](.+?)\\[\/b\\]','ig'); msg = msg.replace(rx, '<span style="font-weight: bold">$1</span>'); Modified: trunk/src/pfcurlprocessing.php =================================================================== --- trunk/src/pfcurlprocessing.php 2007-08-24 15:13:24 UTC (rev 1145) +++ trunk/src/pfcurlprocessing.php 2007-08-26 16:23:20 UTC (rev 1146) @@ -62,8 +62,8 @@ */ function pfc_undo_make_hyperlink($text) { - $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text); - $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text); + $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\".*?>.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text); + $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\".*?>.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text); return $text; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-09-06 15:40:35
|
Revision: 1180 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1180&view=rev Author: kerphi Date: 2007-09-06 08:39:43 -0700 (Thu, 06 Sep 2007) Log Message: ----------- New display_ping parameter used to show/hide the ping information near the phpfreechat linkback logo Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.html.tpl.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-09-06 15:18:01 UTC (rev 1179) +++ trunk/data/public/js/pfcclient.js 2007-09-06 15:39:43 UTC (rev 1180) @@ -196,7 +196,7 @@ // calculate the ping and display it this.ping = this.last_response_time - this.last_request_time; - $('pfc_ping').innerHTML = this.ping+'ms'; + if ($('pfc_ping')) $('pfc_ping').innerHTML = this.ping+'ms'; if (cmd == "connect") { Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-09-06 15:18:01 UTC (rev 1179) +++ trunk/src/pfcglobalconfig.class.php 2007-09-06 15:39:43 UTC (rev 1180) @@ -370,6 +370,14 @@ * (Default value: 40)</p> */ var $short_url_width = 40; + + /** + * <p>Used to show/hide the ping information near the phpfreechat linkback logo. + * The ping is the time between a client request and a server response. + * More the ping is low, faster the chat is responding. + * (Default value: true)</p> + */ + var $display_ping = true; /** * <p>Used to hide the phpfreechat linkback logo. Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-09-06 15:18:01 UTC (rev 1179) +++ trunk/themes/default/chat.html.tpl.php 2007-09-06 15:39:43 UTC (rev 1180) @@ -49,7 +49,10 @@ title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> <?php } ?> + +<?php if ($display_ping) { ?> <span id="pfc_ping" title="<?php echo _pfc("Ping"); ?>"></span> +<?php } ?> <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-09-07 17:28:28
|
Revision: 1185 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1185&view=rev Author: kerphi Date: 2007-09-07 09:43:34 -0700 (Fri, 07 Sep 2007) Log Message: ----------- - remove the unused max_refresh_delay parameter - simplify the ajax request handling Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-09-07 15:06:54 UTC (rev 1184) +++ trunk/data/public/js/pfcclient.js 2007-09-07 16:43:34 UTC (rev 1185) @@ -44,7 +44,6 @@ this.timeout = null; this.refresh_delay = pfc_refresh_delay; - this.max_refresh_delay = pfc_max_refresh_delay; this.last_response_time = new Date().getTime(); this.last_request_time = new Date().getTime(); @@ -191,13 +190,6 @@ trace('handleResponse: '+cmd + "-"+resp+"-"+param); } - // store the new refresh time - this.last_response_time = new Date().getTime(); - - // calculate the ping and display it - this.ping = this.last_response_time - this.last_request_time; - if ($('pfc_ping')) $('pfc_ping').innerHTML = this.ping+'ms'; - if (cmd == "connect") { if (resp == "ok") @@ -1027,6 +1019,9 @@ */ sendRequest: function(cmd, recipientid) { + // do not send another ajax requests if the last one is not yet finished + if (cmd == '/update' && this.pfc_ajax_connected) return; + if (cmd != "/update") { // setup a new timeout to update the chat in 5 seconds (in refresh_delay more exactly) @@ -1036,12 +1031,42 @@ if (pfc_debug) trace('sendRequest: '+cmd); } - - this.last_request_time = new Date().getTime(); + + // prepare the command string var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); if (!recipientid) recipientid = this.gui.getTabId(); cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); - return pfc_handleRequest(cmd); //eval('pfc_handleRequest(cmd);'); + + // send the real ajax request + var url = pfc_server_script_url; + var params = $H(); + params['pfc_ajax'] = 1; + params['f'] = 'handleRequest'; + params['cmd'] = cmd; + new Ajax.Request(url, { + method: 'post', + parameters: params, + onCreate: function(transport) { + this.pfc_ajax_connected = true; + // request time counter used by ping indicator + this.last_request_time = new Date().getTime(); + }.bind(this), + onSuccess: function(transport) { + if (!transport.status) return; // fix strange behavior on KHTML + + // request time counter used by ping indicator + this.last_response_time = new Date().getTime(); + // evaluate the javascript response + eval( transport.responseText ); + }.bind(this), + onComplete: function(transport) { + this.pfc_ajax_connected = false; + + // calculate the ping and display it + this.ping = Math.abs(this.last_response_time - this.last_request_time); + if ($('pfc_ping')) $('pfc_ping').innerHTML = this.ping+'ms'; + }.bind(this) + }); }, /** Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-09-07 15:06:54 UTC (rev 1184) +++ trunk/src/pfcglobalconfig.class.php 2007-09-07 16:43:34 UTC (rev 1185) @@ -161,14 +161,6 @@ * (Default value: 5000 - 5,000ms = 5 seconds)</p> */ var $refresh_delay = 5000; - - /** - * <p>Indicate the maximum number of seconds to wait before the server response. - * If the latest refresh command is not received in this delay an other one will be created. - * This parameter is not implemented in the current version of phpfreechat. - * (Default value: 60000 - 60,000ms = 60 seconds)</p> - */ - var $max_refresh_delay = 60000; /** * <p>This is the time of inactivity to wait before a user is disconnected (in milliseconds). Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-09-07 15:06:54 UTC (rev 1184) +++ trunk/themes/default/chat.js.tpl.php 2007-09-07 16:43:34 UTC (rev 1185) @@ -24,7 +24,6 @@ var pfc_clientid = <?php echo $json->encode(md5(uniqid(rand(), true))); ?>; var pfc_title = <?php echo $json->encode($title); ?>; var pfc_refresh_delay = <?php echo $json->encode($refresh_delay); ?>; -var pfc_max_refresh_delay = <?php echo $json->encode($max_refresh_delay); ?>; var pfc_start_minimized = <?php echo $json->encode($start_minimized); ?>; var pfc_nickmarker = <?php echo $json->encode($nickmarker); ?>; var pfc_clock = <?php echo $json->encode($clock); ?>; @@ -51,8 +50,9 @@ var pfc_nickname_color_list = <?php echo $json->encode($nickname_colorlist); ?>; var pfc_theme = <?php echo $json->encode($theme); ?>; var pfc_isready = false; +var pfc_server_script_url = <?php echo $json->encode($c->server_script_url); ?>; -/* prototype ajax config */ +// todo : move this code in pfcClient function pfc_loadChat() { var url = '<?php echo $c->server_script_url; ?>'; var params = $H(); @@ -66,22 +66,7 @@ } }); } -function pfc_handleRequest(cmd) { - var url = '<?php echo $c->server_script_url; ?>'; - var params = $H(); - params['pfc_ajax'] = 1; - params['f'] = 'handleRequest'; - params['cmd'] = cmd; - new Ajax.Request(url, { - method: 'get', - parameters: params, - onSuccess: function(transport) { - eval( transport.responseText ); - } - }); -} - window.onload = function () { pfc = new pfcClient(); if (pfc_isready) pfc_loadChat(pfc_theme); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-09-20 08:06:53
|
Revision: 1189 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1189&view=rev Author: kerphi Date: 2007-09-20 01:06:56 -0700 (Thu, 20 Sep 2007) Log Message: ----------- new logo Modified Paths: -------------- trunk/style/logo_88x31.gif trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php Modified: trunk/style/logo_88x31.gif =================================================================== (Binary files differ) Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-09-20 08:06:25 UTC (rev 1188) +++ trunk/themes/default/chat.html.tpl.php 2007-09-20 08:06:56 UTC (rev 1189) @@ -44,7 +44,7 @@ <?php if ($display_pfc_logo) { ?> <a href="http://www.phpfreechat.net" id="pfc_logo"<?php if($openlinknewwindow) echo ' onclick="window.open(this.href,\'_blank\');return false;"'; ?>> - <img src="http://www.phpfreechat.net/pub/logo_80x15.gif" + <img src="http://www.phpfreechat.net/pub/logo2_80x15.gif" alt="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-09-20 08:06:25 UTC (rev 1188) +++ trunk/themes/default/chat.js.tpl.php 2007-09-20 08:06:56 UTC (rev 1189) @@ -134,7 +134,7 @@ } // ]]> </script></p> -<a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +<a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo2_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> </div> <!-- pfc_notloading --> </div> <!-- pfc_loader --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-09-27 16:51:42
|
Revision: 1195 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1195&view=rev Author: kerphi Date: 2007-09-27 09:51:42 -0700 (Thu, 27 Sep 2007) Log Message: ----------- New Belgian Dutch (nl_BE) translation (thanks to Toon Van de Putte) Modified Paths: -------------- trunk/demo/index.php trunk/i18n/bg_BG/main.php trunk/src/pfci18n.class.php Added Paths: ----------- trunk/demo/demo62_in_belgian_dutch.php trunk/i18n/nl_BE/ trunk/i18n/nl_BE/main.php Added: trunk/demo/demo62_in_belgian_dutch.php =================================================================== --- trunk/demo/demo62_in_belgian_dutch.php (rev 0) +++ trunk/demo/demo62_in_belgian_dutch.php 2007-09-27 16:51:42 UTC (rev 1195) @@ -0,0 +1,36 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "nl_BE"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + + <?php $chat->printJavascript(); ?> + <?php $chat->printStyle(); ?> + + </head> + + <body> + <?php $chat->printChat(); ?> + +<?php + // print the current file + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-09-26 06:03:43 UTC (rev 1194) +++ trunk/demo/index.php 2007-09-27 16:51:42 UTC (rev 1195) @@ -127,6 +127,7 @@ <li><a href="demo59_in_norwegian_nynorsk.php">demo59 - Norwegian Nynorsk translation of the chat</a></li> <li><a href="demo60_in_vietnamese.php">demo60 - Vietnamese translation of the chat</a></li> <li><a href="demo61_in_croatian.php">demo61 - Croatian translation of the chat</a></li> + <li><a href="demo62_in_belgian_dutch.php">demo62 - Belgian Dutch translation of the chat</a></li> </ul> </div> Modified: trunk/i18n/bg_BG/main.php =================================================================== --- trunk/i18n/bg_BG/main.php 2007-09-26 06:03:43 UTC (rev 1194) +++ trunk/i18n/bg_BG/main.php 2007-09-27 16:51:42 UTC (rev 1195) @@ -401,4 +401,10 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = ""; +// line 446 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = ""; + +// line 454 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = ""; + ?> \ No newline at end of file Added: trunk/i18n/nl_BE/main.php =================================================================== --- trunk/i18n/nl_BE/main.php (rev 0) +++ trunk/i18n/nl_BE/main.php 2007-09-27 16:51:42 UTC (rev 1195) @@ -0,0 +1,412 @@ +<?php +/** + * i18n/nl_BE/main.php + * + * Copyright © 2006 Stephane Gully <ste...@gm...> + * + * Dit is vrij beschikbare software; u kunt dit verspreiden en/of + * aanpassen onder de voorwaarden van het GNU Lesser General Public + * License zoals gepubliceerd door de Free Software Foundation; zowel + * versie 2.1 van de License, of een latere versie. + * + * Deze software wordt verspreid in de hoop dat het bruikbaar is, + * maar ZONDER ENIGE GARANTIE; zonder zelfs een impliciete garantie van + * VERKOOPBAARHEID of GESCHIKHEID VOOR PARTICULIERE DOELEINDEN. Zie de GNU + * Lesser General Public License voor meer details. + * + * U heeft een kopie van de GNU Lesser General Public + * License ontvangen samen met dit programma; zoniet, schrijf dan naar de + * Free Software Foundation, 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * Nederlandse vertaling van de berichten (utf8 encoded!) + * + * @author Toon Van de Putte (gebaseerd op Robert de Ruiter) + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Mijn chat"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s niet gevonden, %s bestand niet gevonden."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Vul hier een nickname in"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Tekstvak kan niet leeg zijn"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s verandert de nickname in %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s is verbonden"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s stop"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s niet verbonden (timeout)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "Onbekende opdracht [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s bestaat niet: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Je hebt nodig %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s bestaat niet, %s bestand niet gevonden"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s bestaat niet"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s geef de directory aan"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s moet een directory zijn"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s kan niet worden gemaakt"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s kan niet worden beschreven"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s is niet leesbaar"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s is geen bestand"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s is geen directory"; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "Geen gekleurde nicknames"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Toon gekleurde nicknames"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Verbreek verbinding"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Maak contact"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Vergroot"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Verklein"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Verberg data en tijd"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Toon data en tijd"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Voer hier je bericht in"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Voer hier je nickname in"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Fout: niet-gedefinieerde of lege parameter '%s', verbeter of verwijder deze parameter"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Verberg smiley venster"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Toon smiley venster"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Verberg online venster"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Toon online venster"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Vet"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Cursief"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Onderstreept"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Verwijder"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Mail"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Kleur"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s template niet gevonden"; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Fout: '%s' kan niet worden gevonden, controleer het pad naar thema '%s' en uw thema '%s' is correct"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s moet worden geïmplementeerd"; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' parameter is verplicht bij standaard gebruik '%s' waarde"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' parameter moet een positief getal zijn"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' parameter is niet geldig. Beschikbare waarden zijn: '%s'"; + + +// line 186 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "Mijn Kamer"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "Deze parameter ontbreekt"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "verbannen uit %s door %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "De id-lijst van de verbannen gebruiker is:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "Leeg"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' maakt de verbanning van gebruiker {id} ongedaan"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' maakt alle verbanningen in dit kanaal ongedaan"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s is vertrokken (timeout)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s komt binnen in %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "gekickt uit %s door %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Kan de boodschap niet versturen, % is offline"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Geen enkele verbanning werd ongedaan gemaakt"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "% is niet langer verbannen"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s gebruikers zijn niet langer verbannen"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Je hebt geen toelating om het commando '%s' uit te voeren"; + +// line 66 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Kan niet in %s omdat je verbannen bent"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Kan niet in %s omdat de kanalenlijst beperkt is"; + +// line 89 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Je mag je nickname niet veranderen"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Niet zo veel berichten plaatsen, flooden is niet toegelaten"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "Privé-bericht"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "Sluit deze tab"; + +// line 199 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Wil je echt vertrekken uit deze kamer?"; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Fout: '%s' is een private parameter, je mag die niet veranderen"; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "'%s' parameter moet een array zijn"; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "'%s' parameter moet een boolean zijn"; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "'%s' moet een charactere string zijn"; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' moet schrijfbaar zijn"; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' directory bestaat niet"; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "Pas deze fouten aan"; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Fout: het gebufferde configuratiebestand bestaat niet"; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Error: de chat kan niet geladen worden! Twee mogelijkheden: je browser ondersteunt geen javascript of de chat staat fout ingesteld. Mail naar web...@ye..."; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "Dit is de lijst met commando's:"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "Identificatie succesvol"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "Identificatie mislukt"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Je moet verbonden zijn om een bericht te kunnen sturen"; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "Klik hier om je bericht te versturen"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "Voer de tekst in die geformatteerd moet worden"; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "Configuratie is gerehashed"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Er is een probleem opgetreden bij het rehashen"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "Die nickname is al in gebruik"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "phpfreechat versie is %s"; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Het maximum aantal kanalen dat je kan betreden is bereikt"; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Het maximum aantal privé-chats is bereikt"; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "Verzenden"; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = "Mysql container: verbindingsfout"; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Mysql container: database creatie fout"; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Mysql container: tabel creatie fout"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Je mag niet tegen jezelf praten"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = "De gekozen nickname is niet toegelaten"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Enable sound notifications"] = "Geluidsmeldingen aanzetten"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["Disable sound notifications"] = "Geluidsmeldingen uitzetten"; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = "geen reden"; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = "De lijst van verbannen gebruikers is:"; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nickname}' maakt de verbanning van gebruiker {nickname} ongedaan"; + +// line 43 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "gekickt uit %s door %s - reden: %s"; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s is vertrokken (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "Chat is bezig met inladen ..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "Even geduld"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s lijkt uitgeschakeld te zijn of wordt niet ondersteund door uw browser."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Deze web-applicatie vereist %s"; + +// line 135 in chat.js.tpl.php +$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Zet %s aan in de instellingen van je browser, of upgrade naar een browser die %s ondersteunt."; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Upgrade naar een browser die %s ondersteunt en probeer opnieuw."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "In Internet Explorer voor versie 7.0 wordt Ajax toegepast via ActiveX. Zet ActiveX aan in de veiligheidsinstellingen of upgrade naar een browser met standaard Ajax ondersteuning."; + +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s bestaat niet, data_public_path kan niet geïnstalleerd worden"; + +// line 73 in invite.class.php +$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "Je moet bij %s gaan om gebruikers in dit kanaal uit te nodigen"; + +// line 47 in chat.html.tpl.php +$GLOBALS["i18n"]["Ping"] = "Ping"; + +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "Invoer vereist"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "OK"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "Annuleren"; + +// line 430 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot create %s"] = "kan %s niet aanmaken"; + +// line 436 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot copy %s in %s"] = "kan %s niet in %s kopiëren"; + +// line 667 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "Fout: '%s' kan niet gevonden worden, kijk of je theme_path '%s' en je theme '%s' correct zijn"; + +// line 414 in phpfreechat.class.php +$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "Ben je zeker dat je deze tab wil sluiten?"; + +// line 42 in ban.class.php +$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s is verbannen uit %s door %s"; + +// line 446 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = ""; + +// line 454 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = ""; + +// line 460 in phpfreechat.class.php +$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = ""; + +// line 89 in invite.class.php +$GLOBALS["i18n"]["%s was invited by %s"] = ""; + +?> \ No newline at end of file Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2007-09-26 06:03:43 UTC (rev 1194) +++ trunk/src/pfci18n.class.php 2007-09-27 16:51:42 UTC (rev 1195) @@ -103,7 +103,7 @@ */ function GetAcceptedLanguage($type="main") { - return /*<GetAcceptedLanguage>*/array('pl_PL','pt_BR','da_DK','uk_UA','nb_NO','fr_FR','hr_HR','vi_VN','hy_AM','ru_RU','eo','en_US','es_ES','ko_KR','ba_BA','zh_TW','zh_CN','it_IT','el_GR','uk_RO','pt_PT','sr_CS','tr_TR','de_DE-informal','de_DE-formal','ja_JP','sv_SE','bn_BD','nl_NL','ar_LB','hu_HU','nn_NO','bg_BG','id_ID');/*</GetAcceptedLanguage>*/ + return /*<GetAcceptedLanguage>*/array('pl_PL','pt_BR','da_DK','uk_UA','nb_NO','fr_FR','hr_HR','vi_VN','hy_AM','ru_RU','eo','en_US','es_ES','ko_KR','nl_BE','ba_BA','zh_TW','zh_CN','it_IT','el_GR','uk_RO','pt_PT','sr_CS','tr_TR','de_DE-informal','de_DE-formal','ja_JP','sv_SE','bn_BD','nl_NL','ar_LB','hu_HU','nn_NO','bg_BG','id_ID');/*</GetAcceptedLanguage>*/ } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-04 11:59:26
|
Revision: 1206 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1206&view=rev Author: kerphi Date: 2007-11-04 03:59:29 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Add the thai translation (thanks to itshee) Modified Paths: -------------- trunk/src/pfci18n.class.php Added Paths: ----------- trunk/demo/demo63_in_thai.php trunk/i18n/th_TH/ trunk/i18n/th_TH/main.php Added: trunk/demo/demo63_in_thai.php =================================================================== --- trunk/demo/demo63_in_thai.php (rev 0) +++ trunk/demo/demo63_in_thai.php 2007-11-04 11:59:29 UTC (rev 1206) @@ -0,0 +1,32 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "th_TH"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + </head> + + <body> + <?php $chat->printChat(); ?> + +<?php + // print the current file + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> \ No newline at end of file Added: trunk/i18n/th_TH/main.php =================================================================== --- trunk/i18n/th_TH/main.php (rev 0) +++ trunk/i18n/th_TH/main.php 2007-11-04 11:59:29 UTC (rev 1206) @@ -0,0 +1,405 @@ +<?php +/** + * i18n/th_TH/main.php + * + * Copyright © 2006 Stephane Gully <ste...@gm...> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * Thai translation of the messages (utf8 encoded!) + * + * @author LMNOP at Thai Wikipedia (ma...@it...) + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "ห้องแชตของฉัน"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s ไม่พบ, %s หาไลบรารีไม่พบ"; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "กรุณาใส่ชื่อหรือนามแฝง"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "ต้องระบุ"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s เปลี่ยนชื่อเป็น %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s ถูกเชื่อมต่อ"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s ออก"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s หลุด (สัญญาณหาย)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "ไม่รู้จักคำสั่ง [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s ไม่มีอยู่: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "คุณจำเป็นต้อง %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s ไม่มีอยู่, %s ไลบรารีไม่พบ"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s ไม่มีอยู่"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s ต้องระบุไดเรกทอรี"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s ต้องเป็นไดเรกทอรี"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s ถูกสร้างไม่ได้"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s ไม่สามารถเขียนทับได้"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s ไม่สามารถอ่านได้"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s ไม่ใช่ไฟล์"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s ไม่ใช่ไดเรกทอรี"; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "ซ่อนสีของนามแฝง"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "แสดงสีของนามแฝง"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "ตัดระบบ"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "เชื่อมต่อ"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "ขยาย"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "ตัดลง"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "ซ่อนวันและเวลา"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "แสดงวันและเวลา"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "ใส่ข้อความที่นี่"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "ใส่นามแฝงที่นี่"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "เกิดข้อผิดพลาด: พารามิเตอร์ไม่ถูกต้องหรืออาจเป็นพารามิเตอร์รุ่นเก่า '%s', กรุณาแก้ไขหรือนำค่านี้ออก"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "ซ่อนกล่องสไมลีย์"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "แสดงกล่องสไมลีย์"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "ซ่อนชื่อผู้ออนไลน์"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "แสดงชื่อผู้ออนไลน์"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "ตัวหนา"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "ตัวเอียง"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "ขีดเส้นใต้"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "ลบ"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "ไม่จัดรูปแบบ"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "เมล"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "สี"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s แม่แบบไม่พบ"; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "เกิดข้อผิดพลาด: '%s' ไม่ถูกพบ กรุณาตรวจสอบ themepath '%s' และ theme '%s' ว่าถูกต้อง"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s ต้องถูกแปลงค่า"; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "พารามิเตอร์'%s' สำคัญโดยค่าตั้งต้นคือ '%s'"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "พารามิเตอร์ '%s' จำเป็นต้องเป็นจำนวนบวก"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "พารามิเตอร์ '%s' ไม่ถูกต้อง ค่าที่ใช้ได้คือ '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "ห้องของฉัน"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "ข้อความส่วนตัว"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "ปิดแท็บนี้"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "แน่ใจว่าต้องการออกจากห้องไหม?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "พารามิเตอร์ขาดหาย"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "ถูกแบนจาก %s โดย %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "รายชื่อผู้ใช้ที่ถูกแบนคือ:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "ว่าง"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' จะยกเลิกการแบนผู้ใช้ที่ถูกแบนโดย {id}"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' ยกเลิกการแบนผู้ใช้ทั้งหมด"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s ออก (สัญญาณหาย)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s เข้าสู่ห้อง %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "โดนเตะจากห้อง %s โดย %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "ไม่สามารถส่งข้อความได้ %s ออฟไลน์"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "ไม่มีใครถูกแบน"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s ถูกยกเลิกการแบน"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s คนได้ถูกยกเลิกการแบนไปแล้ว"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "ไม่อนุญาตให้ใช้คำสั่ง '%s'"; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "ไม่สามารถเข้าห้อง %s เพราะว่าขณะนี้คุณถูกแบน"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "ไม่อนุญาตให้เปลี่ยนนามแฝง"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "ไม่สามารถเข้าห้อง %s เพราะว่าห้องถูกบังคับ"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "กรุณาอย่าส่งข้อความหลายข้อความต่อเนื่อง การฟลัดห้องแชตจะไม่มีการยอมให้"; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "เกิดข้อผิดพลาด: '%s' เป็นพารามิเตอร์ส่วนตัว คุณไม่ได้รับอนุญาตให้เปลี่ยนได้"; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "พารามิเตอร์ '%s' จำเป็นต้องเป็นอาร์เรย์"; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "พารามิเตอร์ '%s' จำเป็นต้องเป็นค่าบูลีน"; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "พารามิเตอร์ '%s' จำเป็นต้องเป็นสตริง"; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' จำต้องอนุญาตให้เขียนทับ"; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "ไดเรกทอรี '%s' ไม่มีอยู่"; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "กรุณาแก้ไขข้อผิดพลาดเหล่านี้"; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "เกิดข้อผิดพลาด: ค่าคอนฟิกที่ถูกแคชไม่มีค่า"; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "เกิดข้อผิดพลาด: แชตไม่สามารถถูกโหลดได้ อาจเกิดจากสาเหตุที่เบราว์เซอร์ไม่รองรับจาวาสคริปต์ หรือการติดตั้งเกิดความผิดพลาด กรุณาถามคำถามได้ที่ฟอรัม"; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "รายชื่อคำสั่ง:"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "ระบุค่าได้สำเร็จ"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "เกิดความผิดพลาดในการระบุ"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "ต้องเชื่อมต่อกับระบบก่อนที่จะส่งข้อความ"; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "กดที่นี่เพื่อส่งข้อความ"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "ใส่ข้อความเพื่อจัดรูปแบบ"; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "ค่าคอนฟิกได้ถูกปรับปรุงใหม่"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "เกิดความผิดพลาดระหว่างปรับปรุง"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = "นามแฝงที่ใส่ถูกใช้โดยผู้อื่นแล้ว"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "phpfreechat รุ่นปัจจุบันคือ %s"; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "จำนวนห้องที่เปิดได้ถึงค่าสูงสุดที่ถูกกำหนดไดว้"; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "จำนวนการแชตส่วนตัวถึงค่าสูงสุดแล้ว"; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "ส่ง"; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = "Mysql container: ข้อผิดพลาดในการเชื่อมต่อ"; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Mysql container: ข้อผิดพลาดในการสร้างฐานข้อมูล '%s'"; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Mysql container: ข้อผิดพลาดในการสร้างตาราง '%s'"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "ไม่สามารถแชตกับตัวเองได้"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "นามแฝงที่เลือกไม่อนุญาตให้ใช้"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Enable sound notifications"] = "เปิดใช้งานเสียงเรียก"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["Disable sound notifications"] = "ปิดใช้งานเสียงเรียก"; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = "ไม่ระบุเหตุผล"; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = "รายชื่อผู้ถูกแบนได้แก่:"; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nickname}' จะยกเลิกการแบนของนามแฝง {nickname}"; + +// line 43 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "ถูกเตะออกจาก %s โดย %s ด้วยสาเหตุ: %s"; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s ออก (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "กำลังโหลดห้องแชต ..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "กรุณารอซักครู่"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s เหมือนจะถูกระงับหรือถูกห้ามจากเบราว์เซอร์"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "เว็บแอปพลิเคชันนี้ต้องการ %s ถึงจะทำงานได้"; + +// line 135 in chat.js.tpl.php +$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "กรุณาเปิดใช้งาน %s ในเบราว์เซอร์ของคุณ หรือใช้งานเบราว์เซอร์ %s ที่รองรับ"; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "กรุณาอัปเกรดไปใช้เบราว์เซอร์ %s ที่รองรับและลองอีกหน"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "อินเทอร์เน็ตเอกซ์พลอเรอร์รุ่นเก่ากว่ารุ่น 7.0 เอแจ็กซ์ทำงานผ่านแอกทีฟเอกซ์ กรุณาเปิดใช้งานแอกทีฟเอกซ์และลองอีกหน"; + +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s ไม่มีอยู่ data_public_path ไม่สามารถถูกติดตั้ง"; + +// line 73 in invite.class.php +$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "คุณต้องเข้าห้อง %s เพื่อที่จะเชิญผู้ใช้อื่นเข้ามา"; + +// line 47 in chat.html.tpl.php +$GLOBALS["i18n"]["Ping"] = "ปิง"; + +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "จำเป็นต้องใส่ค่า"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "ตกลง"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "ยกเลิก"; + +// line 430 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot create %s"] = "ไม่สามารถสร้าง %s"; + +// line 436 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot copy %s in %s"] = "ไม่สามารถคัดลอก %s ใน %s"; + +// line 667 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "เกิดข้อผิดพลาด: '%s' ไม่สามารถหาเจอได้ กรุณาตรวจสอบ theme_path '%s' และ theme '%s' ว่าได้ระบุถูกต้อง"; + +// line 414 in phpfreechat.class.php +$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "แน่ใจว่าคุณต้องการปิดแท็บนี้ ?"; + +// line 42 in ban.class.php +$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s ถูกแบนจาก %s โดย %s"; + +// line 461 in phpfreechat.class.php +$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "คุณกำลังคุยกับผู้ใช้ที่ไม่ได้อยู่ในห้องแชตแล้ว"; + +// line 89 in invite.class.php +$GLOBALS["i18n"]["%s was invited by %s"] = "%s ได้รับเชิญโดย %s"; + +?> \ No newline at end of file Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2007-11-03 16:09:23 UTC (rev 1205) +++ trunk/src/pfci18n.class.php 2007-11-04 11:59:29 UTC (rev 1206) @@ -103,7 +103,7 @@ */ function GetAcceptedLanguage($type="main") { - return /*<GetAcceptedLanguage>*/array('pl_PL','pt_BR','da_DK','uk_UA','nb_NO','fr_FR','hr_HR','vi_VN','hy_AM','ru_RU','eo','en_US','es_ES','ko_KR','nl_BE','ba_BA','zh_TW','zh_CN','it_IT','el_GR','uk_RO','pt_PT','sr_CS','tr_TR','de_DE-informal','de_DE-formal','ja_JP','sv_SE','bn_BD','nl_NL','ar_LB','hu_HU','nn_NO','bg_BG','id_ID');/*</GetAcceptedLanguage>*/ + return /*<GetAcceptedLanguage>*/array('pl_PL','pt_BR','da_DK','uk_UA','nb_NO','fr_FR','hr_HR','vi_VN','hy_AM','ru_RU','eo','en_US','es_ES','ko_KR','nl_BE','ba_BA','zh_TW','zh_CN','it_IT','el_GR','uk_RO','pt_PT','sr_CS','tr_TR','de_DE-informal','de_DE-formal','ja_JP','sv_SE','bn_BD','nl_NL','ar_LB','hu_HU','nn_NO','bg_BG','id_ID','th_TH');/*</GetAcceptedLanguage>*/ } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-04 12:14:06
|
Revision: 1209 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1209&view=rev Author: kerphi Date: 2007-11-04 04:14:10 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Add the Galician translation (thanks to Daniel Dorado) Modified Paths: -------------- trunk/demo/index.php Added Paths: ----------- trunk/demo/demo64_in_galician.php trunk/i18n/gl_ES/ trunk/i18n/gl_ES/main.php Added: trunk/demo/demo64_in_galician.php =================================================================== --- trunk/demo/demo64_in_galician.php (rev 0) +++ trunk/demo/demo64_in_galician.php 2007-11-04 12:14:10 UTC (rev 1209) @@ -0,0 +1,32 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "gl_ES"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + </head> + + <body> + <?php $chat->printChat(); ?> + +<?php + // print the current file + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> \ No newline at end of file Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-11-04 12:08:35 UTC (rev 1208) +++ trunk/demo/index.php 2007-11-04 12:14:10 UTC (rev 1209) @@ -128,6 +128,8 @@ <li><a href="demo60_in_vietnamese.php">demo60 - Vietnamese translation of the chat</a></li> <li><a href="demo61_in_croatian.php">demo61 - Croatian translation of the chat</a></li> <li><a href="demo62_in_belgian_dutch.php">demo62 - Belgian Dutch translation of the chat</a></li> + <li><a href="demo63_in_thai.php">demo63 - Thai translation of the chat</a></li> + <li><a href="demo64_in_galician.php">demo64 - Galician translation of the chat</a></li> </ul> </div> Added: trunk/i18n/gl_ES/main.php =================================================================== --- trunk/i18n/gl_ES/main.php (rev 0) +++ trunk/i18n/gl_ES/main.php 2007-11-04 12:14:10 UTC (rev 1209) @@ -0,0 +1,404 @@ +<?php +/** + * i18n/gl_ES/main.php + * + * Copyright © 2006 Stephane Gully <ste...@gm...> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * Galician version translation of the messages (utf8 encoded!) + * + * @translation by Daniel Dorado <dan...@gm...> + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "O meu Chat"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s non atopada, biblioteca %s non atopada."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Por favor, indica o teu nome de usuario"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "O texto non pode estar vacío"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s cambie o seu nome de usuario para %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s acaba de entrar no chat"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s saiu"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s desconectouse (demasiado tempo inactivo)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "Comando descoñecido [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s non existe: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Precisas %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s non existe, biblioteca %s non atopada"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s non existe"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = " devese indicar o directorio %s"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s deve ser un directorio"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s non pode ser creado"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s non pode ser escrito"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s non se pode ler"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s non é un ficheiro"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s non é un directorio"; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "Esconder marcador do nome do usuario"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Mostrar marcador do nome do usuario"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Desconectar"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Conectar"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Ampliar"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Cortar"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Esconder data e hora"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Mostrar data e hora"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Poña a mensaxe aqui"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Poña o nome de usuario aqui"; + +// line 44 in phpfreechatcontainer.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s precisa ser implementado"; + +// line 121 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Erro: Parámetro indefinido ou obsoleto '%s', por favor corrixe ou borra este parámetro"; + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "O parametro '%s' é necesario, por omisión usa '%s'"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "O parametro '%s' ten que ser um número positivo"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "O parámetro '%s' non é válido. Valores posíveis son: '%s'"; + +// line 574 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Erro: '%s' non pode ser atopado, por favor verifica se o camiño para os temas '%s' e o tema '%s' están correctos"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "Template %s non atopado"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Negrito"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Italico"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Subliñado"; + +// line 40 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Borrado"; + +// line 41 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 42 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Mail"; + +// line 43 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Cor"; + +// line 83 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Esconder iconos expresivos"; + +// line 84 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Mostrar iconos expresivos"; + +// line 85 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Esconder a caixa cós usuarios conectados"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Mostrar a caixa cós usuarios conectados"; + +// line 186 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "Sala de Conversa"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "Falta parámetro"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "expulsado de %s por %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "A lista de usuarios expulsados é:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "Vacio"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' admitirá o usuario identificado por {id}"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' admitirá todos os usuarios expulsados neste canal"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s saiu (demasiado tempo inactivo)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s entrou na sala %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "pateado da sala %s por %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Non consigo enviar a mensaxe, %s está desconectado"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Ninguén foi readmitido"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s foi readmitido"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s usuarios foron readmitidos"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Non tes permiso para executar o comando '%s'"; + +// line 66 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Non podes entrar na sala %s porque foste expulsado"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Non podes entrar na sala %s porque a lista de canais é restrita"; + +// line 89 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Non tes permiso para cambiar o teu nome de usuario"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Por favor, non envies mais mensaxes, non permitimos envios masivos"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "Mensaxe privada"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "Pechar este separador"; + +// line 199 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "¿Tes a certeza de que queres deixar esta sala?"; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Error: '%s' é un parámetro privado, non podes cambialo"; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "'%s' parámetro debe ser un array"; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "'%s' parametro debe ser booleano"; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "'%s' parametro debe ser unha cadea de caracteres"; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' debe ser escribible"; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "Non existe o directorio '%s'"; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "Por favor corrixa estes erros"; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Error: o arquivo config non existe"; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Error: ¡ O chat non pode ser cargado !, hai 2 posibilidades: o teu navegador non soporta JavaScript ou non configuraches correctamente os directorios do servidor – non dudes en pedir axuda ó foro (en inglés)"; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "Aquí está a lista de comandos"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "Identificado correctamente"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "Fallo na identificación"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Debes estar conectado para enviar un mensaxe"; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "Fai click aquí para enviar un mensaxe"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "Ingresa o texto a formatear"; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "Feita a configuración"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Ocurriu un problema durante o proceso"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = "O nome de usuario xa está sendo utilizado"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "Actual versión de phpfreechat %s"; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Alcanzado o número máximo de canles"; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Alcanzado o número máximo de canles privados"; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "Enviar"; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = "Colector MySQL: error de conexión"; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Colector MySQL: '%s' error na creación da base de datos"; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Colector MySQL: '%s' error na creación da tabla(s)"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Non está permitido falarse a un mesmo"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "Non está permitido escoller nome de usuario"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Enable sound notifications"] = "Activar notificacións de son"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["Disable sound notifications"] = "Desactivar notificacións de son"; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = "Sen motivos"; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = "Lista de usuarios prohibidos:"; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nome}' prohibirá o usiuario identificado por {nome}"; + +// line 43 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "Pateado de %s por %s - motivo %s"; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s desconectado (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "Chat cargando..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "Por favor espere"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s parece estar deshabilitado ou non soportado polo teu navegador"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Esta aplicación require %s para traballar correctamente"; + +// line 135 in chat.js.tpl.php +$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Por favor habilita %s na configuración do teu navegador, ou volve a intentalo cun navegador que soporte %s"; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Por favor volve a intentalo cun navegador que soporte %s"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "Nas versións anteriores de 7.0 do Internet Explorer, poñen en execución a Ajax usando ActiveX. Por favor activa ActiveX nos axustes da seguridade do navegador ou cambia a un navegador que soporte Ajax e intentao outra vez."; + +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "Non existe %s, data_public_path non pode instalarse"; + +// line 73 in invite.class.php +$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "Debes estar concectado a canle %s para invitar a usuarios nesta canle"; + +// line 47 in chat.html.tpl.php +$GLOBALS["i18n"]["Ping"] = "Ping"; + +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "Requirese entrada"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "De acordo"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "Cancelar"; + +// line 430 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot create %s"] = "Non se pode crear %s"; + +// line 436 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot copy %s in %s"] = "Non se pode copiar %s en %s"; + +// line 667 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "Erro: '%s' non pode atoparse, por favor comprobe o seu theme_path '%s' e o seu tema '%s'"; + +// line 414 in phpfreechat.class.php +$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "¿Está seguro de que queres pechar este separador?"; + +// line 42 in ban.class.php +$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s prohibido dende %s por %s"; + +// line 461 in phpfreechat.class.php +$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "Estás intentando falar cun desconocido (ou non conectado) usuario"; + +// line 89 in invite.class.php +$GLOBALS["i18n"]["%s was invited by %s"] = "%s fuches invitado por %s"; + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-11 15:21:11
|
Revision: 1211 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1211&view=rev Author: kerphi Date: 2007-11-11 07:21:12 -0800 (Sun, 11 Nov 2007) Log Message: ----------- - usermeta parameter now supports raw html (see demo65 for an example) - new usermeta_key_to_hide parameter Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/demo/index.php trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.js.tpl.php Added Paths: ----------- trunk/demo/demo65_chat_popup.php trunk/demo/demo65_metadata_and_html.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-11-11 13:55:17 UTC (rev 1210) +++ trunk/data/public/js/pfcclient.js 2007-11-11 15:21:12 UTC (rev 1211) @@ -1292,20 +1292,31 @@ ) { var tr = document.createElement('tr'); - var td1 = document.createElement('td'); - td1.setAttribute(className, 'pfc_nickwhois_c1'); - var td2 = document.createElement('td'); - td2.setAttribute(className, 'pfc_nickwhois_c2'); - td1.appendChild(document.createTextNode(k)); - td2.appendChild(document.createTextNode(v)); - tr.appendChild(td1); - tr.appendChild(td2); + if (nickmeta_key_to_hide.indexOf(k) != -1) + { + var td2 = document.createElement('td'); + td2.setAttribute(className, 'pfc_nickwhois_c2'); + td2.setAttribute('colspan', 2); + td2.update(v); + tr.appendChild(td2); + } + else + { + var td1 = document.createElement('td'); + td1.setAttribute(className, 'pfc_nickwhois_c1'); + var td2 = document.createElement('td'); + td2.setAttribute(className, 'pfc_nickwhois_c2'); + td1.update(k); + td2.update(v); + tr.appendChild(td1); + tr.appendChild(td2); + } tbody.appendChild(tr); } } div.appendChild(table); - // add the privmsg link (do not add it if this button is yourself) + // add the privmsg link (do not add it if the nick is yours) if (pfc.getUserMeta(nickid,'nick') != this.nickname) { var p = document.createElement('p'); Added: trunk/demo/demo65_chat_popup.php =================================================================== --- trunk/demo/demo65_chat_popup.php (rev 0) +++ trunk/demo/demo65_chat_popup.php 2007-11-11 15:21:12 UTC (rev 1211) @@ -0,0 +1,22 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; +$params['serverid'] = md5(__FILE__); // calculate a unique id for this chat +$params['nickmeta']['id'] = rand(1,1000); +$params['nickmeta']['profil'] = '<a href="demo65_metadata_and_html.php?profil='.$params['nickmeta']['id'].'" onclick="window.opener.location.href=this.href;return false;">open profil</a>'; +$params['nickmeta']['avatar'] = '<a href="demo65_metadata_and_html.php?profil='.$params['nickmeta']['id'].'" onclick="window.opener.location.href=this.href;return false;"><img src="http://img217.imageshack.us/img217/5223/244bg4.png" alt=""/></a>'; +$params['nickmeta_key_to_hide'] = array('profil','avatar'); +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + </head> + + <body> +<?php $chat->printChat(); ?> + </body> +</html> \ No newline at end of file Added: trunk/demo/demo65_metadata_and_html.php =================================================================== --- trunk/demo/demo65_metadata_and_html.php (rev 0) +++ trunk/demo/demo65_metadata_and_html.php 2007-11-11 15:21:12 UTC (rev 1211) @@ -0,0 +1,46 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + </head> + + <body> + +<p> +Let us +<a href="" + onclick="window.open('demo65_chat_popup.php','The chat popup','toolbar=0,menubar=0,scrollbars=1,width=800,height=630'); return false;"> +start chatting +</a> +</p> + +<?php if (isset($_GET['profil'])) { ?> + <p>Here is the user (id=<?php echo $_GET['profil']; ?>)profil</p> +<?php } ?> + +<?php /* start hide */ ?> +<?php + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + $content = preg_replace('/\<\?php \/\* start hide \*\/ \?\>.*?\<\?php \/\* end hide \*\/ \?\>/s','',$content); + echo htmlentities($content); + echo "</pre>"; +?> + +<?php + echo "<h2>The chat popup source code</h2>"; + $filename = 'demo65_chat_popup.php'; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> +<?php /* end hide */ ?> + + </body> +</html> \ No newline at end of file Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-11-11 13:55:17 UTC (rev 1210) +++ trunk/demo/index.php 2007-11-11 15:21:12 UTC (rev 1211) @@ -75,6 +75,7 @@ <li><a href="demo43_change_the_nicknames_colors.php">demo43 - shows how to change the nicknames automatic colors</a></li> <li><a href="demo50_customized_usermetadata.php">demo50 - shows how to use user metadata : add avatar (images) to each connected users</a></li> <li><a href="demo55_mysql_container.php">demo55 - shows how to use the mysql container</a></li> + <li><a href="demo65_metadata_and_html.php">demo65 - shows how to start a chat in a child popup window and how to display in this page a complete user profil comming from a chat request (user click) </a></li> </ul> Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-11-11 13:55:17 UTC (rev 1210) +++ trunk/src/pfcglobalconfig.class.php 2007-11-11 15:21:12 UTC (rev 1211) @@ -95,6 +95,12 @@ var $nickmeta_private = array('ip'); /** + * <p>Can be used to hide keys in the final displayed whoisbox. + * (Default value: <code>array()</code> - means that nothing is hidden)</p> + */ + var $nickmeta_key_to_hide = array(); + + /** * <p>Set this parameter to true if you want to give admin rights to the connected user. * Attention : if you don't use any external registration system, all your users will be admins. * You have to test current user rights before setting this parameter to true. Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-11-11 13:55:17 UTC (rev 1210) +++ trunk/themes/default/chat.js.tpl.php 2007-11-11 15:21:12 UTC (rev 1211) @@ -51,6 +51,7 @@ var pfc_theme = <?php echo $json->encode($theme); ?>; var pfc_isready = false; var pfc_server_script_url = <?php echo $json->encode($c->server_script_url); ?>; +var nickmeta_key_to_hide = <?php echo $json->encode($c->nickmeta_key_to_hide); ?>; // todo : move this code in pfcClient function pfc_loadChat() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-22 16:50:33
|
Revision: 1215 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1215&view=rev Author: kerphi Date: 2007-11-22 08:50:37 -0800 (Thu, 22 Nov 2007) Log Message: ----------- - Upgrade to prototype 1.6 - Bug fix: whoisbox was broken in IE7 - Window onload event is now handled only by prototype Modified Paths: -------------- trunk/data/public/js/md5.js trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/data/public/js/pfcresource.js trunk/data/public/js/prototype.js trunk/src/phpfreechat.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/data/public/js/md5.js =================================================================== --- trunk/data/public/js/md5.js 2007-11-22 16:45:25 UTC (rev 1214) +++ trunk/data/public/js/md5.js 2007-11-22 16:50:37 UTC (rev 1215) @@ -1,256 +1,327 @@ -/* - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ +/** +* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message +* Digest Algorithm, as defined in RFC 1321. +* +* Extends string prototype with the following method: +* md5 +* +* This extensions doesn't depend on any other code or overwrite existing methods. +* +* +* The Initial Developer of the Original Code is +* Paul Johnston +* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. +* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet +* +* Distributed under the BSD License +* See http://pajhome.org.uk/crypt/md5 for more info. +* +* +* Contributor(s): +* Harald Hanek <har...@gm...> +* +* Copyright (c) 2007 Harald Hanek (http://js-methods.googlecode.com) +* +* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) +* and GPL (http://www.gnu.org/licenses/gpl.html) licenses. +* +* @author Harald Hanek +* @version 0.9 +* @lastchangeddate 10. October 2007 18:01:32 +* @revision 876 +*/ -/* - * Configurable variables. You may need to tweak these to be compatible with - * the server-side, but the defaults work in most cases. - */ -var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ -var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ -var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ +(function(){ -/* - * These are the functions you'll usually want to call - * They take string arguments and return either hex or base-64 encoded strings - */ -function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} -function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} -function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} -function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } -function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } -function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } + var md5 = + { + hexcase : 0, /* hex output format. 0 - lowercase; 1 - uppercase */ + b64pad : "", /* base-64 pad character. "=" for strict RFC compliance */ + chrsz : 8, /* bits per input character. 8 - ASCII; 16 - Unicode */ -/* - * Perform a simple self-test to see if the VM is working - */ -function md5_vm_test() -{ - return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; -} + /** + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ + 'hex_md5' : function(s) + { + return this.binl2hex(this.core_md5(this.str2binl(s), s.length * this.chrsz)); + }, + + 'b64_md5' : function(s) + { + return this.binl2b64(this.core_md5(this.str2binl(s), s.length * this.chrsz)); + }, + + 'str_md5' : function(s) + { + return this.binl2str(this.core_md5(this.str2binl(s), s.length * this.chrsz)); + }, + + 'hex_hmac_md5' : function(key, data) + { + return this.binl2hex(this.core_hmac_md5(key, data)); + }, + + 'b64_hmac_md5' : function(key, data) + { + return this.binl2b64(this.core_hmac_md5(key, data)); + }, + + 'str_hmac_md5' : function(key, data) + { + return this.binl2str(this.core_hmac_md5(key, data)); + }, + + /** + * Calculate the MD5 of an array of little-endian words, and a bit length. + * + */ + 'core_md5' : function(x, len) + { + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = this.md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = this.md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = this.md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = this.md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = this.md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = this.md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = this.md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = this.md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = this.md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = this.md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = this.md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = this.md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = this.md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = this.md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = this.md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = this.md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = this.md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = this.md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = this.md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = this.md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = this.md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = this.md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = this.md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = this.md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = this.md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = this.md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = this.md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = this.md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = this.md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = this.md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = this.md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = this.md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = this.md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = this.md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = this.md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = this.md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = this.md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = this.md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = this.md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = this.md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = this.md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = this.md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = this.md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = this.md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = this.md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = this.md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = this.md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = this.md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = this.md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = this.md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = this.md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = this.md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = this.md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = this.md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = this.md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = this.md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = this.md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = this.md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = this.md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = this.md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = this.md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = this.md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = this.md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = this.md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = this.safe_add(a, olda); + b = this.safe_add(b, oldb); + c = this.safe_add(c, oldc); + d = this.safe_add(d, oldd); + } + return Array(a, b, c, d); + }, -/* - * Calculate the MD5 of an array of little-endian words, and a bit length - */ -function core_md5(x, len) -{ - /* append padding */ - x[len >> 5] |= 0x80 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; + /** + * These functions implement the four basic operations the algorithm uses. + * + */ + 'md5_cmn' : function(q, a, b, x, s, t) + { + return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s),b); + }, + + 'md5_ff' : function(a, b, c, d, x, s, t) + { + return this.md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); + }, + + 'md5_gg' : function(a, b, c, d, x, s, t) + { + return this.md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); + }, + + 'md5_hh' : function(a, b, c, d, x, s, t) + { + return this.md5_cmn(b ^ c ^ d, a, b, x, s, t); + }, + + 'md5_ii' : function(a, b, c, d, x, s, t) + { + return this.md5_cmn(c ^ (b | (~d)), a, b, x, s, t); + }, - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; + /** + * Calculate the HMAC-MD5, of a key and some data. + * + */ + 'core_hmac_md5' : function(key, data) + { + var bkey = this.str2binl(key); + if(bkey.length > 16) + bkey = this.core_md5(bkey, key.length * this.chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = this.core_md5(ipad.concat(this.str2binl(data)), 512 + data.length * this.chrsz); + return this.core_md5(opad.concat(hash), 512 + 128); + }, - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); - d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); - c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); - b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); - a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); - d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); - c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); - b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); - a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); - d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); - c = md5_ff(c, d, a, b, x[i+10], 17, -42063); - b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); - a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); - d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); - c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); - b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + /** + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + * + */ + 'safe_add' : function(x, y) + { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); + }, + + /** + * Bitwise rotate a 32-bit number to the left. + * + */ + 'bit_rol' : function(num, cnt) + { + return (num << cnt) | (num >>> (32 - cnt)); + }, + + /** + * Convert a string to an array of little-endian words. + * If this.chrsz is ASCII, characters >255 have their hi-byte silently ignored. + * + */ + 'str2binl' : function(str) + { + var bin = Array(); + var mask = (1 << this.chrsz) - 1; + for(var i = 0; i < str.length * this.chrsz; i += this.chrsz) + bin[i>>5] |= (str.charCodeAt(i / this.chrsz) & mask) << (i%32); + return bin; + }, + + /** + * Convert an array of little-endian words to a string + * + */ + 'binl2str' : function(bin) + { + var str = ""; + var mask = (1 << this.chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += this.chrsz) + str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); + return str; + }, + + /** + * Convert an array of little-endian words to a hex string. + * + */ + 'binl2hex' : function(binarray) + { + var hex_tab = this.hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); + } + return str; + }, + + /** + * Convert an array of little-endian words to a base-64 string + * + */ + 'binl2b64' : function(binarray) + { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) + str += this.b64pad; + else + str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; + } + }; - a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); - d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); - c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); - b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); - a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); - d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); - c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); - b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); - a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); - d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); - c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); - b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); - a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); - d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); - c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); - b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); - - a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); - d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); - c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); - b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); - a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); - d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); - c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); - b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); - a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); - d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); - c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); - b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); - a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); - d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); - c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); - b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); - - a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); - d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); - c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); - b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); - a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); - d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); - c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); - b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); - a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); - d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); - c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); - b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); - a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); - d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); - c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); - b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); - - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - } - return Array(a, b, c, d); - -} - -/* - * These functions implement the four basic operations the algorithm uses. - */ -function md5_cmn(q, a, b, x, s, t) -{ - return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); -} -function md5_ff(a, b, c, d, x, s, t) -{ - return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5_gg(a, b, c, d, x, s, t) -{ - return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5_hh(a, b, c, d, x, s, t) -{ - return md5_cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5_ii(a, b, c, d, x, s, t) -{ - return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -/* - * Calculate the HMAC-MD5, of a key and some data - */ -function core_hmac_md5(key, data) -{ - var bkey = str2binl(key); - if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); - - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } - - var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); - return core_md5(opad.concat(hash), 512 + 128); -} - -/* - * Add integers, wrapping at 2^32. This uses 16-bit operations internally - * to work around bugs in some JS interpreters. - */ -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -/* - * Bitwise rotate a 32-bit number to the left. - */ -function bit_rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); -} - -/* - * Convert a string to an array of little-endian words - * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. - */ -function str2binl(str) -{ - var bin = Array(); - var mask = (1 << chrsz) - 1; - for(var i = 0; i < str.length * chrsz; i += chrsz) - bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); - return bin; -} - -/* - * Convert an array of little-endian words to a string - */ -function binl2str(bin) -{ - var str = ""; - var mask = (1 << chrsz) - 1; - for(var i = 0; i < bin.length * 32; i += chrsz) - str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); - return str; -} - -/* - * Convert an array of little-endian words to a hex string. - */ -function binl2hex(binarray) -{ - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i++) - { - str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + - hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); - } - return str; -} - -/* - * Convert an array of little-endian words to a base-64 string - */ -function binl2b64(binarray) -{ - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i += 3) - { - var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) - | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) - | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; - else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); - } - } - return str; -} + /** + * Returns the md5 hash of the given string. + * + * @example "JavaScript".md5(); + * @result "686155af75a60a0f6e9d80c1f7edd3e9" + * + * @name md5 + * @return String + */ + if(!String.prototype.md5) + String.prototype.md5 = function() + { + return md5.hex_md5(this); + } +})(); \ No newline at end of file Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-11-22 16:45:25 UTC (rev 1214) +++ trunk/data/public/js/pfcclient.js 2007-11-22 16:50:37 UTC (rev 1215) @@ -62,6 +62,16 @@ this.blinktimeout = Array(); }, + loadChat: function() { + new Ajax.Request(pfc_server_script_url, { + method: 'get', + parameters: {pfc_ajax: 1, f: 'loadChat'}, + onSuccess: function(transport) { + eval( transport.responseText ); + } + }); + }, + connectListener: function() { this.el_words = $('pfc_words'); @@ -170,8 +180,8 @@ if (cmd == "who" || cmd == "who2") { param2 = $H(param2); - param2['meta'] = $H(param2['meta']); - param2['meta']['users'] = $H(param2['meta']['users']); + param2.set('meta', $H(param2.get('meta'))); + param2.get('meta').set('users', $H(param2.get('meta').get('users'))); trace('handleResponse: '+cmd + "-"+resp+"-"+param2.inspect()); } else @@ -407,7 +417,8 @@ } else if (cmd == "whois" || cmd == "whois2") { - var nickid = param['nickid']; + param = $H(param); + var nickid = param.get('nickid'); if (resp == "ok") { this.setUserMeta(nickid, param); @@ -423,7 +434,7 @@ for (var i=0; i<um_keys.length; i++) { var k = um_keys[i]; - var v = um[k]; + var v = um.get(k); if (v && // these parameter are used internaly (don't display it) k != 'nickid' && @@ -437,18 +448,19 @@ } else if (cmd == "who" || cmd == "who2") { - var chan = param['chan']; - var chanid = param['chanid']; - var meta = $H(param['meta']); - meta['users'] = $H(meta['users']); + param = $H(param); + var chan = param.get('chan'); + var chanid = param.get('chanid'); + var meta = $H(param.get('meta')); + meta.set('users', $H(meta.get('users'))); if (resp == "ok") { this.setChanMeta(chanid,meta); // send /whois commands for unknown users - for (var i=0; i<meta['users']['nickid'].length; i++) + for (var i=0; i<meta.get('users').get('nickid').length; i++) { - var nickid = meta['users']['nickid'][i]; - var nick = meta['users']['nick'][i]; + var nickid = meta.get('users').get('nickid')[i]; + var nick = meta.get('users').get('nick')[i]; var um = this.getAllUserMeta(nickid); if (!um) this.sendRequest('/whois2 "'+nickid+'"'); } @@ -490,16 +502,16 @@ getAllUserMeta: function(nickid) { - if (nickid && this.usermeta[nickid]) - return this.usermeta[nickid]; + if (nickid && this.usermeta.get(nickid)) + return this.usermeta.get(nickid); else return null; }, getUserMeta: function(nickid, key) { - if (nickid && key && this.usermeta[nickid] && this.usermeta[nickid][key]) - return this.usermeta[nickid][key]; + if (nickid && key && this.usermeta.get(nickid) && this.usermeta.get(nickid).get(key)) + return this.usermeta.get(nickid).get(key); else return ''; }, @@ -508,26 +520,26 @@ { if (nickid && key) { - if (!this.usermeta[nickid]) this.usermeta[nickid] = $H(); + if (!this.usermeta.get(nickid)) this.usermeta.set(nickid, $H()); if (value) - this.usermeta[nickid][key] = value; + this.usermeta.get(nickid).set(key, value); else - this.usermeta[nickid] = $H(key); + this.usermeta.set(nickid, $H(key)); } }, getAllChanMeta: function(chanid) { - if (chanid && this.chanmeta[chanid]) - return this.chanmeta[chanid]; + if (chanid && this.chanmeta.get(chanid)) + return this.chanmeta.get(chanid); else return null; }, getChanMeta: function(chanid, key) { - if (chanid && key && this.chanmeta[chanid] && this.chanmeta[chanid][key]) - return this.chanmeta[chanid][key]; + if (chanid && key && this.chanmeta.get(chanid) && this.chanmeta.get(chanid).get(key)) + return this.chanmeta.get(chanid).get(key); else return ''; }, @@ -536,11 +548,11 @@ { if (chanid && key) { - if (!this.chanmeta[chanid]) this.chanmeta[chanid] = $H(); + if (!this.chanmeta.get(chanid)) this.chanmeta.set(chanid, $H()); if (value) - this.chanmeta[chanid][key] = value; + this.chanmeta.get(chanid).set(key,value); else - this.chanmeta[chanid] = $H(key); + this.chanmeta.set(chanid, $H(key)); } }, @@ -909,9 +921,8 @@ var msg_html = $H(); var max_msgid = $H(); - //alert(cmds.inspect()); +//alert(cmds.inspect()); - // var html = ''; for(var mid = 0; mid < cmds.length ; mid++) { var id = cmds[mid][0]; @@ -923,7 +934,7 @@ var param = cmds[mid][6]; var fromtoday = cmds[mid][7]; var oldmsg = cmds[mid][8]; - + // format and post message var line = ''; line += '<div id="pfc_msg_'+recipientid+'_'+id+'" class="pfc_cmd_'+ cmd +' pfc_message'; @@ -940,7 +951,7 @@ line += '‹'; line += '<span '; line += 'onclick="pfc.insert_text(\'' + sender.replace("'", '\\\'') + ', \',\'\',false)" '; - line += 'class="pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(sender)) +'">'; + line += 'class="pfc_nickmarker pfc_nick_'+ _to_utf8(sender).md5() +'">'; line += sender; line += '</span>'; line += '›'; @@ -965,14 +976,14 @@ this.gui.notifyWindow(); } - if (msg_html[recipientid] == null) - msg_html[recipientid] = line; + if (msg_html.get(recipientid) == null) + msg_html.set(recipientid, line); else - msg_html[recipientid] += line; - + msg_html.set(recipientid, msg_html.get(recipientid) + line); + // remember the max message id in order to clean old lines - if (!max_msgid[recipientid]) max_msgid[recipientid] = 0; - if (max_msgid[recipientid] < id) max_msgid[recipientid] = id; + if (!max_msgid.get(recipientid)) max_msgid.set(recipientid, 0); + if (max_msgid.get(recipientid) < id) max_msgid.set(recipientid, id); } // loop on all recipients and post messages @@ -981,13 +992,12 @@ { var recipientid = keys[i]; var tabid = recipientid; - // create the tab if it doesn't exists yet var recipientdiv = this.gui.getChatContentFromTabId(tabid); - + // create a dummy div to avoid konqueror bug when setting nickmarkers var m = document.createElement('div'); // do not setup a inline element (ex: span) because the element height will be wrong on FF2 -> scrollDown(..) will be broken - m.innerHTML = msg_html[recipientid]; + m.innerHTML = msg_html.get(recipientid); this.colorizeNicks(m); this.refresh_clock(m); // finaly append this to the message list @@ -995,7 +1005,7 @@ this.gui.scrollDown(tabid, m); // delete the old messages from the client (save some memory) - var limit_msgid = max_msgid[recipientid] - pfc_max_displayed_lines; + var limit_msgid = max_msgid.get(recipientid) - pfc_max_displayed_lines; var elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); while (elt) { @@ -1009,8 +1019,7 @@ limit_msgid--; elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); } - } - + } }, /** @@ -1039,13 +1048,9 @@ // send the real ajax request var url = pfc_server_script_url; - var params = $H(); - params['pfc_ajax'] = 1; - params['f'] = 'handleRequest'; - params['cmd'] = cmd; new Ajax.Request(url, { method: 'post', - parameters: params, + parameters: {'pfc_ajax':1, 'f':'handleRequest', 'cmd': cmd }, onCreate: function(transport) { this.pfc_ajax_connected = true; // request time counter used by ping indicator @@ -1221,7 +1226,7 @@ { var className = (! is_ie) ? 'class' : 'className'; - var nickidlst = this.getChanMeta(chanid,'users')['nickid']; + var nickidlst = this.getChanMeta(chanid,'users').get('nickid'); var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); ul.setAttribute(className, 'pfc_nicklist'); @@ -1242,9 +1247,9 @@ getNickWhoisBox: function(nickid) { - if (!this.nickwhoisbox[nickid]) + if (!this.nickwhoisbox.get(nickid)) this.updateNickWhoisBox(nickid); - return this.nickwhoisbox[nickid]; + return this.nickwhoisbox.get(nickid); }, updateNickWhoisBox: function(nickid) @@ -1252,7 +1257,6 @@ var className = (! is_ie) ? 'class' : 'className'; var usermeta = this.getAllUserMeta(nickid); - var div = document.createElement('div'); div.setAttribute(className, 'pfc_nickwhois'); @@ -1271,7 +1275,7 @@ img.setAttribute('src', this.res.getFileUrl('images/close-whoisbox.gif')); img.alt = this.res.getLabel('Close'); p.appendChild(img); - p.appendChild(document.createTextNode(usermeta['nick'])); // append the nickname text in the title + p.appendChild(document.createTextNode(usermeta.get('nick'))); // append the nickname text in the title // add the whois information table var table = document.createElement('table'); @@ -1282,7 +1286,7 @@ for (var i=0; i<um_keys.length; i++) { var k = um_keys[i]; - var v = usermeta[k]; + var v = usermeta.get(k); if (v && k != 'nickid' && k != 'nick' // useless because it is displayed in the box title && k != 'isadmin' // useless because of the gold shield icon @@ -1292,12 +1296,12 @@ ) { var tr = document.createElement('tr'); - if (nickmeta_key_to_hide.indexOf(k) != -1) + if (pfc_nickmeta_key_to_hide.indexOf(k) != -1) { var td2 = document.createElement('td'); td2.setAttribute(className, 'pfc_nickwhois_c2'); td2.setAttribute('colspan', 2); - td2.update(v); + td2.innerHTML = v; tr.appendChild(td2); } else @@ -1306,8 +1310,8 @@ td1.setAttribute(className, 'pfc_nickwhois_c1'); var td2 = document.createElement('td'); td2.setAttribute(className, 'pfc_nickwhois_c2'); - td1.update(k); - td2.update(v); + td1.innerHTML = k; + td2.innerHTML = v; tr.appendChild(td1); tr.appendChild(td2); } @@ -1340,7 +1344,7 @@ div.appendChild(p); } - this.nickwhoisbox[nickid] = div; + this.nickwhoisbox.set(nickid, div); }, buildNickItem: function(nickid) @@ -1502,13 +1506,12 @@ // We don't want to replace smiley strings inside of tags. // Use negative lookahead to search for end of tag. rx = new RegExp(RegExp.escape(sl[i]) + '(?![^<]*>)','g'); - msg = msg.replace(rx, '<img src="'+ smileys[sl[i]] +'" alt="' + sl[i] + '" title="' + sl[i] + '" />'); + msg = msg.replace(rx, '<img src="'+ smileys.get(sl[i]) +'" alt="' + sl[i] + '" title="' + sl[i] + '" />'); } - + // try to parse nickname for highlighting rx = new RegExp('(^|[ :,;])'+RegExp.escape(this.nickname)+'([ :,;]|$)','gi'); msg = msg.replace(rx, '$1<strong>'+ this.nickname +'</strong>$2'); - // this piece of code is replaced by the word-wrap CSS3 rule. /* @@ -1593,7 +1596,7 @@ applyNickColor: function(root, nick, color) { - var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ hex_md5(_to_utf8(nick)), ''); + var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ _to_utf8(nick).md5(), ''); for(var i = 0; nicktochange.length > i; i++) nicktochange[i].style.color = color; @@ -2070,7 +2073,6 @@ for(var i = 0; i < contentlist.length; i++) { var chatdiv = contentlist[i]; - var style = $H(); if (!this.showwhosonline) { chatdiv.style.width = '100%'; Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-11-22 16:45:25 UTC (rev 1214) +++ trunk/data/public/js/pfcgui.js 2007-11-22 16:50:37 UTC (rev 1215) @@ -36,8 +36,8 @@ if (this.getTabId() != tabid) { // no it's not the current active one so just cache the elttoscroll in the famouse this.elttoscroll array - if (!this.elttoscroll[tabid]) this.elttoscroll[tabid] = Array(); - this.elttoscroll[tabid].push(elttoscroll); + if (!this.elttoscroll.get(tabid)) this.elttoscroll.set(tabid, Array()); + this.elttoscroll.get(tabid).push(elttoscroll); return; } // the wanted tab is active so just scroll down the tab content element @@ -48,7 +48,7 @@ // http://sourceforge.net/tracker/index.php?func=detail&aid=1568264&group_id=158880&atid=809601 var dudVar = content.scrollTop; content.scrollTop += elttoscroll.offsetHeight+2; - this.scrollpos[tabid] = content.scrollTop; + this.scrollpos.set(tabid, content.scrollTop); }, isCreated: function(tabid) @@ -69,7 +69,7 @@ // first of all save the scroll pos of the visible tab var content = this.getChatContentFromTabId(this.current_tab_id); - this.scrollpos[this.current_tab_id] = content.scrollTop; + this.scrollpos.set(this.current_tab_id, content.scrollTop); // start without selected tabs this.current_tab = ''; @@ -103,17 +103,17 @@ // restore the scroll pos var content = this.getChatContentFromTabId(tabid); - content.scrollTop = this.scrollpos[tabid]; + content.scrollTop = this.scrollpos.get(tabid); // scroll the new posted message - if (this.elttoscroll[tabid] && - this.elttoscroll[tabid].length > 0) + if (this.elttoscroll.get(tabid) && + this.elttoscroll.get(tabid).length > 0) { // on by one - for (var i=0; i<this.elttoscroll[tabid].length; i++) - this.scrollDown(tabid,this.elttoscroll[tabid][i]); + for (var i=0; i<this.elttoscroll.get(tabid).length; i++) + this.scrollDown(tabid,this.elttoscroll.get(tabid)[i]); // empty the cached element list because it has been scrolled - this.elttoscroll[tabid] = Array(); + this.elttoscroll.set(tabid, Array()); } this.unnotifyTab(tabid); @@ -129,7 +129,7 @@ var className = (! is_ie) ? 'class' : 'className'; // return the chat content if it exists - var cc = this.chatcontent[tabid]; + var cc = this.chatcontent.get(tabid); if (cc) return cc; // if the chat content doesn't exists yet, just create a cached one @@ -141,7 +141,7 @@ cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) // cc.style.marginLeft = "5px"; - this.chatcontent[tabid] = cc; + this.chatcontent.set(tabid,cc); return cc; }, getOnlineContentFromTabId: function(tabid) @@ -149,7 +149,7 @@ var className = (! is_ie) ? 'class' : 'className'; // return the online content if it exists - var oc = this.onlinecontent[tabid]; + var oc = this.onlinecontent.get(tabid); if (oc) return oc; oc = document.createElement('div'); @@ -160,7 +160,7 @@ // oc.style.borderLeft = "1px solid #555"; oc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) - this.onlinecontent[tabid] = oc; + this.onlinecontent.set(tabid,oc); return oc; }, @@ -194,7 +194,7 @@ /* removeTabByName: function(name) { - var tabid = hex_md5(_to_utf8(name)); + var tabid = _to_utf8(name).md5(); var ret = this.removeTabById(tabid); if (ret == name) return tabid; @@ -214,7 +214,7 @@ // do not create twice a the same tab if (this.isCreated(tabid)) return; - // var tabid = hex_md5(_to_utf8(name)); + // var tabid = _to_utf8(name).md5(); //alert(name+'='+tabid); this.tabs.push(name); this.tabids.push(tabid); @@ -406,7 +406,7 @@ for(var i = 0; i < sl.length; i++) { s_url = sl[i]; - s_symbol = smileys[sl[i]]; + s_symbol = smileys.get(sl[i]); s_symbol = s_symbol.unescapeHTML(); // Replace " with " for IE and Webkit browsers. // The prototype.js version 1.5.1.1 unescapeHTML() function does not do this. Modified: trunk/data/public/js/pfcresource.js =================================================================== --- trunk/data/public/js/pfcresource.js 2007-11-22 16:45:25 UTC (rev 1214) +++ trunk/data/public/js/pfcresource.js 2007-11-22 16:50:37 UTC (rev 1215) @@ -17,15 +17,15 @@ setLabel: function(key, value) { - this.labels[key] = value; + this.labels.set(key,value); }, getLabel: function() { var key = this.getLabel.arguments[0]; - if (this.labels[key]) + if (this.labels.get(key)) { - this.getLabel.arguments[0] = this.labels[key]; + this.getLabel.arguments[0] = this.labels.get(key); return String.sprintf2(this.getLabel.arguments); } else @@ -34,27 +34,27 @@ setFileUrl: function(key, value) { - this.fileurl[key] = value; + this.fileurl.set(key,value); }, getFileUrl: function(key) { - if (this.fileurl[key]) - return this.fileurl[key]; + if (this.fileurl.get(key)) + return this.fileurl.get(key); else return ""; }, setSmiley: function(key, value) { - this.smileys[key] = value; - this.smileysreverse[value] = key; + this.smileys.set(key, value); + this.smileysreverse.set(value,key); this.smileyskeys.push(key); }, getSmiley: function(key) { - if (this.smileys[key]) - return this.smileys[key]; + if (this.smileys.get(key)) + return this.smileys.get(key); else return ""; }, Modified: trunk/data/public/js/prototype.js =================================================================== --- trunk/data/public/js/prototype.js 2007-11-22 16:45:25 UTC (rev 1214) +++ trunk/data/public/js/prototype.js 2007-11-22 16:50:37 UTC (rev 1215) @@ -1,27 +1,29 @@ -/* Prototype JavaScript framework, version 1.5.1.1 +/* Prototype JavaScript framework, version 1.6.0 * (c) 2005-2007 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://www.prototypejs.org/ * -/*--------------------------------------------------------------------------*/ + *--------------------------------------------------------------------------*/ var Prototype = { - Version: '1.5.1.1', + Version: '1.6.0', Browser: { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, - Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1 + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, + MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) }, BrowserFeatures: { XPath: !!document.evaluate, ElementExtensions: !!window.HTMLElement, SpecificElementExtensions: - (document.createElement('div').__proto__ !== - document.createElement('form').__proto__) + document.createElement('div').__proto__ && + document.createElement('div').__proto__ !== + document.createElement('form').__proto__ }, ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>', @@ -29,24 +31,81 @@ emptyFunction: function() { }, K: function(x) { return x } -} +}; +if (Prototype.Browser.MobileSafari) + Prototype.BrowserFeatures.SpecificElementExtensions = false; + +if (Prototype.Browser.WebKit) + Prototype.BrowserFeatures.XPath = false; + +/* Based on Alex Arnell's inheritance implementation. */ var Class = { create: function() { - return function() { + var parent = null, properties = $A(arguments); + if (Object.isFunction(properties[0])) + parent = properties.shift(); + + function klass() { this.initialize.apply(this, arguments); } + + Object.extend(klass, Class.Methods); + klass.superclass = parent; + klass.subclasses = []; + + if (parent) { + var subclass = function() { }; + subclass.prototype = parent.prototype; + klass.prototype = new subclass; + parent.subclasses.push(klass); + } + + for (var i = 0; i < properties.length; i++) + klass.addMethods(properties[i]); + + if (!klass.prototype.initialize) + klass.prototype.initialize = Prototype.emptyFunction; + + klass.prototype.constructor = klass; + + return klass; } -} +}; -var Abstract = new Object(); +Class.Methods = { + addMethods: function(source) { + var ancestor = this.superclass && this.superclass.prototype; + var properties = Object.keys(source); + if (!Object.keys({ toString: true }).length) + properties.push("toString", "valueOf"); + + for (var i = 0, length = properties.length; i < length; i++) { + var property = properties[i], value = source[property]; + if (ancestor && Object.isFunction(value) && + value.argumentNames().first() == "$super") { + var method = value, value = Object.extend((function(m) { + return function() { return ancestor[m].apply(this, arguments) }; + })(property).wrap(method), { + valueOf: function() { return method }, + toString: function() { return method.toString() } + }); + } + this.prototype[property] = value; + } + + return this; + } +}; + +var Abstract = { }; + Object.extend = function(destination, source) { - for (var property in source) { + for (var property in source) destination[property] = source[property]; - } return destination; -} +}; Object.extend(Object, { inspect: function(object) { @@ -62,24 +121,35 @@ toJSON: function(object) { var type = typeof object; - switch(type) { + switch (type) { case 'undefined': case 'function': case 'unknown': return; case 'boolean': return object.toString(); } + if (object === null) return 'null'; if (object.toJSON) return object.toJSON(); - if (object.ownerDocument === document) return; + if (Object.isElement(object)) return; + var results = []; for (var property in object) { var value = Object.toJSON(object[property]); if (value !== undefined) results.push(property.toJSON() + ': ' + value); } + return '{' + results.join(', ') + '}'; }, + toQueryString: function(object) { + return $H(object).toQueryString(); + }, + + toHTML: function(object) { + return object && object.toHTML ? object.toHTML() : String.interpret(object); + }, + keys: function(object) { var keys = []; for (var property in object) @@ -95,55 +165,99 @@ }, clone: function(object) { - return Object.extend({}, object); + return Object.extend({ }, object); + }, + + isElement: function(object) { + return object && object.nodeType == 1; + }, + + isArray: function(object) { + return object && object.constructor === Array; + }, + + isHash: function(object) { + return object instanceof Hash; + }, + + isFunction: function(object) { + return typeof object == "function"; + }, + + isString: function(object) { + return typeof object == "string"; + }, + + isNumber: function(object) { + return typeof object == "number"; + }, + + isUndefined: function(object) { + return typeof object == "undefined"; } }); -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} +Object.extend(Function.prototype, { + argumentNames: function() { + var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); + return names.length == 1 && !names[0] ? [] : names; + }, -Function.prototype.bindAsEventListener = function(object) { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [event || window.event].concat(args)); - } -} + bind: function() { + if (arguments.length < 2 && arguments[0] === undefined) return this; + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } + }, -Object.extend(Number.prototype, { - toColorPart: function() { - return this.toPaddedString(2, 16); + bindAsEventListener: function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [event || window.event].concat(args)); + } }, - succ: function() { - return this + 1; + curry: function() { + if (!arguments.length) return this; + var __method = this, args = $A(arguments); + return function() { + return __method.apply(this, args.concat($A(arguments))); + } }, - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; + delay: function() { + var __method = this, args = $A(arguments), timeout = args.shift() * 1000; + return window.setTimeout(function() { + return __method.apply(__method, args); + }, timeout); }, - toPaddedString: function(length, radix) { - var string = this.toString(radix || 10); - return '0'.times(length - string.length) + string; + wrap: function(wrapper) { + var __method = this; + return function() { + return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); + } }, - toJSON: function() { - return isFinite(this) ? this.toString() : 'null'; + methodize: function() { + if (this._methodized) return this._methodized; + var __method = this; + return this._methodized = function() { + return __method.apply(null, [this].concat($A(arguments))); + }; } }); +Function.prototype.defer = Function.prototype.delay.curry(0.01); + Date.prototype.toJSON = function() { - return '"' + this.getFullYear() + '-' + - (this.getMonth() + 1).toPaddedString(2) + '-' + - this.getDate().toPaddedString(2) + 'T' + - this.getHours().toPaddedString(2) + ':' + - this.getMinutes().toPaddedString(2) + ':' + - this.getSeconds().toPaddedString(2) + '"'; + return '"' + this.getUTCFullYear() + '-' + + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + + this.getUTCDate().toPaddedString(2) + 'T' + + this.getUTCHours().toPaddedString(2) + ':' + + this.getUTCMinutes().toPaddedString(2) + ':' + + this.getUTCSeconds().toPaddedString(2) + 'Z"'; }; var Try = { @@ -155,17 +269,22 @@ try { returnValue = lambda(); break; - } catch (e) {} + } catch (e) { } } return returnValue; } -} +}; +RegExp.prototype.match = RegExp.prototype.test; + +RegExp.escape = function(str) { + return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +}; + /*--------------------------------------------------------------------------*/ -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { +var PeriodicalExecuter = Class.create({ initialize: function(callback, frequency) { this.callback = callback; this.frequency = frequency; @@ -178,6 +297,10 @@ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); }, + execute: function() { + this.callback(this); + }, + stop: function() { if (!this.timer) return; clearInterval(this.timer); @@ -188,13 +311,13 @@ if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; - this.callback(this); + this.execute(); } finally { this.currentlyExecuting = false; } } } -} +}); Object.extend(String, { interpret: function(value) { return value == null ? '' : String(value); @@ -238,14 +361,14 @@ scan: function(pattern, iterator) { this.gsub(pattern, iterator); - return this; + return String(this); }, truncate: function(length, truncation) { length = length || 30; truncation = truncation === undefined ? '...' : truncation; return this.length > length ? - this.slice(0, length - truncation.length) + truncation : this; + this.slice(0, length - truncation.length) + truncation : String(this); }, strip: function() { @@ -279,7 +402,7 @@ }, unescapeHTML: function() { - var div = document.createElement('div'); + var div = new Element('div'); div.innerHTML = this.stripTags(); return div.childNodes[0] ? (div.childNodes.length > 1 ? $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : @@ -288,16 +411,16 @@ toQueryParams: function(separator) { var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return {}; + if (!match) return { }; - return match[1].split(separator || '&').inject({}, function(hash, pair) { + return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { var key = decodeURIComponent(pair.shift()); var value = pair.length > 1 ? pair.join('=') : pair[0]; if (value != undefined) value = decodeURIComponent(value); if (key in hash) { - if (hash[key].constructor != Array) hash[key] = [hash[key]]; + if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; hash[key].push(value); } else hash[key] = value; @@ -316,9 +439,7 @@ }, times: function(count) { - var result = ''; - for (var i = 0; i < count; i++) result += this; - return result; + return count < 1 ? '' : new Array(count + 1).join(this); }, camelize: function() { @@ -396,6 +517,10 @@ blank: function() { return /^\s*$/.test(this); + }, + + interpolate: function(object, pattern) { + return new Template(this, pattern).evaluate(object); } }); @@ -409,10 +534,10 @@ }); String.prototype.gsub.prepareReplacement = function(replacement) { - if (typeof replacement == 'function') return replacement; + if (Object.isFunction(replacement)) return replacement; var template = new Template(replacement); return function(match) { return template.evaluate(match) }; -} +}; String.prototype.parseQuery = String.prototype.toQueryParams; @@ -423,28 +548,46 @@ with (String.prototype.escapeHTML) div.appendChild(text); -var Template = Class.create(); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -Template.prototype = { +var Template = Class.create({ initialize: function(template, pattern) { this.template = template.toString(); - this.pattern = pattern || Template.Pattern; + this.pattern = pattern || Template.Pattern; }, evaluate: function(object) { + if (Object.isFunction(object.toTemplateReplacements)) + object = object.toTemplateReplacements(); + return this.template.gsub(this.pattern, function(match) { - var before = match[1]; + if (object == null) return ''; + + var before = match[1] || ''; if (before == '\\') return match[2]; - return before + String.interpret(object[match[3]]); - }); + + var ctx = object, expr = match[3]; + var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr); + if (match == null) return before; + + while (match != null) { + var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; + ctx = ctx[comp]; + if (null == ctx || '' == match[3]) break; + expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); + match = pattern.exec(expr); + } + + return before + String.interpret(ctx); + }.bind(this)); } -} +}); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead'); +var $break = { }; var Enumerable = { - each: function(iterator) { + each: function(iterator, context) { var index = 0; + iterator = iterator.bind(context); try { this._each(function(value) { iterator(value, index++); @@ -455,40 +598,45 @@ return this; }, - eachSlice: function(number, iterator) { + eachSlice: function(number, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var index = -number, slices = [], array = this.toArray(); while ((index += number) < array.length) slices.push(array.slice(index, index+number)); - return slices.map(iterator); + return slices.collect(iterator, context); }, - all: function(iterator) { + all: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result = true; this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); + result = result && !!iterator(value, index); if (!result) throw $break; }); return result; }, - any: function(iterator) { + any: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result = false; this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) + if (result = !!iterator(value, index)) throw $break; }); return result; }, - collect: function(iterator) { + collect: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var results = []; this.each(function(value, index) { - results.push((iterator || Prototype.K)(value, index)); + results.push(iterator(value, index)); }); return results; }, - detect: function(iterator) { + detect: function(iterator, context) { + iterator = iterator.bind(context); var result; this.each(function(value, index) { if (iterator(value, index)) { @@ -499,7 +647,8 @@ return result; }, - findAll: function(iterator) { + findAll: function(iterator, context) { + iterator = iterator.bind(context); var results = []; this.each(function(value, index) { if (iterator(value, index)) @@ -508,17 +657,24 @@ return results; }, - grep: function(pattern, iterator) { + grep: function(filter, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var results = []; + + if (Object.isString(filter)) + filter = new RegExp(filter); + this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) + if (filter.match(value)) + results.push(iterator(value, index)); + }); return results; }, include: function(object) { + if (Object.isFunction(this.indexOf)) + if (this.indexOf(object) != -1) return true; + var found = false; this.each(function(value) { if (value == object) { @@ -537,7 +693,8 @@ }); }, - inject: function(memo, iterator) { + inject: function(memo, iterator, context) { + iterator = iterator.bind(context); this.each(function(value, index) { memo = iterator(memo, value, index); }); @@ -551,30 +708,33 @@ }); }, - max: function(iterator) { + max: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); + value = iterator(value, index); if (result == undefined || value >= result) result = value; }); return result; }, - min: function(iterator) { + min: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var result; this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); + value = iterator(value, index); if (result == undefined || value < result) result = value; }); return result; }, - partition: function(iterator) { + partition: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; var trues = [], falses = []; this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? + (iterator(value, index) ? trues : falses).push(value); }); return [trues, falses]; @@ -582,13 +742,14 @@ pluck: function(property) { var results = []; - this.each(function(value, index) { + this.each(function(value) { results.push(value[property]); }); return results; }, - reject: function(iterator) { + reject: function(iterator, context) { + iterator = iterator.bind(context); var results = []; this.each(function(value, index) { if (!iterator(value, index)) @@ -597,7 +758,8 @@ return results; }, - sortBy: function(iterator) { + sortBy: function(iterator, context) { + iterator = iterator.bind(context); return this.map(function(value, index) { return {value: value, criteria: iterator(value, index)}; }).sort(function(left, right) { @@ -612,7 +774,7 @@ zip: function() { var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') + if (Object.isFunction(args.last())) iterator = args.pop(); var collections = [this].concat(args).map($A); @@ -628,46 +790,42 @@ inspect: function() { return '#<Enumerable:' + this.toArray().inspect() + '>'; } -} +}; Object.extend(Enumerable, { map: Enumerable.collect, find: Enumerable.detect, select: Enumerable.findAll, + filter: Enumerable.findAll, member: Enumerable.include, - entries: Enumerable.toArray + entries: Enumerable.toArray, + every: Enumerable.all, + some: Enumerable.any }); -var $A = Array.from = function(iterable) { +function $A(iterable) { if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0, length = iterable.length; i < length; i++) - results.push(iterable[i]); - return results; - } + if (iterable.toArray) return iterable.toArray(); + var length = iterable.length, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; } if (Prototype.Browser.WebKit) { - $A = Array.from = function(iterable) { + function $A(iterable) { if (!iterable) return []; - if (!(typeof iterable == 'function' && iterable == '[object NodeList]') && - iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0, length = iterable.length; i < length; i++) - results.push(iterable[i]); - return results; - } + if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && + iterable.toArray) return iterable.toArray(); + var length = iterable.length, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; } } +Array.from = $A; + Object.extend(Array.prototype, Enumerable); -if (!Array.prototype._reverse) - Array.prototype._reverse = Array.prototype.reverse; +if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; Object.extend(Array.prototype, { _each: function(iterator) { @@ -696,7 +854,7 @@ flatten: function() { return this.inject([], function(array, value) { - return array.concat(value && value.constructor == Array ? + return array.concat(Object.isArray(value) ? value.flatten() : [value]); }); }, @@ -708,12 +866,6 @@ }); }, - indexOf: function(object) { - for (var i = 0, length = this.length; i < length; i++) - if (this[i] ==... [truncated message content] |
From: <ke...@us...> - 2007-11-25 19:19:20
|
Revision: 1216 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1216&view=rev Author: kerphi Date: 2007-11-25 11:19:20 -0800 (Sun, 25 Nov 2007) Log Message: ----------- Security fix : nickname HTML injection (thanks to teamhackaday) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/themes/default/chat.html.tpl.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-11-22 16:50:37 UTC (rev 1215) +++ trunk/data/public/js/pfcclient.js 2007-11-25 19:19:20 UTC (rev 1216) @@ -92,8 +92,6 @@ Event.observe(this.el_words, 'keyup', this.callbackWords_OnKeyup.bindAsEventListener(this), false); Event.observe(this.el_words, 'mouseup', this.callbackWords_OnMouseup.bindAsEventListener(this), false); Event.observe(this.el_words, 'focus', this.callbackWords_OnFocus.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'keydown', this.callbackHandle_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'change', this.callbackHandle_OnChange.bindAsEventListener(this), false); Event.observe(document.body, 'unload', this.callback_OnUnload.bindAsEventListener(this), false); }, @@ -309,9 +307,9 @@ if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") { - this.el_handle.innerHTML = param; - this.nickname = param; this.setUserMeta(this.nickid, 'nick', param); + this.el_handle.innerHTML = this.getUserMeta(this.nickid, 'nick').escapeHTML(); + this.nickname = this.getUserMeta(this.nickid, 'nick'); this.updateNickBox(this.nickid); // clear the possible error box generated by the bellow displayMsg(...) function @@ -822,12 +820,6 @@ // Needed for IE since the text box loses selection/caret position on blur this.setSelection(this.el_words); }, - callbackHandle_OnKeydown: function(evt) - { - }, - callbackHandle_OnChange: function(evt) - { - }, callback_OnUnload: function(evt) { /* don't disconnect users when they reload the window @@ -950,9 +942,9 @@ line += ' <span class="pfc_nick">'; line += '‹'; line += '<span '; - line += 'onclick="pfc.insert_text(\'' + sender.replace("'", '\\\'') + ', \',\'\',false)" '; + line += 'onclick="pfc.insert_text(\'' + sender.escapeHTML().replace("'", '\\\'') + ', \',\'\',false)" '; line += 'class="pfc_nickmarker pfc_nick_'+ _to_utf8(sender).md5() +'">'; - line += sender; + line += sender.escapeHTML(); line += '</span>'; line += '›'; line += '</span> '; @@ -1387,7 +1379,7 @@ var nobr = document.createElement('nobr'); var span = document.createElement('span'); span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid); - span.appendChild(document.createTextNode(nick)); + span.innerHTML = nick.escapeHTML(); nobr.appendChild(span); a.appendChild(nobr); Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-11-22 16:50:37 UTC (rev 1215) +++ trunk/themes/default/chat.html.tpl.php 2007-11-25 19:19:20 UTC (rev 1216) @@ -21,7 +21,7 @@ . ' style="cursor: pointer"'; } ?> - ><?php echo $u->nick; ?></p> + ><?php echo phpFreeChat::FilterSpecialChar($u->nick); ?></p> </td> <td class="pfc_td2"> <input type="text" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-25 20:12:26
|
Revision: 1217 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1217&view=rev Author: kerphi Date: 2007-11-25 12:12:30 -0800 (Sun, 25 Nov 2007) Log Message: ----------- cleanup Modified Paths: -------------- trunk/src/commands/getnewmsg.class.php trunk/src/pfccontainer.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/src/commands/getnewmsg.class.php =================================================================== --- trunk/src/commands/getnewmsg.class.php 2007-11-25 19:19:20 UTC (rev 1216) +++ trunk/src/commands/getnewmsg.class.php 2007-11-25 20:12:30 UTC (rev 1217) @@ -84,7 +84,7 @@ $m_sender = $d["sender"]; $m_recipientid = $recipientid; $m_cmd = $d["cmd"]; - $m_param = phpFreeChat::PostFilterMsg($d["param"]); + $m_param = phpFreeChat::PostFilterMsg(pfc_make_hyperlink($d["param"])); $js[] = array($m_id, $m_date, $m_time, Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2007-11-25 19:19:20 UTC (rev 1216) +++ trunk/src/pfccontainer.class.php 2007-11-25 20:12:30 UTC (rev 1217) @@ -429,7 +429,7 @@ $data["sender"] = $formated_line[2]; $data["cmd"] = $formated_line[3]; // convert URLs to html - $data["param"] = pfc_make_hyperlink($formated_line[4]); + $data["param"] = $formated_line[4]; $datalist[$data["id"]] = $data; } } Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-11-25 19:19:20 UTC (rev 1216) +++ trunk/themes/default/chat.js.tpl.php 2007-11-25 20:12:30 UTC (rev 1217) @@ -68,7 +68,7 @@ var pfc_theme = <?php echo $json->encode($theme); ?>; var pfc_isready = false; var pfc_server_script_url = <?php echo $json->encode($c->server_script_url); ?>; -var pfc_nickmeta_key_to_hide = <?php echo $json->encode($c->nickmeta_key_to_hide); ?>; +var pfc_nickmeta_key_to_hide = <?php echo $json->encode($c->nickmeta_key_to_hide); ?>; Event.observe(window, 'load', function() { pfc = new pfcClient(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-11-25 21:45:17
|
Revision: 1218 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1218&view=rev Author: kerphi Date: 2007-11-25 13:45:21 -0800 (Sun, 25 Nov 2007) Log Message: ----------- update partners link and documentation links Modified Paths: -------------- trunk/demo/index.php trunk/index.php Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-11-25 20:12:30 UTC (rev 1217) +++ trunk/demo/index.php 2007-11-25 21:45:21 UTC (rev 1218) @@ -42,11 +42,14 @@ </li> </ul> <p class="partner"> - <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="../style/logo_88x31.gif" /></a><br/> - <a href="http://sourceforge.net/projects/phpfreechat"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=158880&type=1" alt="SourceForge.net Logo" height="31px" width="88px" /></a><br/><br/> - <a href="http://www.hotscripts.com/?RID=N452772">hotscripts.com</a><br/> - <a href="http://www.jeu-gratuit.net/">jeu-gratuit.net</a><br/> - <a href="http://www.pronofun.com/">pronofun.com</a><br/> + <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="style/logo_88x31.gif" /></a><br/> + <a href="http://www.jeu-gratuit.net/">jeu-gratuit</a><br/> + <a href="http://jeux-flash.jeu-gratuit.net/">jeux-flash</a><br/> + <a href="http://www.pronofun.com/">pronofun</a><br/> + <a href="http://areno.jeu-gratuit.net/">areno</a><br/> + <a href="http://www.micropolia.com/">micropolia</a><br/> + <a href="http://www.zeitoun.net/">zeitoun</a><br/> + <a href="http://www.hotscripts.com/?RID=N452772">hotscripts</a><br/> </p> </div> Modified: trunk/index.php =================================================================== --- trunk/index.php 2007-11-25 20:12:30 UTC (rev 1217) +++ trunk/index.php 2007-11-25 21:45:21 UTC (rev 1218) @@ -73,6 +73,9 @@ <a href="http://www.phpfreechat.net/install.fr.html">Install [fr]</a> </li> <li class="item"> + <a href="http://www.phpfreechat.net/parameters-list.en.html">Parameters list [en]</a> + </li> + <li class="item"> <a href="http://www.phpfreechat.net/faq.en.html">FAQ [en]</a> </li> <li class="item"> @@ -95,10 +98,13 @@ </ul> <p class="partner"> <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="style/logo_88x31.gif" /></a><br/> - <a href="http://sourceforge.net/projects/phpfreechat"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=158880&type=1" alt="SourceForge.net Logo" height="31" width="88" /></a><br/><br/> - <a href="http://www.hotscripts.com/?RID=N452772">hotscripts.com</a><br/> - <a href="http://www.jeu-gratuit.net/">jeu-gratuit.net</a><br/> - <a href="http://www.pronofun.com/">pronofun.com</a><br/> + <a href="http://www.jeu-gratuit.net/">jeu-gratuit</a><br/> + <a href="http://jeux-flash.jeu-gratuit.net/">jeux-flash</a><br/> + <a href="http://www.pronofun.com/">pronofun</a><br/> + <a href="http://areno.jeu-gratuit.net/">areno</a><br/> + <a href="http://www.micropolia.com/">micropolia</a><br/> + <a href="http://www.zeitoun.net/">zeitoun</a><br/> + <a href="http://www.hotscripts.com/?RID=N452772">hotscripts</a><br/> </p> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-03-23 18:52:53
|
Revision: 1223 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1223&view=rev Author: kerphi Date: 2008-03-23 11:52:58 -0700 (Sun, 23 Mar 2008) Log Message: ----------- Add a new parameter refresh_delay_steps used to adjust dynamically the refresh_delay parameter depending on the chat activity (thanks to Markus for the patch) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-11-26 13:08:10 UTC (rev 1222) +++ trunk/data/public/js/pfcclient.js 2008-03-23 18:52:58 UTC (rev 1223) @@ -1,2085 +1,2124 @@ -// Browser detection mostly taken from prototype.js 1.5.1.1. -var is_ie = !!(window.attachEvent && !window.opera); -var is_khtml = !!(navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML")); -var is_gecko = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1; -var is_ie7 = navigator.userAgent.indexOf('MSIE 7') > 0; -var is_opera = !!window.opera; -var is_webkit = navigator.userAgent.indexOf('AppleWebKit/') > -1; - -/** - * This class is the client part of phpFreeChat - * (depends on prototype library) - * @author Stephane Gully - */ -var pfcClient = Class.create(); - -//defining the rest of the class implmentation -pfcClient.prototype = { - - initialize: function() - { - // load the graphical user interface builder - this.gui = new pfcGui(); - // load the resources manager (labels and urls) - this.res = new pfcResource(); - - this.nickname = pfc_nickname; - this.nickid = pfc_nickid; - this.usermeta = $H(); - this.chanmeta = $H(); - this.nickwhoisbox = $H(); - - // this array contains all the sent commands - // use the up and down arrow key to navigate through the history - this.cmdhistory = Array(); - this.cmdhistoryid = -1; - this.cmdhistoryissearching = false; - - /* - this.channels = Array(); - this.channelids = Array(); - */ - this.privmsgs = Array(); - this.privmsgids = Array(); - - this.timeout = null; - this.refresh_delay = pfc_refresh_delay; - this.last_response_time = new Date().getTime(); - this.last_request_time = new Date().getTime(); - - /* unique client id for each windows used to identify a open window - * this id is passed every time the JS communicate with server - * (2 clients can use the same session: then only the nickname is shared) */ - this.clientid = pfc_clientid; - - this.isconnected = false; - this.nicklist = $H(); - this.nickcolor = Array(); - this.colorlist = Array(); - - this.blinktmp = Array(); - this.blinkloop = Array(); - this.blinktimeout = Array(); - }, - - loadChat: function() { - new Ajax.Request(pfc_server_script_url, { - method: 'get', - parameters: {pfc_ajax: 1, f: 'loadChat'}, - onSuccess: function(transport) { - eval( transport.responseText ); - } - }); - }, - - connectListener: function() - { - this.el_words = $('pfc_words'); - this.el_handle = $('pfc_handle'); - this.el_container = $('pfc_container'); -// this.el_online = $('pfc_online'); - this.el_errors = $('pfc_errors'); - - this.detectactivity = new DetectActivity(this.el_container); - // restore the window title when user come back to the active zone - if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow.bindAsEventListener(this.gui); - - /* the events callbacks */ - this.el_words.onkeypress = this.callbackWords_OnKeypress.bindAsEventListener(this); -// don't use this line because when doing completeNick the "return false" doesn't work (focus is lost) -// Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); - Event.observe(this.el_words, 'keydown', this.callbackWords_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_words, 'keyup', this.callbackWords_OnKeyup.bindAsEventListener(this), false); - Event.observe(this.el_words, 'mouseup', this.callbackWords_OnMouseup.bindAsEventListener(this), false); - Event.observe(this.el_words, 'focus', this.callbackWords_OnFocus.bindAsEventListener(this), false); - Event.observe(document.body, 'unload', this.callback_OnUnload.bindAsEventListener(this), false); - }, - - refreshGUI: function() - { - this.minmax_status = pfc_start_minimized; - var cookie = getCookie('pfc_minmax_status'); - if (cookie != null) - this.minmax_status = (cookie == 'true'); - - cookie = getCookie('pfc_nickmarker'); - this.nickmarker = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.nickmarker = pfc_nickmarker; - - cookie = getCookie('pfc_clock'); - this.clock = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.clock = pfc_clock; - - cookie = getCookie('pfc_showsmileys'); - this.showsmileys = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showsmileys = pfc_showsmileys; - - cookie = getCookie('pfc_showwhosonline'); - this.showwhosonline = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showwhosonline = pfc_showwhosonline; - - // '' means no forced color, let CSS choose the text color - this.current_text_color = ''; - cookie = getCookie('pfc_current_text_color'); - if (cookie != null) - this.switch_text_color(cookie); - - cookie = getCookie('pfc_issoundenable'); - this.issoundenable = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.issoundenable = pfc_startwithsound; - - this.refresh_loginlogout(); - this.refresh_minimize_maximize(); - this.refresh_Smileys(); - this.refresh_sound(); - this.refresh_nickmarker(); - }, - - /** - * Show a popup dialog to ask user to choose a nickname - */ - askNick: function(nickname,error_text) - { - // ask to choose a nickname - if (nickname == '' || nickname == undefined) nickname = this.nickname; - - // build a dhtml prompt box - var pfcp = this.getPrompt();//new pfcPrompt($('pfc_container')); - pfcp.callback = function(v) { pfc.askNickResponse(v); } - pfcp.prompt((error_text != undefined ? '<span style="color:red">'+error_text+'</span><br/>' : '')+this.res.getLabel('Please enter your nickname'), nickname); - pfcp.focus(); - }, - askNickResponse: function(newnick) - { - if (newnick) - { - if (this.isconnected) - this.sendRequest('/nick "'+newnick+'"'); - else - this.sendRequest('/connect "'+newnick+'"'); - } - }, - - /** - * Reacte to the server response - */ - handleResponse: function(cmd, resp, param) - { - // display some debug messages - if (pfc_debug) - if (cmd != "update") - { - var param2 = param; - if (cmd == "who" || cmd == "who2") - { - param2 = $H(param2); - param2.set('meta', $H(param2.get('meta'))); - param2.get('meta').set('users', $H(param2.get('meta').get('users'))); - trace('handleResponse: '+cmd + "-"+resp+"-"+param2.inspect()); - } - else - if (cmd == "whois" || cmd == "whois2") - { - param2 = $H(param2); - trace('handleResponse: '+cmd + "-"+resp+"-"+param2.inspect()); - } - else - if (cmd == "getnewmsg" || cmd == "join") - { - param2 = $A(param2); - trace('handleResponse: '+cmd + "-"+resp+"-"+param2.inspect()); - } - else - trace('handleResponse: '+cmd + "-"+resp+"-"+param); - } - - if (cmd == "connect") - { - if (resp == "ok") - { - this.nickname = param[0]; - this.isconnected = true; - - // start the polling system - this.updateChat(true); - } - else - this.isconnected = false; - this.refresh_loginlogout(); - } - else if (cmd == "quit") - { - if (resp =="ok") - { - // stop updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - } - else if (cmd == "join" || cmd == "join2") - { - if (resp =="ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "ch"); - if (cmd != "join2" || this.gui.tabs.length == 1) this.gui.setTabById(tabid); - this.refresh_Smileys(); - this.refresh_WhosOnline(); - } - else if (resp == "max_channels") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of joined channels has been reached') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "leave") - { - if (resp =="ok") - { - // remove the channel - var tabid = param; - this.gui.removeTabById(tabid); - - // synchronize the channel client arrays - /* - var index = -1; - index = this.channelids.indexOf(tabid); - this.channelids = this.channelids.without(tabid); - this.channels = this.channels.without(this.channels[index]); - */ - - // synchronize the privmsg client arrays - index = -1; - index = indexOf(this.privmsgids, tabid); - this.privmsgids = without(this.privmsgids, tabid); - this.privmsgs = without(this.privmsgs, this.privmsgs[index]); - - } - } - else if (cmd == "privmsg" || cmd == "privmsg2") - { - if (resp == "ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "pv"); - if (cmd != "privmsg2" || this.gui.tabs.length == 1) this.gui.setTabById(tabid); - - this.privmsgs.push(name); - this.privmsgids.push(tabid); - - } - else if (resp == "max_privmsg") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of private chat has been reached') ); - } - else if (resp == "unknown") - { - // speak to unknown user - this.displayMsg( cmd, this.res.getLabel('You are trying to speak to a unknown (or not connected) user') ); - } - else if (resp == "speak_to_myself") - { - this.displayMsg( cmd, this.res.getLabel('You are not allowed to speak to yourself') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "nick") - { - // give focus the the input text box if wanted - if (pfc_focus_on_connect) this.el_words.focus(); - - if (resp == "connected" || resp == "notchanged") - { - cmd = ''; - } - - if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") - { - this.setUserMeta(this.nickid, 'nick', param); - this.el_handle.innerHTML = this.getUserMeta(this.nickid, 'nick').escapeHTML(); - this.nickname = this.getUserMeta(this.nickid, 'nick'); - this.updateNickBox(this.nickid); - - // clear the possible error box generated by the bellow displayMsg(...) function - this.clearError(Array(this.el_words)); - } - else if (resp == "isused") - { - this.setError(this.res.getLabel('Chosen nickname is already used'), Array()); - this.askNick(param,this.res.getLabel('Chosen nickname is already used')); - } - else if (resp == "notallowed") - { - // When frozen_nick is true and the nickname is already used, server will return - // the 'notallowed' status. It will display a message and stop chat update. - // If the chat update is not stopped, this will loop forever - // as long as the forced nickname is not changed. - - // display a message - this.setError(this.res.getLabel('Chosen nickname is not allowed'), Array()); - // then stop chat updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - } - else if (cmd == "update") - { - } - else if (cmd == "version") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('phpfreechat current version is %s',param) ); - } - } - else if (cmd == "help") - { - if (resp == "ok") - { - this.displayMsg( cmd, param); - } - } - else if (cmd == "rehash") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('Configuration has been rehashed') ); - } - else if (resp == "ko") - { - this.displayMsg( cmd, this.res.getLabel('A problem occurs during rehash') ); - } - } - else if (cmd == "banlist") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "unban") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "auth") - { - if (resp == "ban") - { - alert(param); - } - if (resp == "frozen") - { - alert(param); - } - else if (resp == "nick") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "debug") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "clear") - { - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - container.innerHTML = ""; - } - else if (cmd == "identify") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "checknickchange") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "whois" || cmd == "whois2") - { - param = $H(param); - var nickid = param.get('nickid'); - if (resp == "ok") - { - this.setUserMeta(nickid, param); - this.updateNickBox(nickid); - this.updateNickWhoisBox(nickid); - } - if (cmd == "whois") - { - // display the whois info - var um = this.getAllUserMeta(nickid); - var um_keys = um.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = um.get(k); - if (v && - // these parameter are used internaly (don't display it) - k != 'nickid' && - k != 'floodtime' && - k != 'flood_nbmsg' && - k != 'flood_nbchar') - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "who" || cmd == "who2") - { - param = $H(param); - var chan = param.get('chan'); - var chanid = param.get('chanid'); - var meta = $H(param.get('meta')); - meta.set('users', $H(meta.get('users'))); - if (resp == "ok") - { - this.setChanMeta(chanid,meta); - // send /whois commands for unknown users - for (var i=0; i<meta.get('users').get('nickid').length; i++) - { - var nickid = meta.get('users').get('nickid')[i]; - var nick = meta.get('users').get('nick')[i]; - var um = this.getAllUserMeta(nickid); - if (!um) this.sendRequest('/whois2 "'+nickid+'"'); - } - - // update the nick list display on the current channel - this.updateNickListBox(chanid); - } - if (cmd == "who") - { - // display the whois info - var cm = this.getAllChanMeta(chanid); - var cm_keys = cm.keys(); - var msg = ''; - for (var i=0; i<cm_keys.length; i++) - { - var k = cm_keys[i]; - var v = cm[k]; - if (k != 'users') - { - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "getnewmsg") - { - if (resp == "ok") - { - this.handleComingRequest(param); - } - } - else if (cmd == "send") - { - } - else - alert(cmd + "-"+resp+"-"+param); - }, - - getAllUserMeta: function(nickid) - { - if (nickid && this.usermeta.get(nickid)) - return this.usermeta.get(nickid); - else - return null; - }, - - getUserMeta: function(nickid, key) - { - if (nickid && key && this.usermeta.get(nickid) && this.usermeta.get(nickid).get(key)) - return this.usermeta.get(nickid).get(key); - else - return ''; - }, - - setUserMeta: function(nickid, key, value) - { - if (nickid && key) - { - if (!this.usermeta.get(nickid)) this.usermeta.set(nickid, $H()); - if (value) - this.usermeta.get(nickid).set(key, value); - else - this.usermeta.set(nickid, $H(key)); - } - }, - - getAllChanMeta: function(chanid) - { - if (chanid && this.chanmeta.get(chanid)) - return this.chanmeta.get(chanid); - else - return null; - }, - - getChanMeta: function(chanid, key) - { - if (chanid && key && this.chanmeta.get(chanid) && this.chanmeta.get(chanid).get(key)) - return this.chanmeta.get(chanid).get(key); - else - return ''; - }, - - setChanMeta: function(chanid, key, value) - { - if (chanid && key) - { - if (!this.chanmeta.get(chanid)) this.chanmeta.set(chanid, $H()); - if (value) - this.chanmeta.get(chanid).set(key,value); - else - this.chanmeta.set(chanid, $H(key)); - } - }, - - doSendMessage: function() - { - var w = this.el_words; - var wval = w.value; - - // Append the string to the history. - this.cmdhistory.push(wval); - this.cmdhistoryid = this.cmdhistory.length; - this.cmdhistoryissearching = false; - - // Send the string to the server. - re = new RegExp("^(\/[a-zA-Z0-9]+)( (.*)|)"); - if (wval.match(re)) - { - // A user command. - cmd = wval.replace(re, '$1'); - param = wval.replace(re, '$3'); - this.sendRequest(cmd +' '+ param.substr(0, pfc_max_text_len + 2*this.clientid.length)); - } - else - { - // A classic 'send' command. - - // Empty messages with only spaces. - rx = new RegExp('^[ ]*$','g'); - wval = wval.replace(rx,''); - - // Truncate the text length. - wval = wval.substr(0,pfc_max_text_len); - - // Colorize the text with current_text_color. - if (this.current_text_color != '' && wval.length != '') - wval = '[color=#' + this.current_text_color + '] ' + wval + ' [/color]'; - - this.sendRequest('/send '+ wval); - } - w.value = ''; - return false; - }, - - /** - * Try to complete a nickname like on IRC when pressing the TAB key. - * Nicks with spaces may not work under certain circumstances. - * Replacing spaces with alternate spaces (e.g., ) helps. - * Gecko browsers convert the to regular spaces, so no help for these browsers. - * Note: IRC does not allow nicks with spaces, so it's much easier for those clients. :) - * @author Gerard Pinzone - */ - completeNick: function() - { - var w = this.el_words; - var selStart = w.value.length; // Default for browsers that don't support selection/caret position commands. - var selEnd = selStart; - - // Get selection/caret position. - if (w.setSelectionRange) - { - // We don't rely on the stored values for browsers that support - // the selectionStart and selectionEnd commands. - selStart = w.selectionStart; - selEnd = w.selectionEnd; - } - else if (w.createTextRange && document.selection) - { - // We must rely on the stored values for IE browsers. - selStart = (w.selStart != null) ? w.selStart : w.value.length; - selEnd = (w.selEnd != null) ? w.selEnd : w.value.length; - } - - var begin = w.value.lastIndexOf(' ', selStart - 1) + 1; - var end = (w.value.indexOf(' ', selStart) >= 0) ? w.value.indexOf(' ', selStart) : w.value.length; - var nick_src = w.value.substring(begin, end); - var non_nick_begin = w.value.substring(0, begin); - var non_nick_end = w.value.substring(end, w.value.length); - - if (nick_src != '') - { - var tabid = this.gui.getTabId(); - var n_list = this.getChanMeta(tabid, 'users')['nick']; - var nick_match = false; - for (var i = 0; i < n_list.length; i++) - { - var nick_tmp = n_list[i]; - // replace spaces in nicks with - nick_tmp = nick_tmp.replace(/ /g, '\240'); - if (nick_tmp.indexOf(nick_src) == 0) - { - if (! nick_match) - { - nick_match = true; - nick_replace = nick_tmp; - } - else - { - // more than one possibility for completion - var nick_len = Math.min(nick_tmp.length, nick_replace.length); - // only keep characters that are common to all matches - var j = 0; - for (j = 0; j < nick_len; j++) - if (nick_tmp.charAt(j) != nick_replace.charAt(j)) - break; - - nick_replace = nick_replace.substr(0, j); - } - } - } - if (nick_match) - { - w.value = non_nick_begin + nick_replace + non_nick_end; - w.selStart = w.selEnd = non_nick_begin.length + nick_replace.length; - - // Move cursor to end of completed nick. - if (w.setSelectionRange) - w.setSelectionRange(w.selEnd, w.selEnd); // Gecko - else - this.setSelection(w); // IE - } - } - }, - - /** - * Cycle to older entry in history - */ - historyUp: function() - { - // Write the previous command in the history. - if (this.cmdhistory.length > 0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid - 1; - if (this.cmdhistoryid < 0) - this.cmdhistoryid = 0; // stop at oldest entry - w.value = this.cmdhistory[this.cmdhistoryid]; - } - }, - - /** - * Cycle to newer entry in history - */ - historyDown: function() - { - // Write the next command in the history. - if (this.cmdhistory.length > 0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid + 1; - if (this.cmdhistoryid >= this.cmdhistory.length) - { - this.cmdhistoryid = this.cmdhistory.length; // stop at newest entry + 1 - w.value = ""; // blank input box - } - else - w.value = this.cmdhistory[this.cmdhistoryid]; - } - }, - - /** - * Handle the pressed keys. - * see also callbackWords_OnKeydown - */ - callbackWords_OnKeypress: function(evt) - { - // All browsers except for IE should use "evt.which." - var code = (evt.which) ? evt.which : evt.keyCode; - if (code == Event.KEY_RETURN) /* ENTER key */ - { - return this.doSendMessage(); - } - else - { - // Allow other key defaults. - return true; - } - }, - - /** - * Handle the pressed keys. - * see also callbackWords_OnKeypress - * WARNING: Suppressing defaults on the keydown event - * may prevent keypress and/or keyup events - * from firing. - */ - callbackWords_OnKeydown: function(evt) - { - if (!this.isconnected) return false; - this.clearError(Array(this.el_words)); - var code = (evt.which) ? evt.which : evt.keyCode - if (code == 38 && (is_gecko || is_ie || is_opera || is_webkit)) // up arrow key - { - /* TODO: Fix up arrow issue in Opera - may be a bug in Opera. See TAB handler comments below. */ - /* Konqueror cannot use this feature due to keycode conflicts. */ - - // Write the previous command in the history. - this.historyUp(); - - if (evt.returnValue) // IE - evt.returnValue = false; - if (evt.preventDefault) // DOM - evt.preventDefault(); - return false; // should work in all browsers - } - else if (code == 40 && (is_gecko || is_ie || is_opera || is_webkit)) // down arrow key - { - /* Konqueror cannot use this feature due to keycode conflicts. */ - - // Write the previous command in the history. - this.historyDown(); - - if (evt.returnValue) // IE - evt.returnValue = false; - if (evt.preventDefault) // DOM - evt.preventDefault(); - return false; // should work in all browsers - } - else if (code == 9) /* TAB key */ - { - // Do nickname completion like on IRC / Unix command line. - this.completeNick(); - - if (is_opera) - { - // Fixes Opera's loss of focus after TAB key is pressed. - // This is most likely due to a bug in Opera - // that executes the default key operation BEFORE the - // keydown and keypress event handler. - // This is probably the reason for the "up arrow" issue above. - //window.setTimeout(function(){evt.target.focus();}, 0); - evt.target.onblur = function() { this.focus(); this.onblur = null; }; - } - - if (evt.returnValue) // IE - evt.returnValue = false; - if (evt.preventDefault) // DOM - evt.preventDefault(); - return false; // Should work in all browsers. - } - else - { - // Allow other key defaults. - return true; - } - }, - callbackWords_OnKeyup: function(evt) - { - // Needed for IE since the text box loses selection/caret position on blur - this.storeSelectionPos(this.el_words); - }, - callbackWords_OnMouseup: function(evt) - { - // Needed for IE since the text box loses selection/caret position on blur - this.storeSelectionPos(this.el_words); - }, - callbackWords_OnFocus: function(evt) - { - // if (this.el_handle && this.el_handle.value == '' && !this.minmax_status) - // this.el_handle.focus(); - - // Needed for IE since the text box loses selection/caret position on blur - this.setSelection(this.el_words); - }, - callback_OnUnload: function(evt) - { - /* don't disconnect users when they reload the window - * this event doesn't only occurs when the page is closed but also when the page is reloaded */ - if (pfc_quit_on_closedwindow) - { - if (!this.isconnected) return false; - this.sendRequest('/quit'); - } - }, - - - /** - * hide error area and stop blinking fields - */ - clearError: function(ids) - { - this.el_errors.style.display = 'none'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'stop'); - }, - - /** - * show error area and assign to it an error message and start the blinking of given fields - */ - setError: function(str, ids) - { - this.el_errors.innerHTML = str; - this.el_errors.style.display = 'block'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'start'); - }, - - /** - * blink routines used by Error functions - */ - blink: function(id, action) - { - clearTimeout(this.blinktimeout[id]); - if ($(id) == null) return; - if (action == 'start') - { - this.blinktmp[id] = $(id).style.backgroundColor; - clearTimeout(this.blinktimeout[id]); - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - if (action == 'stop') - { - $(id).style.backgroundColor = this.blinktmp[id]; - } - if (action == 'loop') - { - if (this.blinkloop[id] == 1) - { - $(id).style.backgroundColor = '#FFDFC0'; - this.blinkloop[id] = 2; - } - else - { - $(id).style.backgroundColor = '#FFFFFF'; - this.blinkloop[id] = 1; - } - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - }, - - displayMsg: function( cmd, msg ) - { - this.setError(msg, Array()); - - // @todo find a better crossbrowser way to display messages -/* - // get the current selected tab container - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - - // to fix IE6 display bug - // http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 - div = document.createElement('div'); - // div.style.padding = "2px 5px 2px 5px"; // this will clear the screen in IE6 - div.innerHTML = '<div class="pfc_info pfc_info_'+cmd+'" style="margin:5px">'+msg+'</div>'; - - // finaly append this to the message list - container.appendChild(div); - this.gui.scrollDown(tabid, div); -*/ - }, - - handleComingRequest: function( cmds ) - { - var msg_html = $H(); - var max_msgid = $H(); - -//alert(cmds.inspect()); - - for(var mid = 0; mid < cmds.length ; mid++) - { - var id = cmds[mid][0]; - var date = cmds[mid][1]; - var time = cmds[mid][2]; - var sender = cmds[mid][3]; - var recipientid = cmds[mid][4]; - var cmd = cmds[mid][5]; - var param = cmds[mid][6]; - var fromtoday = cmds[mid][7]; - var oldmsg = cmds[mid][8]; - - // format and post message - var line = ''; - line += '<div id="pfc_msg_'+recipientid+'_'+id+'" class="pfc_cmd_'+ cmd +' pfc_message'; - line += (id % 2 == 0) ? ' pfc_evenmsg' : ' pfc_oddmsg'; - if (oldmsg == 1) line += ' pfc_oldmsg'; - line += '">'; - line += '<span class="pfc_date'; - if (fromtoday == 1) line += ' pfc_invisible'; - line += '">'+ date +'</span> '; - line += '<span class="pfc_heure">'+ time +'</span> '; - if (cmd == 'send') - { - line += ' <span class="pfc_nick">'; - line += '‹'; - line += '<span '; - line += 'onclick="pfc.insert_text(\'' + sender.escapeHTML().replace("'", '\\\'') + ', \',\'\',false)" '; - line += 'class="pfc_nickmarker pfc_nick_'+ _to_utf8(sender).md5() +'">'; - line += sender.escapeHTML(); - line += '</span>'; - line += '›'; - line += '</span> '; - } - if (cmd == 'notice' || cmd == 'me') - line += '<span class="pfc_words">* '+ this.parseMessage(param) +'</span> '; - else - line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> '; - line += '</div>'; - - if (oldmsg == 0) - if (cmd == 'send' || cmd == 'me') - { - // notify the hidden tab a message has been received - // don't notify anything if this is old messages - var tabid = recipientid; - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); - // notify the window (change the title) - if (!this.detectactivity.isActive() && pfc_notify_window) - this.gui.notifyWindow(); - } - - if (msg_html.get(recipientid) == null) - msg_html.set(recipientid, line); - else - msg_html.set(recipientid, msg_html.get(recipientid) + line); - - // remember the max message id in order to clean old lines - if (!max_msgid.get(recipientid)) max_msgid.set(recipientid, 0); - if (max_msgid.get(recipientid) < id) max_msgid.set(recipientid, id); - } - - // loop on all recipients and post messages - var keys = msg_html.keys(); - for( var i=0; i<keys.length; i++) - { - var recipientid = keys[i]; - var tabid = recipientid; - // create the tab if it doesn't exists yet - var recipientdiv = this.gui.getChatContentFromTabId(tabid); - - // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('div'); // do not setup a inline element (ex: span) because the element height will be wrong on FF2 -> scrollDown(..) will be broken - m.innerHTML = msg_html.get(recipientid); - this.colorizeNicks(m); - this.refresh_clock(m); - // finaly append this to the message list - recipientdiv.appendChild(m); - this.gui.scrollDown(tabid, m); - - // delete the old messages from the client (save some memory) - var limit_msgid = max_msgid.get(recipientid) - pfc_max_displayed_lines; - var elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - while (elt) - { - // delete this element to save browser memory - if(elt.parentNode) - elt.parentNode.removeChild(elt); - else if(elt.parentElement) // older IE browsers (<6.0) may not support parentNode - elt.parentElement.removeChild(elt); - else // if all else fails - elt.innerHTML = ''; - limit_msgid--; - elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - } - } - }, - - /** - * Call the ajax request function - * Will query the server - */ - sendRequest: function(cmd, recipientid) - { - // do not send another ajax requests if the last one is not yet finished - if (cmd == '/update' && this.pfc_ajax_connected) return; - - if (cmd != "/update") - { - // setup a new timeout to update the chat in 5 seconds (in refresh_delay more exactly) - clearTimeout(this.timeout); - this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); - - if (pfc_debug) - trace('sendRequest: '+cmd); - } - - // prepare the command string - var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); - if (!recipientid) recipientid = this.gui.getTabId(); - cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); - - // send the real ajax request - var url = pfc_server_script_url; - new Ajax.Request(url, { - method: 'post', - parameters: {'pfc_ajax':1, 'f':'handleRequest', 'cmd': cmd }, - onCreate: function(transport) { - this.pfc_ajax_connected = true; - // request time counter used by ping indicator - this.last_request_time = new Date().getTime(); - }.bind(this), - onSuccess: function(transport) { - if (!transport.status) return; // fix strange behavior on KHTML - - // request time counter used by ping indicator - this.last_response_time = new Date().getTime(); - // evaluate the javascript response - eval( transport.responseText ); - }.bind(this), - onComplete: function(transport) { - this.pfc_ajax_connected = false; - - // calculate the ping and display it - this.ping = Math.abs(this.last_response_time - this.last_request_time); - if ($('pfc_ping')) $('pfc_ping').innerHTML = this.ping+'ms'; - }.bind(this) - }); - }, - - /** - * update function to poll the server each 'refresh_delay' time - */ - updateChat: function(start) - { - clearTimeout(this.timeout); - if (start) - { - this.sendRequest('/update'); - - // setup the next update - this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); - } - }, - - /** - * Stores the caret/selection position for IE 6.x and 7.x - * Returns true if text range start and end values were updated. - * Code based on: http://www.bazon.net/mishoo/articles.epl?art_id=1292 - */ - storeSelectionPos: function(obj) - { - // We don't need to store the start and end positions if the browser - // supports the Gecko selection model. However, these values may be - // useful for debugging. Also, Opera recognizes Gecko and IE range - // commands, so we need to ensure Opera only uses the Gecko model. - /* WARNING: Do not use this for textareas. They require a more - complex algorithm. */ - if (obj.setSelectionRange) - { - obj.selStart = obj.selectionStart; - obj.selEnd = obj.selectionEnd; - - return true; - } - - // IE - else if (obj.createTextRange && document.selection) - { - // Determine current selection start position. - var range = document.selection.createRange(); - var isCollapsed = range.compareEndPoints("StartToEnd", range) == 0; - if (!isCollapsed) - range.collapse(true); - var b = range.getBookmark(); - obj.selStart = b.charCodeAt(2) - b.charCodeAt(0) - 1; - - // Determine current selection end position. - range = document.selection.createRange(); - isCollapsed = range.compareEndPoints("StartToEnd", range) == 0; - if (!isCollapsed) - range.collapse(false); - b = range.getBookmark(); - obj.selEnd = b.charCodeAt(2) - b.charCodeAt(0) - 1; - - return true; - } - - // Browser does not support selection range processing. - else - return false; - }, - - /** - * Sets the selection/caret in the object based on the - * object's selStart and selEnd parameters. - * This should only be needed for IE only. - */ - setSelection: function(obj) - { - // This part of the function is included to prevent - // Opera from executing the IE portion. - /* WARNING: Do not attempt to use this function as - a wrapper for the Gekco based setSelectionRange. - It causes problems in Opera when executed from - the event trigger onFocus. */ - if (obj.setSelectionRange) - { - return null; - } - // IE - else if (obj.createTextRange) - { - var range = obj.createTextRange(); - range.collapse(true); - range.moveStart("character", obj.selStart); - range.moveEnd("character", obj.selEnd - obj.selStart); - range.select(); - - return range; - } - // Browser does not support selection range processing. - else - return null; - }, - - /** - * insert a smiley - */ - insertSmiley: function(smiley) - { - var w = this.el_words; - - if (w.setSelectionRange) - { - // Gecko - var s = w.selectionStart; - var e = w.selectionEnd; - w.value = w.value.substring(0, s) + smiley + w.value.substr(e); - w.setSelectionRange(s + smiley.length, s + smiley.length); - w.focus(); - } - else if (w.createTextRange) - { - // IE - w.focus(); - - // Get range based on stored values. - var range = this.setSelection(w); - - range.text = smiley; - - // Move caret position to end of smiley and collapse selection, if any. - // Check if internally kept values for selection are initialized. - w.selStart = (w.selStart) ? w.selStart + smiley.length : smiley.length; - w.selEnd = w.selStart; - } - else - { - // Unsupported browsers get smiley at end of string like old times. - w.value += smiley; - w.focus(); - } - }, - - updateNickBox: function(nickid) - { - // @todo optimize this function because it is called lot of times so it could cause CPU consuming on client side - var chanids = this.chanmeta.keys(); - for(var i = 0; chanids.length > i; i++) - { - this.updateNickListBox(chanids[i]); - } - }, - - /** - * fill the nickname list with connected nicknames - */ - updateNickListBox: function(chanid) - { - var className = (! is_ie) ? 'class' : 'className'; - - var nickidlst = this.getChanMeta(chanid,'users').get('nickid'); - var nickdiv = this.gui.getOnlineContentFromTabId(chanid); - var ul = document.createElement('ul'); - ul.setAttribute(className, 'pfc_nicklist'); - for (var i=0; i<nickidlst.length; i++) - { - var nickid = nickidlst[i]; - var li = this.buildNickItem(nickid); - li.setAttribute(className, 'pfc_nickitem_'+nickid); - ul.appendChild(li); - } - var fc = nickdiv.firstChild; - if (fc) - nickdiv.replaceChild(ul,fc); - else - nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); - }, - - getNickWhoisBox: function(nickid) - { - if (!this.nickwhoisbox.get(nickid)) - this.updateNickWhoisBox(nickid); - return this.nickwhoisbox.get(nickid); - }, - - updateNickWhoisBox: function(nickid) - { - var className = (! is_ie) ? 'class' : 'className'; - - var usermeta = this.getAllUserMeta(nickid); - var div = document.createElement('div'); - div.setAttribute(className, 'pfc_nickwhois'); - - var p = document.createElement('p'); - p.setAttribute(className, 'pfc_nickwhois_header'); - div.appendChild(p); - - // add the close button - var img = document.createElement('img'); - img.setAttribute(className, 'pfc_nickwhois_close'); - img.pfc_parent = div; - img.onclick = function(evt){ - this.pfc_parent.style.display = 'none'; - return false; - } - img.setAttribute('src', this.res.getFileUrl('images/close-whoisbox.gif')); - img.alt = this.res.getLabel('Close'); - p.appendChild(img); - p.appendChild(document.createTextNode(usermeta.get('nick'))); // append the nickname text in the title - - // add the whois information table - var table = document.createElement('table'); - var tbody = document.createElement('tbody'); - table.appendChild(tbody); - var um_keys = usermeta.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = usermeta.get(k); - if (v && k != 'nickid' - && k != 'nick' // useless because it is displayed in the box title - && k != 'isadmin' // useless because of the gold shield icon - && k != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - ) - { - var tr = document.createElement('tr'); - if (pfc_nickmeta_key_to_hide.indexOf(k) != -1) - { - var td2 = document.createElement('td'); - td2.setAttribute(className, 'pfc_nickwhois_c2'); - td2.setAttribute('colspan', 2); - td2.innerHTML = v; - tr.appendChild(td2); - } - else - { - var td1 = document.createElement('td'); - td1.setAttribute(className, 'pfc_nickwhois_c1'); - var td2 = document.createElement('td'); - td2.setAttribute(className, 'pfc_nickwhois_c2'); - td1.innerHTML = k; - td2.innerHTML = v; - tr.appendChild(td1); - tr.appendChild(td2); - } - tbody.appendChild(tr); - } - } - div.appendChild(table); - - // add the privmsg link (do not add it if the nick is yours) - if (pfc.getUserMeta(nickid,'nick') != this.nickname) - { - var p = document.createElement('p'); - p.setAttribute(className, 'pfc_nickwhois_pv'); - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_nickid = nickid; - a.pfc_parent = div; - a.onclick = function(evt){ - var nick = pfc.getUserMeta(this.pfc_nickid,'nick'); - pfc.sendRequest('/privmsg "'+nick+'"'); - this.pfc_parent.style.display = 'none'; - return false; - } - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/openpv.gif')); - img.alt = document.createTextNode(this.res.getLabel('Private message')); - a.appendChild(img); - a.appendChild(document.createTextNode(this.res.getLabel('Private message'))); - p.appendChild(a); - div.appendChild(p); - } - - this.nickwhoisbox.set(nickid, div); - }, - - buildNickItem: function(nickid) - { - var className = (! is_ie) ? 'class' : 'className'; - - var nick = this.getUserMeta(nickid, 'nick'); - var isadmin = this.getUserMeta(nickid, 'isadmin'); - if (isadmin == '') isadmin = false; - - var li = document.createElement('li'); - - var a = document.createElement('a'); - a.setAttribute('href','#'); - a.pfc_nick = nick; - a.pfc_nickid = nickid; - a.onclick = function(evt){ - var d = pfc.getNickWhoisBox(this.pfc_nickid); - document.body.appendChild(d); - d.style.display = 'block'; - d.style.zIndex = '400'; - d.style.position = 'absolute'; - d.style.left = (mousePosX(evt)-7)+'px'; - d.style.top = (mousePosY(evt)-7)+'px'; - return false; - } - li.appendChild(a); - - var img = document.createElement('img'); - if (isadmin) - img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); - else - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.style.marginRight = '5px'; - img.setAttribute(className, 'pfc_nickbutton'); - a.appendChild(img); - - // nobr is not xhtml valid but it's a workeround - // for IE which doesn't support 'white-space: pre' css rule - var nobr = document.createElement('nobr'); - var span = document.createElement('span'); - span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid); - span.innerHTML = nick.escapeHTML(); - nobr.appendChild(span); - a.appendChild(nobr); - - return li; - }, - - /** - * clear the nickname list - */ - clearNickList: function() - { - /* - var nickdiv = this.el_online; - var fc = nickdiv.firstChild; - if (fc) nickdiv.removeChild(fc); - */ - }, - - - /** - * clear the message list history - */ - clearMessages: function() - { - //var msgdiv = $('pfc_chat'); - //msgdiv.innerHTML = ''; - }, - - /** - * parse the message - */ - parseMessage: function(msg) - { - var rx = null; -/* - // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\~\\/\\?\\=\\&\\-\\_\\#:;%,@]*[a-z0-9\\/\\?\\=\\&\\-\\_\\#])([^\\"]|$)','ig'); - var ttt = msg.split(rx_url); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - var offset = (ttt[i].length - 7) / 2; - var delta = (ttt[i].length - 7 - 60); - var range1 = 7+offset-delta; - var range2 = 7+offset+delta; - if (ttt[i].match(rx_url)) - { - msg = msg + '<a href="' + ttt[i] + '"'; - if (pfc_openlinknewwindow) - msg = msg + ' onclick="window.open(this.href,\'_blank\');return false;"'; - msg = msg + '>' + (delta>0 ? ttt[i].substring(7,range1)+ ' ... ' + ttt[i].substring(range2,ttt[i].length) : ttt[i]) + '</a>'; - } - else - { - msg = msg + ttt[i]; - } - } - } - else - { - // fallback for IE6/Konqueror which do not support split with regexp - replace = '$1<a href="$2"'; - if (pfc_openlinknewwindow) - replace = replace + ' onclick="window.open(this.href,\'_blank\');return false;"'; - replace = replace + '>$2</a>$3'; - msg = msg.replace(rx_url, replace); - } -*/ - - // Remove auto-linked entries. - if ( false ) - { - rx = new RegExp('<a href="mailto:(.*?)".*?>.*?<\/a>','ig'); - msg = msg.replace(rx, '$1'); - rx = new RegExp('<a href="(.*?)".*?>.*?<\/a>','ig'); - msg = msg.replace(rx, '$1'); - } - - // Replace double spaces outside of tags by " " entity. - rx = new RegExp(' (?= )(?![^<]*>)','g'); - msg = msg.replace(rx, ' '); - - // try to parse bbcode - rx = new RegExp('\\[b\\](.+?)\\[\/b\\]','ig'); - msg = msg.replace(rx, '<span style="font-weight: bold">$1</span>'); - rx = new RegExp('\\[i\\](.+?)\\[\/i\\]','ig'); - msg = msg.replace(rx, '<span style="font-style: italic">$1</span>'); - rx = new RegExp('\\[u\\](.+?)\\[\/u\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: underline">$1</span>'); - rx = new RegExp('\\[s\\](.+?)\\[\/s\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: line-through">$1</span>'); - // rx = new RegExp('\\[pre\\](.+?)\\[\/pre\\]','ig'); - // msg = msg.replace(rx, '<pre>$1</pre>'); -/* - rx = new RegExp('\\[email\\]([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$1</a>'); - rx = new RegExp('\\[email=([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\](.+?)\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$2</a>'); -*/ - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - // parse bbcode colors twice because the current_text_color is a bbcolor - // so it's possible to have a bbcode color imbrication - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - - // try to parse smileys - var smileys = this.res.getSmileyHash(); - var sl = this.res.getSmileyKeys(); // Keys should be sorted by length from pfc.gui.loadSmileyBox() - for(var i = 0; i < sl.length; i++) - { - // We don't want to replace smiley strings inside of tags. - // Use negative lookahead to search for end of tag. - rx = new RegExp(RegExp.escape(sl[i]) + '(?![^<]*>)','g'); - msg = msg.replace(rx, '<img src="'+ smileys.get(sl[i]) +'" alt="' + sl[i] + '" title="' + sl[i] + '" />'); - } - - // try to parse nickname for highlighting - rx = new RegExp('(^|[ :,;])'+RegExp.escape(this.nickname)+'([ :,;]|$)','gi'); - msg = msg.replace(rx, '$1<strong>'+ this.nickname +'</strong>$2'); - - // this piece of code is replaced by the word-wrap CSS3 rule. - /* - // don't allow to post words bigger than 65 caracteres - // doesn't work with crappy IE and Konqueror ! - rx = new RegExp('([^ \\:\\<\\>\\/\\&\\;]{60})','ig'); - var ttt = msg.split(rx); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - msg = msg + ttt[i] + ' '; - } - } - */ - return msg; - }, - - /** - * apply nicknames color to the root childs - */ - colorizeNicks: function(root) - { - if (this.nickmarker) - { - var nicklist = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; i < nicklist.length; i++) - { - var cur_nick = nicklist[i].innerHTML; - var cur_color = this.getAndAssignNickColor(cur_nick); - nicklist[i].style.color = cur_color; - } - } - }, - - /** - * Initialize the color array used to colirize the nicknames - */ - reloadColorList: function() - { - this.colorlist = $A(pfc_nickname_color_list); - }, - - - /** - * get the corresponding nickname color - */ - getAndAssignNickColor: function(nick) - { - /* check the nickname is colorized or not */ - var already_colorized = false; - var nc = ''; - for(var j = 0; j < this.nickcolor.length && !already_colorized; j++) - { - if (this.nickcolor[j][0] == nick) - { - already_colorized = true; - nc = this.nickcolor[j][1]; - } - } - if (!already_colorized) - { - /* reload the color stack if it's empty */ - if (this.colorlist.length == 0) this.reloadColorList(); - /* take the next color from the list and colorize this nickname */ - var cid = Math.round(Math.random()*(this.colorlist.length-1)); - nc = this.colorlist[cid]; - this.colorlist.splice(cid,1); - this.nickcolor.push(new Array(nick, nc)); - } - - return nc; - }, - - - /** - * Colorize with 'color' all the nicknames found as a 'root' child - */ - applyNickColor: function(root, nick, color) - { - - var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ _to_utf8(nick).md5(), ''); - for(var i = 0; nicktochange.length > i; i++) - nicktochange[i].style.color = color; - - }, - - /** - * Returns a list of elements which have a clsName class - */ - getElementsByClassName: function( root, clsName, clsIgnore ) - { - var i, matches = new Array(); - var els = root.getElementsByTagName('*'); - var rx1 = new RegExp('.*'+clsName+'.*'); - var rx2 = new RegExp('.*'+clsIgnore+'.*'); - for(i=0; i<els.length; i++) { - if(els.item(i).className.match(rx1) && - (clsIgnore == '' || !els.item(i).className.match(rx2)) ) - { - matches.push(els.item(i)); - } - } - return matches; - }, - - showClass: function(root, clsName, clsIgnore, show) - { - var elts = this.getElementsByClassName(root, clsName, clsIgnore); - for(var i = 0; elts.length > i; i++) - if (show) - elts[i].style.display = 'inline'; - else - elts[i].style.display = 'none'; - }, - - - /** - * Nickname marker show/hide - */ - nickmarker_swap: function() - { - if (this.nickmarker) { - this.nickmarker = false; - } else { - this.nickmarker = true; - } - this.refresh_nickmarker() - setCookie('pfc_nickmarker', this.nickmarker); - }, - refresh_nickmarker: function(root) - { - var nickmarker_icon = $('pfc_nickmarker'); - if (!root) root = $('pfc_channels_content'); - if (this.nickmarker) - { - nickmarker_icon.src = this.res.getFileUrl('images/color-on.gif'); - nickmarker_icon.alt = this.res.getLabel("Hide nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - this.colorizeNicks(root); - } - else - { - nickmarker_icon.src = this.res.getFileUrl('images/color-off.gif'); - nickmarker_icon.alt = this.res.getLabel("Show nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - var elts = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; elts.length > i; i++) - { - // this is not supported in konqueror =>>> elts[i].removeAttribute('style'); - elts[i].style.color = ''; - } - } - }, - - - /** - * Date/Hour show/hide - */ - clock_swap: function() - { - if (this.clock) { - this.clock = false; - } else { - this.clock = true; - } - this.refresh_clock(); - setCookie('pfc_clock', this.clock); - }, - refresh_clock: function( root ) - { - var clock_icon = $('pfc_clock'); - if (!root) root = $('pfc_channels_content'); - if (this.clock) - { - clock_icon.src = this.res.getFileUrl('images/clock-on.gif'); - clock_icon.alt = this.res.getLabel('Hide dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', true); - this.showClass(root, 'pfc_heure', 'pfc_invisible', true); - } - else - { - clock_icon.src = this.res.getFileUrl('images/clock-off.gif'); - clock_icon.alt = this.res.getLabel('Show dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', false); - this.showClass(root, 'pfc_heure', 'pfc_invisible', false); - } - // browser automaticaly scroll up misteriously when showing the dates - // $('pfc_chat').scrollTop += 30; - }, - - /** - * Sound button - */ - sound_swap: function() - { - if (this.issoundenable) { - this.issoundenable = false; - } else { - this.issoundenable = true; - } - this.refresh_sound(); - setCookie('pfc_issoundenable', this.issoundenable); - }, - refresh_sound: function( root ) - { - var snd_icon = $('pfc_sound'); - if (this.issoundenable) - { - snd_icon.src = this.res.getFileUrl('images/sound-on.gif'); - snd_icon.alt = this.res.getLabel('Disable sound notifications'); - snd_icon.title = snd_icon.alt; - } - else - { - snd_icon.src = this.res.getFileUrl('images/sound-off.gif'); - snd_icon.alt = this.res.getLabel('Enable sound notifications'); - snd_icon.title = snd_icon.alt; - } - }, - - /** - * Connect/disconnect button - */ - connect_disconnect: function() - { - if (this.isconnected) - this.sendRequest('/quit'); - else - { - if (this.nickname == '') - this.askNick(); - else - this.sendRequest('/connect "'+this.nickname+'"'); - } - }, - refresh_loginlogout: function() - { - var loginlogout_icon = $('pfc_loginlogout'); - if (this.isconnected) - { - loginlogout_icon.src = this.res.getFileUrl('images/logout.gif'); - loginlogout_icon.alt = this.res.getLabel('Disconnect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - else - { - this.clearMessages(); - this.clearNickList(); - loginlogout_icon.src = this.res.getFileUrl('images/login.gif'); - loginlogout_icon.alt = this.res.getLabel('Connect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - }, - - - /** - * Minimize/Maximized the chat zone - */ - swap_minimize_maximize: function() - { - if (this.minmax_status) { - this.minmax_status = false; - } else { - this.minmax_status = true; - } - setCookie('pfc_minmax_status', this.minmax_status); - this.refresh_minimize_maximize(); - }, - refresh_minimize_maximize: function() - { - var content = $('pfc_content_expandable'); - var btn = $('pfc_minmax'); - if (this.minmax_status) - { - btn.src = this.res.getFileUrl('images/maximize.gif'); - btn.alt = this.res.getLabel('Magnify'); - btn.title = btn.alt; - content.style.display = 'none'; - } - else - { - btn.src = this.res.getFileUrl('images/minimize.gif'); - btn.alt = this.res.getLabel('Cut down'); - btn.title = btn.alt; - content.style.display = 'block'; - } - }, - - - /** - * BBcode ToolBar - */ - insert_text: function(open, close, promptifselempty) - { - var msgfield = $('pfc_words'); - - var pfcp = this.getPrompt(); - pfcp.msgfield = msgfield; - pfcp.open = open; - pfcp.close = close; - pfcp.promptifselempty = promptifselempty; - pfcp.callback = this.insert_text_callback; - - // Gecko - /* Always check for Gecko selection processing commands - first. This is needed for Opera. */ - if (msgfield.selectionStart || msgfield.selectionStart == '0') - { - var startPos = msgfield.selectionStart; - var endPos = msgfield.selectionEnd; - - var text = msgfield.value.substring(startPos, endPos); - if (startPos == endPos && promptifselempty) - { - pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); - pfcp.focus(); - } - else - this.insert_text_callback(text, pfcp); - } - - // IE - else if (document.selection && document.selection.createRange) - { - msgfield.focus(); - - // Get selection range. - pfcp.range = this.setSelection(msgfield); - var text = pfcp.range.text; - if (text == "" && promptifselempty) - { - pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); - pfcp.focus(); - } - else - this.insert_text_callback(text, pfcp); - } - - // Fallback support for other browsers - else - { - pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); - pfcp.focus(); - } - return; - }, - insert_text_callback: function(text, pfcp) - { - var open = pfcp.open; - var close = pfcp.close; - var promptifselempty = pfcp.promptifselempty; - var msgfield = pfcp.msgfield; - var range = pfcp.range; - - // Gecko - /* Always check for Gecko selection processing commands - first. This is needed for Opera. */ - if (msgfield.selectionStart || msgfield.selectionStart == '0') - { - var startPos = msgfield.selectionStart; - var endPos = msgfield.selectionEnd; - - var extralength = 0; - if (startPos == endPos && promptifselempty) - { - if (text == null) text = ""; - extralength = text.length; - } - if (text.length > 0 || !promptifselempty) - { - msgfield.value = msgfield.value.substring(0, startPos) + open + text + close + msgfield.value.su... [truncated message content] |
From: <ke...@us...> - 2008-03-23 19:50:19
|
Revision: 1226 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1226&view=rev Author: kerphi Date: 2008-03-23 12:50:24 -0700 (Sun, 23 Mar 2008) Log Message: ----------- New Occitan (oc) translation (thanks to Arve Cassinhac) Modified Paths: -------------- trunk/demo/index.php trunk/i18n/es_ES/main.php trunk/i18n/gl_ES/main.php trunk/i18n/hu_HU/main.php trunk/i18n/pl_PL/main.php trunk/i18n/pt_BR/main.php trunk/src/pfci18n.class.php Added Paths: ----------- trunk/demo/demo66_in_occitan.php trunk/i18n/oc/ trunk/i18n/oc/main.php Added: trunk/demo/demo66_in_occitan.php =================================================================== --- trunk/demo/demo66_in_occitan.php (rev 0) +++ trunk/demo/demo66_in_occitan.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -0,0 +1,32 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "oc"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + </head> + + <body> + <?php $chat->printChat(); ?> +<?php /* start hide */ ?> +<?php + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + $content = preg_replace('/\<\?php \/\* start hide \*\/ \?\>.*?\<\?php \/\* end hide \*\/ \?\>/s','',$content); + highlight_string($content); + echo "</pre>"; +?> +<?php /* end hide */ ?> + </body> +</html> Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/demo/index.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -134,6 +134,7 @@ <li><a href="demo62_in_belgian_dutch.php">demo62 - Belgian Dutch translation of the chat</a></li> <li><a href="demo63_in_thai.php">demo63 - Thai translation of the chat</a></li> <li><a href="demo64_in_galician.php">demo64 - Galician translation of the chat</a></li> + <li><a href="demo66_in_occitan.php">demo66 - Occitan translation of the chat</a></li> </ul> </div> Modified: trunk/i18n/es_ES/main.php =================================================================== --- trunk/i18n/es_ES/main.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/i18n/es_ES/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -403,4 +403,5 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = "%s fue invitado por %s"; -?> + +?> \ No newline at end of file Modified: trunk/i18n/gl_ES/main.php =================================================================== --- trunk/i18n/gl_ES/main.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/i18n/gl_ES/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -401,4 +401,5 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = "%s fuches invitado por %s"; -?> + +?> \ No newline at end of file Modified: trunk/i18n/hu_HU/main.php =================================================================== --- trunk/i18n/hu_HU/main.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/i18n/hu_HU/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -404,4 +404,11 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = "%s meghívva %s által"; -?> + +// line 450 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = ""; + +// line 458 in phpfreechat.class.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = ""; + +?> \ No newline at end of file Added: trunk/i18n/oc/main.php =================================================================== --- trunk/i18n/oc/main.php (rev 0) +++ trunk/i18n/oc/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -0,0 +1,405 @@ +<?php +/** +* i18n/oc/main.php +* +* Copyright © 2006 Stephane Gully <ste...@gm...> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the +* Free Software Foundation, 51 Franklin St, Fifth Floor, +* Boston, MA 02110-1301 USA +*/ + +/** +* Occitan translation of the messages (utf8 encoded!) +* +* @translation by Arve Cassinhac <co...@pa...> +*/ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Lo meu chach"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s pas trapat, la librariá %s eisista pas ont es especificada."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Dintratz lo vòstre escais"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Lo messatge pòt pas èsser vuèg"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s se sona ara %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s se ven de coneitar"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s daissèt"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s foguèt desconeitat (timeout)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "Comanda desconeguda [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s eisista pas: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Avètz besonh de %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s eisista pas, la librariá %s foguèt pas trapada"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s eisista pas"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "lo repertòri %s deu èsser ensenhat"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s deu èsser un repertòri"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s pòt pas èsser fargat"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s pòt pas èsser escrich"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s pòt pas èsser legit"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s es pas un fiquièr"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s es pas un repertòri"; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [aviat per phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "Amagar la color dels semblanoms"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Mostrar la color dels semblanoms"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Se desconeitar"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Se coneitar"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Alargar"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Demesir"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Amagar la data"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Mostrar la data"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Dintratz lo vòstre messatge dins aquel airal"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Dintratz lo vòstre semblanom aicí"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error : conforme desconegut o despassat '%s', condrechatz o levatz aqueste conforme"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Amagar los smileys"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Cartelar los smileys"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Amagar los emmerçadors en linha"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Cartelar los emmerçadors en linha"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Grais"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Italic"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Sotalinhat"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Levat"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Tèste pre-formatat"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Mail"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Color"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "lo fiquièr model '%s' foguèt pas trapat"; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' foguèt pas trapat, avertadatz que lo vòstre repertòri de tème '%s' es bon e que lo nom del vòstre tème '%s' eisista plan"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s deu èsser actualejat"; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "Lo conforme '%s' es obligatòri, per manca, podètz emmerçar la valor '%s'"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "Lo conforme '%s' deu èsser un nombre positiu"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "Lo conforme '%s' es pas valide. Las valors autorgadas son : '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "Lo meu parlador"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "Messatge privat"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "Tampar l'onglet"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Que volètz vertadierament daissar aqueste parlador ?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "Conforme mancant"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "Bandit del parlador %s per %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "La tièra dels id bandits es :"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "Vide"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' va desbandir l'emmerçador identificat per {id}"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' va desbandir totes los bandits d'aqueste parlador"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s daissèt (timeout)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s jonhèt %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "patacat de %s per %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Lo messatge foguèt pas mandat, %s es pas coneitat"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Degun foguèt pas desbandit"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s foguèt desbandit"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s emmerçador foguèt desbandit"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Sètz pas autorgat de ronçar la comanda '%s'"; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Podètz pas jónher %s que sètz bandits"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Sètz pas autorgat de cambiar lo vòstre semblanom"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Podètz pas jónher %s qu'es pas dans la tièra dels parladors autorgats"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Vos pregui, postatz pas tant de messatges de seguida, lo flood es pas tolerat"; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Error: lo conforme '%s' es privat, lo podètz pas assenhar"; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "Lo conforme '%s' deu èsser un taulèl (array)"; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "Lo conforme '%s' deu èsser un bolean (vertadièr o fals)"; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "Lo conforme '%s' deu èsser una cadena de caractas"; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' deu èsser acessidís en escritura"; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "Lo repertòri '%s' eisista pas"; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "Mercé-plan de condrechar aquestas errors"; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Error : lo fiquièr d'amag cabissent lo conformatge eisista pas"; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Error : lo chach pòt pas èsser cargat ! siaga lo vòstre navegaire sofèrta pas lo javascript, siaga avètz pas balhats los bons dreches als repertòris. Trantalhatz pas de demandar d'ajuda sul foròm"; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "Vaquí la tièra de las comandas :"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "Identificacion capitada"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "Identificacion descondrecha"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Devètz èsser coneitat entà mandar un messatge"; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "Clicatz aicí entà mandar lo vòstre message"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "Dintratz lo tèste de formatar"; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "La conformatge cargada tornar (rehashed)"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Un problème subrevenguèt pendent lo rehash"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is already used"] = "Lo semblanom es ja emmerçat"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "La revirada correnta de phpfreechat es %s"; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Lo nombre maissimòm de parladors autorgats foguèt atench"; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Lo nombre maissimòm de chaches privats foguèt atench"; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "Mandar"; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = "Error del contenedor mysql : coneission"; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Error del contenedor mysql : fargament de la sòla de dadas '%s'"; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Error del contenedor mysql : fargament de la taula '%s'"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Sètz pas autorgats de vos parlar"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "Lo semblanom causit es pas autorgat"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Enable sound notifications"] = "Afanar l'encautatge tindaire"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["Disable sound notifications"] = "Desafanar l'encautatge tindaire"; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = "pas de rason"; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = "La tièra dels emmerçadors bandits es :"; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {id}' va desbandir l'emmerçador identificat par {nickname}"; + +// line 43 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "patacat de %s per %s"; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s daissèt (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "Cargament del chach ..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "Pacientatz"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s sembla èsser desafanat o pas/mal suportat pel vòstre navegador."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Aqueste aturament oèb necita %s entà foncionar condrechament."; + +// line 135 in chat.js.tpl.php +$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Volgatz afanar %s dins los conformes del vòstre navegador, o emmerçatz un navegador que supòrte %s e ensajatz tornar."; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Volgatz emmerçar un navegador que supòrte %s e ensajatz tornar."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "Dins la revirada d\'Internet Explorer sotana a 7.0, Ajax es emplementat per ActiveX. Volgatz afanar ActiveX dains los conformes de seguretat o emmerçar un navegador que supòrte Ajax e ensajatz tornar"; + +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s eisista pas, data_public_path pòt pas èsser enjaçat"; + +// line 73 in invite.class.php +$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "Devètz jónher %s entà i poder convidar d'emmerçadors"; + +// line 47 in chat.html.tpl.php +$GLOBALS["i18n"]["Ping"] = "Temps de responsa"; + +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "Volgatz respondre"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "ÒC"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "Delir"; + +// line 430 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot create %s"] = "Se pòt pas fargar %s"; + +// line 436 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["cannot copy %s in %s"] = "Se pòt pas copiar %s dins %s"; + +// line 667 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "Error : '%s' se pòt pas trapar, avertadatz que lo vòstre tème_path '%s' e que lo vòstre tème '%s' son condreches"; + +// line 414 in phpfreechat.class.php +$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "Sètz segur de vòler tampar aqueste onglet ?"; + +// line 42 in ban.class.php +$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s banni de %s par %s"; + +// line 461 in phpfreechat.class.php +$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "Vous ensajatz de parler à un emmerçador inconnu (ou inconnu)"; + +// line 89 in invite.class.php +$GLOBALS["i18n"]["%s was invited by %s"] = "%s a été invité par %s"; + +?> \ No newline at end of file Modified: trunk/i18n/pl_PL/main.php =================================================================== --- trunk/i18n/pl_PL/main.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/i18n/pl_PL/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -406,4 +406,5 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = "%s został zaproszony przez %s"; -?> + +?> \ No newline at end of file Modified: trunk/i18n/pt_BR/main.php =================================================================== --- trunk/i18n/pt_BR/main.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/i18n/pt_BR/main.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -406,4 +406,5 @@ // line 89 in invite.class.php $GLOBALS["i18n"]["%s was invited by %s"] = "%s foi convidado por %s"; -?> + +?> \ No newline at end of file Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2008-03-23 19:19:14 UTC (rev 1225) +++ trunk/src/pfci18n.class.php 2008-03-23 19:50:24 UTC (rev 1226) @@ -103,7 +103,7 @@ */ function GetAcceptedLanguage($type="main") { - return /*<GetAcceptedLanguage>*/array('pl_PL','pt_BR','da_DK','uk_UA','nb_NO','fr_FR','hr_HR','vi_VN','hy_AM','ru_RU','eo','en_US','es_ES','ko_KR','nl_BE','ba_BA','zh_TW','zh_CN','it_IT','el_GR','uk_RO','pt_PT','sr_CS','tr_TR','de_DE-informal','de_DE-formal','ja_JP','sv_SE','bn_BD','nl_NL','ar_LB','hu_HU','nn_NO','bg_BG','id_ID','th_TH','gl_ES');/*</GetAcceptedLanguage>*/ + return /*<GetAcceptedLanguage>*/array('nl_NL','ko_KR','nl_BE','tr_TR','pt_PT','en_US','eo','hr_HR','vi_VN','es_ES','zh_TW','nn_NO','ru_RU','id_ID','hu_HU','th_TH','hy_AM','oc','da_DK','de_DE-formal','uk_RO','nb_NO','fr_FR','it_IT','sv_SE','uk_UA','sr_CS','ar_LB','bg_BG','pt_BR','ba_BA','bn_BD','el_GR','zh_CN','gl_ES','pl_PL','de_DE-informal','ja_JP');/*</GetAcceptedLanguage>*/ } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-03-23 20:28:53
|
Revision: 1232 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1232&view=rev Author: kerphi Date: 2008-03-23 13:28:58 -0700 (Sun, 23 Mar 2008) Log Message: ----------- Rename occitan (oc) locale to oc_FR Modified Paths: -------------- trunk/demo/demo66_in_occitan.php trunk/src/pfci18n.class.php Added Paths: ----------- trunk/i18n/oc_FR/ Removed Paths: ------------- trunk/i18n/oc/ Modified: trunk/demo/demo66_in_occitan.php =================================================================== --- trunk/demo/demo66_in_occitan.php 2008-03-23 20:22:43 UTC (rev 1231) +++ trunk/demo/demo66_in_occitan.php 2008-03-23 20:28:58 UTC (rev 1232) @@ -3,7 +3,7 @@ require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -$params["language"] = "oc"; +$params["language"] = "oc_FR"; $chat = new phpFreeChat( $params ); ?> Copied: trunk/i18n/oc_FR (from rev 1226, trunk/i18n/oc) Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2008-03-23 20:22:43 UTC (rev 1231) +++ trunk/src/pfci18n.class.php 2008-03-23 20:28:58 UTC (rev 1232) @@ -103,7 +103,7 @@ */ function GetAcceptedLanguage($type="main") { - return /*<GetAcceptedLanguage>*/array('nl_NL','ko_KR','nl_BE','tr_TR','pt_PT','en_US','eo','hr_HR','vi_VN','es_ES','zh_TW','nn_NO','ru_RU','id_ID','hu_HU','th_TH','hy_AM','oc','da_DK','de_DE-formal','uk_RO','nb_NO','fr_FR','it_IT','sv_SE','uk_UA','sr_CS','ar_LB','bg_BG','pt_BR','ba_BA','bn_BD','el_GR','zh_CN','gl_ES','pl_PL','de_DE-informal','ja_JP');/*</GetAcceptedLanguage>*/ + return /*<GetAcceptedLanguage>*/array('nl_NL','ko_KR','nl_BE','tr_TR','pt_PT','en_US','eo','hr_HR','vi_VN','es_ES','zh_TW','nn_NO','ru_RU','id_ID','hu_HU','th_TH','hy_AM','oc_FR','da_DK','de_DE-formal','uk_RO','nb_NO','fr_FR','it_IT','sv_SE','uk_UA','sr_CS','ar_LB','bg_BG','pt_BR','ba_BA','bn_BD','el_GR','zh_CN','gl_ES','pl_PL','de_DE-informal','ja_JP');/*</GetAcceptedLanguage>*/ } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-03-23 20:49:48
|
Revision: 1233 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1233&view=rev Author: kerphi Date: 2008-03-23 13:49:52 -0700 (Sun, 23 Mar 2008) Log Message: ----------- remove unused dependencies Modified Paths: -------------- trunk/testcase/container_generic.php Removed Paths: ------------- trunk/demo/demo35_shared_memory.php trunk/lib/pear/System/ Deleted: trunk/demo/demo35_shared_memory.php =================================================================== --- trunk/demo/demo35_shared_memory.php 2008-03-23 20:28:58 UTC (rev 1232) +++ trunk/demo/demo35_shared_memory.php 2008-03-23 20:49:52 UTC (rev 1233) @@ -1,74 +0,0 @@ -<?php - -require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; -$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -$params["container_type"] = "Memory"; -$params["container_cfg_sm_type"] = "auto"; // autodetect the best possible storage method -/** -Other (tested) storage types: -Eaccelerator -File // Plain text -Shmop - -Not tested but available: -Systemv // System V -Mmcache // Turck MMCache -Memcache // Memcached -Apc // APC -Apachenote // Apache note -Sqlite // does not work at the moment -Sharedance // Sharedance -*/ - -/* -// Use these parameters to force using the file storage -$params["container_cfg_sm_type"] = "File"; -$params["container_cfg_sm_options"] = array("tmp"=>"/tmp"); -*/ - -/* -// works not yet! (PEAR class error) -// you have to create the needed tables before using them -$params["container_cfg_sm_type"] = "Sqlite"; -$params["container_cfg_sm_options"] = array( - 'db' => ':memory:', - 'table' => 'sharedmemory', - 'var' => 'key', - 'value' => 'data', - 'persistent' => false -); -*/ - -/** -For other parameters/options look into the documentation of the pear class System/SharedMemory. -*/ - -$chat = new phpFreeChat($params); - -?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html> - - <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <title>phpFreeChat demo</title> - <?php $chat->printJavascript(); ?> - <?php $chat->printStyle(); ?> - </head> - - <body> - <?php $chat->printChat(); ?> - -<?php - // print the current file - echo "<h2>The source code</h2>"; - $filename = __FILE__; - echo "<p><code>".$filename."</code></p>"; - echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; - $content = file_get_contents($filename); - highlight_string($content); - echo "</pre>"; -?> - </body> - -</html> \ No newline at end of file Modified: trunk/testcase/container_generic.php =================================================================== --- trunk/testcase/container_generic.php 2008-03-23 20:28:58 UTC (rev 1232) +++ trunk/testcase/container_generic.php 2008-03-23 20:49:52 UTC (rev 1233) @@ -1,7 +1,7 @@ <?php $delim = DIRECTORY_SEPARATOR == "\\" ? ";" : ":"; -$classpath = "." . $delim . dirname(__FILE__).'/../lib/pear/'; +$classpath = "." . $delim . dirname(__FILE__).'/../lib/pear/' . $delim . ini_get('include_path'); ini_set('include_path', $classpath); require_once "PHPUnit.php"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |