phpfreechat-svn Mailing List for phpFreeChat (Page 34)
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-04-17 15:11:15
|
Revision: 443 Author: kerphi Date: 2006-04-17 08:11:09 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=443&view=rev Log Message: ----------- remove memory limit Modified Paths: -------------- branches/0.x/contrib/pfcInstaller/createinstaller.php Modified: branches/0.x/contrib/pfcInstaller/createinstaller.php =================================================================== --- branches/0.x/contrib/pfcInstaller/createinstaller.php 2006-04-17 14:57:54 UTC (rev 442) +++ branches/0.x/contrib/pfcInstaller/createinstaller.php 2006-04-17 15:11:09 UTC (rev 443) @@ -1,4 +1,10 @@ <?php + +// on desactive le timeout car se script met bcp de temps a s'executer +ini_set('max_execution_time', -1); +// on desactive la limite de memoire car ce scrite peut manger bcp de memoire +ini_set('memory_limit', -1); + if (version_compare(phpversion(), '5.0.0', '<')){ die("PHP5 is required for this verson of the installer devkit"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-17 14:57:59
|
Revision: 442 Author: kerphi Date: 2006-04-17 07:57:54 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=442&view=rev Log Message: ----------- version update Modified Paths: -------------- branches/0.x/version Modified: branches/0.x/version =================================================================== --- branches/0.x/version 2006-04-17 14:57:18 UTC (rev 441) +++ branches/0.x/version 2006-04-17 14:57:54 UTC (rev 442) @@ -1 +1 @@ -0.9.1 \ No newline at end of file +0.9.2 \ 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-04-17 14:57:25
|
Revision: 441 Author: kerphi Date: 2006-04-17 07:57:18 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=441&view=rev Log Message: ----------- correct the background color for the blune theme Modified Paths: -------------- branches/0.x/themes/blune/templates/style.css.tpl.php Modified: branches/0.x/themes/blune/templates/style.css.tpl.php =================================================================== --- branches/0.x/themes/blune/templates/style.css.tpl.php 2006-04-17 14:55:30 UTC (rev 440) +++ branches/0.x/themes/blune/templates/style.css.tpl.php 2006-04-17 14:57:18 UTC (rev 441) @@ -1,34 +1,38 @@ - -div#<?php echo $prefix; ?>container { - color: #2A4064; - background-color: #BEC5D0; - background-image: url(<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>); -} - -div.<?php echo $prefix; ?>message { - background-color:#CED4DF; -} - -div.<?php echo $prefix; ?>oldmsg { - background-color:#DCDEE4; -} - -span.<?php echo $prefix; ?>nick { -color:#2A4064; -} - -div.<?php echo $prefix; ?>btn img:hover { - border: 1px solid #000; -} - -div#<?php echo $prefix; ?>online { - height: 48%; -} - -div#<?php echo $prefix; ?>smileys { - height: 48%; -} - + +div#<?php echo $prefix; ?>container { + color: #2A4064; + background-color: #BEC5D0; + background-image: url(<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>); +} + +div#<?php echo $prefix; ?>chat { + background-color:#CED4DF; +} + +div.<?php echo $prefix; ?>message { + background-color:#CED4DF; +} + +div.<?php echo $prefix; ?>oldmsg { + background-color:#DCDEE4; +} + +span.<?php echo $prefix; ?>nick { + color:#2A4064; +} + +div.<?php echo $prefix; ?>btn img:hover { + border: 1px solid #000; +} + +div#<?php echo $prefix; ?>online { + height: 48%; +} + +div#<?php echo $prefix; ?>smileys { + height: 48%; +} + p#<?php echo $prefix; ?>errors { display: none; margin-top: 5px; @@ -36,7 +40,7 @@ height: 18px; border: black solid 1px; - color: #EC4A1F; + color: #EC4A1F; background-color: #BEC5D0; text-align: center; 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-04-17 14:55:36
|
Revision: 440 Author: kerphi Date: 2006-04-17 07:55:30 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=440&view=rev Log Message: ----------- remove the width parameter limitation because the IE6 bug has been fixed using document.recalc() javascript function Modified Paths: -------------- branches/0.x/src/phpfreechatconfig.class.php Modified: branches/0.x/src/phpfreechatconfig.class.php =================================================================== --- branches/0.x/src/phpfreechatconfig.class.php 2006-04-17 12:01:45 UTC (rev 439) +++ branches/0.x/src/phpfreechatconfig.class.php 2006-04-17 14:55:30 UTC (rev 440) @@ -391,12 +391,14 @@ // check the width parameter is not used // because of a display bug in IE + /* if ( $this->width != "" && $this->width != "auto" ) { $this->errors[] = "Do not uses 'width' parameter because of a display bug in IE6, please look at this workaround : http://www.phpfreechat.net/forum/viewtopic.php?pid=867#p867"; $ok = false; } + */ // load smileys from file if ($ok) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-17 12:01:55
|
Revision: 439 Author: kerphi Date: 2006-04-17 05:01:45 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=439&view=rev Log Message: ----------- New greek el_GR translation (many thanks to Speedy) Modified Paths: -------------- branches/0.x/demo/index.php Added Paths: ----------- branches/0.x/demo/demo41_in_greek.php branches/0.x/i18n/el_GR/ Copied: branches/0.x/demo/demo41_in_greek.php (from rev 438, trunk/demo/demo41_in_greek.php) =================================================================== --- branches/0.x/demo/demo41_in_greek.php (rev 0) +++ branches/0.x/demo/demo41_in_greek.php 2006-04-17 12:01:45 UTC (rev 439) @@ -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"] = "el_GR"; +$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: branches/0.x/demo/index.php =================================================================== --- branches/0.x/demo/index.php 2006-04-17 11:43:34 UTC (rev 438) +++ branches/0.x/demo/index.php 2006-04-17 12:01:45 UTC (rev 439) @@ -65,6 +65,7 @@ <li><a href="demo38_in_norwegian_bokmal.php">demo38 - the norwegian bokmal translation of the chat</a></li> <li><a href="demo39_in_bosnian.php">demo39 - the bosnian translation of the chat</a></li> <li><a href="demo40_in_turkish.php">demo40 - the turkish translation of the chat</a></li> + <li><a href="demo41_in_greek.php">demo41 - the greek translation of the chat</a></li> </ul> </body> Copied: branches/0.x/i18n/el_GR (from rev 438, trunk/i18n/el_GR) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-17 11:43:45
|
Revision: 438 Author: kerphi Date: 2006-04-17 04:43:34 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=438&view=rev Log Message: ----------- New Greek el_GR translation (many thanks to Speedy) Modified Paths: -------------- trunk/demo/index.php Added Paths: ----------- trunk/demo/demo41_in_greek.php trunk/i18n/el_GR/ trunk/i18n/el_GR/main.php Added: trunk/demo/demo41_in_greek.php =================================================================== --- trunk/demo/demo41_in_greek.php (rev 0) +++ trunk/demo/demo41_in_greek.php 2006-04-17 11:43:34 UTC (rev 438) @@ -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"] = "el_GR"; +$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-04-16 20:46:40 UTC (rev 437) +++ trunk/demo/index.php 2006-04-17 11:43:34 UTC (rev 438) @@ -65,6 +65,7 @@ <li><a href="demo38_in_norwegian_bokmal.php">demo38 - the norwegian bokmal translation of the chat</a></li> <li><a href="demo39_in_bosnian.php">demo39 - the bosnian translation of the chat</a></li> <li><a href="demo40_in_turkish.php">demo40 - the turkish translation of the chat</a></li> + <li><a href="demo41_in_greek.php">demo41 - the greek translation of the chat</a></li> </ul> </body> Added: trunk/i18n/el_GR/main.php =================================================================== --- trunk/i18n/el_GR/main.php (rev 0) +++ trunk/i18n/el_GR/main.php 2006-04-17 11:43:34 UTC (rev 438) @@ -0,0 +1,121 @@ +<?php +/** + * i18n/el_GR/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 + */ + +/** + * Greek translation of the messages (utf8 encoded!) + * + * @translated by Speedy <el...@ma...> + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "H συζήτηση μου"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s δεν βρέθηκε, %s η βιβλιοθήκη δεν μπόρεσε να βρεθεί."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Παρακαλώ εισάγετε ψευδώνυμο."; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Το κείμενο δεν μπορεί να είναι άδειο."; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s αλλάζει το ψευδώνυμο του σε %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s συνδέθηκε"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s έφυγε"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s αποσυνδέθηκε (timeout)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "Άγνωστη εντολή [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s δεν υπάρχει: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Χρειάζεσαι %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s δεν υπάρχει, %s η βιβλιοθήκη δεν μπορεί να βρεθεί"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s δεν υπάρχει"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s φάκελος πρέπει να είναι συγκεκριμένος."; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s πρέπει να είναι φάκελος"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s δεν μπορεί να δημιουργηθεί"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s δεν είναι δυνατόν να εγγραφεί."; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s δεν είναι δυνατόν να διαβαστεί"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s δεν είναι αρχείο"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s δεν είναι φάκελος"; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "Απόκρυψη χρωμάτων ψευδωνύμων"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Εμφάνιση χρωμάτων ψευδωνύμων"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Αποσυνδέση"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Σύνδεση"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Μεγέθυνση"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Σμίκρυνση"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Απόκρυψη ημερομηνίας και ώρας"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Εμφάνιση ημερομηνίας και ώρας"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Εισάγετε το μήνυμα σας εδώ "; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Εισάγετε το ψευδώνυμο σας εδώ"; +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-16 20:46:46
|
Revision: 437 Author: kerphi Date: 2006-04-16 13:46:40 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=437&view=rev Log Message: ----------- makes nickname colorization working Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 20:09:13 UTC (rev 436) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 20:46:40 UTC (rev 437) @@ -530,10 +530,20 @@ var recipientid = cmds[mid][4]; var cmd = cmds[mid][5]; var param = cmds[mid][6]; - //var fromtoday = cmds[mid][6]; //var oldmsg = cmds[mid][7]; + + // check the nickname is in the list or not + var nickfound = false; + for(var i = 0; i < this.nicklist[recipientid].length && !nickfound; i++) + { + if (this.nicklist[recipientid][i] == sender) + nickfound = true; + } + var nickcolor = ''; + if (nickfound) nickcolor = this.getAndAssignNickColor(sender); + // format and post message var line = ''; line += '<div id="<?php echo $prefix; ?>msg'+ id +'" class="<?php echo $prefix; ?>'+ cmd +' <?php echo $prefix; ?>message'; @@ -548,7 +558,7 @@ line += ' <span class="<?php echo $prefix; ?>nick">'; line += '‹'; line += '<span '; - // if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; + if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; line += 'class="<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; line += '</span>'; @@ -682,7 +692,7 @@ nickdiv.replaceChild(ul,fc); else nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); + this.colorizeNicks(tabid,nickdiv); }, test: function(evt) @@ -884,16 +894,14 @@ /** * apply nicknames color to the root childs */ - colorizeNicks: function(root) + colorizeNicks: function(tabid, root) { - /* - for(var i = 0; i < this.nicklist.length; i++) + for(var i = 0; i < this.nicklist[tabid].length; i++) { - var cur_nick = this.nicklist[i]; + var cur_nick = this.nicklist[tabid][i]; var cur_color = this.getAndAssignNickColor(cur_nick); this.applyNickColor(root, cur_nick, cur_color); } - */ }, /** @@ -957,11 +965,11 @@ */ applyNickColor: function(root, nick, color) { - /* + var nicktochange = this.getElementsByClassName(root, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nick)), '') for(var i = 0; nicktochange.length > i; i++) nicktochange[i].style.color = color; - */ + }, /** @@ -1017,8 +1025,8 @@ nickmarker_icon.src = "<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"; nickmarker_icon.alt = this.i18n._('hide_nickname_color'); nickmarker_icon.title = nickmarker_icon.alt; - this.colorizeNicks(root); - this.colorizeNicks($('<?php echo $prefix; ?>online')); + // this.colorizeNicks(root); + // this.colorizeNicks($('<?php echo $prefix; ?>online')); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-16 20:09:24
|
Revision: 436 Author: kerphi Date: 2006-04-16 13:09:13 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=436&view=rev Log Message: ----------- i18n refactoring client side rehash command improvments Modified Paths: -------------- trunk/src/commands/rehash.class.php trunk/src/phpfreechat.class.php trunk/themes/default/templates/pfcclient.js.tpl.php trunk/themes/default/templates/pfcgui.js.tpl.php trunk/themes/default/templates/style.css.tpl.php Added Paths: ----------- trunk/themes/default/templates/pfci18n.js.tpl.php Modified: trunk/src/commands/rehash.class.php =================================================================== --- trunk/src/commands/rehash.class.php 2006-04-16 17:00:59 UTC (rev 435) +++ trunk/src/commands/rehash.class.php 2006-04-16 20:09:13 UTC (rev 436) @@ -15,6 +15,7 @@ { $c =& $this->c; $synchro = $c->synchronizeWithCache(true); // true => destroy the cache + if ($synchro) $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ko', '');"); else Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-04-16 17:00:59 UTC (rev 435) +++ trunk/src/phpfreechat.class.php 2006-04-16 20:09:13 UTC (rev 436) @@ -100,6 +100,8 @@ $t->assignObject($c,"c"); $t->assignObject($u,"u"); $output .= "<script type=\"text/javascript\">\n // <![CDATA[\n"; + $t->setTemplate($c->getFilePathFromTheme("templates/pfci18n.js.tpl.php")); + $output .= $t->getOutput(); $t->setTemplate($c->getFilePathFromTheme("templates/pfcgui.js.tpl.php")); $output .= $t->getOutput(); $t->setTemplate($c->getFilePathFromTheme("templates/pfcclient.js.tpl.php")); Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 17:00:59 UTC (rev 435) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 20:09:13 UTC (rev 436) @@ -9,9 +9,7 @@ pfcClient.prototype = { initialize: function() - { - this.gui = new pfcGui(); - + { /* user description */ this.nickname = '<?php echo $u->nick; ?>'; @@ -86,26 +84,27 @@ this.el_container.onmouseup = this.callbackContainer_OnMouseup.bindAsEventListener(this); document.body.onunload = this.callback_OnUnload.bindAsEventListener(this); - /* the i18n translations */ - var i18n = { - hide_nickname_color: '<?php echo _pfc("Hide nickname marker"); ?>', - show_nickname_color: '<?php echo _pfc("Show nickname marker"); ?>', - hide_clock: '<?php echo _pfc("Hide dates and hours"); ?>', - show_clock: '<?php echo _pfc("Show dates and hours"); ?>', - logout: '<?php echo _pfc("Disconnect"); ?>', - login: '<?php echo _pfc("Connect"); ?>', - maximize: '<?php echo _pfc("Magnify"); ?>', - minimize: '<?php echo _pfc("Cut down"); ?>', - hidesmiley: '<?php echo _pfc("Hide smiley box"); ?>', - showsmiley: '<?php echo _pfc("Show smiley box"); ?>', - hideonline: '<?php echo _pfc("Hide online users box"); ?>', - showonline: '<?php echo _pfc("Show online users box"); ?>', + // the i18n translations + this.i18n = new pfcI18N(); + this.i18n.setLabel('hide_nickname_color', '<?php echo _pfc("Hide nickname marker"); ?>'); + this.i18n.setLabel('show_nickname_color', '<?php echo _pfc("Show nickname marker"); ?>'); + this.i18n.setLabel('hide_clock', '<?php echo _pfc("Hide dates and hours"); ?>'); + this.i18n.setLabel('show_clock', '<?php echo _pfc("Show dates and hours"); ?>'); + this.i18n.setLabel('logout', '<?php echo _pfc("Disconnect"); ?>'); + this.i18n.setLabel('login', '<?php echo _pfc("Connect"); ?>'); + this.i18n.setLabel('maximize', '<?php echo _pfc("Magnify"); ?>'); + this.i18n.setLabel('minimize', '<?php echo _pfc("Cut down"); ?>'); + this.i18n.setLabel('hidesmiley', '<?php echo _pfc("Hide smiley box"); ?>'); + this.i18n.setLabel('showsmiley', '<?php echo _pfc("Show smiley box"); ?>'); + this.i18n.setLabel('hideonline', '<?php echo _pfc("Hide online users box"); ?>'); + this.i18n.setLabel('showonline', '<?php echo _pfc("Show online users box"); ?>'); + this.i18n.setLabel('enter_nickname', '<?php echo _pfc("Please enter your nickname"); ?>'); + this.i18n.setLabel('Private message', '<?php echo _pfc("Private message"); ?>'); + this.i18n.setLabel('Close this tab', '<?php echo _pfc("Close this tab"); ?>'); - enter_nickname: '<?php echo _pfc("Please enter your nickname"); ?>', - private_message: '<?php echo _pfc("Private message"); ?>' - }; - this.i18n = $H(i18n); - + // the graphical user interface + this.gui = new pfcGui(this.i18n); + /* the smileys */ var smileys = { <?php @@ -130,7 +129,7 @@ { // ask to choose a nickname if (nickname == '') nickname = this.nickname; - var newnick = prompt(this.i18n.enter_nickname, nickname); + var newnick = prompt(this.i18n._('enter_nickname'), nickname); if (newnick) this.sendRequest('/nick', newnick); }, @@ -304,11 +303,17 @@ } else if (cmd == "rehash") { + if (resp == "ok") + { + this.displayMsg( 'rehash', this.i18n._('Configuration has been rehashed') ); + } + else if (resp == "ko") + { + this.displayMsg( 'rehash', this.i18n._('A problem occurs during rehash') ); + } + } + else alert(cmd + "-"+resp+"-"+param); - } - - //if( cmd != "update") - // alert(cmd + "-"+resp+"-"+param); }, /** @@ -494,6 +499,20 @@ } }, + displayMsg: function( cmd, msg ) + { + // get the current selected tab container + var tabid = this.gui.getTabId(); + var container = this.gui.getChatContentFromTabId(tabid); + + // create a dummy div to avoid konqueror bug when setting nickmarkers + var m = document.createElement('div'); + m.innerHTML = '<pre class="<?php echo $prefix; ?>cmd_'+cmd+'">'+msg+'</pre>'; + // finaly append this to the message list + container.appendChild(m); + this.gui.scrollDown(tabid, m); + }, + handleComingRequest: function( cmds ) { var msg_html = $H(); @@ -560,28 +579,15 @@ var recipientid = keys[i]; var tabid = recipientid; - /* create the tab if it doesn't exists yet */ + // 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 */ + // create a dummy div to avoid konqueror bug when setting nickmarkers var m = document.createElement('div'); m.innerHTML = msg_html[recipientid]; - /* finaly append this to the message list */ + // finaly append this to the message list recipientdiv.appendChild(m); - - // var a = msg_ids[recipientid]; - //alert(a.inspect()); - // for(var j = 0; j < msg_ids[recipientid].length ; j++) - { - - this.gui.scrollDown(tabid, m/*$('<?php echo $prefix; ?>msg'+ msg_ids[recipientid][j])*/); - - // colorize messages nicknames - //var root = $('<?php echo $prefix; ?>msg'+ msg_ids[j]); - //this.refresh_nickmarker(root); - //this.refresh_clock(root); - } - + this.gui.scrollDown(tabid, m); } }, @@ -645,7 +651,7 @@ // this is someone -> create a privmsg link var img = document.createElement('img'); img.setAttribute('src', '<?php echo $c->getFileUrlFromTheme('images/user.gif'); ?>'); - img.alt = this.i18n.private_message; + img.alt = this.i18n._('Private message'); img.title = img.alt; img.style.marginRight = '5px'; var a = document.createElement('a'); @@ -1009,7 +1015,7 @@ if (this.nickmarker) { nickmarker_icon.src = "<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"; - nickmarker_icon.alt = this.i18n.hide_nickname_color; + nickmarker_icon.alt = this.i18n._('hide_nickname_color'); nickmarker_icon.title = nickmarker_icon.alt; this.colorizeNicks(root); this.colorizeNicks($('<?php echo $prefix; ?>online')); @@ -1017,7 +1023,7 @@ else { nickmarker_icon.src = "<?php echo $c->getFileUrlFromTheme('images/color-off.gif'); ?>"; - nickmarker_icon.alt = this.i18n.show_nickname_color; + nickmarker_icon.alt = this.i18n._('show_nickname_color'); nickmarker_icon.title = nickmarker_icon.alt; var elts = this.getElementsByClassName(root, '<?php echo $prefix; ?>nickmarker', ''); for(var i = 0; elts.length > i; i++) @@ -1056,7 +1062,7 @@ if (this.clock) { clock_icon.src = "<?php echo $c->getFileUrlFromTheme('images/clock-on.gif'); ?>"; - clock_icon.alt = this.i18n.hide_clock; + clock_icon.alt = this.i18n._('hide_clock'); clock_icon.title = clock_icon.alt; this.showClass(root, '<?php echo $prefix; ?>date', '<?php echo $prefix; ?>invisible', true); this.showClass(root, '<?php echo $prefix; ?>heure', '<?php echo $prefix; ?>invisible', true); @@ -1064,7 +1070,7 @@ else { clock_icon.src = "<?php echo $c->getFileUrlFromTheme('images/clock-off.gif'); ?>"; - clock_icon.alt = this.i18n.show_clock; + clock_icon.alt = this.i18n._('show_clock'); clock_icon.title = clock_icon.alt; this.showClass(root, '<?php echo $prefix; ?>date', '<?php echo $prefix; ?>invisible', false); this.showClass(root, '<?php echo $prefix; ?>heure', '<?php echo $prefix; ?>invisible', false); @@ -1091,7 +1097,7 @@ { // this.updateNickList(this.nicklist); loginlogout_icon.src = "<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>"; - loginlogout_icon.alt = this.i18n.logout; + loginlogout_icon.alt = this.i18n._('logout'); loginlogout_icon.title = loginlogout_icon.alt; } else @@ -1099,7 +1105,7 @@ this.clearMessages(); this.clearNickList(); loginlogout_icon.src = "<?php echo $c->getFileUrlFromTheme('images/login.gif'); ?>"; - loginlogout_icon.alt = this.i18n.login; + loginlogout_icon.alt = this.i18n._('login'); loginlogout_icon.title = loginlogout_icon.alt; } }, @@ -1126,14 +1132,14 @@ if (this.minmax_status) { btn.src = "<?php echo $c->getFileUrlFromTheme('images/maximize.gif'); ?>"; - btn.alt = this.i18n.maximize; + btn.alt = this.i18n._('maximize'); btn.title = btn.alt; content.style.display = 'none'; } else { btn.src = "<?php echo $c->getFileUrlFromTheme('images/minimize.gif'); ?>"; - btn.alt = this.i18n.minimize; + btn.alt = this.i18n._('minimize'); btn.title = btn.alt; content.style.display = 'block'; } @@ -1238,7 +1244,7 @@ if (btn) { btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-on.gif'); ?>"; - btn.alt = this.i18n.hidesmiley; + btn.alt = this.i18n._('hidesmiley'); btn.title = btn.alt; } content.style.display = 'block'; @@ -1248,7 +1254,7 @@ if (btn) { btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-off.gif'); ?>"; - btn.alt = this.i18n.showsmiley; + btn.alt = this.i18n._('showsmiley'); btn.title = btn.alt; } content.style.display = 'none'; @@ -1282,14 +1288,14 @@ if (this.showwhosonline) { btn.src = "<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"; - btn.alt = this.i18n.hideonline; + btn.alt = this.i18n._('hideonline'); btn.title = btn.alt; content.style.display = 'block'; } else { btn.src = "<?php echo $c->getFileUrlFromTheme('images/online-off.gif'); ?>"; - btn.alt = this.i18n.showonline; + btn.alt = this.i18n._('showonline'); btn.title = btn.alt; content.style.display = 'none'; } Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-16 17:00:59 UTC (rev 435) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-16 20:09:13 UTC (rev 436) @@ -6,8 +6,10 @@ var pfcGui = Class.create(); pfcGui.prototype = { - initialize: function() + initialize: function(i18n) { + this.i18n = i18n; + this.current_tab = ''; this.current_tab_id = ''; this.tabs = Array(); @@ -211,7 +213,7 @@ var a2 = document.createElement('a'); a2.pfc_tabid = tabid; a2.onclick = function(){pfc.sendRequest('/leave', this.pfc_tabid); return false;} - a2.alt = '<?php echo _pfc("Close this tab"); ?>'; + a2.alt = this.i18n._('Close this tab'); a2.title = a2.alt; Element.addClassName(a2, '<?php echo $prefix; ?>tabclose'); var img = document.createElement('img'); Added: trunk/themes/default/templates/pfci18n.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfci18n.js.tpl.php (rev 0) +++ trunk/themes/default/templates/pfci18n.js.tpl.php 2006-04-16 20:09:13 UTC (rev 436) @@ -0,0 +1,40 @@ +/** + * This class centralize the pfc' translated messages + * (depends on prototype library) + * @author Stephane Gully + */ +var pfcI18N = Class.create(); +pfcI18N.prototype = { + + initialize: function() + { + this.labels = $H(); + this.elts = $H(); + }, + + setLabel: function(key, value) + { + this.labels[key] = value; + }, + + _: function(key, param) + { + if (this.labels[key]) + return this.labels[key]; + else + return '_'+key+'_'; + }, + + /** + * Register element can be used to change dynamicaly the client language + */ + registerElement: function(key, element, attribute) + { + // store the assigned element + element = $(element); + if (!this.elts[key]) + this.elts[key] = [ [element, attribute] ]; + else + this.elts[key].push( [element, attribute] ); + } +}; Modified: trunk/themes/default/templates/style.css.tpl.php =================================================================== --- trunk/themes/default/templates/style.css.tpl.php 2006-04-16 17:00:59 UTC (rev 435) +++ trunk/themes/default/templates/style.css.tpl.php 2006-04-16 20:09:13 UTC (rev 436) @@ -231,6 +231,12 @@ font-style: italic; color: #888; } +pre.<?php echo $prefix; ?>cmd_rehash, +pre.<?php echo $prefix; ?>cmd_help +{ + color: #888; + font-style: italic; +} div#<?php echo $prefix; ?>colorlist { display: none; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-16 20:09:23
|
Revision: 436 Author: kerphi Date: 2006-04-16 13:09:13 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=436&view=rev Log Message: ----------- i18n refactoring client side rehash command improvments Modified Paths: -------------- trunk/src/commands/rehash.class.php trunk/src/phpfreechat.class.php trunk/themes/default/templates/pfcclient.js.tpl.php trunk/themes/default/templates/pfcgui.js.tpl.php trunk/themes/default/templates/style.css.tpl.php Added Paths: ----------- trunk/themes/default/templates/pfci18n.js.tpl.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-16 17:01:06
|
Revision: 435 Author: kerphi Date: 2006-04-16 10:00:59 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=435&view=rev Log Message: ----------- new command : rehash Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-16 17:00:21
|
Revision: 434 Author: kerphi Date: 2006-04-16 10:00:13 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=434&view=rev Log Message: ----------- new command : rehash (This command deletes the cached configuration. Uses it to take into account new parameters.) Modified Paths: -------------- trunk/src/commands/init.class.php trunk/src/pfccommand.class.php trunk/src/pfcglobalconfig.class.php Added Paths: ----------- trunk/src/commands/rehash.class.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@gm...> - 2006-04-16 15:47:05
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ke...@us...> - 2006-04-16 15:42:46
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ste...@gm...> - 2006-04-16 15:42:37
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ste...@gm...> - 2006-04-16 15:12:54
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ste...@gm...> - 2006-04-16 15:07:31
|
AZsz |
From: <ke...@us...> - 2006-04-16 14:56:24
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: Kerphi <ke...@ho...> - 2006-04-16 14:54:52
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ste...@gm...> - 2006-04-16 14:52:35
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: Kerphi <ke...@ho...> - 2006-02-27 15:12:13
|
-- St=E9phane GULLY (http://www.zeitoun.net) |
From: <ste...@gm...> - 2006-02-27 14:01:26
|
-- St=E9phane GULLY (http://www.zeitoun.net) |