phpfreechat-svn Mailing List for phpFreeChat (Page 24)
Status: Beta
Brought to you by:
kerphi
You can subscribe to this list here.
2006 |
Jan
|
Feb
(2) |
Mar
|
Apr
(61) |
May
(56) |
Jun
(96) |
Jul
(23) |
Aug
(62) |
Sep
(76) |
Oct
(48) |
Nov
(28) |
Dec
(28) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(31) |
Feb
(40) |
Mar
(29) |
Apr
(11) |
May
(6) |
Jun
(18) |
Jul
(18) |
Aug
(108) |
Sep
(24) |
Oct
(6) |
Nov
(21) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(16) |
Apr
|
May
(3) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(3) |
Dec
(2) |
2009 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ke...@us...> - 2006-08-22 14:26:06
|
Revision: 692 Author: kerphi Date: 2006-08-22 07:25:59 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=692&view=rev Log Message: ----------- fix the green demo Added Paths: ----------- trunk/themes/green/style.css Removed Paths: ------------- trunk/themes/green/templates/ Added: trunk/themes/green/style.css =================================================================== --- trunk/themes/green/style.css (rev 0) +++ trunk/themes/green/style.css 2006-08-22 14:25:59 UTC (rev 692) @@ -0,0 +1,107 @@ +div#pfc_container { + border: 1px solid #555; + color: #338822; + background-color: #d9edd8; + background-image: url("proxy.php?p=green/images/shade.gif"); + background-position: right; + background-repeat: repeat-y; +} + +div#pfc_channels_content { + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #e0edde; +} + +/* channels tabpanes */ +ul#pfc_channels_list { + border-bottom: 1px solid #555; +} +ul#pfc_channels_list li div { + border-top: 1px solid #555; + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #7dc073; +} +ul#pfc_channels_list li.selected div { + background-color: #e0edde; + border-bottom: 1px solid #e0edde; + color: #000; +} +ul#pfc_channels_list li > div:hover { + background-color: #e0edde; +} +ul#pfc_channels_list li a { + color: #000; +} + +div.pfc_smileys { + border: 1px solid #000; + background-color: #EEE; +} +div.pfc_online { + border: black solid 1px; + color: #000; + background-color: #DDD; +} +div.pfc_online li { + border-bottom: 1px solid #DDD; +} + +h2#pfc_title { + font-size: 110%; +} + +div.pfc_oldmsg { +} + +span.pfc_heure, span.pfc_date { + color: #bebebe; +} + +span.pfc_nick { + color: #fbac17; +} + +input#pfc_words { + border: black solid 1px; +} + +p#pfc_handle { + border: black solid 1px; + color: black; +} + +div.pfc_btn img { + border: 1px solid #393; /* same as container color */ +} +div.pfc_btn img:hover { + border: 1px solid #000; +} + +p#pfc_errors { + border: black solid 1px; + color: #EC4A1F; + background-color: #FFBA76; +} + +/* commands */ +.pfc_cmd_msg { + color: black; +} +.pfc_cmd_me { + font-style: italic; + color: black; +} +.pfc_cmd_notice { + font-style: italic; + color: #888; +} +pre.pfc_cmd_rehash, +pre.pfc_cmd_help +{ + color: #888; + font-style: italic; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 14:14:47
|
Revision: 691 Author: kerphi Date: 2006-08-22 07:14:42 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=691&view=rev Log Message: ----------- Fix demo34 for the new 1.x api Added Paths: ----------- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js Removed Paths: ------------- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/templates/ Added: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js (rev 0) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js 2006-08-22 14:14:42 UTC (rev 691) @@ -0,0 +1,61 @@ +pfcClient.prototype.updateNickList = function(tabid,lst) +{ + this.nicklist[tabid] = lst; + var nicks = lst; + var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild; + var ul = document.createElement('ul'); + for (var i=0; i<nicks.length; i++) + { + var li = document.createElement('li'); + if (nicks[i] != this.nickname) + { + // this is someone -> create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user.gif')); + img.alt = this.res.getLabel('Private message'); + img.title = img.alt; + img.style.marginRight = '5px'; + var a = document.createElement('a'); + a.setAttribute('href', ''); + a.pfc_nick = nicks[i]; + a.onclick = function(){pfc.sendRequest('/privmsg', this.pfc_nick); return false;} + a.appendChild(img); + li.appendChild(a); + } + else + { + // this is myself -> do not create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user-me.gif')); + img.alt = ''; + img.title = img.alt; + img.style.marginRight = '5px'; + li.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 a = document.createElement('a'); + a.pfc_nick = nicks[i]; + a.setAttribute('href','http://www.google.com/search?q='+nicks[i]); + a.setAttribute('target','_blank'); + //a.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} + a.appendChild(document.createTextNode(nicks[i])); + a.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); + a.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 + + nobr.appendChild(a); + li.appendChild(nobr); + li.style.borderBottom = '1px solid #AAA'; + + ul.appendChild(li); + } + var fc = nickdiv.firstChild; + if (fc) + nickdiv.replaceChild(ul,fc); + else + nickdiv.appendChild(ul,fc); + this.colorizeNicks(nickdiv); +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 13:58:49
|
Revision: 690 Author: kerphi Date: 2006-08-22 06:58:44 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=690&view=rev Log Message: ----------- Fix the insert_text prompt feature Modified Paths: -------------- trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-22 13:46:23 UTC (rev 689) +++ trunk/src/client/pfcclient.js 2006-08-22 13:58:44 UTC (rev 690) @@ -656,7 +656,7 @@ line += ' <span class="pfc_nick">'; line += '‹'; line += '<span '; - line += 'onclick="pfc.insert_text(\'' + sender + ', \',\'\')" '; + line += 'onclick="pfc.insert_text(\'' + sender + ', \',\'\',false)" '; line += 'class="pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; line += '</span>'; @@ -791,7 +791,7 @@ var nobr = document.createElement('nobr'); var span = document.createElement('span'); span.pfc_nick = nicks[i]; - span.onclick = function(){pfc.insert_text(this.pfc_nick+", ",""); return false;} + span.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} span.appendChild(document.createTextNode(nicks[i])); span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 @@ -1176,7 +1176,7 @@ /** * BBcode ToolBar */ - insert_text: function(open, close) + insert_text: function(open, close, promptifselempty) { var msgfield = $('pfc_words'); @@ -1186,9 +1186,10 @@ msgfield.focus(); sel = document.selection.createRange(); var text = sel.text; - if (text == "") + if (text == "" && promptifselempty) text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text.length > 0) + if (text == null) text = ""; + if (text.length > 0 || !promptifselempty) { sel.text = open + text + close; // @todo move the cursor just after the BBCODE, this doesn't work when the text to enclose is selected, IE6 keeps the whole selection active after the operation. @@ -1204,12 +1205,12 @@ var text = msgfield.value.substring(startPos, endPos); var extralength = 0; - if (startPos == endPos) + if (startPos == endPos && promptifselempty) { text = prompt(this.res.getLabel('Enter the text to format'),''); extralength = text.length; } - if (text.length > 0) + if (text.length > 0 || !promptifselempty) { msgfield.value = msgfield.value.substring(0, startPos) + open + text + close + msgfield.value.substring(endPos, msgfield.value.length); msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + extralength + close.length; @@ -1221,7 +1222,7 @@ else { var text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text.length > 0) + if (text.length > 0 || !promptifselempty) { msgfield.value += open + text + close; msgfield.focus(); Modified: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js 2006-08-22 13:46:23 UTC (rev 689) +++ trunk/src/client/pfcgui.js 2006-08-22 13:58:44 UTC (rev 690) @@ -474,7 +474,7 @@ img.setAttribute('className', 'pfc_bt_strong'); // for IE6 img.setAttribute('title', pfc.res.getLabel("Bold")); img.setAttribute('src', pfc.res.getFileUrl('images/bt_strong.gif')); - img.onclick = function(){ pfc.insert_text('[b]','[/b]'); } + img.onclick = function(){ pfc.insert_text('[b]','[/b]',true); } btn.appendChild(img); bbcontainer.appendChild(btn); @@ -487,7 +487,7 @@ img.setAttribute('className', 'pfc_bt_italics'); // for IE6 img.setAttribute('title', pfc.res.getLabel("Italics")); img.setAttribute('src', pfc.res.getFileUrl('images/bt_em.gif')); - img.onclick = function(){ pfc.insert_text('[i]','[/i]'); } + img.onclick = function(){ pfc.insert_text('[i]','[/i]',true); } btn.appendChild(img); bbcontainer.appendChild(btn); @@ -500,7 +500,7 @@ img.setAttribute('className', 'pfc_bt_underline'); // for IE6 img.setAttribute('title', pfc.res.getLabel("Underline")); img.setAttribute('src', pfc.res.getFileUrl('images/bt_ins.gif')); - img.onclick = function(){ pfc.insert_text('[u]','[/u]'); } + img.onclick = function(){ pfc.insert_text('[u]','[/u]',true); } btn.appendChild(img); bbcontainer.appendChild(btn); @@ -513,7 +513,7 @@ img.setAttribute('className', 'pfc_bt_delete'); // for IE6 img.setAttribute('title', pfc.res.getLabel("Delete")); img.setAttribute('src', pfc.res.getFileUrl('images/bt_del.gif')); - img.onclick = function(){ pfc.insert_text('[s]','[/s]'); } + img.onclick = function(){ pfc.insert_text('[s]','[/s]',true); } btn.appendChild(img); bbcontainer.appendChild(btn); @@ -526,7 +526,7 @@ img.setAttribute('className', 'pfc_bt_mail'); // for IE6 img.setAttribute('title', pfc.res.getLabel("Mail")); img.setAttribute('src', pfc.res.getFileUrl('images/bt_mail.gif')); - img.onclick = function(){ pfc.insert_text('[email]','[/email]'); } + img.onclick = function(){ pfc.insert_text('[email]','[/email]',true); } btn.appendChild(img); bbcontainer.appendChild(btn); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 13:46:28
|
Revision: 689 Author: kerphi Date: 2006-08-22 06:46:23 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=689&view=rev Log Message: ----------- Fix customized command demo for the new 1.x api Modified Paths: -------------- trunk/demo/demo27_customized_command.php Modified: trunk/demo/demo27_customized_command.php =================================================================== --- trunk/demo/demo27_customized_command.php 2006-08-22 13:40:44 UTC (rev 688) +++ trunk/demo/demo27_customized_command.php 2006-08-22 13:46:23 UTC (rev 689) @@ -5,13 +5,19 @@ require_once dirname(__FILE__)."/../src/pfccommand.class.php"; class pfcCommand_roll extends pfcCommand { - function run(&$xml_reponse, $clientid, $msg) + function run(&$xml_reponse, $p) { + $clientid = $p["clientid"]; + $param = $p["param"]; + $sender = $p["sender"]; + $recipient = $p["recipient"]; + $recipientid = $p["recipientid"]; + $c =& $this->c; $nick = $c->nick; $container =& $c->getContainerInstance(); - $text = trim($msg); + $text = trim($param); // Call parse roll require_once dirname(__FILE__).'/demo27_dice.class.php'; @@ -19,13 +25,15 @@ if (!$dice->check($text)) { $result = $dice->error_get(); + $cmdp = $p; + $cmdp["param"] = "Cmd_roll failed: " . $result; $cmd =& pfcCommand::Factory("error", $c); - $cmd->run($xml_reponse, $clientid, "Cmd_roll failed: " . $result); + $cmd->run($xml_reponse, $cmdp); } else { $result = $dice->roll(); - $container->writeMsg($nick, $result); + $container->write($recipient, $nick, "send", $result); } if ($c->debug) pxlog("Cmd_roll[".$c->sessionid."]: msg=".$result, "chat", $c->getId()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 13:40:48
|
Revision: 688 Author: kerphi Date: 2006-08-22 06:40:44 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=688&view=rev Log Message: ----------- Fix the multichannel demo Modified Paths: -------------- trunk/demo/demo15_multiple_channel.php Modified: trunk/demo/demo15_multiple_channel.php =================================================================== --- trunk/demo/demo15_multiple_channel.php 2006-08-22 13:09:46 UTC (rev 687) +++ trunk/demo/demo15_multiple_channel.php 2006-08-22 13:40:44 UTC (rev 688) @@ -5,7 +5,8 @@ $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["title"] = "A simple chat with multiple/dynamic channels (rooms)"; $params["nick"] = "guest"; // setup the intitial nickname -//$params["channel"] = isset($_GET["channel"]) ? $_GET["channel"] : "room1"; +$params["channels"] = array("room1"); +$params["frozen_channels"] = array("room1", "room2"); $chat = new phpFreeChat( $params ); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 13:09:55
|
Revision: 687 Author: kerphi Date: 2006-08-22 06:09:46 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=687&view=rev Log Message: ----------- don't fix the min-height of the index Modified Paths: -------------- trunk/style/content.css Modified: trunk/style/content.css =================================================================== --- trunk/style/content.css 2006-08-22 13:08:50 UTC (rev 686) +++ trunk/style/content.css 2006-08-22 13:09:46 UTC (rev 687) @@ -5,7 +5,7 @@ margin-left: 12.2em; background-color: #FFF; border: 1px #acd233 solid; - min-height: 15em; + /*min-height: 15em;*/ } div.content * { margin-top: 0.5em; margin-bottom: 0.5em; } div.content h2 { border-bottom: 1px #444 solid; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 13:09:01
|
Revision: 686 Author: kerphi Date: 2006-08-22 06:08:50 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=686&view=rev Log Message: ----------- Add partners on the pfc index. Modified Paths: -------------- trunk/demo/index.php trunk/index.php trunk/style/content.css Added Paths: ----------- trunk/style/bulle.gif Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2006-08-22 12:24:26 UTC (rev 685) +++ trunk/demo/index.php 2006-08-22 13:08:50 UTC (rev 686) @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <title>phpFreeChat Demos</title> + <title>phpFreeChat - Demos</title> <link rel="stylesheet" title="classic" type="text/css" href="../style/generic.css" /> <link rel="stylesheet" title="classic" type="text/css" href="../style/header.css" /> <link rel="stylesheet" title="classic" type="text/css" href="../style/footer.css" /> @@ -42,41 +42,12 @@ </li> </ul> <p class="partner"> - <a href="http://www.phpfreechat.net"><img alt="logo big" src="../style/logo_88x31.gif" /></a> + <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/?refer=phpfreechat">jeu-gratuit.net</a><br/> + <a href="http://www.pronofun.com/?refer=phpfreechat">pronofun.com</a><br/> </p> - <div class="rating"> - <form action="http://www.hotscripts.com/rate/56184.html" method="get"> - <p><input type="hidden" name="RID" value="N452772"/></p> - <table> - <tbody> - <tr> - <td> - <table> - <tbody> - <tr> - <td>If you like our script, please rate it! <input type="hidden" name="external" value="1"/> - </td> - </tr> - <tr> - <td> - <select name="rate" size="1"> - <option value="5" selected="selected">Excellent!</option> - <option value="4">Very Good</option> - <option value="3">Good</option> - <option value="2">Fair</option> - <option value="1">Poor</option> - </select> - <input type="submit" name="submit" value="Cast My Vote!"/> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - </tbody> - </table> - </form> - </div> </div> <div class="content"> @@ -149,15 +120,4 @@ </div> -<div class="footer"> - <div class="valid"> - <a href="http://validator.w3.org/check?uri=referer"> - <img alt="Valid XHTML 1.0!" src="../style/valid-xhtml.png"> - </a> - <a href="http://jigsaw.w3.org/css-validator/check/referer"> - <img alt="Valid CSS!" src="../style/valid-css.png"> - </a> - </div> - <p>@2006 phpFreeChat</p> - </div> </body></html> Modified: trunk/index.php =================================================================== --- trunk/index.php 2006-08-22 12:24:26 UTC (rev 685) +++ trunk/index.php 2006-08-22 13:08:50 UTC (rev 686) @@ -2,6 +2,7 @@ require_once dirname(__FILE__)."/src/phpfreechat.class.php"; $params = array(); +$params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,10); // setup the intitial nickname $params["isadmin"] = true; // just for debug ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat @@ -12,7 +13,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <title>phpFreeChat Sources Index</title> + <title>phpFreeChat- Sources Index</title> <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" /> @@ -25,7 +26,7 @@ <div class="header"> <h1>phpFreeChat - Sources Index</h1> - <img alt="logo bulle" src="style/bulle.png" class="logo2" /> + <img alt="logo bulle" src="style/bulle.gif" class="logo2" /> </div> <div class="menu"> @@ -36,9 +37,16 @@ <li class="item"> <a href="demo/">Demos</a> </li> + <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?> + <li> + <a href="checkmd5.php">Check md5</a> + </li> + <?php } ?> + <!-- <li class="item"> <a href="admin/">Administration</a> </li> + --> </ul> </li> <li class="sub title">Documentation</li> @@ -60,59 +68,16 @@ </li> </ul> <p class="partner"> - <a href="http://www.phpfreechat.net"><img alt="logo big" src="style/logo_88x31.gif" /></a> + <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/?refer=phpfreechat">jeu-gratuit.net</a><br/> + <a href="http://www.pronofun.com/?refer=phpfreechat">pronofun.com</a><br/> </p> - - <div class="rating"> - <form action="http://www.hotscripts.com/rate/56184.html" method="get"> - <p><input type="hidden" name="RID" value="N452772" /></p> - <table> - <tbody> - <tr> - <td> - <table> - <tbody> - <tr> - <td>If you like our script, please rate it! <input type="hidden" name="external" value="1"/> - </td> - </tr> - <tr> - <td> - <select name="rate" size="1"> - <option value="5" selected="selected">Excellent!</option> - <option value="4">Very Good</option> - <option value="3">Good</option> - <option value="2">Fair</option> - <option value="1">Poor</option> - </select> - <input type="submit" name="submit" value="Cast My Vote!"/> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - </tbody> - </table> - </form> - </div> </div> <div class="content"> - <h2>See the quick demo</h2> <?php $chat->printChat(); ?> - <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) require_once dirname(__FILE__)."/checkmd5.php"; ?> </div> -<div class="footer"> - <div class="valid"> - <a href="http://validator.w3.org/check?uri=referer"> - <img alt="Valid XHTML 1.0!" src="style/valid-xhtml.png" /> - </a> - <a href="http://jigsaw.w3.org/css-validator/check/referer"> - <img alt="Valid CSS!" src="style/valid-css.png" /> - </a> - </div> - <p>@2006 phpFreeChat</p> - </div> </body></html> Added: trunk/style/bulle.gif =================================================================== (Binary files differ) Property changes on: trunk/style/bulle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/style/content.css =================================================================== --- trunk/style/content.css 2006-08-22 12:24:26 UTC (rev 685) +++ trunk/style/content.css 2006-08-22 13:08:50 UTC (rev 686) @@ -5,7 +5,7 @@ margin-left: 12.2em; background-color: #FFF; border: 1px #acd233 solid; - min-height: 40em; + min-height: 15em; } div.content * { margin-top: 0.5em; margin-bottom: 0.5em; } div.content h2 { border-bottom: 1px #444 solid; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-22 12:24:33
|
Revision: 685 Author: kerphi Date: 2006-08-22 05:24:26 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=685&view=rev Log Message: ----------- [en] Add a popup dialog to ask some text for the bbcode buttons (thanks to Mephisto). [fr] Ajout d'un popup pour demander d'entrer du texte lorsque l'utilisateur a selectionn?\195?\169 un texte vide au moment d'appliquer un bbcode (merci ?\195?\160 Mephisto). Modified Paths: -------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js Modified: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-08-19 20:54:57 UTC (rev 684) +++ trunk/src/client/chat.js.tpl.php 2006-08-22 12:24:26 UTC (rev 685) @@ -57,31 +57,32 @@ <?php $labels_to_load = -array( "Do you really want to leave this room ?", - "Hide nickname marker", - "Show nickname marker", - "Hide dates and hours", - "Show dates and hours", - "Disconnect", - "Connect", - "Magnify", - "Cut down", - "Hide smiley box", - "Show smiley box", - "Hide online users box", - "Show online users box", - "Please enter your nickname", - "Private message", - "Close this tab", - "Enter your message here", - "Enter your nickname here", - "Bold", - "Italics", - "Underline", - "Delete", - "Mail", - "Color", - "PHP FREE CHAT [powered by phpFreeChat-%s]", +array( "Do you really want to leave this room ?", // _pfc + "Hide nickname marker", // _pfc + "Show nickname marker", // _pfc + "Hide dates and hours", // _pfc + "Show dates and hours", // _pfc + "Disconnect", // _pfc + "Connect", // _pfc + "Magnify", // _pfc + "Cut down", // _pfc + "Hide smiley box", // _pfc + "Show smiley box", // _pfc + "Hide online users box", // _pfc + "Show online users box", // _pfc + "Please enter your nickname", // _pfc + "Private message", // _pfc + "Close this tab", // _pfc + "Enter your message here", // _pfc + "Enter your nickname here", // _pfc + "Bold", // _pfc + "Italics", // _pfc + "Underline", // _pfc + "Delete", // _pfc + "Mail", // _pfc + "Color", // _pfc + "PHP FREE CHAT [powered by phpFreeChat-%s]", // _pfc + "Enter the text to format", // _pfc ); foreach($labels_to_load as $l) { Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-19 20:54:57 UTC (rev 684) +++ trunk/src/client/pfcclient.js 2006-08-22 12:24:26 UTC (rev 685) @@ -1185,8 +1185,15 @@ { msgfield.focus(); sel = document.selection.createRange(); - sel.text = open + sel.text + close; - msgfield.focus(); + var text = sel.text; + if (text == "") + text = prompt(this.res.getLabel('Enter the text to format'),''); + if (text.length > 0) + { + sel.text = open + text + close; + // @todo move the cursor just after the BBCODE, this doesn't work when the text to enclose is selected, IE6 keeps the whole selection active after the operation. + msgfield.focus(); + } } // Moz support @@ -1195,16 +1202,30 @@ var startPos = msgfield.selectionStart; var endPos = msgfield.selectionEnd; - msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length); - msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length; - msgfield.focus(); + var text = msgfield.value.substring(startPos, endPos); + var extralength = 0; + if (startPos == endPos) + { + text = prompt(this.res.getLabel('Enter the text to format'),''); + extralength = text.length; + } + if (text.length > 0) + { + msgfield.value = msgfield.value.substring(0, startPos) + open + text + close + msgfield.value.substring(endPos, msgfield.value.length); + msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + extralength + close.length; + msgfield.focus(); + } } // Fallback support for other browsers else { - msgfield.value += open + close; - msgfield.focus(); + var text = prompt(this.res.getLabel('Enter the text to format'),''); + if (text.length > 0) + { + msgfield.value += open + text + close; + msgfield.focus(); + } } return; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-19 20:55:06
|
Revision: 684 Author: kerphi Date: 2006-08-19 13:54:57 -0700 (Sat, 19 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=684&view=rev Log Message: ----------- admin.php Polish translation (thanks to Jusuff) Added Paths: ----------- trunk/i18n/pl_PL/admin.php Added: trunk/i18n/pl_PL/admin.php =================================================================== --- trunk/i18n/pl_PL/admin.php (rev 0) +++ trunk/i18n/pl_PL/admin.php 2006-08-19 20:54:57 UTC (rev 684) @@ -0,0 +1,72 @@ +<?php +/** + * i18n/pl_PL/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 + */ + +/** + * Polish translation of the messages (utf8 encoded!) + * + * @author Jusuff <ju...@op...> + */ + +$GLOBALS["i18n"]["lang"] = "Polski"; + +// admin/index.php +$GLOBALS["i18n"]["Administration"] = "Administracja"; +$GLOBALS["i18n"]["Available Languages"] = "Dostępne języki"; +$GLOBALS["i18n"]["PFC version verification"] = "Kontrola wersji PFC"; +$GLOBALS["i18n"]["Internet connection is not possible"] = "Połączenie z Internetem nie jest możliwe"; +$GLOBALS["i18n"]["PFC is update"] = "Twoja wersja PFC jest aktualna"; +$GLOBALS["i18n"]["PFC version"] = "Wersja PFC"; +$GLOBALS["i18n"]["The last official version"] = "Najnowsza oficjalna wersja"; +$GLOBALS["i18n"]["PFC is not update"] = "Twoja wersja PFC jest nieaktualna"; +$GLOBALS["i18n"]["Your version"] = "Twoja wersja"; +$GLOBALS["i18n"]["Download the last version %s here %s."] = "Pobierz najnowszą wersję %s tutaj %s."; + + +// admin/user.php +$GLOBALS["i18n"]["Users management"] = "Zarządzanie użytkownikami"; +$GLOBALS["i18n"]["At least one user must be declare to activate authentication."] = "Musi być przynajmniej jeden użytkownik, by można było włączyć uwierzytelnianie."; +$GLOBALS["i18n"]["It is not possible to delete the last user."] = "Nie można usunąć ostatniego użytkownika."; + +$GLOBALS["i18n"]["User %s deleted."] = "Użytkownik %s został usunięty."; +$GLOBALS["i18n"]["User %s added."] = "Użytkownik %s został dodany."; +$GLOBALS["i18n"]["User %s edited."] = "Użytkownik %s został zmieniony."; + +$GLOBALS["i18n"]["Authentication disable"] = "Uwierzytelnianie wyłączone"; +$GLOBALS["i18n"]["Enable here"] = "Włącz tutaj"; +$GLOBALS["i18n"]["Authentication enable"] = "Uwierzytelnianie włączone"; +$GLOBALS["i18n"]["Disable here"] = "Wyłącz tutaj"; + +$GLOBALS["i18n"]["Username"] = "Użytkownik"; +$GLOBALS["i18n"]["Password"] = "Hasło"; +$GLOBALS["i18n"]["Group"] = "Grupa"; + +$GLOBALS["i18n"]["Do you really want to delete %s ?"] = "Na pewno chcesz usunąć użytkownika: %s ?"; +$GLOBALS["i18n"]["Add a new user"] = "Dodaj nowego użytkownika"; + +$GLOBALS["i18n"]["Edit"] = "Edytuj"; +$GLOBALS["i18n"]["Delete"] = "Usuń"; + +// admin/themes.php +$GLOBALS["i18n"]["Available themes"] = "Dostępne motywy"; +$GLOBALS["i18n"]["Screenshot"] = "Screenshot"; + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-19 08:25:15
|
Revision: 683 Author: kerphi Date: 2006-08-19 01:25:08 -0700 (Sat, 19 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=683&view=rev Log Message: ----------- Bug fix: don't notify the tabs when old message are posted (when history is shown at first load) Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-18 22:09:53 UTC (rev 682) +++ trunk/src/client/pfcclient.js 2006-08-19 08:25:08 UTC (rev 683) @@ -670,12 +670,14 @@ line += '</div>'; // notify the hidden tab a message has been received - if (cmd == 'send' || cmd == 'me') - { - var tabid = recipientid; - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); - } + // don't notify anything if this is old messages + if (oldmsg == 0) + if (cmd == 'send' || cmd == 'me') + { + var tabid = recipientid; + if (this.gui.getTabId() != tabid) + this.gui.notifyTab(tabid); + } if (msg_html[recipientid] == null) msg_html[recipientid] = line; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-18 22:09:59
|
Revision: 682 Author: kerphi Date: 2006-08-18 15:09:53 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=682&view=rev Log Message: ----------- Bug fix: the nickname encoding was not correctly converted according to the output_encoding parameter (cf demo8). Modified Paths: -------------- trunk/demo/demo8_with_a_iso-8859-1_encoded_page.php trunk/src/client/chat.js.tpl.php Modified: trunk/demo/demo8_with_a_iso-8859-1_encoded_page.php =================================================================== --- trunk/demo/demo8_with_a_iso-8859-1_encoded_page.php 2006-08-18 21:58:42 UTC (rev 681) +++ trunk/demo/demo8_with_a_iso-8859-1_encoded_page.php 2006-08-18 22:09:53 UTC (rev 682) @@ -1,5 +1,8 @@ <?php +// force the encoding because off some strange configured server +header("Content-Type: text/html; charset=ISO-8859-1"); + require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat Modified: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-08-18 21:58:42 UTC (rev 681) +++ trunk/src/client/chat.js.tpl.php 2006-08-18 22:09:53 UTC (rev 682) @@ -1,5 +1,5 @@ var pfc_version = '<?php echo $version; ?>'; -var pfc_nickname = '<?php echo addslashes($u->nick); ?>'; +var pfc_nickname = '<?php echo ($GLOBALS["output_encoding"]=="UTF-8" ? addslashes($u->nick) : iconv("UTF-8", $GLOBALS["output_encoding"],addslashes($u->nick))); ?>'; var pfc_clientid = '<?php echo md5(uniqid(rand(), true)); ?>'; var pfc_title = '<?php echo addslashes($title); ?>'; var pfc_refresh_delay = <?php echo $refresh_delay; ?>; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-18 21:58:47
|
Revision: 681 Author: kerphi Date: 2006-08-18 14:58:42 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=681&view=rev Log Message: ----------- Try to set quit_on_closedwindow parameter to true by default. This could be annoying because on each page reload or on each page close a notice will be generated (but can be disabled with shownotice parameter). Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-08-18 21:44:47 UTC (rev 680) +++ trunk/src/pfcglobalconfig.class.php 2006-08-18 21:58:42 UTC (rev 681) @@ -54,7 +54,7 @@ var $refresh_delay = 5000; // in mili-seconds (5 seconds) var $timeout = 20000; // in mili-seconds (20 seconds) var $max_msg = 20; - var $quit_on_closedwindow = false; // false because a reload event is the same as a close event + var $quit_on_closedwindow = true; // could be annoying because the reload event is the same as a close event var $focus_on_connect = true; var $connect_at_startup = true; var $start_minimized = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-18 21:45:00
|
Revision: 680 Author: kerphi Date: 2006-08-18 14:44:47 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=680&view=rev Log Message: ----------- Now the pfcResource::getLabel javascript method can handle multi-parameters. Modified Paths: -------------- trunk/src/client/pfcresource.js trunk/src/phpfreechat.class.php Added Paths: ----------- trunk/lib/javascript/sprintf2.js Added: trunk/lib/javascript/sprintf2.js =================================================================== --- trunk/lib/javascript/sprintf2.js (rev 0) +++ trunk/lib/javascript/sprintf2.js 2006-08-18 21:44:47 UTC (rev 680) @@ -0,0 +1,27 @@ +function sprintf2(arg) { + if( arg.length < 2 ) { + return arg[0]; + } + var data = arg[ 0 ]; + for( var k=1; k<arg.length; ++k ) { + switch( typeof( arg[ k ] ) ) + { + case 'string': + data = data.replace( /%s/, arg[ k ] ); + break; + case 'number': + data = data.replace( /%d/, arg[ k ] ); + break; + case 'boolean': + data = data.replace( /%b/, arg[ k ] ? 'true' : 'false' ); + break; + default: + /// function | object | undefined + break; + } + } + return( data ); +} +if( !String.sprintf2 ) { + String.sprintf2 = sprintf2; +} \ No newline at end of file Modified: trunk/src/client/pfcresource.js =================================================================== --- trunk/src/client/pfcresource.js 2006-08-18 16:40:23 UTC (rev 679) +++ trunk/src/client/pfcresource.js 2006-08-18 21:44:47 UTC (rev 680) @@ -19,10 +19,11 @@ this.labels[key] = value; }, - getLabel: function(key, params) + getLabel: function() { + var key = this.getLabel.arguments[0]; if (this.labels[key]) - return this.labels[key]; + return String.sprintf2(this.getLabel.arguments); //this.labels[key]; else return ""; }, @@ -62,3 +63,20 @@ } }; + + + + + + + + + + + + + + + + + Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-08-18 16:40:23 UTC (rev 679) +++ trunk/src/phpfreechat.class.php 2006-08-18 21:44:47 UTC (rev 680) @@ -108,6 +108,7 @@ $js[] = "lib/javascript/myprototype.js"; $js[] = "lib/javascript/regex.js"; $js[] = "lib/javascript/utf8.js"; + $js[] = "lib/javascript/sprintf2.js"; $js[] = "src/client/pfcclient.js"; $js[] = "src/client/pfcgui.js"; $js[] = "src/client/pfcresource.js"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-18 16:40:33
|
Revision: 679 Author: kerphi Date: 2006-08-18 09:40:23 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=679&view=rev Log Message: ----------- - Bug fix: the phpfreechat logo was hidden on IE6 - Add an error message in the static html if no javascript is loaded. This error message is just removed by the javascript code if the chat is created correctly. Modified Paths: -------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcgui.js trunk/src/pfci18n.class.php trunk/src/phpfreechat.class.php Modified: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-08-18 15:03:13 UTC (rev 678) +++ trunk/src/client/chat.js.tpl.php 2006-08-18 16:40:23 UTC (rev 679) @@ -1,3 +1,4 @@ +var pfc_version = '<?php echo $version; ?>'; var pfc_nickname = '<?php echo addslashes($u->nick); ?>'; var pfc_clientid = '<?php echo md5(uniqid(rand(), true)); ?>'; var pfc_title = '<?php echo addslashes($title); ?>'; @@ -80,10 +81,11 @@ "Delete", "Mail", "Color", + "PHP FREE CHAT [powered by phpFreeChat-%s]", ); foreach($labels_to_load as $l) { - echo "pfc.res.setLabel('".$l."','".addslashes(_pfc($l))."');\n"; + echo "pfc.res.setLabel('".$l."','".addslashes(_pfc2($l))."');\n"; } $fileurl_to_load = Modified: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js 2006-08-18 15:03:13 UTC (rev 678) +++ trunk/src/client/pfcgui.js 2006-08-18 16:40:23 UTC (rev 679) @@ -320,8 +320,7 @@ { var container = $('pfc_container'); - // move the logo - var logo = $('pfc_logo'); + // clean the chat box container.innerHTML = ''; // minimize/maximize button @@ -378,8 +377,18 @@ inputcontainer.appendChild(cmdcontainer); // move the phpfreechat logo into the cmd container box - cmdcontainer.appendChild(logo); - + var a = document.createElement('a'); + a.setAttribute('id', 'pfc_logo'); + a.setAttribute('href','http://www.phpfreechat.net'); + if (pfc_openlinknewwindow) + a.onclick = function(){ window.open(this.href,'_blank'); return false; } + var img = document.createElement('img'); + img.setAttribute('src', 'http://www.phpfreechat.net/pub/logo_80x15.gif'); + img.setAttribute('alt', pfc.res.getLabel("PHP FREE CHAT [powered by phpFreeChat-%s]",pfc_version)); + img.title = img.alt; + a.appendChild(img); + cmdcontainer.appendChild(a); + // handle box : <input id="pfc_handle" type="button" ... var handle = document.createElement('p'); handle.setAttribute('id', 'pfc_handle'); Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2006-08-18 15:03:13 UTC (rev 678) +++ trunk/src/pfci18n.class.php 2006-08-18 16:40:23 UTC (rev 679) @@ -32,6 +32,20 @@ "_".$args[0]."_"; return call_user_func_array('sprintf', $args); } +/** + * Just like _pfc but just return the raw translated string, keeping the %s into it + * (used byt the javascript resources (i18n) class) + */ +function _pfc2() +{ + $args = func_get_args(); + $args[0] = isset($GLOBALS["i18n"][$args[0]]) && $GLOBALS["i18n"][$args[0]] != "" ? + ($GLOBALS["output_encoding"] == "UTF-8" ? + $GLOBALS["i18n"][$args[0]] : + iconv("UTF-8", $GLOBALS["output_encoding"], $GLOBALS["i18n"][$args[0]])) : + "_".$args[0]."_"; + return $args[0]; +} class pfcI18N { Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-08-18 15:03:13 UTC (rev 678) +++ trunk/src/phpfreechat.class.php 2006-08-18 16:40:23 UTC (rev 679) @@ -175,7 +175,8 @@ // or keep a backling to http://www.phpfreechat on your partner page // it helps phpfreechat promotion over the Web. // (remember it's a free program) - $output .= "<a href=\"http://www.phpfreechat.net\" id=\"pfc_logo\"".($c->openlinknewwindow ? ' onclick="window.open(this.href,\'_blank\');return false;"' : '')."><img src=\"http://www.phpfreechat.net/pub/logo_80x15.gif\" alt=\""._pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $c->version)."\" title=\""._pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $c->version)."\" /></a>"; + $output .= "<p>"._pfc("Error: the chat cannot be loaded, check the public directory rights or ask some help on the forum")." <a href=\"http://www.phpfreechat.net/forum/\">www.phpfreechat.net/forum</a></p>"; + $output .= "<a href=\"http://www.phpfreechat.net\"><img src=\"http://www.phpfreechat.net/pub/logo_80x15.gif\" alt=\"PHP FREE CHAT [powered by phpFreeChat-".$c->version."]\" title=\"PHP FREE CHAT [powered by phpFreeChat-".$c->version."]\" /></a>"; $output .= "</div>"; $output .= "<script type=\"text/javascript\">\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-18 15:03:34
|
Revision: 678 Author: kerphi Date: 2006-08-18 08:03:13 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=678&view=rev Log Message: ----------- Bug fix: the nickname box position was broken on IE6, I replaced it by a <p> with appropriate css rules. Modified Paths: -------------- trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js trunk/themes/default/style.css Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-17 21:10:14 UTC (rev 677) +++ trunk/src/client/pfcclient.js 2006-08-18 15:03:13 UTC (rev 678) @@ -301,7 +301,7 @@ if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") { - this.el_handle.value = param; + this.el_handle.innerHTML = param; this.nickname = param; } else if (resp == "isused") Modified: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js 2006-08-17 21:10:14 UTC (rev 677) +++ trunk/src/client/pfcgui.js 2006-08-18 15:03:13 UTC (rev 678) @@ -381,11 +381,10 @@ cmdcontainer.appendChild(logo); // handle box : <input id="pfc_handle" type="button" ... - var handle = document.createElement('input'); + var handle = document.createElement('p'); handle.setAttribute('id', 'pfc_handle'); - handle.setAttribute('type', 'button'); handle.setAttribute('title', pfc.res.getLabel("Enter your nickname here")); - handle.setAttribute('value', pfc.nickname); + handle.appendChild(document.createTextNode(pfc.nickname)); handle.onclick = function(){ pfc.askNick(''); } cmdcontainer.appendChild(handle); Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2006-08-17 21:10:14 UTC (rev 677) +++ trunk/themes/default/style.css 2006-08-18 15:03:13 UTC (rev 678) @@ -172,15 +172,24 @@ div#pfc_cmd_container { position: relative; margin-top: 5px; + margin-bottom: 5px; width: 100%; } +div#pfc_cmd_container * { + margin-right: 2px; +} -input#pfc_handle { - border: black solid 1px; - padding: 0 4px 0 4px; +p#pfc_handle { + display: inline; + cursor: pointer; + border: 1px solid #555; + padding: 2px 10px 2px 10px; color: black; - text-align: center; margin-bottom: 5px; + font-weight: bold; + background-color: #EEE; + font-size: 70%; /* these two line fix a display problem in IE6 : */ + vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ } a#pfc_logo { @@ -202,6 +211,10 @@ /* border: 1px solid #000;*/ } +div#pfc_bbcode_container * { + margin-right: 2px; +} + div#pfc_errors { display: none; margin-top: 5px; @@ -255,6 +268,9 @@ padding: 4px; margin-top: 4px; } +div#pfc_smileys * { + margin-right: 2px; +} div#pfc_smileys img { cursor: pointer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-17 21:10:38
|
Revision: 677 Author: kerphi Date: 2006-08-17 14:10:14 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=677&view=rev Log Message: ----------- # Big refactoring: * Set the prefix parameter value to "pfc_". Now this parameter can't be changed because it simplify the new developments. * Change the manner how resources are manager. Resources were copied into a public directory. Now resources are just delivered by the proxy.php file which is placed into the publix directory. * Remove php code into each resources files (javascript, css). So now the chat page size is lighter from -50% (80ko to 30ko). * No more chat-post.js.tpl.php, chat-pre.js.tpl.php, and pfcclient-custo.js.tpl.php. All these redundant files are now merged into one unique file : customize.js. * The chat is now generated by Javascript routines. # Redesign the default skin (it's nicer for me, maybe for you too ?). Modified Paths: -------------- trunk/demo/demo15_multiple_channel.php trunk/src/commands/nick.class.php trunk/src/pfcglobalconfig.class.php trunk/src/pfcuserconfig.class.php trunk/src/phpfreechat.class.php trunk/themes/default/images/oldmsg.gif Added Paths: ----------- trunk/demo/demo5_customized_style_data/mytheme/style.css trunk/src/client/ trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js trunk/src/client/pfcresource.js trunk/src/client/proxy.php.tpl trunk/themes/default/customize.js trunk/themes/default/images/background.gif trunk/themes/default/images/newmsg.gif trunk/themes/default/style.css Removed Paths: ------------- trunk/demo/demo5_customized_style_data/mytheme/templates/ trunk/themes/default/images/shade.gif trunk/themes/default/templates/ Modified: trunk/demo/demo15_multiple_channel.php =================================================================== --- trunk/demo/demo15_multiple_channel.php 2006-08-17 17:55:00 UTC (rev 676) +++ trunk/demo/demo15_multiple_channel.php 2006-08-17 21:10:14 UTC (rev 677) @@ -5,7 +5,7 @@ $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["title"] = "A simple chat with multiple/dynamic channels (rooms)"; $params["nick"] = "guest"; // setup the intitial nickname -$params["channel"] = isset($_GET["channel"]) ? $_GET["channel"] : "room1"; +//$params["channel"] = isset($_GET["channel"]) ? $_GET["channel"] : "room1"; $chat = new phpFreeChat( $params ); ?> @@ -23,14 +23,10 @@ <body> <p>Rooms list:</p> <ul> - <li><a href="?channel=room1">#room1</a></li> - <li><a href="?channel=room2">#room2</a></li> + <li><a href="#" onclick="pfc.sendRequest('/join', 'room1');">room1</a></li> + <li><a href="#" onclick="pfc.sendRequest('/join', 'room2');">room2</a></li> </ul> -<?php - $c =& pfcGlobalConfig::Instance(); - echo "<p>You are in #".$c->channel."</p>"; -?> <?php $chat->printChat(); ?> <?php Added: trunk/demo/demo5_customized_style_data/mytheme/style.css =================================================================== --- trunk/demo/demo5_customized_style_data/mytheme/style.css (rev 0) +++ trunk/demo/demo5_customized_style_data/mytheme/style.css 2006-08-17 21:10:14 UTC (rev 677) @@ -0,0 +1,66 @@ + +div#pfc_container { + border: black double 5px; + background-image: url("proxy.php?p=mytheme/images/brick.jpg"); + background-repeat: repeat; + padding: 20px; + color: black; + margin: auto; +} +div#pfc_chat { + background-color: #FFF; +} + +div#pfc_content { + border: none; +} + +div.pfc_message { + background-color: transparent; + background-image: url("proxy.php?p=mytheme/images/newmsg.gif"); + background-repeat: no-repeat; + background-position: right center; +} + +div.pfc_oldmsg { + background-image: url("proxy.php?p=mytheme/images/oldmsg.gif"); +} + +span.pfc_heure { + margin-left: 25px; + color: #888; +} + +span.pfc_date { + display: none; +} + +span.pfc_pseudo { + color: black; + font-weight: bold; +} + +input#pfc_handle { + color: black; + font-weight: bold; +} + +div#pfc_online { +} + +div.pfc_btn img { + border: 1px solid #FFF; /* same as container color */ +} +div.pfc_btn img:hover { + border: 1px solid #000; + background-color: #CCC; +} + + +/* commands */ +.pfc_cmd_notice { + color: red; +} +.pfc_cmd_msg { + color: #555; +} \ No newline at end of file Added: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php (rev 0) +++ trunk/src/client/chat.js.tpl.php 2006-08-17 21:10:14 UTC (rev 677) @@ -0,0 +1,149 @@ +var pfc_nickname = '<?php echo addslashes($u->nick); ?>'; +var pfc_clientid = '<?php echo md5(uniqid(rand(), true)); ?>'; +var pfc_title = '<?php echo addslashes($title); ?>'; +var pfc_refresh_delay = <?php echo $refresh_delay; ?>; +var pfc_start_minimized = <?php echo $start_minimized ? "true" : "false"; ?>; +var pfc_nickmarker = <?php echo $nickmarker ? "true" : "false"; ?>; +var pfc_clock = <?php echo $clock ? "true" : "false"; ?>; +var pfc_showsmileys = <?php echo $showsmileys ? "true" : "false"; ?>; +var pfc_showwhosonline = <?php echo $showwhosonline ? "true" : "false"; ?>; +var pfc_focus_on_connect = <?php echo $focus_on_connect ? "true" : "false"; ?>; +var pfc_max_text_len = <?php echo $max_text_len; ?>; +var pfc_quit_on_closedwindow = <?php echo $quit_on_closedwindow ? "true" : "false"; ?>; +var pfc_debug = <?php echo $debug ? "true" : "false"; ?>; +var pfc_max_text_len = <?php echo $max_text_len; ?>; +var pfc_btn_sh_smileys = <?php echo $btn_sh_smileys ? "true" : "false"; ?>; +var pfc_btn_sh_whosonline = <?php echo $btn_sh_whosonline ? "true" : "false"; ?>; +var pfc_connect_at_startup = <?php echo $connect_at_startup ? "true" : "false"; ?>; +var pfc_defaultchan = Array(<?php + function quoteandescape($v) { return "'".addslashes($v)."'"; } + $list = array(); foreach($c->channels as $ch) {$list[] = $ch; } + $list = array_map("quoteandescape",$list); + echo implode(",", $list); + ?>); +var pfc_userchan = Array(<?php + $list = array(); foreach($u->channels as $ch) {$list[] = $ch["name"];} + $list = array_map("quoteandescape",$list); + echo implode(",", $list); + ?>); +var pfc_privmsg = Array(<?php + $list = array(); foreach($u->privmsg as $pv) {$list[] = $pv["name"];} + $list = array_map("quoteandescape",$list); + echo implode(",", $list); + ?>); +var pfc_openlinknewwindow = <?php echo $openlinknewwindow ? "true" : "false"; ?>; +<?php +$bbcode_clist = array("FFFFFF","000000","000055","008000","FF0000","800000","800080","FF5500","FFFF00","00FF00","008080","00FFFF","0000FF","FF00FF","7F7F7F","D2D2D2"); +?> +var pfc_bbcode_color_list = Array(<?php + $list = array(); foreach($bbcode_clist as $v) {$list[] = $v;} + $list = array_map("quoteandescape",$list); + echo implode(",", $list); + ?>); +<?php +$nickname_clist = array('#CCCCCC','#000000','#3636B2','#2A8C2A','#C33B3B','#C73232','#80267F','#66361F','#D9A641','#3DCC3D','#1A5555','#2F8C74','#4545E6','#B037B0','#4C4C4C','#959595'); +?> +var pfc_nickname_color_list = Array(<?php + $list = array(); foreach($nickname_clist as $v) {$list[] = $v;} + $list = array_map("quoteandescape",$list); + echo implode(",", $list); + ?>); +var pfc_proxy_url = '<?php echo $data_public_url."/".$serverid."/proxy.php"; ?>'; + + +/* create our client which will do all the work on the client side ! */ +var pfc = new pfcClient(); +<?php + +$labels_to_load = +array( "Do you really want to leave this room ?", + "Hide nickname marker", + "Show nickname marker", + "Hide dates and hours", + "Show dates and hours", + "Disconnect", + "Connect", + "Magnify", + "Cut down", + "Hide smiley box", + "Show smiley box", + "Hide online users box", + "Show online users box", + "Please enter your nickname", + "Private message", + "Close this tab", + "Enter your message here", + "Enter your nickname here", + "Bold", + "Italics", + "Underline", + "Delete", + "Mail", + "Color", + ); +foreach($labels_to_load as $l) +{ + echo "pfc.res.setLabel('".$l."','".addslashes(_pfc($l))."');\n"; +} + +$fileurl_to_load = +array( 'images/ch.gif', + 'images/pv.gif', + 'images/tab_remove.gif', + 'images/ch-active.gif', + 'images/pv-active.gif', + 'images/user.gif', + 'images/user-me.gif', + 'images/color-on.gif', + 'images/color-off.gif', + 'images/clock-on.gif', + 'images/clock-off.gif', + 'images/logout.gif', + 'images/login.gif', + 'images/maximize.gif', + 'images/minimize.gif', + 'images/smiley-on.gif', + 'images/smiley-off.gif', + 'images/online-on.gif', + 'images/online-off.gif', + 'images/bt_strong.gif', + 'images/bt_em.gif', + 'images/bt_ins.gif', + 'images/bt_del.gif', + 'images/bt_mail.gif', + 'images/bt_color.gif', + ); + +// convert bbcode color value list to a bbcode color url list +function get_bbcode_color_url($v) { return 'images/color_'.$v.'.gif'; } +$bbcode_clist = array_map("get_bbcode_color_url",$bbcode_clist); + +$fileurl_to_load = array_merge($fileurl_to_load, $bbcode_clist); +foreach($fileurl_to_load as $f) +{ + echo "pfc.res.setFileUrl('".$f."',pfc_proxy_url+'".$c->getFileUrlByProxy($f,false)."');\n"; +} + +foreach($smileys as $s_file => $s_str) { + for($j = 0; $j<count($s_str) ; $j++) { + echo "pfc.res.setSmiley('".$s_str[$j]."',pfc_proxy_url+'".$c->getFileUrlByProxy($s_file,false)."');\n"; + } +} + +?> + +pfc.gui.buildChat(); +pfc.connectListener(); +pfc.refreshGUI(); +if (pfc_connect_at_startup) pfc.connect_disconnect(); + +<?php if ($debugxajax) { ?> +xajax.DebugMessage = function(text) +{ + var s = new String(text); + text = s.escapeHTML(); + rx = new RegExp('<','g'); + text = text.replace(rx, '\n<'); + $('debugxajax').innerHTML += '\n---------------\n' + text; +} +<?php } ?> Added: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js (rev 0) +++ trunk/src/client/pfcclient.js 2006-08-17 21:10:14 UTC (rev 677) @@ -0,0 +1,1367 @@ +var is_ie = navigator.appName.match("Explorer"); +var is_khtml = navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML"); +var is_ff = navigator.appName.match("Netscape"); + +/** + * 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 array contains all the sent command + // used the up and down key to navigate in the history + // (doesn't work on IE6) + 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; + /* 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(); + + }, + + 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'); + + /* the events callbacks */ + this.el_words.onkeypress = this.callbackWords_OnKeypress.bindAsEventListener(this); + this.el_words.onkeydown = this.callbackWords_OnKeydown.bindAsEventListener(this); + this.el_words.onfocus = this.callbackWords_OnFocus.bindAsEventListener(this); + this.el_handle.onkeydown = this.callbackHandle_OnKeydown.bindAsEventListener(this); + this.el_handle.onchange = this.callbackHandle_OnChange.bindAsEventListener(this); + this.el_container.onmousemove = this.callbackContainer_OnMousemove.bindAsEventListener(this); + this.el_container.onmousedown = this.callbackContainer_OnMousedown.bindAsEventListener(this); + this.el_container.onmouseup = this.callbackContainer_OnMouseup.bindAsEventListener(this); + document.body.onunload = this.callback_OnUnload.bindAsEventListener(this); + }, + + 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); + + this.refresh_loginlogout(); + this.refresh_minimize_maximize(); + this.refresh_Smileys(); + this.refresh_nickmarker(); + }, + + /** + * Show a popup dialog to ask user to choose a nickname + */ + askNick: function(nickname) + { + // ask to choose a nickname + if (nickname == '') nickname = this.nickname; + var newnick = prompt(this.res.getLabel('Please enter your nickname'), nickname); + if (newnick) + this.sendRequest('/nick', newnick); + }, + + /** + * Reacte to the server response + */ + handleResponse: function(cmd, resp, param) + { + if (cmd == "connect") + { + //alert(cmd + "-"+resp+"-"+param); + if (resp == "ok") + { + if (this.nickname == '') + // ask to choose a nickname + this.askNick(this.nickname); + else + { + this.sendRequest('/nick', this.nickname); + } + + // give focus the the input text box if wanted + if (pfc_focus_on_connect) this.el_words.focus(); + + 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") + { + if (resp =="ok") + { + // create the new channel + var tabid = param[0]; + var name = param[1]; + this.gui.createTab(name, tabid, "ch"); + this.gui.setTabById(tabid); + /* + this.channels.push(name); + this.channelids.push(tabid); + */ + this.refresh_Smileys(); + this.refresh_WhosOnline(); + } + else + alert(cmd + "-"+resp+"-"+param); + } + else if (cmd == "join2") + { + if (resp =="ok") + { + // create the new channel + var tabid = param[0]; + var name = param[1]; + this.gui.createTab(name, tabid, "ch"); + // do not switch to the new created tab + // keep it in the background + // this.gui.setTabById(tabid); + this.refresh_WhosOnline(); + } + else + alert(cmd + "-"+resp+"-"+param); + } + else if (cmd == "leave") + { + //alert(cmd + "-"+resp+"-"+param); + 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") + { + if (resp == "ok") + { + // create the new channel + var tabid = param[0]; + var name = param[1]; + this.gui.createTab(name, tabid, "pv"); + this.gui.setTabById(tabid); + + this.privmsgs.push(name); + this.privmsgids.push(tabid); + + } + else if (resp == "unknown") + { + // speak to unknown user + } + else + alert(cmd + "-"+resp+"-"+param); + } + else if (cmd == "privmsg2") + { + if (resp == "ok") + { + // create the new channel + var tabid = param[0]; + var name = param[1]; + this.gui.createTab(name, tabid, "pv"); + // do not switch to the new created tab + // keep it in the background + // this.gui.setTabById(tabid); + + this.privmsgs.push(name); + this.privmsgids.push(tabid); + } + else if (resp == "unknown") + { + // speak to unknown user + } + else + alert(cmd + "-"+resp+"-"+param); + } + else if (cmd == "nick") + { + if (resp == "connected" || resp == "notchanged") + { + // now join channels comming from sessions + // or the default one + cmd = ''; + if (pfc_userchan.length == 0) + { + for (var i=0; i<pfc_defaultchan.length; i++) + { + if (i<pfc_defaultchan.length-1) + cmd = "/join2"; + else + cmd = "/join"; + this.sendRequest(cmd, pfc_defaultchan[i]); + } + } + for (var i=0; i<pfc_userchan.length; i++) + { + if (i<pfc_userchan.length-1) + cmd = "/join2"; + else + cmd = "/join"; + this.sendRequest(cmd, pfc_userchan[i]); + } + for (var i=0; i<pfc_privmsg.length; i++) + { + this.sendRequest("/privmsg", pfc_privmsg[i]); + } + } + + if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") + { + this.el_handle.value = param; + this.nickname = param; + } + else if (resp == "isused") + { + this.askNick(param); + } + else + alert(cmd + "-"+resp+"-"+param); + } + else if (cmd == "update") + { + if (resp == "ok") + { + } + } + 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 + alert(cmd + "-"+resp+"-"+param); + }, + + /** + * Try to complete a nickname like on IRC when pressing the TAB key + * @todo: improve the algorithme, it should take into account the cursor position + */ + completeNick: function() + { + var w = this.el_words; + var nick_src = w.value.substring(w.value.lastIndexOf(' ')+1,w.value.length); + if (nick_src != '') + { + var ul_online = this.el_online.firstChild; + for (var i=0; i<ul_online.childNodes.length; i++) + { + var nick = ul_online.childNodes[i].innerHTML; + if (indexOf(nick, nick_src) == 0) + w.value = w.value.replace(nick_src, nick); + } + } + }, + + /** + * Handle the pressed keys + * see also callbackWords_OnKeydown + */ + callbackWords_OnKeypress: function(evt) + { + var code = (evt.which) ? evt.which : evt.keyCode; + if (code == Event.KEY_TAB) /* tab key */ + { + /* FF & Konqueror workaround : ignore TAB key here */ + /* do the nickname completion work like on IRC */ + this.completeNick(); + return false; /* do not leave the tab key default behavior */ + } + else if (code == Event.KEY_RETURN) /* enter key */ + { + 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-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 + 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; + } + else if (code == 33 && false) // page up key + { + // write the last 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 = this.cmdhistory.length-1; + w.value = this.cmdhistory[this.cmdhistoryid]; + } + } + else if (code == 34 && false) // page down key + { + // 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 = 0; + w.value = this.cmdhistory[this.cmdhistoryid]; + } + } + else + { + /* allow other keys */ + return true; + } + }, + /** + * Handle the pressed keys + * see also callbackWords_OnKeypress + */ + callbackWords_OnKeydown: function(evt) + { + if (!this.isconnected) return false; + this.clearError(Array(this.el_words)); + var code = (evt.which) ? evt.which : event.keyCode + if (code == 9) /* tab key */ + { + /* IE workaround : ignore TAB key here */ + /* do the nickname completion work like on IRC */ + this.completeNick(); + return false; /* do not leave the tab key default behavior */ + } + else + { + return true; + } + }, + callbackWords_OnFocus: function(evt) + { + // if (this.el_handle && this.el_handle.value == '' && !this.minmax_status) + // this.el_handle.focus(); + }, + callbackHandle_OnKeydown: function(evt) + { + }, + callbackHandle_OnChange: function(evt) + { + }, + 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'); + } + }, + + callbackContainer_OnMousemove: function(evt) + { + this.isdraging = true; + }, + callbackContainer_OnMousedown: function(evt) + { + if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) + this.isdraging = false; + }, + callbackContainer_OnMouseup: function(evt) + { + if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) + if (!this.isdraging) + if (this.el_words && !this.minmax_status) + this.el_words.focus(); + }, + + /** + * 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 ) + { + // get the current selected tab container + var tabid = this.gui.getTabId(); + var container = this.gui.getChatContentFromTabId(tabid); + + div = document.createElement('div'); + div.style.padding = "2px 5px 2px 5px"; + + pre = document.createElement('pre'); + pre.setAttribute('class', 'pfc_info pfc_info_'+cmd); + pre.setAttribute('className', 'pfc_info pfc_info_'+cmd); // for IE6 + // Element.addClassName(pre, 'pfc_info'); + // Element.addClassName(pre, 'pfc_info_'+cmd); + pre.style.border = "1px solid #555"; + pre.style.padding = "5px"; + pre.innerHTML = msg; + div.appendChild(pre); + + // finaly append this to the message list + container.appendChild(div); + this.gui.scrollDown(tabid, div); + }, + + handleComingRequest: function( cmds ) + { + var msg_html = $H(); + + //alert(cmds.inspect()); + + // var html = ''; + 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'+ id +'" class="pfc_cmd_'+ cmd +' pfc_message'; + 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 + ', \',\'\')" '; + line += 'class="pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(sender)) +'">'; + line += sender; + 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>'; + + // notify the hidden tab a message has been received + if (cmd == 'send' || cmd == 'me') + { + var tabid = recipientid; + if (this.gui.getTabId() != tabid) + this.gui.notifyTab(tabid); + } + + if (msg_html[recipientid] == null) + msg_html[recipientid] = line; + else + msg_html[recipientid] += line; + } + + // 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'); + m.innerHTML = msg_html[recipientid]; + this.colorizeNicks(m); + this.refresh_clock(m); + // finaly append this to the message list + recipientdiv.appendChild(m); + this.gui.scrollDown(tabid, m); + } + }, + + /** + * Call the ajax request function + * Will query the server + */ + sendRequest: function(cmd, param) + { + var recipientid = this.gui.getTabId(); + var req = cmd+" "+this.clientid+" "+(recipientid==''?'0':recipientid)+(param?" "+param : ""); + if (pfc_debug) + if (cmd != "/update") alert(req); + return eval('pfc_handleRequest(req);'); + }, + + /** + * update function to poll the server each 'refresh_delay' time + */ + updateChat: function(start) + { + clearTimeout(this.timeout); + if (start) + { + var res = this.sendRequest('/update'); + // adjust the refresh_delay if the connection was lost + if (res == false) { this.refresh_delay = this.refresh_delay * 2; } + // setup the next update + this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); + } + }, + + /** + * insert a smiley + */ + insertSmiley: function(s) + { + this.el_words.value += s; + this.el_words.focus(); + }, + + /** + * fill the nickname list with connected nicknames + */ + updateNickList: function(tabid,lst) + { + // alert('updateNickList: tabid='+tabid+"-lst="+lst.inspect()); + //var tabid = hex_md5(_to_utf8("ch_"+recipient)); + + this.nicklist[tabid] = lst; + var nicks = lst; + var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild; + var ul = document.createElement('ul'); + for (var i=0; i<nicks.length; i++) + { + var li = document.createElement('li'); + if (nicks[i] != this.nickname) + { + // this is someone -> create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user.gif')); + img.alt = this.res.getLabel('Private message'); + img.title = img.alt; + img.style.marginRight = '5px'; + var a = document.createElement('a'); + a.setAttribute('href', ''); + a.pfc_nick = nicks[i]; + a.onclick = function(){pfc.sendRequest('/privmsg', this.pfc_nick); return false;} + a.appendChild(img); + li.appendChild(a); + } + else + { + // this is myself -> do not create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user-me.gif')); + img.alt = ''; + img.title = img.alt; + img.style.marginRight = '5px'; + li.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.pfc_nick = nicks[i]; + span.onclick = function(){pfc.insert_text(this.pfc_nick+", ",""); return false;} + span.appendChild(document.createTextNode(nicks[i])); + span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); + span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 + + // Element.addClassName(span, 'pfc_nickmarker'); + // Element.addClassName(span, 'pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); + nobr.appendChild(span); + li.appendChild(nobr); + li.style.borderBottom = '1px solid #AAA'; + + ul.appendChild(li); + } + var fc = nickdiv.firstChild; + if (fc) + nickdiv.replaceChild(ul,fc); + else + nickdiv.appendChild(ul,fc); + this.colorizeNicks(nickdiv); + }, + + /** + * 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.\\/\\?\\=\\&\\-\\_\\#:;]*)([^\\"]|$)','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); + } + + // 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>'); + 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 = smileys.keys(); + for(var i = 0; i < sl.length; i++) + { + rx = new RegExp(RegExp.escape(sl[i]),'g'); + msg = msg.replace(rx, '<img src="'+ smileys[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'); + + // 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 = pfc_nickname_color_list; + }, + + + /** + * get the corresponding nickname color + */ + getAndAssignNickColor: function(nick) + { + /* check the nickname is colorized or not */ + var allready_colorized = false; + var nc = ''; + for(var j = 0; j < this.nickcolor.length; j++) + { + if (this.nickcolor[j][0] == nick) + { + allready_colorized = true; + nc = this.nickcolor[j][1]; + } + } + if (!allready_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_'+ hex_md5(_to_utf8(nick)), '') + 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; + }, + + /** + * Connect/disconnect button + */ + connect_disconnect: function() + { + if (this.isconnected) + this.sendRequest('/quit'); + else + this.sendRequest('/connect'); + }, + refresh_loginlogout: function() + { + var loginlogout_icon = $('pfc_loginlogout'); + if (this.isconnected) + { + // this.updateNickList(this.nicklist); + 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) + { + var msgfield = $('pfc_words'); + + // IE support + if (document.selection && document.selection.createRange) + { + msgfield.focus(); + sel = document.selection.createRange(); + sel.text = open + sel.text + close; + msgfield.focus(); + } + + // Moz support + else if (msgfield.selectionStart || msgfield.selectionStart == '0') + { + var startPos = msgfield.selectionStart; + var endPos = msgfield.selectionEnd; + + msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length); + msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length; + msgfield.focus(); + } + + // Fallback support for other browsers + else + { + msgfield.value += open + close; + msgfield.focus(); + } + return; + }, + + /** + * Minimize/Maximize none/inline + */ + minimize_maximize: function(idname, type) + { + var element = $(idname); + if(element.style) + { + if(element.style.display == type ) + { + element.style.display = 'none'; + } + else + { + element.style.display = type; + } + } + }, + + switch_text_color: function(color) + { + /* clear any existing borders on the color buttons */ + var colorbtn = this.getElementsByClassName($('pfc_colorlist'), 'pfc_color', ''); + for(var i = 0; colorbtn.length > i; i++) + colorbtn[i].style.border = 'none'; + + /* assign the new border style to the selected button */ + this.current_text_color = color; + setCookie('pfc_current_text_color', this.current_text_color); + var idname = 'pfc_color_' + color; + $(idname).style.border = '1px solid #666'; + $(idname).style.padding = '1px'; + + // assigne the new color to the input text box + this.el_words.style.color = '#'+color; + this.el_words.focus(); + }, + + /** + * Smiley show/hide + */ + showHideSmileys: function() + { + if (this.showsmileys) + { + this.showsmileys = false; + } + else + { + this.showsmileys = true; + } + setCookie('pfc_showsmileys', this.showsmileys); + this.refresh_Smileys(); + }, + refresh_Smileys: function() + { + // first of all : show/hide the smiley box + var content = $('pfc_smileys'); + if (this.showsmileys) + content.style.display = 'block'; + else + content.style.display = 'none'; + + // then switch the button icon + var btn = $('pfc_showHideSmileysbtn'); + if (this.showsmileys) + { + if (btn) + { + btn.src = this.res.getFileUrl('images/smiley-on.gif'); + btn.alt = this.res.getLabel('Hide smiley box'); + btn.title = btn.alt; + } + } + else + { + if (btn) + { + btn.src = this.res.getFileUrl('images/smiley-off.gif'); + btn.alt = this.res.getLabel('Show smiley box'); + btn.title = btn.alt; + } + } + }, + + + /** + * Show Hide who's online + */ + showHideWhosOnline: function() + { + if (this.showwhosonline) + { + this.showwhosonline = false; + } + else + { + this.showwhosonline = true; + } + setCookie('pfc_showwhosonline', this.showwhosonline); + this.refresh_WhosOnline(); + }, + refresh_WhosOnline: function() + { + // first of all : show/hide the nickname list box + var root = $('pfc_channels_content'); + var contentlist = this.getElementsByClassName(root, 'pfc_online', ''); + for(var i = 0; i < contentlist.length; i++) + { + var content = contentlist[i]; + if (this.showwhosonline) + content.style.display = 'block'; + else + content.style.display = 'none'; + content.style.zIndex = '100'; // for IE6, force the nickname list borders to be shown + } + + // then refresh the button icon + var btn = $('pfc_showHideWhosOnlineBtn'); + if (!btn) return; + if (this.showwhosonline) + { + btn.src = this.res.getFileUrl('images/online-on.gif'); + btn.alt = this.res.getLabel('Hide online users box'); + btn.title = btn.alt; + } + else + { + btn.src = this.res.getFileUrl('images/online-off.gif'); + btn.alt = this.res.getLabel('Show online users box'); + btn.title = btn.alt; + } + this.refresh_Chat(); + }, + + /** + * Resize chat + */ + refresh_Chat: function() + { + // resize all the tabs content + var root = $('pfc_channels_content'); + var contentlist = this.getElementsByClassName(root, 'pfc_chat', ''); + for(var i = 0; i < contentlist.length; i++) + { + var chatdiv = contentlist[i]; + var style = $H(); + if (!this.showwhosonline) + { + chatdiv.style.width = '100%'; + } + else + { + chatdiv.style.width = ''; + } + } + } +}; Added: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js (rev 0) +++ trunk/src/client/pfcgui.js 2006-08-17 21:10:14 UTC (rev 677) @@ -0,0 +1,568 @@ +/** + * This class centralize the pfc' Graphic User Interface manipulations + * (depends on prototype library) + * @author Stephane Gully + */ +var pfcGui = Class.create(); +pfcGui.prototype = { + + initialize: function() + { + this.current_tab = ''; + this.current_tab_id = ''; + this.tabs = Array(); + this.tabids = Array(); + this.tabtypes = Array(); + this.chatcontent = $H(); + this.onlinecontent = $H(); + this.scrollpos = $H(); + this.elttoscroll = $H(); + }, + + /** + * scroll down from the posted message height + */ + scrollDown: function(tabid, elttoscroll) + { + if (this.getTabId() != tabid) + { + if (!this.elttoscroll[tabid]) this.elttoscroll[tabid] = Array(); + this.elttoscroll[tabid].push(elttoscroll); + return; + } + var content = this.getChatContentFromTabId(tabid); + content.scrollTop += elttoscroll.offsetHeight+2; + this.scrollpos[tabid] = content.scrollTop; + }, + + isCreated: function(tabid) + { + /* + for (var i = 0; i < this.tabids.length ; i++) + { + if (this.tabids[i] == tabid) return true; + } + return false; + */ + return (indexOf(this.tabids, tabid) >= 0); + }, + + setTabById: function(tabid) + { + // 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; + + // start without selected tabs + this.current_tab = ''; + this.current_tab_id = ''; + var tab_to_show = null; + // try to fine the tab to select and select it! + for (var i=0; i<this.tabids.length; i++) + { + var tabtitle = $('pfc_channel_title'+this.tabids[i]); + var tabcontent = $('pfc_channel_content'+this.tabids[i]); + if (this.tabids[i] == tabid) + { + // select the tab + tabtitle.setAttribute('class', 'selected'); + tabtitle.setAttribute('className', 'selected'); // for IE6 + //Element.addClassName(tabtitle, 'selected'); + tab_to_show = tabcontent; + this.current_tab = this.tabs[i]; + this.current_tab_id = tabid; + } + else + { + // unselect the tab + tabtitle.setAttribute('class', ''); + tabtitle.setAttribute('className', ''); // for IE6 + //Element.removeClassName(tabtitle, 'selected'); + tabcontent.style.display = 'none'; + } + } + + // show the new selected tab + tab_to_show.style.display = 'block'; + + // restore the scroll pos + var content = this.getChatContentFromTabId(tabid); + content.scrollTop = this.scrollpos[tabid]; + + // scroll the new posted message + if (this.elttoscroll[tabid] && + this.elttoscroll[tabid].length > 0) + { + // on by one + for (var i=0; i<this.elttoscroll[tabid].length; i++) + this.scrollDown(tabid,this.elttoscroll[tabid][i]); + this.elttoscroll[tabid] = Array(); + } + + this.unnotifyTab(tabid); + }, + + getTabId: function() + { + return this.current_tab_id; + }, + + getChatContentFromTabId: function(tabid) + { + // return the chat content if it exists + var cc = this.chatcontent[tabid]; + if (cc) return cc; + + // 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 + + // Element.addClassName(cc, 'pfc_chat'); + 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; + return cc; + }, + getOnlineContentFromTabId: function(tabid) + { + // 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); + oc.setAttribute('class', 'pfc_online'); + oc.setAttribute('className', 'pfc_online'); // for IE6 + //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"; + oc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) + + // Create a dummy div to add padding + var div = document.createElement('div'); + div.style.padding = "5px"; + oc.appendChild(div); + + this.onlinecontent[tabid] = oc; + return oc; + }, + + removeTabById: function(tabid) + { + // remove the widgets + var tabparent_t = $('pfc_channels_list'); + var tabparent_c = $('pfc_channels_content'); + var tab_t = $('pfc_channel_title'+tabid); + var tab_c = $('pfc_channel_content'+tabid); + tabparent_t.removeChild(tab_t); + tabparent_c.removeChild(tab_c); + + // empty the chat div content + var div_chat = this.getChatContentFromTabId(tabid); + div_chat.innerHTML = ''; + + // remove the tab from the list + var tabpos = indexOf(this.tabids, tabid); + var name = this.tabs[tabpos]; + this.tabids = without(this.tabids, this.tabids[tabpos]); + this.tabs = without(this.tabs, this.tabs[tabpos]); + this.tabtypes = without(this.tabtypes, this.tabtypes[tabpos]); + tabpos = indexOf(this.tabids, this.getTabId()); + if (tabpos<0) tabpos = 0; + this.setTabById(this.tabids[tabpos]); + return name; + }, + + /* + removeTabByName: function(name) + { + var tabid = hex_md5(_to_utf8(name)); + var ret = this.removeTabById(tabid); + if (ret == name) + return tabid; + else + return 0; + }, + */ + + createTab: function(name, tabid, type) + { + // do not create empty tabs + if(name == '') return; + if(tabid == '') return; + + // do not create twice a the same tab + if (this.isCreated(tabid)) return; + + // var tabid = hex_md5(_to_utf8(name)); + //alert(name+'='+tabid); + this.tabs.push(name); + this.tabids.push(tabid); + this.tabtypes.push(type); + + //alert(this.tabs.toString()); + + var li_title = document.createElement('li'); + li_title.setAttribute('id', 'pfc_channel_title'+tabid); + + var li_div = document.createElement('div'); + li_title.appendChild(li_div); + + var img = document.createElement('img'); + img.setAttribute('id', 'pfc_tabimg'+tabid); + if (type == 'ch') + img.setAttribute('src', pfc.res.getFileUrl('images/ch.gif')); + if (type == 'pv') + img.setAttribute('src', pfc.res.getFileUrl('images/pv.gif')); + var a1 = document.createElement('a'); + // Element.addClassName(a1, 'pfc_tabtitle'); + a1.setAttribute('class', 'pfc_tabtitle'); + a1.setAttribute('className', 'pfc_tabtitle'); // for IE6 + a1.appendChild(img); + a1.appendChild(document.createTextNode(name)); + a1.setAttribute('href', '#'); + a1.pfc_tabid = tabid; + a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;} + li_div.appendChild(a1); + + var a2 = document.createElement('a'); + a2.pfc_tabid = tabid; + a2.onclick = function(){ + var res = confirm(pfc.res.getLabel('Do you really want to leave this room ?')); + if (res == true) pfc.sendRequest('/leave', this.pfc_tabid); return false; + } + a2.alt = pfc.res.getLabel('Close this tab'); + a2.title = a2.alt; + // Element.addClassName(a2, 'pfc_tabclose'); + a2.setAttribute('class', 'pfc_tabclose'); + a2.setAttribute('className', 'pfc_tabclose'); // for IE6 + var img = document.createElement('img'); + img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif')); + a2.appendChild(img); + li_div.appendChild(a2); + + 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 + div_content.style.display = 'none'; + + var div_chat = this.getChatContentFromTabId(tabid); + var div_online = this.getOnlineContentFromTabId(tabid); + div_content.appendChild(div_chat); + div_content.appendChild(div_online); + + $('pfc_channels_list').appendChild(li_title); + $('pfc_channels_content').appendChild(div_content); + + return tabid; + }, + + /** + * This function change the tab icon in order to catch the attention + */ + notifyTab: function(tabid) + { + var tabpos = indexOf(this.tabids, tabid); + var tabtype = this.tabtypes[tabpos]; + var img = $('pfc_tabimg'+tabid); + if (img) ... [truncated message content] |
From: <ke...@us...> - 2006-08-17 17:55:19
|
Revision: 676 Author: kerphi Date: 2006-08-17 10:55:00 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=676&view=rev Log Message: ----------- New Polish pl_PL translation (thanks to Pawel) Modified Paths: -------------- trunk/demo/index.php Added Paths: ----------- trunk/demo/demo47_in_polish.php trunk/i18n/pl_PL/ trunk/i18n/pl_PL/main.php Added: trunk/demo/demo47_in_polish.php =================================================================== --- trunk/demo/demo47_in_polish.php (rev 0) +++ trunk/demo/demo47_in_polish.php 2006-08-17 17:55:00 UTC (rev 676) @@ -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"] = "pl_PL"; +$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 2006-08-17 16:25:56 UTC (rev 675) +++ trunk/demo/index.php 2006-08-17 17:55:00 UTC (rev 676) @@ -144,6 +144,7 @@ <li><a href="demo42_in_chinese_from_taiwan.php">demo42 - the Chinese from taiwan (traditional Chinese) translation of the chat</a></li> <li><a href="demo45_in_bulgarian.php">demo45 - the Bulgarian translation of the chat</a></li> <li><a href="demo46_in_hungarian.php">demo46 - the Hungarian translation of the chat</a></li> + <li><a href="demo47_in_polish.php">demo47 - the Polish translation of the chat</a></li> </ul> </div> Added: trunk/i18n/pl_PL/main.php =================================================================== --- trunk/i18n/pl_PL/main.php (rev 0) +++ trunk/i18n/pl_PL/main.php 2006-08-17 17:55:00 UTC (rev 676) @@ -0,0 +1,243 @@ +<?php +/** + * i18n/pl_PL/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 + */ + +/** + * Polish translation of the messages (utf8 encoded!) + * + * @author Pawel + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Chat"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "Nie znaleziono %s, nie można znaleźć biblioteki %s."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Proszę wprowadzić swój 'nick'"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Tekst nie może byc pusty"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s zmienił[a] swój nick na %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s połączony"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s odłączony"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s odłączony (timeout)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "Nieznane polecenie [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s nie istnieje: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Konieczne jest %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s nie istnieje, nie można znaleźć biblioteki %s"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s nie istnieje"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s katalog musi być podany"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s musi byc katalogiem"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s nie może zostac utworzony"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s nie jest zapisywalny"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s nie jest odczytywalny"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s nie jest plikiem"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s nie jest katalogiem"; + +// 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"] = "Ukryj kolory nick-ów"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Pokaż kolory nick-ów"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Odłącz"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Połącz"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Powiększ"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Obetnij"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Ukryj datę i godzinę"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Pokaż date i godzinę"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Wprowadź tutaj komunikat"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Wprowadź tutaj swój nick"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Błąd: niezdefiniowany lub nieużywany parametr '%s', popraw lub usuń ten parametr"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Ukryj emotikony"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Pokaż emotikony"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Ukryj listę użytkowników on-line"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Pokaż listę użytkowników on-line"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Pogrubienie"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Kursywa"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Podkreślenie"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Przekreślenie"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Kod"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Mail"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Kolor"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "Nie można znaleźć szablonu %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"] = "Błąd: nie można znaleźć '%s', sprawdź czy katalog tymczasowy '%s' oraz styl '%s' są poprawne"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s misi być zaimplementowane"; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' parametr jest obowiązkowy z definicji używa '%s'"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' parametr musi być liczbą dodatnią"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' parametr niepoprawny. Poprawne wartości: '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "Rozmowa"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "Wiadomość prywatna"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "Zamknij zakładkę"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Czy rzeczywiście chcesz opuścić ten kanał ?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "Brakujący parametr"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "zablokowany w %s przez %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "Lista zablokowanych użytkowników:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "Pusty"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' odblokuje użytkownikia o nick-u {id}"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' odblokuje wszystkich użytkowników na tym kanale"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s odłączenie (timeout)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s dołączył do %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "wykopany z %s przez %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Nie możesz wysłać tej wiadomości, %s jest odłączony"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Nikt nie został odblokowany"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s został odblokowany"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s użytkowników zostało odblokowanych"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Nie wolno ci używać polecenia '%s'"; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Nie możesz dołaczyc do %s ponieważ jesteś blokowany"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Nie wolno ci zmieniać nick-a"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Nie możesz dołączyć do %s ponieważ lista kanałów jest zastrzeżona"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Proszę nie wysyłąć tak wielu komunikatów, nie jest to dopuszczalne"; + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-17 16:26:02
|
Revision: 675 Author: kerphi Date: 2006-08-17 09:25:56 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=675&view=rev Log Message: ----------- Code cleaning and add http proxy parameters Modified Paths: -------------- trunk/contrib/pfcInstaller2/index.php Modified: trunk/contrib/pfcInstaller2/index.php =================================================================== --- trunk/contrib/pfcInstaller2/index.php 2006-08-09 21:39:32 UTC (rev 674) +++ trunk/contrib/pfcInstaller2/index.php 2006-08-17 16:25:56 UTC (rev 675) @@ -1,24 +1,31 @@ <?php +$http["proxy_host"] = "proxyout.inist.fr"; +$http["proxy_port"] = 8080; +$base_url = "http://www.phpfreechat.net/download"; +$base_url = "http://puzzle.dl.sourceforge.net/sourceforge/phpfreechat"; +$archivename = "phpfreechat-1.0-beta4.tar.gz"; +//$archivename = "phpfreechat-0.9.3.tar.gz"; +$dstpath = dirname(__FILE__)."/data"; + require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('file_get_contents'); PHP_Compat::loadFunction('file_put_contents'); -$archivename = "phpfreechat-0.1.tar.gz"; -$dstpath = dirname(__FILE__)."/data"; if (!is_writable($dstpath)) die("ERROR: ".$dstpath." is not writable!"); require_once "HTTP/Request.php"; -$req =& new HTTP_Request("http://www.phpfreechat.net/download/".$archivename); +$req =& new HTTP_Request($base_url."/".$archivename, $http); if (!PEAR::isError($req->sendRequest())) { $archivecontent = $req->getResponseBody(); file_put_contents($dstpath."/".$archivename, $archivecontent); require_once "File/Archive.php"; - @File_Archive::extract( $src = $dstpath."/".$archivename."/", - $dest = $dstpath ); + $src = $dstpath."/".$archivename."/"; + $dest = $dstpath; + File_Archive::extract( $src, $dest ); } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-09 21:39:40
|
Revision: 674 Author: kerphi Date: 2006-08-09 14:39:32 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=674&view=rev Log Message: ----------- Bug fix: the parameters should not be passed with a & because in php pass-by-reference is setup in the methode prototype. (thanks to John Mario Cano) Modified Paths: -------------- trunk/src/proxys/auth.class.php trunk/src/proxys/censor.class.php trunk/src/proxys/lock.class.php trunk/src/proxys/noflood.class.php Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-08-08 13:39:26 UTC (rev 673) +++ trunk/src/proxys/auth.class.php 2006-08-09 21:39:32 UTC (rev 674) @@ -104,7 +104,7 @@ $p["sender"] = $sender; $p["recipient"] = $recipient; $p["recipientid"] = $recipientid; - $this->next->run(&$xml_reponse, $p); + $this->next->run($xml_reponse, $p); } } Modified: trunk/src/proxys/censor.class.php =================================================================== --- trunk/src/proxys/censor.class.php 2006-08-08 13:39:26 UTC (rev 673) +++ trunk/src/proxys/censor.class.php 2006-08-09 21:39:32 UTC (rev 674) @@ -63,7 +63,7 @@ $p["sender"] = $sender; $p["recipient"] = $recipient; $p["recipientid"] = $recipientid; - $this->next->run(&$xml_reponse, $p); + $this->next->run($xml_reponse, $p); } } Modified: trunk/src/proxys/lock.class.php =================================================================== --- trunk/src/proxys/lock.class.php 2006-08-08 13:39:26 UTC (rev 673) +++ trunk/src/proxys/lock.class.php 2006-08-09 21:39:32 UTC (rev 674) @@ -54,7 +54,7 @@ $p["sender"] = $sender; $p["recipient"] = $recipient; $p["recipientid"] = $recipientid; - $this->next->run(&$xml_reponse, $p); + $this->next->run($xml_reponse, $p); } } } Modified: trunk/src/proxys/noflood.class.php =================================================================== --- trunk/src/proxys/noflood.class.php 2006-08-08 13:39:26 UTC (rev 673) +++ trunk/src/proxys/noflood.class.php 2006-08-09 21:39:32 UTC (rev 674) @@ -82,7 +82,7 @@ $p["sender"] = $sender; $p["recipient"] = $recipient; $p["recipientid"] = $recipientid; - $this->next->run(&$xml_reponse, $p); + $this->next->run($xml_reponse, $p); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-08 13:39:32
|
Revision: 673 Author: kerphi Date: 2006-08-08 06:39:26 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=673&view=rev Log Message: ----------- Bug fix: URL parsing breaks when an URL contains a semicolon (thanks to Shimodax) Modified Paths: -------------- branches/0.x/themes/default/templates/pfcclient.js.tpl.php Modified: branches/0.x/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- branches/0.x/themes/default/templates/pfcclient.js.tpl.php 2006-08-07 15:40:12 UTC (rev 672) +++ branches/0.x/themes/default/templates/pfcclient.js.tpl.php 2006-08-08 13:39:26 UTC (rev 673) @@ -384,7 +384,7 @@ var rx = null; // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\/\\?\\=\\&\\-\\_\\#]*)([^\\"]|$)','ig'); + var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\/\\?\\=\\&\\-\\_\\#;:]*)([^\\"]|$)','ig'); var ttt = msg.split(rx_url); if (ttt.length > 1 && !navigator.appName.match("Explorer|Konqueror") && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-07 15:40:23
|
Revision: 672 Author: kerphi Date: 2006-08-07 08:40:12 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=672&view=rev Log Message: ----------- Japanese translation update (thanks to elf2000) Modified Paths: -------------- trunk/i18n/ja_JP/main.php Added Paths: ----------- trunk/i18n/ja_JP/admin.php Added: trunk/i18n/ja_JP/admin.php =================================================================== --- trunk/i18n/ja_JP/admin.php (rev 0) +++ trunk/i18n/ja_JP/admin.php 2006-08-07 15:40:12 UTC (rev 672) @@ -0,0 +1,72 @@ +<?php +/** + * i18n/ja_JP/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 + */ + +/** + * Japanese translation of the messages (utf8 encoded!) + * + * @author Tadashi Jokagi <el...@us...> http://poyo.jp/ + */ + +$GLOBALS["i18n"]["lang"] = "Japanese"; + +// admin/index.php +$GLOBALS["i18n"]["Administration"] = "管理"; +$GLOBALS["i18n"]["Available Languages"] = "利用可能な言語"; +$GLOBALS["i18n"]["PFC version verification"] = "PFC のバージョン確認"; +$GLOBALS["i18n"]["Internet connection is not possible"] = "インターネットへの接続ができません。"; +$GLOBALS["i18n"]["PFC is update"] = "PFC is update"; +$GLOBALS["i18n"]["PFC version"] = "PFC バージョン"; +$GLOBALS["i18n"]["The last official version"] = "最後の公式バージョン"; +$GLOBALS["i18n"]["PFC is not update"] = "PFC is not update"; +$GLOBALS["i18n"]["Your version"] = "使用中のバージョン"; +$GLOBALS["i18n"]["Download the last version %s here %s."] = "%s ここ %s で最新バージョンをダウンロードします。"; + + +// admin/user.php +$GLOBALS["i18n"]["Users management"] = "ユーザー管理"; +$GLOBALS["i18n"]["At least one user must be declare to activate authentication."] = "少なくとも認証を有効にするにはひとりのユーザーを作成しなければなりません。"; +$GLOBALS["i18n"]["It is not possible to delete the last user."] = "最後のユーザを削除することはできません。"; + +$GLOBALS["i18n"]["User %s deleted."] = "ユーザー %s を削除しました。"; +$GLOBALS["i18n"]["User %s added."] = "ユーザー %s を追加しました。"; +$GLOBALS["i18n"]["User %s edited."] = "ユーザー %s を編集しました。"; + +$GLOBALS["i18n"]["Authentication disable"] = "認証は無効です"; +$GLOBALS["i18n"]["Enable here"] = "ここで有効にする"; +$GLOBALS["i18n"]["Authentication enable"] = "認証は有効です"; +$GLOBALS["i18n"]["Disable here"] = "ここで無効にする"; + +$GLOBALS["i18n"]["Username"] = "ユーザー名"; +$GLOBALS["i18n"]["Password"] = "パスワード"; +$GLOBALS["i18n"]["Group"] = "グループ"; + +$GLOBALS["i18n"]["Do you really want to delete %s ?"] = "本当に「%s」を削除しますか?"; +$GLOBALS["i18n"]["Add a new user"] = "新規ユーザーを追加する"; + +$GLOBALS["i18n"]["Edit"] = "編集する"; +$GLOBALS["i18n"]["Delete"] = "削除する"; + +// admin/themes.php +$GLOBALS["i18n"]["Available themes"] = "利用可能なテーマ"; +$GLOBALS["i18n"]["Screenshot"] = "スクリーンショット"; + +?> Modified: trunk/i18n/ja_JP/main.php =================================================================== --- trunk/i18n/ja_JP/main.php 2006-08-03 17:32:43 UTC (rev 671) +++ trunk/i18n/ja_JP/main.php 2006-08-07 15:40:12 UTC (rev 672) @@ -23,7 +23,7 @@ /** * Japanese translation of the messages (utf8 encoded!) * - * @author Tadashi Jokagi <el...@us...> + * @author Tadashi Jokagi <el...@us...> http://poyo.jp/ */ // line 45 in phpfreechatconfig.class.php @@ -122,125 +122,122 @@ // line 93 in phpfreechatconfig.class.php $GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "エラー: パラメーター「%s」は破棄されたか未定義です。このパラメーターを修正するか削除してください。"; -// line 48 in phpfreechattemplate.class.php -$GLOBALS["i18n"]["%s template could not be found"] = ""; +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "表情ボックスを隠す"; -// line 324 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'serverid' parameter is mandatory by default use 'md5(__FILE__)' value"] = ""; +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "表情ボックスを表示する"; -// 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"] = ""; +// 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"] = ""; +$GLOBALS["i18n"]["Bold"] = "強調"; // line 34 in chat.html.tpl.php -$GLOBALS["i18n"]["Italics"] = ""; +$GLOBALS["i18n"]["Italics"] = "斜線"; // line 35 in chat.html.tpl.php -$GLOBALS["i18n"]["Underline"] = ""; +$GLOBALS["i18n"]["Underline"] = "アンダーライン"; // line 36 in chat.html.tpl.php -$GLOBALS["i18n"]["Delete"] = ""; +$GLOBALS["i18n"]["Delete"] = "削除する"; // line 37 in chat.html.tpl.php -$GLOBALS["i18n"]["Pre"] = ""; +$GLOBALS["i18n"]["Pre"] = "Pre"; // line 38 in chat.html.tpl.php -$GLOBALS["i18n"]["Mail"] = ""; +$GLOBALS["i18n"]["Mail"] = "メール"; // line 39 in chat.html.tpl.php -$GLOBALS["i18n"]["Color"] = ""; +$GLOBALS["i18n"]["Color"] = "色"; -// line 86 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Hide smiley box"] = ""; +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "テンプレート「%s」を見つけることができません。"; -// line 87 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Show smiley box"] = ""; +// 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」とテーマ「%s」が正しいか確認してください。"; -// 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 75 in pfccommand.class.php -$GLOBALS["i18n"]["%s must be implemented"] = ""; +$GLOBALS["i18n"]["%s must be implemented"] = "%s は実装されなければなりません。"; // line 343 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = ""; +$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"] = ""; +$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'"] = ""; +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "パラメーター「%s」は正しくありません。利用できる値: 「%s」"; -// line 186 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["My room"] = ""; +// 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"] = ""; +$GLOBALS["i18n"]["Missing parameter"] = "パラメーターが足りません"; // line 38 in ban.class.php -$GLOBALS["i18n"]["banished from %s by %s"] = ""; +$GLOBALS["i18n"]["banished from %s by %s"] = "%s さんにより、%s から禁止されました。"; // line 23 in banlist.class.php -$GLOBALS["i18n"]["The banished user's id list is:"] = ""; +$GLOBALS["i18n"]["The banished user's id list is:"] = "禁止されたユーザー ID の一覧です:"; // line 32 in banlist.class.php -$GLOBALS["i18n"]["Empty"] = ""; +$GLOBALS["i18n"]["Empty"] = "空"; // line 34 in banlist.class.php -$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = ""; +$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"] = ""; +$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)"] = ""; +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s が退出しました (タイムアウト)"; // line 46 in join.class.php -$GLOBALS["i18n"]["%s joins %s"] = ""; +$GLOBALS["i18n"]["%s joins %s"] = "%s が %s に参加しました。"; // line 31 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s"] = "%2$s により %1$\s から追い出されました。"; // line 38 in send.class.php -$GLOBALS["i18n"]["Can't send the message, %s is offline"] = ""; +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "%s はオフラインなのでメッセージを送ることができませんでした。"; // line 27 in unban.class.php -$GLOBALS["i18n"]["Nobody has been unbanished"] = ""; +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Nobody の禁止を解除しました。"; // line 42 in unban.class.php -$GLOBALS["i18n"]["%s has been unbanished"] = ""; +$GLOBALS["i18n"]["%s has been unbanished"] = "%s の禁止を解除しました。"; // line 49 in unban.class.php -$GLOBALS["i18n"]["%s users have been unbanished"] = ""; +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s 人のユーザーの禁止を解除しました。"; // line 47 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = ""; +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "コマンド「%s」の実行が許可されていません。"; -// line 66 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because you are banished"] = ""; +// 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"] = ""; +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "チャンネル一覧が制限されているので「%s」に参加できません。"; -// line 89 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to change your nickname"] = ""; - // line 56 in noflood.class.php -$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = ""; +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "大量で黙認できません大量のメッセージを投稿しないでください。"; -// line 109 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Private message"] = ""; - -// line 110 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Close this tab"] = ""; - -// line 199 in pfcgui.js.tpl.php -$GLOBALS["i18n"]["Do you really want to leave this room ?"] = ""; - -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-03 17:33:04
|
Revision: 671 Author: kerphi Date: 2006-08-03 10:32:43 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=671&view=rev Log Message: ----------- Russian translation update (thanks to Kamashev Maim) Modified Paths: -------------- trunk/i18n/ru_RU/main.php Added Paths: ----------- trunk/i18n/ru_RU/admin.php Added: trunk/i18n/ru_RU/admin.php =================================================================== --- trunk/i18n/ru_RU/admin.php (rev 0) +++ trunk/i18n/ru_RU/admin.php 2006-08-03 17:32:43 UTC (rev 671) @@ -0,0 +1,72 @@ +<?php +/** + * i18n/ru_RU/admin.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 + */ + +/** + * Russian translation of the messages (utf8 encoded!) + * + * @author Kamashev Maxim <m.k...@gm...> + */ + +$GLOBALS["i18n"]["lang"] = "Русский"; + +// admin/index.php +$GLOBALS["i18n"]["Administration"] = "Администрация"; +$GLOBALS["i18n"]["Available Languages"] = "Доступные языки"; +$GLOBALS["i18n"]["PFC version verification"] = "PFC версия верифицированна"; +$GLOBALS["i18n"]["Internet connection is not possible"] = "Не стабильное интернет соединение"; +$GLOBALS["i18n"]["PFC is update"] = "PFC обновлён"; +$GLOBALS["i18n"]["PFC version"] = "PFC версия"; +$GLOBALS["i18n"]["The last official version"] = "Предыдущая официальная версия"; +$GLOBALS["i18n"]["PFC is not update"] = "PFC не обновлён"; +$GLOBALS["i18n"]["Your version"] = "Ваша версия"; +$GLOBALS["i18n"]["Download the last version %s here %s."] = "Загрузите предыдущую версию %s здесь %s."; + + +// admin/user.php +$GLOBALS["i18n"]["Users management"] = "Управление пользователями"; +$GLOBALS["i18n"]["At least one user must be declare to activate authentication."] = "Минимум один пользователь должен быть для активизации авторизации."; +$GLOBALS["i18n"]["It is not possible to delete the last user."] = "Нельзя удалить 'старого' пользователя."; + +$GLOBALS["i18n"]["User %s deleted."] = "Пользователь %s удалён."; +$GLOBALS["i18n"]["User %s added."] = "Пользователь %s добавлен."; +$GLOBALS["i18n"]["User %s edited."] = "Пользователь %s изменён."; + +$GLOBALS["i18n"]["Authentication disable"] = "Авторизация запрещена"; +$GLOBALS["i18n"]["Enable here"] = "Активизировать здесь"; +$GLOBALS["i18n"]["Authentication enable"] = "Авторизация разрешена"; +$GLOBALS["i18n"]["Disable here"] = "Запретить здесь"; + +$GLOBALS["i18n"]["Username"] = "Имя пользователя"; +$GLOBALS["i18n"]["Password"] = "Пароль"; +$GLOBALS["i18n"]["Group"] = "Группа"; + +$GLOBALS["i18n"]["Do you really want to delete %s ?"] = "Вы на самом деле хотите удалить %s ?"; +$GLOBALS["i18n"]["Add a new user"] = "Добавить нового пользователя"; + +$GLOBALS["i18n"]["Edit"] = "Изменить"; +$GLOBALS["i18n"]["Delete"] = "Удалить"; + +// admin/themes.php +$GLOBALS["i18n"]["Available themes"] = "Доступные темы"; +$GLOBALS["i18n"]["Screenshot"] = "Скриншот"; + +?> Modified: trunk/i18n/ru_RU/main.php =================================================================== --- trunk/i18n/ru_RU/main.php 2006-08-02 14:22:00 UTC (rev 670) +++ trunk/i18n/ru_RU/main.php 2006-08-03 17:32:43 UTC (rev 671) @@ -24,10 +24,11 @@ * Russian translation of the messages (utf8 encoded!) * * @author Stanislav Kondratyuk <an...@gm...> + * @author Kamashev Maim <m.k...@gm...> */ // line 45 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["My Chat"] = "Мой Чат"; +$GLOBALS["i18n"]["My Chat"] = "Мой чат"; // line 201 in phpfreechatconfig.class.php $GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s не найдена, библиотека %s не обнаружена"; @@ -93,7 +94,7 @@ $GLOBALS["i18n"]["Hide nickname marker"] = "Скрыть цвета ников"; // line 304 in javascript1.js.tpl.php -$GLOBALS["i18n"]["Show nickname marker"] = "Показавть цвета ников"; +$GLOBALS["i18n"]["Show nickname marker"] = "Показывать цвета ников"; // line 389 in javascript1.js.tpl.php $GLOBALS["i18n"]["Disconnect"] = "Отключиться"; @@ -147,10 +148,10 @@ $GLOBALS["i18n"]["Delete"] = "Удалить"; // line 37 in chat.html.tpl.php -$GLOBALS["i18n"]["Pre"] = "Pre"; +$GLOBALS["i18n"]["Pre"] = "Пре"; // line 38 in chat.html.tpl.php -$GLOBALS["i18n"]["Mail"] = "Mail"; +$GLOBALS["i18n"]["Mail"] = "Почта"; // line 39 in chat.html.tpl.php $GLOBALS["i18n"]["Color"] = "Цвет"; @@ -167,80 +168,79 @@ // 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"] = ""; +$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"] = ""; +$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'"] = ""; +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' параметр не верен. Разрешены значения : '%s'"; // line 186 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["My room"] = ""; +$GLOBALS["i18n"]["My room"] = "Моя комната"; // line 19 in unban.class.php -$GLOBALS["i18n"]["Missing parameter"] = ""; +$GLOBALS["i18n"]["Missing parameter"] = "Неверный параметр"; // line 38 in ban.class.php -$GLOBALS["i18n"]["banished from %s by %s"] = ""; +$GLOBALS["i18n"]["banished from %s by %s"] = "Забанен из %s по %s"; // line 23 in banlist.class.php -$GLOBALS["i18n"]["The banished user's id list is:"] = ""; +$GLOBALS["i18n"]["The banished user's id list is:"] = "Список забаненых пользователей:"; // line 32 in banlist.class.php -$GLOBALS["i18n"]["Empty"] = ""; +$GLOBALS["i18n"]["Empty"] = "Пусто"; // line 34 in banlist.class.php -$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = ""; +$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"] = ""; +$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)"] = ""; +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s вышел (timeout)"; // line 46 in join.class.php -$GLOBALS["i18n"]["%s joins %s"] = ""; +$GLOBALS["i18n"]["%s joins %s"] = "%s вошёл в %s"; // line 31 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s"] = ""; +$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"] = ""; +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Нельзя отправить сообщение, %s в оффлайн"; // line 27 in unban.class.php -$GLOBALS["i18n"]["Nobody has been unbanished"] = ""; +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Никто не был разбанен"; // line 42 in unban.class.php -$GLOBALS["i18n"]["%s has been unbanished"] = ""; +$GLOBALS["i18n"]["%s has been unbanished"] = "%s был разбанен"; // line 49 in unban.class.php -$GLOBALS["i18n"]["%s users have been unbanished"] = ""; +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s пользователи были разбанены"; // line 47 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = ""; +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Вам не разрешено использовать команды '%s'"; // line 66 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because you are banished"] = ""; +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Невозможно войти %s потому что вы забанены"; // line 76 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = ""; +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Не могу войти в комнату %s, так как список комнат ограничен"; // line 89 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to change your nickname"] = ""; +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Вам запрещено изменять ваш ник"; // line 56 in noflood.class.php -$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = ""; +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Пожалуйста, не присылайте мне много сообщений, флуд не приветствуется"; // line 109 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Private message"] = ""; +$GLOBALS["i18n"]["Private message"] = "Личное сообщение"; // line 110 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Close this tab"] = ""; +$GLOBALS["i18n"]["Close this tab"] = "Закрыть вкладку"; // line 199 in pfcgui.js.tpl.php -$GLOBALS["i18n"]["Do you really want to leave this room ?"] = ""; +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Вы на самом деле хотите покинуть эту комнату?"; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-02 14:22:06
|
Revision: 670 Author: kerphi Date: 2006-08-02 07:22:00 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=670&view=rev Log Message: ----------- Bug fix: the ban command was broken Modified Paths: -------------- trunk/src/commands/ban.class.php Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2006-08-02 14:14:46 UTC (rev 669) +++ trunk/src/commands/ban.class.php 2006-08-02 14:22:00 UTC (rev 670) @@ -8,6 +8,12 @@ function run(&$xml_reponse, $p) { + $clientid = $p["clientid"]; + $param = $p["param"]; + $sender = $p["sender"]; + $recipient = $p["recipient"]; + $recipientid = $p["recipientid"]; + $c =& $this->c; $u =& $this->u; @@ -24,17 +30,17 @@ $container =& $c->getContainerInstance(); - $nickid = $container->getNickId($p["param"]); + $nickid = $container->getNickId($param); if ($nickid != "undefined") { $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); $cmdtmp = array("leave", /* cmdname */ - $p["recipientid"],/* param */ - $p["sender"], /* sender */ - $p["recipient"], /* recipient */ - $p["recipientid"],/* recipientid */ + $recipientid,/* param */ + $sender, /* sender */ + $recipient, /* recipient */ + $recipientid,/* recipientid */ ); //_pfc("banished from %s by %s", $recipient, $sender); $cmdtoplay[] = $cmdtmp; // ban the user from the current channel @@ -42,13 +48,13 @@ } // update the recipient banlist - $banlist = $container->getMeta("banlist_nickid", "channel", $p["recipientid"]); + $banlist = $container->getMeta("banlist_nickid", "channel", $recipientid); if ($banlist == NULL) $banlist = array(); else $banlist = unserialize($banlist); $banlist[] = $nickid; // append the nickid to the banlist - $container->setMeta(serialize($banlist), "banlist_nickid", "channel", $p["recipientid"]); + $container->setMeta(serialize($banlist), "banlist_nickid", "channel", $recipientid); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-02 14:14:55
|
Revision: 669 Author: kerphi Date: 2006-08-02 07:14:46 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=669&view=rev Log Message: ----------- Bug fix: When /rehash command was run, sometime a js alert showing php errors poped up. Modified Paths: -------------- trunk/src/phpfreechat.class.php Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-08-02 09:54:10 UTC (rev 668) +++ trunk/src/phpfreechat.class.php 2006-08-02 14:14:46 UTC (rev 669) @@ -60,14 +60,18 @@ return phpFreeChat::HandleRequest($request); } // then init xajax engine - if (!class_exists("xajax")) require_once $c->xajaxpath."/xajax.inc.php"; - $this->xajax = new xajax($c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""), $c->prefix); - if ($c->debugxajax) $this->xajax->debugOn(); - $this->xajax->waitCursorOff(); // do not show a wait cursor during chat updates - $this->xajax->cleanBufferOff(); - $this->xajax->errorHandlerOn(); // used to have verbose error logs - $this->xajax->registerFunction("handleRequest"); - $this->xajax->processRequests(); + if (!class_exists("xajax")) + if (file_exists($c->xajaxpath."/xajax.inc.php")) + { + require_once $c->xajaxpath."/xajax.inc.php"; + $this->xajax = new xajax($c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""), $c->prefix); + if ($c->debugxajax) $this->xajax->debugOn(); + $this->xajax->waitCursorOff(); // do not show a wait cursor during chat updates + $this->xajax->cleanBufferOff(); + $this->xajax->errorHandlerOn(); // used to have verbose error logs + $this->xajax->registerFunction("handleRequest"); + $this->xajax->processRequests(); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-02 09:54:18
|
Revision: 668 Author: kerphi Date: 2006-08-02 02:54:10 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=668&view=rev Log Message: ----------- Remove the contrib directory from the ziped archive when a release is done in order to generate smalled archives. Modified Paths: -------------- trunk/misc/tarSource Modified: trunk/misc/tarSource =================================================================== --- trunk/misc/tarSource 2006-08-01 21:28:17 UTC (rev 667) +++ trunk/misc/tarSource 2006-08-02 09:54:10 UTC (rev 668) @@ -6,6 +6,7 @@ echo "-> copying files" rm -rf ./$NAME svn export .. ./$NAME +rm -rf ./$NAME/contrib echo "-> creating checkmd5.php file" ./checkmd5 ./$NAME ./$NAME/checkmd5.php echo "-> creating .tar.gz" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |