phpfreechat-svn Mailing List for phpFreeChat (Page 30)
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-06-01 08:42:37
|
Revision: 542 Author: kerphi Date: 2006-06-01 01:42:32 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=542&view=rev Log Message: ----------- I forgot a file : the green theme demo Added Paths: ----------- trunk/demo/demo44_green_theme.php Added: trunk/demo/demo44_green_theme.php =================================================================== --- trunk/demo/demo44_green_theme.php (rev 0) +++ trunk/demo/demo44_green_theme.php 2006-06-01 08:42:32 UTC (rev 542) @@ -0,0 +1,34 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; +$params["serverid"] = md5(__FILE__); +$params["title"] = "A chat using the green theme"; +$params["theme"] = "green"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> + <title>Blune PHPFreeChat</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> \ 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-06-01 08:42:05
|
Revision: 541 Author: kerphi Date: 2006-06-01 01:41:44 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=541&view=rev Log Message: ----------- New Bulgarian bg_BG translation (thanks to Marko Nikolov) Modified Paths: -------------- branches/0.x/demo/index.php trunk/demo/index.php Added Paths: ----------- branches/0.x/demo/demo45_in_bulgarian.php branches/0.x/i18n/bg_BG/ branches/0.x/i18n/bg_BG/main.php trunk/demo/demo45_in_bulgarian.php trunk/i18n/bg_BG/ trunk/i18n/bg_BG/main.php Added: branches/0.x/demo/demo45_in_bulgarian.php =================================================================== --- branches/0.x/demo/demo45_in_bulgarian.php (rev 0) +++ branches/0.x/demo/demo45_in_bulgarian.php 2006-06-01 08:41:44 UTC (rev 541) @@ -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"] = "bg_BG"; +$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-05-31 15:40:12 UTC (rev 540) +++ branches/0.x/demo/index.php 2006-06-01 08:41:44 UTC (rev 541) @@ -67,7 +67,8 @@ <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> <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> </ul> </body> -</html> +</html> \ No newline at end of file Added: branches/0.x/i18n/bg_BG/main.php =================================================================== --- branches/0.x/i18n/bg_BG/main.php (rev 0) +++ branches/0.x/i18n/bg_BG/main.php 2006-06-01 08:41:44 UTC (rev 541) @@ -0,0 +1,175 @@ +<?php +/** + * i18n/bg_BG/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 + */ + +/** + * Bulgarian translation of the messages (utf8 encoded!) + * + * @author Marko Nikolov <mar...@gm...> + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Моят чат"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s не е намерена, %s библиотека не е намерена."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Въведете вашия ник"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Текстът не може да е празен"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s си смени ника на %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s влезе"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s излезе"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s излезе (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"] = "Въведете тук вашия ник"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Грешка: неопределен или ненужен параметър '%s', моля поправете или премахнете този параметър"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Скрий емотиконите"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Покажи емотиконите"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Скрий списъка с потребители"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Покажи списъка с потребители"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Удебелен"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Наклонен"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Подчертан"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Изтрий"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Поща"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Цвят"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s шаблон не е намерен"; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Грешка: '%s' не е намерен, моля проверете точният път '%s' и вашата тема '%s' дали са правилни"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s трябва да бъде въведено"; + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' параметър е задължителен, по подразбиране ползва '%s' стойност"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' парамерър трябва да е с положителна стойност"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' параметър не е валиден. Възможните стойности са: '%s'"; +?> \ No newline at end of file Added: trunk/demo/demo45_in_bulgarian.php =================================================================== --- trunk/demo/demo45_in_bulgarian.php (rev 0) +++ trunk/demo/demo45_in_bulgarian.php 2006-06-01 08:41:44 UTC (rev 541) @@ -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"] = "bg_BG"; +$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-05-31 15:40:12 UTC (rev 540) +++ trunk/demo/index.php 2006-06-01 08:41:44 UTC (rev 541) @@ -109,6 +109,7 @@ <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> <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> </ul> </div> Added: trunk/i18n/bg_BG/main.php =================================================================== --- trunk/i18n/bg_BG/main.php (rev 0) +++ trunk/i18n/bg_BG/main.php 2006-06-01 08:41:44 UTC (rev 541) @@ -0,0 +1,175 @@ +<?php +/** + * i18n/bg_BG/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 + */ + +/** + * Bulgarian translation of the messages (utf8 encoded!) + * + * @author Marko Nikolov <mar...@gm...> + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Моят чат"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s не е намерена, %s библиотека не е намерена."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Въведете вашия ник"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Текстът не може да е празен"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s си смени ника на %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s влезе"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s излезе"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s излезе (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"] = "Въведете тук вашия ник"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Грешка: неопределен или ненужен параметър '%s', моля поправете или премахнете този параметър"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Скрий емотиконите"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Покажи емотиконите"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Скрий списъка с потребители"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Покажи списъка с потребители"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Удебелен"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Наклонен"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Подчертан"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Изтрий"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Поща"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Цвят"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s шаблон не е намерен"; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Грешка: '%s' не е намерен, моля проверете точният път '%s' и вашата тема '%s' дали са правилни"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s трябва да бъде въведено"; + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' параметър е задължителен, по подразбиране ползва '%s' стойност"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' парамерър трябва да е с положителна стойност"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' параметър не е валиден. Възможните стойности са: '%s'"; +?> \ 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-05-31 15:40:18
|
Revision: 540 Author: kerphi Date: 2006-05-31 08:40:12 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=540&view=rev Log Message: ----------- Behavior improvements: when leaving a room, a pop up ask if the user really want to quit. And the current tab stay active when a none active tab is removed. Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 15:23:17 UTC (rev 539) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 15:40:12 UTC (rev 540) @@ -19,7 +19,6 @@ this.onlinecontent = $H(); this.smileycontent = $H(); this.scrollpos = $H(); - // this.tabprefixs = Array(); }, /** @@ -166,8 +165,8 @@ this.tabids = this.tabids.without(this.tabids[tabpos]); this.tabs = this.tabs.without(this.tabs[tabpos]); this.tabtypes = this.tabtypes.without(this.tabtypes[tabpos]); - // this.tabprefixs = this.tabprefixs.without(this.tabprefixs[tabpos]); - tabpos--; if (tabpos<0) tabpos = 0; + tabpos = this.tabids.indexOf(this.getTabId()); + if (tabpos<0) tabpos = 0; this.setTabById(this.tabids[tabpos]); return name; }, @@ -198,7 +197,6 @@ this.tabs.push(name); this.tabids.push(tabid); this.tabtypes.push(type); - // this.tabprefixs.push(prefix); var li_title = document.createElement('li'); li_title.setAttribute('id', '<?php echo $prefix; ?>channel_title'+tabid); @@ -223,7 +221,10 @@ var a2 = document.createElement('a'); a2.pfc_tabid = tabid; - a2.onclick = function(){pfc.sendRequest('/leave', this.pfc_tabid); return false;} + a2.onclick = function(){ + var res = confirm('<?php echo _pfc("Do you really want to leave this room ?"); ?>'); + if (res == true) pfc.sendRequest('/leave', this.pfc_tabid); return false; + } a2.alt = this.i18n._('Close this tab'); a2.title = a2.alt; Element.addClassName(a2, '<?php echo $prefix; ?>tabclose'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 15:23:22
|
Revision: 539 Author: kerphi Date: 2006-05-31 08:23:17 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=539&view=rev Log Message: ----------- Bug fix: the show/hide smiley and online boxes switcher was broken 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-05-31 14:58:00 UTC (rev 538) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 15:23:17 UTC (rev 539) @@ -201,6 +201,8 @@ this.channels.push(name); this.channelids.push(tabid); */ + this.refresh_Smileys(); + this.refresh_WhosOnline(); } else alert(cmd + "-"+resp+"-"+param); @@ -216,7 +218,8 @@ // do not switch to the new created tab // keep it in the background // this.gui.setTabById(tabid); - alert("ccc"); + this.refresh_Smileys(); + this.refresh_WhosOnline(); } else alert(cmd + "-"+resp+"-"+param); @@ -1312,7 +1315,19 @@ }, refresh_Smileys: function() { - var content = $('<?php echo $prefix; ?>smileys'); + // first of all : show/hide the smiley box + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>smileys', ''); + for(var i = 0; i < contentlist.length; i++) + { + var content = contentlist[i]; + if (this.showsmileys) + content.style.display = 'block'; + else + content.style.display = 'none'; + } + + // then switch the button icon var btn = $('<?php echo $prefix; ?>showHideSmileysbtn'); if (this.showsmileys) { @@ -1322,7 +1337,6 @@ btn.alt = this.i18n._('hidesmiley'); btn.title = btn.alt; } - content.style.display = 'block'; } else { @@ -1332,7 +1346,6 @@ btn.alt = this.i18n._('showsmiley'); btn.title = btn.alt; } - content.style.display = 'none'; } this.refresh_Chat(); this.refresh_OnlineAndSmileys(); @@ -1357,7 +1370,19 @@ }, refresh_WhosOnline: function() { - var content = $('<?php echo $prefix; ?>online'); + // first of all : show/hide the nickname list box + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>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'; + } + + // then refresh the button icon var btn = $('<?php echo $prefix; ?>showHideWhosOnlineBtn'); if (!btn) return; if (this.showwhosonline) @@ -1365,14 +1390,12 @@ btn.src = "<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"; 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.title = btn.alt; - content.style.display = 'none'; } this.refresh_Chat(); this.refresh_OnlineAndSmileys(); @@ -1383,30 +1406,42 @@ */ refresh_OnlineAndSmileys: function() { - var onlinediv = $('<?php echo $prefix; ?>online'); - var smileysdiv = $('<?php echo $prefix; ?>smileys'); var style = $H(); - - if (this.showwhosonline) + var root = $('<?php echo $prefix; ?>channels_content'); + + // resize the smiley area + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>smileys', ''); + for(var i = 0; i < contentlist.length; i++) { - style['height'] = ''; - Element.setStyle(smileysdiv, style); + var smileydiv = contentlist[i]; + if (this.showwhosonline) + { + style['height'] = ''; + Element.setStyle(smileydiv, style); + } + else + { + style['height'] = '100%'; + Element.setStyle(smileydiv, style); + } } - else + + // resize the nickname list area + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>online', ''); + for(var i = 0; i < contentlist.length; i++) { - style['height'] = '100%'; - Element.setStyle(smileysdiv, style); + var onlinediv = contentlist[i]; + if (this.showsmileys) + { + style['height'] = ''; + Element.setStyle(onlinediv, style); + } + else + { + style['height'] = '100%'; + Element.setStyle(onlinediv, style); + } } - if (this.showsmileys) - { - style['height'] = ''; - Element.setStyle(onlinediv, style); - } - else - { - style['height'] = '100%'; - Element.setStyle(onlinediv, style); - } // for IE7 CSS refresh // if fixes the smiley and online boxes resize problem on IE6 @@ -1418,18 +1453,24 @@ */ refresh_Chat: function() { - var chatdiv = $('<?php echo $prefix; ?>chat'); - var style = $H(); - if (!this.showwhosonline && !this.showsmileys) + // resize all the tabs content + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>chat', ''); + for(var i = 0; i < contentlist.length; i++) { - style['width'] = '100%'; - Element.setStyle(chatdiv, style); + var chatdiv = contentlist[i]; + var style = $H(); + if (!this.showwhosonline && !this.showsmileys) + { + style['width'] = '100%'; + Element.setStyle(chatdiv, style); + } + else + { + style['width'] = ''; + Element.setStyle(chatdiv, style); + } } - else - { - style['width'] = ''; - Element.setStyle(chatdiv, style); - } } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:58:07
|
Revision: 538 Author: kerphi Date: 2006-05-31 07:58:00 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=538&view=rev Log Message: ----------- Bug fix: when someone posted a message on a none active tab, the scrollbar was reset. Now it is just not updated (better than nothing). Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:50:34 UTC (rev 537) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:58:00 UTC (rev 538) @@ -27,6 +27,7 @@ */ scrollDown: function(tabid, elttoscroll) { + if (this.getTabId() != tabid) return; /* do nothing if this is not the current tab or it will reset the scrollbar position to 0 */ var content = this.getChatContentFromTabId(tabid); content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:50:46
|
Revision: 537 Author: kerphi Date: 2006-05-31 07:50:34 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=537&view=rev Log Message: ----------- Bug fix: the <:o) smiley was broken (more generally all smiley s using html special characters) Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:30:55 UTC (rev 536) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:50:34 UTC (rev 537) @@ -136,11 +136,11 @@ s.setAttribute('src','<?php echo $s_file; ?>'); s.setAttribute('alt','<?php echo $s_str[0]; ?>'); s.setAttribute('title','<?php echo $s_str[0]; ?>'); - s.setAttribute('onclick','pfc.insertSmiley(\'<?php echo $s_str[0]; ?>\');'); + s.setAttribute('onclick','pfc.insertSmiley(String(\'<?php echo $s_str[0]; ?>\').unescapeHTML());'); div.appendChild(s); <?php } ?> sc.appendChild(div); - + this.smileycontent[tabid] = sc; return sc; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:31:03
|
Revision: 536 Author: kerphi Date: 2006-05-31 07:30:55 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=536&view=rev Log Message: ----------- Design improvement: add a small margin on the left of the chat area. Modified Paths: -------------- trunk/themes/default/templates/style.css.tpl.php Modified: trunk/themes/default/templates/style.css.tpl.php =================================================================== --- trunk/themes/default/templates/style.css.tpl.php 2006-05-31 14:19:35 UTC (rev 535) +++ trunk/themes/default/templates/style.css.tpl.php 2006-05-31 14:30:55 UTC (rev 536) @@ -86,11 +86,13 @@ div.<?php echo $prefix; ?>chat { z-index: 100; position: absolute; - left: 0px; top: 0px; + /* left and width are adjusted to leave a small margin on the left of the chat area + * padding css rule doesn't work because the chat zone is generated by JS function */ + left: 0.5%; + width: 79.5%; + height: 100%; overflow: auto; - width: 80%; - height: 100%; } div.<?php echo $prefix; ?>smileys { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:19:40
|
Revision: 535 Author: kerphi Date: 2006-05-31 07:19:35 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=535&view=rev Log Message: ----------- Bug fix: the show/hide clock button switcher was broken 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-05-31 14:12:20 UTC (rev 534) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:19:35 UTC (rev 535) @@ -668,10 +668,11 @@ // 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); - this.colorizeNicks(m); } }, @@ -1069,14 +1070,12 @@ 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'; - */ }, @@ -1122,7 +1121,6 @@ /** * Date/Hour show/hide */ - /* clock_swap: function() { if (this.clock) { @@ -1136,7 +1134,7 @@ refresh_clock: function( root ) { var clock_icon = $('<?php echo $prefix; ?>clock'); - if (!root) root = $('<?php echo $prefix; ?>chat'); + if (!root) root = $('<?php echo $prefix; ?>channels_content'); if (this.clock) { clock_icon.src = "<?php echo $c->getFileUrlFromTheme('images/clock-on.gif'); ?>"; @@ -1154,9 +1152,8 @@ this.showClass(root, '<?php echo $prefix; ?>heure', '<?php echo $prefix; ?>invisible', false); } // browser automaticaly scroll up misteriously when showing the dates - $('<?php echo $prefix; ?>chat').scrollTop += 30; + // $('<?php echo $prefix; ?>chat').scrollTop += 30; }, - */ /** * Connect/disconnect button This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:12:26
|
Revision: 534 Author: kerphi Date: 2006-05-31 07:12:20 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=534&view=rev Log Message: ----------- Bug fix: the nickname colorization on/off swapper was broken 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-05-30 09:19:40 UTC (rev 533) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:12:20 UTC (rev 534) @@ -618,17 +618,6 @@ 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 = ''; @@ -644,7 +633,6 @@ line += ' <span class="<?php echo $prefix; ?>nick">'; line += '‹'; line += '<span '; - if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; line += 'onclick="pfc.insert_text(\'' + sender + ', \',\'\')" '; line += 'class="<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; @@ -683,6 +671,7 @@ // finaly append this to the message list recipientdiv.appendChild(m); this.gui.scrollDown(tabid, m); + this.colorizeNicks(m); } }, @@ -737,10 +726,7 @@ var ul = document.createElement('ul'); for (var i=0; i<nicks.length; i++) { - var li = document.createElement('li'); - Element.addClassName(li, '<?php echo $prefix; ?>nickmarker'); - Element.addClassName(li, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i]))); - + var li = document.createElement('li'); if (nicks[i] != this.nickname) { // this is someone -> create a privmsg link @@ -775,6 +761,8 @@ span.pfc_nick = nicks[i]; span.onclick = function(){pfc.insert_text(this.pfc_nick+", ",""); return false;} span.appendChild(document.createTextNode(nicks[i])); + Element.addClassName(span, '<?php echo $prefix; ?>nickmarker'); + Element.addClassName(span, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i]))); nobr.appendChild(span); li.appendChild(nobr); li.style.borderBottom = '1px solid #AAA'; @@ -786,7 +774,7 @@ nickdiv.replaceChild(ul,fc); else nickdiv.appendChild(ul,fc); - this.colorizeNicks(tabid,nickdiv); + this.colorizeNicks(nickdiv); }, /** @@ -902,9 +890,9 @@ /** * parse messages and append it to the message list */ +/* parseAndPost: function(msgs) { - /* var msgdiv = $('<?php echo $prefix; ?>chat'); var msgids = Array(); @@ -976,22 +964,23 @@ this.refresh_nickmarker(root); this.refresh_clock(root); } - */ }, +*/ /** * apply nicknames color to the root childs */ - colorizeNicks: function(tabid, root) + colorizeNicks: function(root) { - for(var i = 0; i < this.nicklist[tabid].length; i++) + var nicklist = this.getElementsByClassName(root, '<?php echo $prefix; ?>nickmarker', ''); + for(var i = 0; i < nicklist.length; i++) { - var cur_nick = this.nicklist[tabid][i]; + var cur_nick = nicklist[i].innerHTML; var cur_color = this.getAndAssignNickColor(cur_nick); - this.applyNickColor(root, cur_nick, cur_color); + nicklist[i].style.color = cur_color; } }, - + /** * Initialize the color array used to colirize the nicknames */ @@ -1107,14 +1096,13 @@ refresh_nickmarker: function(root) { var nickmarker_icon = $('<?php echo $prefix; ?>nickmarker'); - if (!root) root = $('<?php echo $prefix; ?>chat'); + if (!root) root = $('<?php echo $prefix; ?>channels_content'); if (this.nickmarker) { 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); } else { @@ -1124,15 +1112,9 @@ var elts = this.getElementsByClassName(root, '<?php echo $prefix; ?>nickmarker', ''); for(var i = 0; elts.length > i; i++) { - /* this is not supported in konqueror =>>> elts[i].removeAttribute('style');*/ + // this is not supported in konqueror =>>> elts[i].removeAttribute('style'); elts[i].style.color = ''; } - var elts = this.getElementsByClassName($('<?php echo $prefix; ?>online'), '<?php echo $prefix; ?>nickmarker', ''); - for(var i = 0; elts.length > i; i++) - { - /* this is not supported in konqueror =>>> elts[i].removeAttribute('style');*/ - elts[i].style.color = ''; - } } }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-30 09:19:47
|
Revision: 533 Author: kerphi Date: 2006-05-30 02:19:40 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=533&view=rev Log Message: ----------- Insert the nickname text when clicking on the nick : in the list and in the chat zone. (thanks to Hap for his patch) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php trunk/themes/default/templates/style.css.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-28 18:55:40 UTC (rev 532) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-30 09:19:40 UTC (rev 533) @@ -645,6 +645,7 @@ line += '‹'; line += '<span '; if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; + line += 'onclick="pfc.insert_text(\'' + sender + ', \',\'\')" '; line += 'class="<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; line += '</span>'; Modified: trunk/themes/default/templates/style.css.tpl.php =================================================================== --- trunk/themes/default/templates/style.css.tpl.php 2006-05-28 18:55:40 UTC (rev 532) +++ trunk/themes/default/templates/style.css.tpl.php 2006-05-30 09:19:40 UTC (rev 533) @@ -252,5 +252,6 @@ .<?php echo $prefix; ?>nickmarker { white-space: pre; + cursor: crosshair; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 18:55:50
|
Revision: 532 Author: kerphi Date: 2006-05-28 11:55:40 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=532&view=rev Log Message: ----------- add a todo comment Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 18:54:30 UTC (rev 531) +++ trunk/src/pfccommand.class.php 2006-05-28 18:55:40 UTC (rev 532) @@ -77,6 +77,7 @@ $cmd->name = $cmd_name; // instanciate the proxy chains + // @todo instanciate the whole chain (from the 'proxys' parameter array) $proxy = NULL; $proxy_name = strtolower($c->proxys[0]); $proxy_classname = "pfcProxyCommand_" . $proxy_name; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 18:54:52
|
Revision: 531 Author: kerphi Date: 2006-05-28 11:54:30 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=531&view=rev Log Message: ----------- Bug fix: unknown command error handling was broken Modified Paths: -------------- trunk/src/pfccommand.class.php trunk/src/proxys/auth.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 18:47:04 UTC (rev 530) +++ trunk/src/pfccommand.class.php 2006-05-28 18:54:30 UTC (rev 531) @@ -75,24 +75,25 @@ { $cmd =& new $cmd_classname(); $cmd->name = $cmd_name; + + // instanciate the proxy chains + $proxy = NULL; + $proxy_name = strtolower($c->proxys[0]); + $proxy_classname = "pfcProxyCommand_" . $proxy_name; + $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; + if (file_exists($proxy_filename)) require_once($proxy_filename); + if (class_exists($proxy_classname)) + { + $proxy =& new $proxy_classname(); + $proxy->name = $cmd_name; + $proxy->proxyname = $proxy_name; + $proxy->linkTo($cmd); + } + + // return the proxy, not the command (the proxy will forward the request to the real command) + return $proxy; } - - // instanciate the proxy chains - $proxy = NULL; - $proxy_name = strtolower($c->proxys[0]); - $proxy_classname = "pfcProxyCommand_" . $proxy_name; - $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; - if (file_exists($proxy_filename)) require_once($proxy_filename); - if (class_exists($proxy_classname)) - { - $proxy =& new $proxy_classname(); - $proxy->name = $cmd_name; - $proxy->proxyname = $proxy_name; - $proxy->linkTo($cmd); - } - - // return the proxy, not the command (the proxy will forward the request to the real command) - return $proxy; + return $cmd; } /** Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-05-28 18:47:04 UTC (rev 530) +++ trunk/src/proxys/auth.class.php 2006-05-28 18:54:30 UTC (rev 531) @@ -75,7 +75,7 @@ } } - // on passe la main a au prochain proxy (ou a la command finale) + // forward the command to the next proxy or to the final command $this->next->run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 18:47:13
|
Revision: 530 Author: kerphi Date: 2006-05-28 11:47:04 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=530&view=rev Log Message: ----------- Bug fix: closing a none active tab wasn't possible Modified Paths: -------------- trunk/src/commands/leave.class.php Modified: trunk/src/commands/leave.class.php =================================================================== --- trunk/src/commands/leave.class.php 2006-05-28 18:36:08 UTC (rev 529) +++ trunk/src/commands/leave.class.php 2006-05-28 18:47:04 UTC (rev 530) @@ -14,10 +14,10 @@ // tab to leave can be passed in the parameters // a reason can also be present (used for kick and ban commands) $id = ""; $reason = ""; - if (preg_match("/([a-z0-9]*) (.*)/i", $param, $res)) + if (preg_match("/([a-z0-9]*)( (.*)|)/i", $param, $res)) { $id = $res[1]; - $reason = $res[2]; + $reason = trim($res[2]); } if ($id == "") $id = $recipientid; // be default this is the current tab to leave This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 18:36:14
|
Revision: 529 Author: kerphi Date: 2006-05-28 11:36:08 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=529&view=rev Log Message: ----------- remove 'admins' parameter array add 'isadmin' parameter rename 'proxy' to 'proxys' parameter Modified Paths: -------------- trunk/src/commands/connect.class.php trunk/src/pfccommand.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/src/commands/connect.class.php =================================================================== --- trunk/src/commands/connect.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/commands/connect.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -20,11 +20,7 @@ // store the user ip $container->setMeta($_SERVER["REMOTE_ADDR"], "ip", "nickname", $nickid); // store the admin flag - if (in_array($c->nick, $c->admins)) - $container->setMeta(true, "isadmin", "nickname", $nickid); - else - $container->setMeta(false, "isadmin", "nickname", $nickid); - + $container->setMeta($c->isadmin, "isadmin", "nickname", $nickid); // connect to the server $xml_reponse->addScript("pfc.handleResponse('connect', 'ok', '');"); Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/pfccommand.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -79,7 +79,7 @@ // instanciate the proxy chains $proxy = NULL; - $proxy_name = strtolower($c->proxy[0]); + $proxy_name = strtolower($c->proxys[0]); $proxy_classname = "pfcProxyCommand_" . $proxy_name; $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; if (file_exists($proxy_filename)) require_once($proxy_filename); Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/pfcglobalconfig.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -31,17 +31,16 @@ class pfcGlobalConfig { var $serverid = ""; // this is the chat server id (comparable to the server host in IRC) - - var $admins = array(); - var $proxy = array("auth"); // these parameters are dynamic (not cached) var $nick = ""; // the initial nickname ("" means the user will be queried) + var $isadmin = false; var $channels = array(); // the default joined channels when opening the chat var $privmsg = array(); // the default privmsg chat to lauch when opening the chat var $active = false; // by default the user is not connected // these parameters are static (cached) + var $proxys = array("auth"); var $title = ""; // default is _pfc("My Chat") var $channel = ""; // default is _pfc("My room") var $frozen_nick = false; @@ -135,8 +134,10 @@ $this->synchronizeWithCache(); - // the nickname is not global, it must not be cached - if (isset($params["nick"])) $this->nick = $params["nick"]; + // the 'nick' is dynamic, it must not be cached + if (isset($params["nick"])) $this->nick = $params["nick"]; + // the 'isadmin' flag is dynamic, it must not be cached + if (isset($params["isadmin"])) $this->isadmin = $params["isadmin"]; } function &Instance( $params = array() ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 17:09:38
|
Revision: 528 Author: kerphi Date: 2006-05-28 10:09:31 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=528&view=rev Log Message: ----------- basic user authentification based on the initial nickname Modified Paths: -------------- trunk/src/commands/connect.class.php trunk/src/commands/op.class.php trunk/src/proxys/auth.class.php Modified: trunk/src/commands/connect.class.php =================================================================== --- trunk/src/commands/connect.class.php 2006-05-28 17:08:53 UTC (rev 527) +++ trunk/src/commands/connect.class.php 2006-05-28 17:09:31 UTC (rev 528) @@ -14,6 +14,17 @@ $container =& $c->getContainerInstance(); $disconnected_users = $container->removeObsoleteNick(NULL, $c->timeout); + + // setup some user meta + $nickid = $container->getNickId($u->nick); + // store the user ip + $container->setMeta($_SERVER["REMOTE_ADDR"], "ip", "nickname", $nickid); + // store the admin flag + if (in_array($c->nick, $c->admins)) + $container->setMeta(true, "isadmin", "nickname", $nickid); + else + $container->setMeta(false, "isadmin", "nickname", $nickid); + // connect to the server $xml_reponse->addScript("pfc.handleResponse('connect', 'ok', '');"); Modified: trunk/src/commands/op.class.php =================================================================== --- trunk/src/commands/op.class.php 2006-05-28 17:08:53 UTC (rev 527) +++ trunk/src/commands/op.class.php 2006-05-28 17:09:31 UTC (rev 528) @@ -4,12 +4,28 @@ class pfcCommand_op extends pfcCommand { + var $usage = "/op {nickname}"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; $u =& $this->u; - $xml_reponse->addScript("alert('op command');"); + if (trim($param) == "") + { + // error + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } + + // just change the "isadmin" meta flag + $nicktoop = trim($param); + $container =& $c->getContainerInstance(); + $nicktoopid = $container->getNickId($nicktoop); + $container->setMeta(true, "isadmin", "nickname", $nicktoopid); } } Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-05-28 17:08:53 UTC (rev 527) +++ trunk/src/proxys/auth.class.php 2006-05-28 17:09:31 UTC (rev 528) @@ -42,12 +42,20 @@ if ($this->name == "op") { - if (!in_array($u->nick, $c->admins)) + $container =& $c->getContainerInstance(); + $nickid = $container->getNickId($sender); + $isadmin = $container->getMeta("isadmin", "nickname", $nickid); + if (!$isadmin) { $xml_reponse->addScript("alert('not allowed to do /op');"); + return; } + else + { + // $xml_reponse->addScript("alert('allowed to do /op');"); + } } - if ($this->name == "join") + else if ($this->name == "join") { // check the user is not listed in the banished channel list $container =& $c->getContainerInstance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 17:09:04
|
Revision: 527 Author: kerphi Date: 2006-05-28 10:08:53 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=527&view=rev Log Message: ----------- remove useless code Modified Paths: -------------- trunk/src/phpfreechat.class.php Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-05-28 17:08:25 UTC (rev 526) +++ trunk/src/phpfreechat.class.php 2006-05-28 17:08:53 UTC (rev 527) @@ -385,7 +385,7 @@ if ($cmdtmp != NULL) { // store the new cmdtoplay list (-1 item) - $cmdtoplay = $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); + $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); // play the command $cmd =& pfcCommand::Factory($cmdtmp[0]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 17:08:30
|
Revision: 526 Author: kerphi Date: 2006-05-28 10:08:25 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=526&view=rev Log Message: ----------- Add the "usage" parameter Modified Paths: -------------- trunk/src/commands/nick.class.php Modified: trunk/src/commands/nick.class.php =================================================================== --- trunk/src/commands/nick.class.php 2006-05-28 17:07:39 UTC (rev 525) +++ trunk/src/commands/nick.class.php 2006-05-28 17:08:25 UTC (rev 526) @@ -4,25 +4,27 @@ class pfcCommand_nick extends pfcCommand { + var $usage = "/nick {newnickname}"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; $u =& $this->u; + if (trim($param) == "") + { + // error + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } + $newnick = phpFreeChat::FilterNickname($param); $oldnick = $u->nick; if ($c->debug) pxlog("/nick ".$newnick, "chat", $c->getId()); - - if ($newnick == "") - { - // the choosen nick is empty - if ($c->debug) pxlog("/nick the choosen nick is empty", "chat", $c->getId()); - $xml_reponse->addScript("pfc.handleResponse('nick', 'empty', '');"); - //$cmd =& pfcCommand::Factory("asknick"); - //$cmd->run($xml_reponse, $clientid, "", $sender, $recipient); - return; - } $container =& $c->getContainerInstance(); $newnickid = $container->getNickId($newnick); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 17:07:47
|
Revision: 525 Author: kerphi Date: 2006-05-28 10:07:39 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=525&view=rev Log Message: ----------- can print the $_SERVER global variable Modified Paths: -------------- trunk/src/commands/debug.class.php Modified: trunk/src/commands/debug.class.php =================================================================== --- trunk/src/commands/debug.class.php 2006-05-28 15:54:34 UTC (rev 524) +++ trunk/src/commands/debug.class.php 2006-05-28 17:07:39 UTC (rev 525) @@ -24,7 +24,14 @@ $msg = str_replace("\n","",addslashes(nl2br($msg))); $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); } - + if ($param == "phpserver") + { + $msg = ""; + $msg .= var_export($_SERVER, true); + $msg = str_replace("\n","",addslashes(nl2br($msg))); + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 15:54:42
|
Revision: 524 Author: kerphi Date: 2006-05-28 08:54:34 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=524&view=rev Log Message: ----------- pfcContainer interface and documentation update Modified Paths: -------------- trunk/src/pfccontainer.class.php Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2006-05-28 15:46:57 UTC (rev 523) +++ trunk/src/pfccontainer.class.php 2006-05-28 15:54:34 UTC (rev 524) @@ -36,7 +36,7 @@ /** * Create (connect/join) the nickname into the server or the channel locations - * Notice: this function must update all channels the users joined (use stored channel list into metadata) + * Notice: the caller must take care to update all channels the users joined (use stored channel list into metadata) * @param $chan if NULL then create the user on the server (connect), otherwise create the user on the given channel (join) * @param $nick the nickname to create * @param $nickid is the corresponding nickname id (taken from session) @@ -46,9 +46,10 @@ /** * Remove (disconnect/quit) the nickname from the server or from a channel - * Notice: this function must update all channels if the user disconnect completly (use stored channel list into metadata) - * @param $chan if NULL then remove the user on the server (disconnect) and on all the joined channels, otherwise just remove the user from the given channel (quit) + * Notice: The caller must take care to update all joined channels. + * @param $chan if NULL then remove the user on the server (disconnect), otherwise just remove the user from the given channel (quit) * @param $nick the nickname to remove + * @return true if the nickname was correctly removed */ function removeNick($chan, $nickname) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } @@ -62,9 +63,11 @@ function updateNick($chan, $nick) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } + /** * Change the user' nickname - * Notice: this function must update all channels the users joined (use stored channel list into metadata) + * Notice: this call must take care to update all channels the user joined + * @param $chan where to update the nick, if null then update the server nick * @param $newnick * @param $oldnick */ @@ -85,7 +88,7 @@ * Notice: this function must remove all nicknames which are not uptodate from the given channel or from the server * @param $chan if NULL then check obsolete nick on the server, otherwise just check obsolete nick on the given channel * @param $timeout - * @return array() contains all disconnected nicknames + * @return array("nick"=>???, "timestamp"=>???) contains all disconnected nicknames and there timestamp */ function removeObsoleteNick($chan, $timeout) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } @@ -93,26 +96,37 @@ /** * Returns the nickname list on the given channel or on the whole server * @param $chan if NULL then returns all connected user, otherwise just returns the channel nicknames - * @return array() contains a nickname list - */ + * @return array(array("nick"=>???,"timestamp"=>???) contains the nickname list with the associated timestamp (laste update time) + */ function getOnlineNick($chan) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } /** - * Write a message to the given channel or to the server + * Returns returns a positive number if the nick is online + * @param $chan if NULL then check if the user is online on the server, otherwise check if the user has joined the channel + * @return -1 if the user is off line, a positive (>=0) if the user is online + */ + function isNickOnline($chan, $nick) + { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } + + /** + * Write a command to the given channel or to the server * Notice: a message is very generic, it can be a misc command (notice, me, ...) * @param $chan if NULL then write the message on the server, otherwise just write the message on the channel message pool * @param $nick is the sender nickname - * @param $msg is the raw message to write + * @param $cmd is the command name (ex: "send", "nick", "kick" ...) + * @param $param is the command' parameters (ex: param of the "send" command is the message) + * @return $msg_id the created message identifier */ function write($chan, $nick, $msg) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } /** - * Read the last posted messages from a channel or from the server + * Read the last posted commands from a channel or from the server + * Notice: the returned array must be ordered by id * @param $chan if NULL then read from the server, otherwise read from the given channel * @param $from_id read all message with a greater id - * @return array() contains the messages list + * @return array() contains the command list */ function read($chan, $from_id) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } @@ -123,7 +137,7 @@ * @param $chan if NULL then read if from the server, otherwise read if from the given channel * @return int is the last posted message id */ - function getLastMsgId() + function getLastId($chan) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } /** @@ -132,7 +146,7 @@ * @param $key is the index which identify a metadata * @param $type is used to "group" some metadata * @param $subtype is used to "group" precisely some metadata, use NULL to ignore it - * @return mixed the value assigned to the key + * @return mixed the value assigned to the key, NULL if not found */ function getMeta($key, $type, $subtype = NULL) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } @@ -144,15 +158,18 @@ * @param $value is the value associated to the key * @param $type is used to "group" some metadata * @param $subtype is used to "group" precisely some metadata, use NULL to ignore it + * @return true on success, false on error */ - function setMeta($key, $value, $type, $subtype = NULL) + function setMeta($value, $key, $type, $subtype = NULL) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } + /** * Remove a meta data key/value couple * Notice: if key is NULL then all the meta data must be removed * @param $key is the key to delete, use NULL to delete all the metadata * @param $type is used to "group" some metadata * @param $subtype is used to "group" precisely some metadata, use NULL to ignore it + * @return true on success, false on error */ function rmMeta($key, $type, $subtype = NULL) { die(_pfc("%s must be implemented", get_class($this)."::".__FUNCTION__)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 15:47:07
|
Revision: 523 Author: kerphi Date: 2006-05-28 08:46:57 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=523&view=rev Log Message: ----------- Refactoring on the 'cmdtoplay' command: Now all the command parameters are stored in the user meta. Now a reason is available for the /leave command, it is used by the kick and ban command Modified Paths: -------------- trunk/src/commands/ban.class.php trunk/src/commands/join.class.php trunk/src/commands/kick.class.php trunk/src/commands/leave.class.php trunk/src/commands/unban.class.php trunk/src/commands/update.class.php trunk/src/pfccommand.class.php trunk/src/phpfreechat.class.php Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/ban.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -4,19 +4,39 @@ class pfcCommand_ban extends pfcCommand { + var $usage = "/ban {nickname}"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; $u =& $this->u; + if (trim($param) == "") + { + // error + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } + $container =& $c->getContainerInstance(); $nickid = $container->getNickId($param); if ($nickid != "undefined") { $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - $cmdtoplay[] = array("leave",$recipientid); // ban the user from the current channel //_pfc("banished by %s", $sender); + + $cmdtmp = array("leave", /* cmdname */ + $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 $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); } Modified: trunk/src/commands/join.class.php =================================================================== --- trunk/src/commands/join.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/join.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -4,15 +4,26 @@ class pfcCommand_join extends pfcCommand { + var $usage = "/join {channelname}"; + function run(&$xml_reponse, $clientid, &$param, &$sender, &$recipient, &$recipientid) { $c =& $this->c; $u =& $this->u; - $channame = $param; + $channame = trim($param); $chanrecip = pfcCommand_join::GetRecipient($channame); $chanid = pfcCommand_join::GetRecipientId($channame); + if ($channame == "") + { + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } + if(!isset($u->channels[$chanid])) { $u->channels[$chanid]["recipient"] = $chanrecip; Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/kick.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -4,11 +4,22 @@ class pfcCommand_kick extends pfcCommand { + var $usage = "/kick {nickname}"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; $u =& $this->u; + if (trim($param) == "") + { + // error + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } // kicking a user just add a command to play to the aimed user metadata. $container =& $c->getContainerInstance(); @@ -17,7 +28,14 @@ { $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - $cmdtoplay[] = array("leave", $recipientid); // kick the user from the current channel //_pfc("kicked by %s", $sender); + $reason = _pfc("kicked from %s by %s", $u->channels[$recipientid]["name"], $sender); + $cmdtmp = array("leave", /* cmdname */ + $recipientid." ".$reason, /* param */ + $sender, /* sender */ + $recipient, /* recipient */ + $recipientid,/* recipientid */ + ); + $cmdtoplay[] = $cmdtmp; // kick the user from the current channel $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); } } Modified: trunk/src/commands/leave.class.php =================================================================== --- trunk/src/commands/leave.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/leave.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -4,13 +4,22 @@ class pfcCommand_leave extends pfcCommand { + var $usage = "/leave [{recipientid} {reason}]"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; $u =& $this->u; // tab to leave can be passed in the parameters - $id = ($param != "") ? $param : $recipientid; + // a reason can also be present (used for kick and ban commands) + $id = ""; $reason = ""; + if (preg_match("/([a-z0-9]*) (.*)/i", $param, $res)) + { + $id = $res[1]; + $reason = $res[2]; + } + if ($id == "") $id = $recipientid; // be default this is the current tab to leave // $xml_reponse->addScript("alert('sender=".addslashes($sender)."');"); // $xml_reponse->addScript("alert('recipientid=".addslashes($id)."');"); @@ -44,9 +53,11 @@ { if ($leavech) { - // show a leave message + // show a leave message with the showing the reason if present + $msg = _pfc("%s quit",$u->nick); + if ($reason != "") $msg .= " (".$reason.")"; $cmd =& pfcCommand::Factory("notice"); - $cmd->run($xml_reponse, $clientid, _pfc("%s quit",$u->nick), $sender, $leave_recip, $leave_id, 1); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $leave_recip, $leave_id, 1); } // remove the nickname from the channel/pv @@ -60,7 +71,10 @@ else { // error - $xml_reponse->addScript("alert('error leaving ".$id."');"); + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); } } } Modified: trunk/src/commands/unban.class.php =================================================================== --- trunk/src/commands/unban.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/unban.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -4,6 +4,8 @@ class pfcCommand_unban extends pfcCommand { + var $usage = "/unban {id}"; + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) { $c =& $this->c; @@ -11,7 +13,16 @@ $container =& $c->getContainerInstance(); - + if (trim($param) == "") + { + // error + $msg = _pfc("Missing parameter"); + $msg .= " (".$this->usage.")"; + $cmd =& pfcCommand::Factory("error"); + $cmd->run($xml_reponse, $clientid, $msg, $sender, $recipient, $recipientid); + return; + } + $updated = false; $msg = "<p>"._pfc("Nobody has been unbanished")."</p>"; Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/commands/update.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -23,19 +23,6 @@ // $cmd =& pfcCommand::Factory("notice"); // $cmd->run($xml_reponse, $clientid, _pfc("%s quit (timeout)",$u), $sender, $recipient, $recipientid, 2); // } - - - /* - // --- - // play the other commands - $nickid = $container->getNickId($u->nick); - $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); - $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - foreach($cmdtoplay as $cmdtmp) - $xml_reponse->addScript("pfc.handleResponse('update', 'cmdtoplay', Array('".$cmdtmp[0]."','".addslashes($cmdtmp[1])."'));"); - $container->rmMeta("cmdtoplay", "nickname", $nickid); - // --- - */ // update the user nickname timestamp $cmd =& pfcCommand::Factory("updatemynick"); Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/pfccommand.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -35,6 +35,11 @@ * Command name (lowercase) */ var $name; + + /** + * Contains the command syntaxe (how to use the command) + */ + var $usage; /** * Not used for now Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-05-28 15:44:30 UTC (rev 522) +++ trunk/src/phpfreechat.class.php 2006-05-28 15:46:57 UTC (rev 523) @@ -354,10 +354,15 @@ $container =& $c->getContainerInstance(); $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $u->privmsg[$recipientid]["pvnickid"]); $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - //if (!isset($cmdtoplay["privmsg2"])) $cmdtoplay["privmsg2"] = array(); - if (!in_array(array("privmsg2", $u->nick), $cmdtoplay)) + $cmdtmp = array("privmsg2", /* cmdname */ + $u->nick, /* param */ + $sender, /* sender */ + $recipient, /* recipient */ + $recipientid,/* recipientid */ + ); + if (!in_array($cmdtmp, $cmdtoplay)) { - $cmdtoplay[] = array("privmsg2", $u->nick); + $cmdtoplay[] = $cmdtmp; $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $u->privmsg[$recipientid]["pvnickid"]); //$xml_reponse->addScript("alert('cmdtoplay[]=".serialize($cmdtoplay)."');"); } @@ -385,12 +390,16 @@ // play the command $cmd =& pfcCommand::Factory($cmdtmp[0]); if ($c->debug) - $cmd->run($xml_reponse, $clientid, $cmdtmp[1], $sender, $recipient, $recipientid); + $cmd->run($xml_reponse, $clientid, $cmdtmp[1], $cmdtmp[2], $cmdtmp[3], $cmdtmp[4]); else - @$cmd->run($xml_reponse, $clientid, $cmdtmp[1], $sender, $recipient, $recipientid); + @$cmd->run($xml_reponse, $clientid, $cmdtmp[1], $cmdtmp[2], $cmdtmp[3], $cmdtmp[4]); + // if the cmdtoplay is a 'leave' command, then show an alert to the kicked or banished user if ($cmdtmp[0] == "leave") - $xml_reponse->addScript("alert('KICK');"); + { + if (preg_match("/([a-z0-9]*) (.*)/i", $cmdtmp[1], $res)) + $xml_reponse->addScript("alert('".$res[2]."');"); + } // check if there is other command to play $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 15:44:35
|
Revision: 522 Author: kerphi Date: 2006-05-28 08:44:30 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=522&view=rev Log Message: ----------- documentation clarification Modified Paths: -------------- trunk/src/commands/banlist.class.php Modified: trunk/src/commands/banlist.class.php =================================================================== --- trunk/src/commands/banlist.class.php 2006-05-28 14:59:14 UTC (rev 521) +++ trunk/src/commands/banlist.class.php 2006-05-28 15:44:30 UTC (rev 522) @@ -31,8 +31,8 @@ { $msg .= "<p>("._pfc("Empty").")</p>"; } - $msg .= "<p>"._pfc("'/unban {id}' command will unban the user identified by {id}")."</p>"; - $msg .= "<p>"._pfc("'/unban all' command will unban all the users on this channel")."</p>"; + $msg .= "<p>"._pfc("'/unban {id}' will unban the user identified by {id}")."</p>"; + $msg .= "<p>"._pfc("'/unban all' will unban all the users on this channel")."</p>"; $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".addslashes($msg)."');"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 14:59:27
|
Revision: 521 Author: kerphi Date: 2006-05-28 07:59:14 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=521&view=rev Log Message: ----------- Refactoring on the 'cmdtoplay' code : remove the command call from the client side (security issue) Modified Paths: -------------- trunk/src/commands/update.class.php trunk/src/phpfreechat.class.php Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2006-05-28 12:23:40 UTC (rev 520) +++ trunk/src/commands/update.class.php 2006-05-28 14:59:14 UTC (rev 521) @@ -25,6 +25,7 @@ // } + /* // --- // play the other commands $nickid = $container->getNickId($u->nick); @@ -34,7 +35,7 @@ $xml_reponse->addScript("pfc.handleResponse('update', 'cmdtoplay', Array('".$cmdtmp[0]."','".addslashes($cmdtmp[1])."'));"); $container->rmMeta("cmdtoplay", "nickname", $nickid); // --- - + */ // update the user nickname timestamp $cmd =& pfcCommand::Factory("updatemynick"); Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-05-28 12:23:40 UTC (rev 520) +++ trunk/src/phpfreechat.class.php 2006-05-28 14:59:14 UTC (rev 521) @@ -365,7 +365,6 @@ } - /* // before playing the wanted command // play the found commands into the meta 'cmdtoplay' @@ -381,20 +380,27 @@ if ($cmdtmp != NULL) { // store the new cmdtoplay list (-1 item) - $cmdtoplay = $container->setMeta("cmdtoplay", "nickname", $nickid); + $cmdtoplay = $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); // play the command + $cmd =& pfcCommand::Factory($cmdtmp[0]); + if ($c->debug) + $cmd->run($xml_reponse, $clientid, $cmdtmp[1], $sender, $recipient, $recipientid); + else + @$cmd->run($xml_reponse, $clientid, $cmdtmp[1], $sender, $recipient, $recipientid); + + if ($cmdtmp[0] == "leave") + $xml_reponse->addScript("alert('KICK');"); // check if there is other command to play $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); - $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); } $morecmd = (count($cmdtoplay) > 0); } - */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 12:23:51
|
Revision: 520 Author: kerphi Date: 2006-05-28 05:23:40 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=520&view=rev Log Message: ----------- Refactoring on the 'cmdtoplay' code Modified Paths: -------------- trunk/src/commands/ban.class.php trunk/src/commands/kick.class.php trunk/src/commands/update.class.php trunk/src/phpfreechat.class.php Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2006-05-28 11:56:07 UTC (rev 519) +++ trunk/src/commands/ban.class.php 2006-05-28 12:23:40 UTC (rev 520) @@ -15,10 +15,8 @@ if ($nickid != "undefined") { $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); - if (is_string($cmdtoplay)) $cmdtoplay = unserialize($cmdtoplay); - if (!is_array($cmdtoplay)) $cmdtoplay = array(); - if (!isset($cmdtoplay["leave"])) $cmdtoplay["leave"] = array(); - $cmdtoplay["leave"][] = $recipientid; // ban the user from the current channel //_pfc("banished by %s", $sender); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + $cmdtoplay[] = array("leave",$recipientid); // ban the user from the current channel //_pfc("banished by %s", $sender); $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); } Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2006-05-28 11:56:07 UTC (rev 519) +++ trunk/src/commands/kick.class.php 2006-05-28 12:23:40 UTC (rev 520) @@ -16,10 +16,8 @@ if ($nickid != "undefined") { $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); - if (is_string($cmdtoplay)) $cmdtoplay = unserialize($cmdtoplay); - if (!is_array($cmdtoplay)) $cmdtoplay = array(); - if (!isset($cmdtoplay["leave"])) $cmdtoplay["leave"] = array(); - $cmdtoplay["leave"][] = $recipientid; // kick the user from the current channel //_pfc("kicked by %s", $sender); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + $cmdtoplay[] = array("leave", $recipientid); // kick the user from the current channel //_pfc("kicked by %s", $sender); $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $nickid); } } Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2006-05-28 11:56:07 UTC (rev 519) +++ trunk/src/commands/update.class.php 2006-05-28 12:23:40 UTC (rev 520) @@ -29,11 +29,9 @@ // play the other commands $nickid = $container->getNickId($u->nick); $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); - if (is_string($cmdtoplay)) $cmdtoplay = unserialize($cmdtoplay); - if (!is_array($cmdtoplay)) $cmdtoplay = array(); - foreach($cmdtoplay as $cmdstr => $cmdparams) - foreach($cmdparams as $cmdparam) - $xml_reponse->addScript("pfc.handleResponse('update', 'cmdtoplay', Array('".$cmdstr."','".addslashes($cmdparam)."'));"); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + foreach($cmdtoplay as $cmdtmp) + $xml_reponse->addScript("pfc.handleResponse('update', 'cmdtoplay', Array('".$cmdtmp[0]."','".addslashes($cmdtmp[1])."'));"); $container->rmMeta("cmdtoplay", "nickname", $nickid); // --- Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-05-28 11:56:07 UTC (rev 519) +++ trunk/src/phpfreechat.class.php 2006-05-28 12:23:40 UTC (rev 520) @@ -353,19 +353,53 @@ // (warn other user that someone talk to him) $container =& $c->getContainerInstance(); $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $u->privmsg[$recipientid]["pvnickid"]); - if (is_string($cmdtoplay)) $cmdtoplay = unserialize($cmdtoplay); - if (!is_array($cmdtoplay)) $cmdtoplay = array(); - if (!isset($cmdtoplay["privmsg2"])) $cmdtoplay["privmsg2"] = array(); - if (!in_array($u->nick, $cmdtoplay["privmsg2"])) + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + //if (!isset($cmdtoplay["privmsg2"])) $cmdtoplay["privmsg2"] = array(); + if (!in_array(array("privmsg2", $u->nick), $cmdtoplay)) { - $cmdtoplay["privmsg2"][] = $u->nick; + $cmdtoplay[] = array("privmsg2", $u->nick); $container->setMeta(serialize($cmdtoplay), "cmdtoplay", "nickname", $u->privmsg[$recipientid]["pvnickid"]); - // $xml_reponse->addScript("alert('cmdtoplay[]=".serialize($cmdtoplay)."');"); + //$xml_reponse->addScript("alert('cmdtoplay[]=".serialize($cmdtoplay)."');"); } } - + } + + /* + // before playing the wanted command + // play the found commands into the meta 'cmdtoplay' + $container =& $c->getContainerInstance(); + $nickid = $container->getNickId($u->nick); + $morecmd = true; + while($morecmd) + { + // take a command from the list + $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + $cmdtmp = array_pop($cmdtoplay); + if ($cmdtmp != NULL) + { + // store the new cmdtoplay list (-1 item) + $cmdtoplay = $container->setMeta("cmdtoplay", "nickname", $nickid); + + // play the command + + // check if there is other command to play + $cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid); + $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); + } + + $morecmd = (count($cmdtoplay) > 0); + } + + + */ + + + + + $cmd =& pfcCommand::Factory($rawcmd); if ($cmd != NULL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 11:56:12
|
Revision: 519 Author: kerphi Date: 2006-05-28 04:56:07 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=519&view=rev Log Message: ----------- New command: /clear This command just clear the current tab Added Paths: ----------- trunk/src/commands/clear.class.php Added: trunk/src/commands/clear.class.php =================================================================== --- trunk/src/commands/clear.class.php (rev 0) +++ trunk/src/commands/clear.class.php 2006-05-28 11:56:07 UTC (rev 519) @@ -0,0 +1,16 @@ +<?php + +require_once(dirname(__FILE__)."/../pfccommand.class.php"); + +class pfcCommand_clear extends pfcCommand +{ + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) + { + $c =& $this->c; + $u =& $this->u; + + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '');"); + } +} + +?> \ 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-05-28 11:55:36
|
Revision: 518 Author: kerphi Date: 2006-05-28 04:55:31 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=518&view=rev Log Message: ----------- New command: /debug '/debug userconfig' : display user config array '/debug globalconfig' : display global config array Added Paths: ----------- trunk/src/commands/debug.class.php Added: trunk/src/commands/debug.class.php =================================================================== --- trunk/src/commands/debug.class.php (rev 0) +++ trunk/src/commands/debug.class.php 2006-05-28 11:55:31 UTC (rev 518) @@ -0,0 +1,31 @@ +<?php + +require_once(dirname(__FILE__)."/../pfccommand.class.php"); + +class pfcCommand_debug extends pfcCommand +{ + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) + { + $c =& $this->c; + $u =& $this->u; + + if ($param == "userconfig") + { + $msg = ""; + $msg .= var_export($u, true); + $msg = str_replace("\n","",addslashes(nl2br($msg))); + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); + } + + if ($param == "globalconfig") + { + $msg = ""; + $msg .= var_export($c, true); + $msg = str_replace("\n","",addslashes(nl2br($msg))); + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); + } + + } +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |