phpfreechat-svn Mailing List for phpFreeChat (Page 2)
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...> - 2008-09-12 12:26:08
|
Revision: 1252
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1252&view=rev
Author: kerphi
Date: 2008-09-12 12:26:17 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
Bug fix: when reloading the chat while a private message tab is opened, the PV tab was not shown again. (thanks to Amandarn)
Modified Paths:
--------------
trunk/src/commands/connect.class.php
Modified: trunk/src/commands/connect.class.php
===================================================================
--- trunk/src/commands/connect.class.php 2008-09-12 09:37:45 UTC (rev 1251)
+++ trunk/src/commands/connect.class.php 2008-09-12 12:26:17 UTC (rev 1252)
@@ -74,7 +74,7 @@
for($i = 0 ; $i < count($pvlist) ; $i++)
{
$cmdp = array();
- $cmdp["param"] = $pvlist[$i];
+ $cmdp["params"][0] = $pvlist[$i];
$cmd =& pfcCommand::Factory( $i < count($pvlist)-1 || !$joinoldchan ? 'privmsg2' : 'privmsg' );
$cmd->run($xml_reponse, $cmdp);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-09-12 09:37:35
|
Revision: 1251
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1251&view=rev
Author: kerphi
Date: 2008-09-12 09:37:45 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
The notice and the me command have to be differentiated client side.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2008-09-11 12:47:11 UTC (rev 1250)
+++ trunk/data/public/js/pfcclient.js 2008-09-12 09:37:45 UTC (rev 1251)
@@ -966,7 +966,9 @@
line += '›';
line += '</span> ';
}
- if (cmd == 'notice' || cmd == 'me')
+ if (cmd == 'notice')
+ line += '<span class="pfc_words">* ' + this.parseMessage(param) +'</span> ';
+ else if (cmd == 'me')
line += '<span class="pfc_words">* '+ sender.escapeHTML() + ' ' + this.parseMessage(param) +'</span> ';
else
line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> ';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-09-11 12:47:02
|
Revision: 1250
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1250&view=rev
Author: kerphi
Date: 2008-09-11 12:47:11 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
XSS security hole fix in the '/me' command. (thanks to Philipp Blaim for the report)
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/src/commands/me.class.php
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2008-08-01 07:17:10 UTC (rev 1249)
+++ trunk/data/public/js/pfcclient.js 2008-09-11 12:47:11 UTC (rev 1250)
@@ -967,7 +967,7 @@
line += '</span> ';
}
if (cmd == 'notice' || cmd == 'me')
- line += '<span class="pfc_words">* '+ this.parseMessage(param) +'</span> ';
+ line += '<span class="pfc_words">* '+ sender.escapeHTML() + ' ' + this.parseMessage(param) +'</span> ';
else
line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> ';
line += '</div>';
Modified: trunk/src/commands/me.class.php
===================================================================
--- trunk/src/commands/me.class.php 2008-08-01 07:17:10 UTC (rev 1249)
+++ trunk/src/commands/me.class.php 2008-09-11 12:47:11 UTC (rev 1250)
@@ -30,7 +30,7 @@
}
$msg = phpFreeChat::PreFilterMsg($param);
- $ct->write($recipient, "*me*", $this->name, $u->getNickname()." ".$msg);
+ $ct->write($recipient, $sender, $this->name, $msg);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-08-01 07:17:01
|
Revision: 1249
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1249&view=rev
Author: kerphi
Date: 2008-08-01 07:17:10 +0000 (Fri, 01 Aug 2008)
Log Message:
-----------
Fixes the deop command and maybe other regressions (thanks to bakebowling and Walker for the report)
Modified Paths:
--------------
trunk/src/containers/file.class.php
Modified: trunk/src/containers/file.class.php
===================================================================
--- trunk/src/containers/file.class.php 2008-07-30 14:02:12 UTC (rev 1248)
+++ trunk/src/containers/file.class.php 2008-08-01 07:17:10 UTC (rev 1249)
@@ -110,6 +110,7 @@
$leafexists = file_exists($leaffilename);
if ($leafvalue == NULL)
{
+ unlink($leaffilename);
touch($leaffilename);
}
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-30 14:02:03
|
Revision: 1248
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1248&view=rev
Author: kerphi
Date: 2008-07-30 14:02:12 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
phpfreechat 1.1 release
Added Paths:
-----------
tags/1.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-30 13:58:31
|
Revision: 1247
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1247&view=rev
Author: kerphi
Date: 2008-07-30 13:58:39 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
phpfreechat 1.2 release
Added Paths:
-----------
tags/1.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-30 13:30:43
|
Revision: 1246
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1246&view=rev
Author: kerphi
Date: 2008-07-30 13:30:52 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
clarify a comment
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2008-07-30 07:51:29 UTC (rev 1245)
+++ trunk/src/pfcglobalconfig.class.php 2008-07-30 13:30:52 UTC (rev 1246)
@@ -112,7 +112,7 @@
* <p>This parameter contains a list of key/value that identify admin access.
* The keys are the nicknames and the values are the corresponding passwords.
* Note: The "isadmin" parameter does not depend on this variable.
- * (Default value: No admin/password accounts are available. Don't forget to change it.)</p>
+ * (Default value: nick 'admin' with no password is available. Don't forget to change it.)</p>
*/
var $admins = array("admin" => "");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-30 07:51:20
|
Revision: 1245
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1245&view=rev
Author: kerphi
Date: 2008-07-30 07:51:29 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
version 1.2
Modified Paths:
--------------
trunk/version.txt
Modified: trunk/version.txt
===================================================================
--- trunk/version.txt 2008-07-30 07:32:57 UTC (rev 1244)
+++ trunk/version.txt 2008-07-30 07:51:29 UTC (rev 1245)
@@ -1 +1 @@
-1.1
+1.2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-30 07:32:48
|
Revision: 1244
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1244&view=rev
Author: kerphi
Date: 2008-07-30 07:32:57 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
This revision fixes a big security hole. The nickid is a public identifier shared between all the chatters. Before this patch, the nickid was equal to the session_id without any shadow. Now the sessionid is blured. (Many thanks to DrNathan for the report)
Modified Paths:
--------------
trunk/src/pfcuserconfig.class.php
Modified: trunk/src/pfcuserconfig.class.php
===================================================================
--- trunk/src/pfcuserconfig.class.php 2008-07-29 14:10:33 UTC (rev 1243)
+++ trunk/src/pfcuserconfig.class.php 2008-07-30 07:32:57 UTC (rev 1244)
@@ -23,10 +23,10 @@
// start the session : session is used for locking purpose and cache purpose
session_name( "phpfreechat" );
if(session_id() == "") session_start();
-
- // echo "pfcUserConfig()<br>";
- $this->nickid = session_id();
+ // the nickid is a public identifier shared between all the chatters
+ // this is why the session_id must not be assigned directly to the nickid
+ $this->nickid = sha1(session_id());
// user parameters are cached in sessions
$this->_getParam("nick");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-29 14:10:24
|
Revision: 1243
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1243&view=rev
Author: kerphi
Date: 2008-07-29 14:10:33 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
Cleanup the demo31 with unused code
Modified Paths:
--------------
trunk/demo/demo31_show_who_is_online-chat.php
trunk/demo/demo31_show_who_is_online-whoisonline.php
Removed Paths:
-------------
trunk/demo/demo31_show_who_is_online-config.php
Modified: trunk/demo/demo31_show_who_is_online-chat.php
===================================================================
--- trunk/demo/demo31_show_who_is_online-chat.php 2008-07-26 09:41:26 UTC (rev 1242)
+++ trunk/demo/demo31_show_who_is_online-chat.php 2008-07-29 14:10:33 UTC (rev 1243)
@@ -2,6 +2,7 @@
require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
+$params = array();
// calculate a unique id for this chat,
// this id must be used by pfcInfo to get chat infos
$params["serverid"] = md5("Whois online demo");
@@ -28,13 +29,6 @@
// print the current file
echo "<h2>The source code</h2>";
- $filename = dirname(__FILE__)."/demo31_show_who_is_online-config.php";
- echo "<p><code>".$filename."</code></p>";
- echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
- $content = file_get_contents($filename);
- highlight_string($content);
- echo "</pre>";
-
$filename = __FILE__;
echo "<p><code>".$filename."</code></p>";
echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
Deleted: trunk/demo/demo31_show_who_is_online-config.php
===================================================================
--- trunk/demo/demo31_show_who_is_online-config.php 2008-07-26 09:41:26 UTC (rev 1242)
+++ trunk/demo/demo31_show_who_is_online-config.php 2008-07-29 14:10:33 UTC (rev 1243)
@@ -1,8 +0,0 @@
-<?php
-
-require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
-$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
-$params["title"] = "Whois online demo channel";
-$pfc_config =& pfcGlobalConfig::Instance( $params );
-
-?>
Modified: trunk/demo/demo31_show_who_is_online-whoisonline.php
===================================================================
--- trunk/demo/demo31_show_who_is_online-whoisonline.php 2008-07-26 09:41:26 UTC (rev 1242)
+++ trunk/demo/demo31_show_who_is_online-whoisonline.php 2008-07-29 14:10:33 UTC (rev 1243)
@@ -32,13 +32,6 @@
// print the current file
echo "<h2>The source code</h2>";
- $filename = dirname(__FILE__)."/demo31_show_who_is_online-config.php";
- echo "<p><code>".$filename."</code></p>";
- echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
- $content = file_get_contents($filename);
- highlight_string($content);
- echo "</pre>";
-
$filename = __FILE__;
echo "<p><code>".$filename."</code></p>";
echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-07-26 09:41:18
|
Revision: 1242
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1242&view=rev
Author: kerphi
Date: 2008-07-26 09:41:26 +0000 (Sat, 26 Jul 2008)
Log Message:
-----------
Modify the english translation of the nick change message (following the cdn's suggestion)
Modified Paths:
--------------
trunk/i18n/en_US/main.php
trunk/i18n/eo/main.php
Modified: trunk/i18n/en_US/main.php
===================================================================
--- trunk/i18n/en_US/main.php 2008-05-23 20:54:51 UTC (rev 1241)
+++ trunk/i18n/en_US/main.php 2008-07-26 09:41:26 UTC (rev 1242)
@@ -39,7 +39,7 @@
$GLOBALS["i18n"]["Text cannot be empty"] = "Text cannot be empty";
// line 392 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s changes his/her nickname to %s";
+$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s changes nickname to %s";
// line 398 in phpfreechat.class.php
$GLOBALS["i18n"]["%s is connected"] = "%s is connected";
Modified: trunk/i18n/eo/main.php
===================================================================
--- trunk/i18n/eo/main.php 2008-05-23 20:54:51 UTC (rev 1241)
+++ trunk/i18n/eo/main.php 2008-07-26 09:41:26 UTC (rev 1242)
@@ -1,179 +1,178 @@
-<?php
-/**
- * i18n/eo/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
- */
-
-/**
- * Esperanto translation of the messages (utf8 encoded!)
- *
- * @author Andrey Yankovskiy
- */
-
-// line 45 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["My Chat"] = "Nia babilejo";
-
-// line 201 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s not found, %s library can't be found.";
-
-// line 355 in phpfreechat.class.php
-$GLOBALS["i18n"]["Please enter your nickname"] = "Bonvolu enskribi vian voknomon";
-
-// line 565 in phpfreechat.class.php
-$GLOBALS["i18n"]["Text cannot be empty"] = "Hej! Vi forgesis skribi ion!!!";
-
-// line 392 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s changes his/her nickname to %s";
-
-// line 398 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s is connected"] = "%s is connected";
-
-// line 452 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s quit"] = "%s quit";
-
-// line 468 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s disconnected (timeout)";
-
-// line 262 in phpfreechat.class.php
-$GLOBALS["i18n"]["Unknown command [%s]"] = "Unknown command [%s]";
-
-// line 149 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s doesn't exist: %s";
-
-// line 180 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["You need %s"] = "You need %s";
-
-// line 241 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s doesn't exist, %s library can't be found";
-
-// line 280 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s doesn't exist"] = "%s doesn't exist";
-
-// line 433 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s directory must be specified"] = "%s directory must be specified";
-
-// line 439 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s must be a directory"] = "%s must be a directory";
-
-// line 446 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s can't be created"] = "%s can't be created";
-
-// line 451 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s is not writeable"] = "%s is not writeable";
-
-// line 496 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s is not readable"] = "%s is not readable";
-
-// line 469 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s is not a file"] = "%s is not a file";
-
-// line 491 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["%s is not a directory"] = "%s is not a directory";
-
-// line 23 in chat.html.tpl.php
-$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]";
-
-// line 296 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Hide nickname marker"] = "malkolorigi la nomon";
-
-// line 304 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Show nickname marker"] = "kolorigi la nomon";
-
-// line 389 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Disconnect"] = "Diskonekto";
-
-// line 395 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Connect"] = "Konekto";
-
-// line 427 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Magnify"] = "Malsxrumpi";
-
-// line 434 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Cut down"] = "Sxrumpi";
-
-// line 345 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Hide dates and hours"] = "Kasxi tempon";
-
-// line 353 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Show dates and hours"] = "Montri la tempon";
-
-// line 21 in chat.html.tpl.php
-$GLOBALS["i18n"]["Enter your message here"] = "Enskribu via mesagxo";
-
-// line 24 in chat.html.tpl.php
-$GLOBALS["i18n"]["Enter your nickname here"] = "Bonvolu enskribi vian nomon";
-
-// line 93 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: undefined or obsolete parameter '%s', please correct or remove this parameter";
-
-// line 86 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Hide smiley box"] = "Kasxi la bildetaron";
-
-// line 87 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Show smiley box"] = "Montri la bildetaron";
-
-// line 88 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Hide online users box"] = "Kasxi la partoprenantojn";
-
-// line 89 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Show online users box"] = "Montri la partoprenantojn";
-
-// line 33 in chat.html.tpl.php
-$GLOBALS["i18n"]["Bold"] = "Dike";
-
-// line 34 in chat.html.tpl.php
-$GLOBALS["i18n"]["Italics"] = "Kursive";
-
-// line 35 in chat.html.tpl.php
-$GLOBALS["i18n"]["Underline"] = "Substreke";
-
-// line 36 in chat.html.tpl.php
-$GLOBALS["i18n"]["Delete"] = "Forstreke";
-
-// line 37 in chat.html.tpl.php
-$GLOBALS["i18n"]["Pre"] = "Pre";
-
-// line 38 in chat.html.tpl.php
-$GLOBALS["i18n"]["Mail"] = "E-posxto";
-
-// line 39 in chat.html.tpl.php
-$GLOBALS["i18n"]["Color"] = "Koloro";
-
-// line 48 in phpfreechattemplate.class.php
-$GLOBALS["i18n"]["%s template could not be found"] = "%s template could not be found";
-
-// line 512 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct";
-
-// line 75 in pfccommand.class.php
-$GLOBALS["i18n"]["%s must be implemented"] = "%s must be implemented";
-
-// line 343 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' parameter is mandatory by default use '%s' value";
-
-// line 378 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' parameter must be a positive number";
-
-// line 386 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' parameter is not valid. Available values are: '%s'";
-
-?>
+<?php
+/**
+ * i18n/eo/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
+ */
+
+/**
+ * Esperanto translation of the messages (utf8 encoded!)
+ *
+ * @author Andrey Yankovskiy
+ */
+
+// line 45 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["My Chat"] = "Nia babilejo";
+
+// line 201 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s not found, %s library can't be found.";
+
+// line 355 in phpfreechat.class.php
+$GLOBALS["i18n"]["Please enter your nickname"] = "Bonvolu enskribi vian voknomon";
+
+// line 565 in phpfreechat.class.php
+$GLOBALS["i18n"]["Text cannot be empty"] = "Hej! Vi forgesis skribi ion!!!";
+
+// line 392 in phpfreechat.class.php
+$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s changes nickname to %s";
+
+// line 398 in phpfreechat.class.php
+$GLOBALS["i18n"]["%s is connected"] = "%s is connected";
+
+// line 452 in phpfreechat.class.php
+$GLOBALS["i18n"]["%s quit"] = "%s quit";
+
+// line 468 in phpfreechat.class.php
+$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s disconnected (timeout)";
+
+// line 262 in phpfreechat.class.php
+$GLOBALS["i18n"]["Unknown command [%s]"] = "Unknown command [%s]";
+
+// line 149 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s doesn't exist: %s";
+
+// line 180 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["You need %s"] = "You need %s";
+
+// line 241 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s doesn't exist, %s library can't be found";
+
+// line 280 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s doesn't exist"] = "%s doesn't exist";
+
+// line 433 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s directory must be specified"] = "%s directory must be specified";
+
+// line 439 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s must be a directory"] = "%s must be a directory";
+
+// line 446 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s can't be created"] = "%s can't be created";
+
+// line 451 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s is not writeable"] = "%s is not writeable";
+
+// line 496 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s is not readable"] = "%s is not readable";
+
+// line 469 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s is not a file"] = "%s is not a file";
+
+// line 491 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["%s is not a directory"] = "%s is not a directory";
+
+// line 23 in chat.html.tpl.php
+$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]";
+
+// line 296 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Hide nickname marker"] = "malkolorigi la nomon";
+
+// line 304 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Show nickname marker"] = "kolorigi la nomon";
+
+// line 389 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Disconnect"] = "Diskonekto";
+
+// line 395 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Connect"] = "Konekto";
+
+// line 427 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Magnify"] = "Malsxrumpi";
+
+// line 434 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Cut down"] = "Sxrumpi";
+
+// line 345 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Hide dates and hours"] = "Kasxi tempon";
+
+// line 353 in javascript1.js.tpl.php
+$GLOBALS["i18n"]["Show dates and hours"] = "Montri la tempon";
+
+// line 21 in chat.html.tpl.php
+$GLOBALS["i18n"]["Enter your message here"] = "Enskribu via mesagxo";
+
+// line 24 in chat.html.tpl.php
+$GLOBALS["i18n"]["Enter your nickname here"] = "Bonvolu enskribi vian nomon";
+
+// line 93 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: undefined or obsolete parameter '%s', please correct or remove this parameter";
+
+// line 86 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Hide smiley box"] = "Kasxi la bildetaron";
+
+// line 87 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Show smiley box"] = "Montri la bildetaron";
+
+// line 88 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Hide online users box"] = "Kasxi la partoprenantojn";
+
+// line 89 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Show online users box"] = "Montri la partoprenantojn";
+
+// line 33 in chat.html.tpl.php
+$GLOBALS["i18n"]["Bold"] = "Dike";
+
+// line 34 in chat.html.tpl.php
+$GLOBALS["i18n"]["Italics"] = "Kursive";
+
+// line 35 in chat.html.tpl.php
+$GLOBALS["i18n"]["Underline"] = "Substreke";
+
+// line 36 in chat.html.tpl.php
+$GLOBALS["i18n"]["Delete"] = "Forstreke";
+
+// line 37 in chat.html.tpl.php
+$GLOBALS["i18n"]["Pre"] = "Pre";
+
+// line 38 in chat.html.tpl.php
+$GLOBALS["i18n"]["Mail"] = "E-posxto";
+
+// line 39 in chat.html.tpl.php
+$GLOBALS["i18n"]["Color"] = "Koloro";
+
+// line 48 in phpfreechattemplate.class.php
+$GLOBALS["i18n"]["%s template could not be found"] = "%s template could not be found";
+
+// line 512 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct";
+
+// line 75 in pfccommand.class.php
+$GLOBALS["i18n"]["%s must be implemented"] = "%s must be implemented";
+
+// line 343 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' parameter is mandatory by default use '%s' value";
+
+// line 378 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' parameter must be a positive number";
+
+// line 386 in phpfreechatconfig.class.php
+$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' parameter is not valid. Available values are: '%s'";
+
// line 183 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-05-23 20:54:44
|
Revision: 1241
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1241&view=rev
Author: kerphi
Date: 2008-05-23 13:54:51 -0700 (Fri, 23 May 2008)
Log Message:
-----------
Add a test on the LOCK_EX feature in the initialisation process. This feature doesn't work on filesystems like NFS.
Modified Paths:
--------------
trunk/src/containers/file.class.php
Modified: trunk/src/containers/file.class.php
===================================================================
--- trunk/src/containers/file.class.php 2008-05-16 07:20:26 UTC (rev 1240)
+++ trunk/src/containers/file.class.php 2008-05-23 20:54:51 UTC (rev 1241)
@@ -70,18 +70,29 @@
$timetowait = 2;
if (is_writable(dirname($filename)))
{
- file_put_contents($filename,'some-data1-'.time(), LOCK_EX);
+ file_put_contents($filename,'some-data1-'.time());
clearstatcache();
$time1 = filemtime($filename);
sleep($timetowait);
- file_put_contents($filename,'some-data2-'.time(), LOCK_EX);
+ file_put_contents($filename,'some-data2-'.time());
clearstatcache();
$time2 = filemtime($filename);
unlink($filename);
if ($time2-$time1 != $timetowait)
- $errors[] = "filemtime php fuction is not usable on your filesystem. Please do not use the 'file' container (try the 'mysql' container) or swith to another filesystem.";
+ $errors[] = "filemtime php fuction is not usable on your filesystem. Please do not use the 'file' container (try the 'mysql' container) or swith to another filesystem type.";
}
+ // test the LOCK_EX feature because it doesn't work on special filsystem like NFS
+ $filename = $c->data_private_path.'/filemtime.test';
+ if (is_writable(dirname($filename)))
+ {
+ $data1 = time();
+ file_put_contents($filename, $data1, LOCK_EX);
+ $data2 = file_get_contents($filename);
+ if ($data1 != $data2)
+ $errors[] = "LOCK_EX feature is not usable on your filesystem. Please do not use the 'file' container (try the 'mysql' container) or swith to another filesystem type.";
+ }
+
return $errors;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-05-16 07:20:20
|
Revision: 1240
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1240&view=rev
Author: kerphi
Date: 2008-05-16 00:20:26 -0700 (Fri, 16 May 2008)
Log Message:
-----------
Fixes the timeout problem for special servers which do not update the file timestamp when the content doesn't change
Modified Paths:
--------------
trunk/src/containers/file.class.php
Modified: trunk/src/containers/file.class.php
===================================================================
--- trunk/src/containers/file.class.php 2008-05-04 06:47:21 UTC (rev 1239)
+++ trunk/src/containers/file.class.php 2008-05-16 07:20:26 UTC (rev 1240)
@@ -99,7 +99,7 @@
$leafexists = file_exists($leaffilename);
if ($leafvalue == NULL)
{
- file_put_contents($leaffilename, '', LOCK_EX);
+ touch($leaffilename);
}
else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-05-04 06:47:17
|
Revision: 1239
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1239&view=rev
Author: kerphi
Date: 2008-05-03 23:47:21 -0700 (Sat, 03 May 2008)
Log Message:
-----------
Change the default timeout value to a higher value than all the possible refresh_delay steps : 35 secondes
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2008-03-27 17:53:21 UTC (rev 1238)
+++ trunk/src/pfcglobalconfig.class.php 2008-05-04 06:47:21 UTC (rev 1239)
@@ -183,9 +183,9 @@
* <p>This is the time of inactivity to wait before considering a user is disconnected (in milliseconds).
* A user is inactive only if s/he closed his/her chat window. A user with an open chat window
* is not inactive because s/he sends each <code>refresh_delay</code> an HTTP request.
- * (Default value: 20000 it means 20000 ms or 20 seconds)</p>
+ * (Default value: 35000 it means 35000 ms or 35 seconds)</p>
*/
- var $timeout = 20000;
+ var $timeout = 35000;
/**
* When this parameter is true, all the chatters will be redirected
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-27 17:53:14
|
Revision: 1238
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1238&view=rev
Author: kerphi
Date: 2008-03-27 10:53:21 -0700 (Thu, 27 Mar 2008)
Log Message:
-----------
begining of a publish/subscriber protocole
Added Paths:
-----------
branches/pfc-comet/misc/comet-tests/iframe2/subscriber.php
Added: branches/pfc-comet/misc/comet-tests/iframe2/subscriber.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/subscriber.php (rev 0)
+++ branches/pfc-comet/misc/comet-tests/iframe2/subscriber.php 2008-03-27 17:53:21 UTC (rev 1238)
@@ -0,0 +1,53 @@
+<?php
+
+function chat_backend_callback($pfccomet) {
+ static $id;
+ if (!isset($id)) $id = md5(uniqid(rand(), true));
+ file_put_contents('/tmp/cometdebug',"id=".$id." ".time()."\n",FILE_APPEND|LOCK_EX);
+ return time();
+}
+
+require_once 'pfccomet.class.php';
+$params = array();
+$params['pfccometjs_url'] = './pfccomet.js';
+$params['prototypejs_url'] = '../../../data/public/js/prototype.js';
+$params['instance_name'] = 'mypfccomet';
+$params['backend_loop'] = true;
+$params['backend_loop_sleep'] = 500000; // 100000 microsec = 100 milisec
+$params['backend_url'] = './'.basename(__FILE__);
+$params['backend_callback'] = 'chat_backend_callback';
+$params['onresponse_callback'] = 'chat_handle_response';
+$pfccomet = new pfcComet($params);
+$pfccomet->run();
+
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>pfcComet tester</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+<script type="text/javascript">
+var clientid = 'C1';
+function chat_handle_response(comet,response)
+{
+ // document.getElementById('date').innerHTML = time;
+}
+function chat_subscribe()
+{
+ <?php echo $params['instance_name']; ?>.write(clientid+' SUB CHANNEL1');
+}
+</script>
+
+<?php $pfccomet->printJavascript(); ?>
+
+
+ </head>
+ <body>
+
+ <div id="date">here will be displayed the server time</div>
+ <input type="button" value="Disconnect" onclick="<?php echo $params['instance_name']; ?>.disconnect()" />
+ <input type="button" value="Connect" onclick="<?php echo $params['instance_name']; ?>.connect()" />
+ <input type="button" value="Subscribe" onclick="chat_subscribe();" />
+
+ </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...> - 2008-03-27 17:11:44
|
Revision: 1237
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1237&view=rev
Author: kerphi
Date: 2008-03-27 10:11:51 -0700 (Thu, 27 Mar 2008)
Log Message:
-----------
improve the pfccomet classe
Modified Paths:
--------------
branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php
branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php
Modified: branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php 2008-03-27 16:03:04 UTC (rev 1236)
+++ branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php 2008-03-27 17:11:51 UTC (rev 1237)
@@ -1,31 +1,37 @@
<?php
class pfcComet {
- var $pfccometjs_url = './pfccomet.js';
- var $prototypejs_url = './prototype.js';
- var $backend_url = '';
- var $backend_url_flag = 'backend';
- var $backend_callback = null;
- var $backend_loop = false;
- var $backend_loop_sleep = 1000000; // microseconds
- var $onresponse_callback = null;
- var $onconnect_callback = null;
- var $ondisconnect_callback = null;
+ private $pfccometjs_url = './pfccomet.js';
+ private $prototypejs_url = './prototype.js';
+ private $instance_name = 'pfccomet';
+ private $backend_url = '';
+ private $backend_url_flag = 'backend';
+ private $backend_callback = null;
+ private $backend_loop = false;
+ private $backend_loop_sleep = 1000000; // 1000000 microseconds = 1 second
+ private $onresponse_callback = null;
+ private $onconnect_callback = null;
+ private $ondisconnect_callback = null;
- function pfcComet()
- {
- if ($this->backend_url == '')
- $this->backend_url = $_SERVER['PHP_SELF'];
- }
+ public function __construct($params = array())
+ {
+ foreach(get_object_vars($this) as $k => $v)
+ {
+ if (isset($params[$k]))
+ $this->$k = $params[$k];
+ }
+ if ($this->backend_url == '')
+ $this->backend_url = $_SERVER['PHP_SELF'];
+ }
- function run()
- {
- if (isset($_REQUEST[$this->backend_url_flag]))
+ public function run()
{
- header("Cache-Control: no-cache, must-revalidate");
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- flush();
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+ if (isset($_REQUEST[$this->backend_url_flag]))
+ {
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ flush();
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>pfcComet backend iframe</title>
@@ -43,68 +49,68 @@
// head[0].appendChild(prototypejs);
// }
// load the comet object
- var pfccomet = window.parent.pfccomet;
+ var '.$this->instance_name.' = window.parent.'.$this->instance_name.';
</script>
<body>
';
- flush();
+ flush();
- // trigger the onConnect callback
- echo '<script type="text/javascript">pfccomet._onConnect();</script>'."\n";
- flush();
+ // trigger the onConnect callback
+ echo '<script type="text/javascript">'.$this->instance_name.'._onConnect();</script>'."\n";
+ flush();
- // trigger the backend callback
- do {
- if (is_callable($this->backend_callback))
- {
- $func = $this->backend_callback;
- if ( is_array($func) ){
- echo $this->formatResponse($func[0]->$func[1]($this));
- } else {
- echo $this->formatResponse($func($this));
- }
- }
- flush();
- if ($this->backend_loop) // do not sleep if the loop is finished
- usleep($this->backend_loop_sleep);
- } while($this->backend_loop);
+ // trigger the backend callback
+ do {
+ if (is_callable($this->backend_callback))
+ {
+ $func = $this->backend_callback;
+ if ( is_array($func) ){
+ echo $this->_formatResponse($func[0]->$func[1]($this));
+ } else {
+ echo $this->_formatResponse($func($this));
+ }
+ }
+ flush();
+ if ($this->backend_loop) // do not sleep if the loop is finished
+ usleep($this->backend_loop_sleep);
+ } while($this->backend_loop);
- // trigger the onDisconnect callback
- echo '<script type="text/javascript">pfccomet._onDisconnect();</script>'."\n";
- echo '</body></html>';
- flush();
+ // trigger the onDisconnect callback
+ echo '<script type="text/javascript">'.$this->instance_name.'._onDisconnect();</script>'."\n";
+ echo '</body></html>';
+ flush();
- die();
+ die();
+ }
}
- }
- function formatResponse($data)
- {
- return '<script type="text/javascript">pfccomet._onResponse('.json_encode($data).');</script>'."\n";
- }
+ protected function _formatResponse($data)
+ {
+ return '<script type="text/javascript">'.$this->instance_name.'._onResponse('.json_encode($data).');</script>'."\n";
+ }
- function printJavascript($return = false)
- {
- $output = '<script type="text/javascript" src="'.$this->prototypejs_url.'"></script>'."\n";
- $output .= '<script type="text/javascript" src="'.$this->pfccometjs_url.'"></script>'."\n";
- $output .= '<script type="text/javascript">
+ public function printJavascript($return = false)
+ {
+ $output = '<script type="text/javascript" src="'.$this->prototypejs_url.'"></script>'."\n";
+ $output .= '<script type="text/javascript" src="'.$this->pfccometjs_url.'"></script>'."\n";
+ $output .= '<script type="text/javascript">
Event.observe(window, "load", function() {
- pfccomet = new pfcComet({"url":"'.$this->backend_url.'?'.$this->backend_url_flag.'"});'."\n";
- if ( $this->onresponse_callback )
- $output .= ' pfccomet.onResponse = '.$this->onresponse_callback.';'."\n";
- if ( $this->onconnect_callback )
- $output .= ' pfccomet.onConnect = '.$this->onconnect_callback.';'."\n";
- if ( $this->ondisconnect_callback )
- $output .= ' pfccomet.onDisconnect = '.$this->ondisconnect_callback.';'."\n";
- $output .= '
- pfccomet.connect();
+ '.$this->instance_name.' = new pfcComet({"url":"'.$this->backend_url.'?'.$this->backend_url_flag.'"});'."\n";
+ if ( $this->onresponse_callback )
+ $output .= ' '.$this->instance_name.'.onResponse = '.$this->onresponse_callback.';'."\n";
+ if ( $this->onconnect_callback )
+ $output .= ' '.$this->instance_name.'.onConnect = '.$this->onconnect_callback.';'."\n";
+ if ( $this->ondisconnect_callback )
+ $output .= ' '.$this->instance_name.'.onDisconnect = '.$this->ondisconnect_callback.';'."\n";
+ $output .= '
+ '.$this->instance_name.'.connect();
});
</script>'."\n";
- if ($return)
- return $output;
- else
- echo $output;
- }
+ if ($return)
+ return $output;
+ else
+ echo $output;
+ }
}
Modified: branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php 2008-03-27 16:03:04 UTC (rev 1236)
+++ branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php 2008-03-27 17:11:51 UTC (rev 1237)
@@ -8,14 +8,16 @@
}
require_once 'pfccomet.class.php';
-$pfccomet = new pfcComet();
-$pfccomet->pfccometjs_url = './pfccomet.js';
-$pfccomet->prototypejs_url = '../../../data/public/js/prototype.js';
-$pfccomet->backend_loop = true;
-$pfccomet->backend_loop_sleep = 500000; // 100000 microsec = 100 milisec
-$pfccomet->backend_url = './'.basename(__FILE__);
-$pfccomet->backend_callback = 'macallback';
-$pfccomet->onresponse_callback = 'update_servertime_area';
+$params = array();
+$params['pfccometjs_url'] = './pfccomet.js';
+$params['prototypejs_url'] = '../../../data/public/js/prototype.js';
+$params['instance_name'] = 'mypfccomet';
+$params['backend_loop'] = true;
+$params['backend_loop_sleep'] = 500000; // 100000 microsec = 100 milisec
+$params['backend_url'] = './'.basename(__FILE__);
+$params['backend_callback'] = 'macallback';
+$params['onresponse_callback'] = 'update_servertime_area';
+$pfccomet = new pfcComet($params);
$pfccomet->run();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -38,8 +40,8 @@
<body>
<div id="date">here will be displayed the server time</div>
- <input type="button" value="Disconnect" onclick="pfccomet.disconnect()" />
- <input type="button" value="Connect" onclick="pfccomet.connect()" />
+ <input type="button" value="Disconnect" onclick="<?php echo $params['instance_name']; ?>.disconnect()" />
+ <input type="button" value="Connect" onclick="<?php echo $params['instance_name']; ?>.connect()" />
</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...> - 2008-03-27 16:03:02
|
Revision: 1236
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1236&view=rev
Author: kerphi
Date: 2008-03-27 09:03:04 -0700 (Thu, 27 Mar 2008)
Log Message:
-----------
do not show the warning message when isadmin parameter is removed
Modified Paths:
--------------
trunk/index.php
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2008-03-27 09:33:51 UTC (rev 1235)
+++ trunk/index.php 2008-03-27 16:03:04 UTC (rev 1236)
@@ -107,7 +107,9 @@
<div class="content">
<?php $chat->printChat(); ?>
- <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
+ <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
+ <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
+ <?php } ?>
</div>
</body></html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-27 09:33:46
|
Revision: 1235
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1235&view=rev
Author: kerphi
Date: 2008-03-27 02:33:51 -0700 (Thu, 27 Mar 2008)
Log Message:
-----------
improve the pfcComet package
Modified Paths:
--------------
branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php
branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php
branches/pfc-comet/misc/comet-tests/iframe2/tester.php
Added Paths:
-----------
branches/pfc-comet/misc/comet-tests/iframe2/tester-loop2.php
Modified: branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php 2008-03-23 20:58:07 UTC (rev 1234)
+++ branches/pfc-comet/misc/comet-tests/iframe2/pfccomet.class.php 2008-03-27 09:33:51 UTC (rev 1235)
@@ -4,10 +4,10 @@
var $pfccometjs_url = './pfccomet.js';
var $prototypejs_url = './prototype.js';
var $backend_url = '';
- var $backend_param = 'backend';
+ var $backend_url_flag = 'backend';
var $backend_callback = null;
var $backend_loop = false;
- var $backend_loop_sleep = 1;
+ var $backend_loop_sleep = 1000000; // microseconds
var $onresponse_callback = null;
var $onconnect_callback = null;
var $ondisconnect_callback = null;
@@ -20,7 +20,7 @@
function run()
{
- if (isset($_REQUEST[$this->backend_param]))
+ if (isset($_REQUEST[$this->backend_url_flag]))
{
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@@ -59,13 +59,14 @@
{
$func = $this->backend_callback;
if ( is_array($func) ){
- echo $func[0]->$func[1]($this);
+ echo $this->formatResponse($func[0]->$func[1]($this));
} else {
- echo $func($this);
+ echo $this->formatResponse($func($this));
}
}
flush();
- sleep($this->backend_loop_sleep);
+ if ($this->backend_loop) // do not sleep if the loop is finished
+ usleep($this->backend_loop_sleep);
} while($this->backend_loop);
// trigger the onDisconnect callback
@@ -79,7 +80,7 @@
function formatResponse($data)
{
- return '<script type="text/javascript">pfccomet._onResponse(\''.addslashes($data).'\');</script>'."\n";
+ return '<script type="text/javascript">pfccomet._onResponse('.json_encode($data).');</script>'."\n";
}
function printJavascript($return = false)
@@ -88,7 +89,7 @@
$output .= '<script type="text/javascript" src="'.$this->pfccometjs_url.'"></script>'."\n";
$output .= '<script type="text/javascript">
Event.observe(window, "load", function() {
- pfccomet = new pfcComet({"url":"'.$this->backend_url.'?'.$this->backend_param.'"});'."\n";
+ pfccomet = new pfcComet({"url":"'.$this->backend_url.'?'.$this->backend_url_flag.'"});'."\n";
if ( $this->onresponse_callback )
$output .= ' pfccomet.onResponse = '.$this->onresponse_callback.';'."\n";
if ( $this->onconnect_callback )
Modified: branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php 2008-03-23 20:58:07 UTC (rev 1234)
+++ branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php 2008-03-27 09:33:51 UTC (rev 1235)
@@ -4,15 +4,16 @@
static $id;
if (!isset($id)) $id = md5(uniqid(rand(), true));
file_put_contents('/tmp/cometdebug',"id=".$id." ".time()."\n",FILE_APPEND|LOCK_EX);
- return $pfccomet->formatResponse(time());
+ return time();
}
require_once 'pfccomet.class.php';
$pfccomet = new pfcComet();
-$pfccomet->pfccometjs_url = './pfccomet.js';
-$pfccomet->prototypejs_url = '../../../data/public/js/prototype.js';
-$pfccomet->backend_loop = true;
-$pfccomet->backend_url = './tester-loop.php';
+$pfccomet->pfccometjs_url = './pfccomet.js';
+$pfccomet->prototypejs_url = '../../../data/public/js/prototype.js';
+$pfccomet->backend_loop = true;
+$pfccomet->backend_loop_sleep = 500000; // 100000 microsec = 100 milisec
+$pfccomet->backend_url = './'.basename(__FILE__);
$pfccomet->backend_callback = 'macallback';
$pfccomet->onresponse_callback = 'update_servertime_area';
$pfccomet->run();
Added: branches/pfc-comet/misc/comet-tests/iframe2/tester-loop2.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/tester-loop2.php (rev 0)
+++ branches/pfc-comet/misc/comet-tests/iframe2/tester-loop2.php 2008-03-27 09:33:51 UTC (rev 1235)
@@ -0,0 +1,48 @@
+<?php
+
+function macallback($pfccomet) {
+ return array(time(),'blabla');
+}
+
+require_once 'pfccomet.class.php';
+$pfccomet = new pfcComet();
+$pfccomet->backend_loop = true;
+$pfccomet->backend_loop_sleep = 500000; // 100000 microsec = 100 milisec
+$pfccomet->backend_url = './'.basename(__FILE__);
+$pfccomet->backend_callback = 'macallback';
+$pfccomet->onresponse_callback = 'update_servertime_area';
+
+$pfccomet->run();
+
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>pfcComet tester</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+
+ <script type="text/javascript" src="../../../data/public/js/prototype.js"></script>
+ <script type="text/javascript" src="./pfccomet.js"></script>
+
+<script type="text/javascript">
+
+Event.observe(window, "load", function() {
+ pfccomet = new pfcComet({"url":"./<?php echo $pfccomet->backend_url; ?>?<?php echo $pfccomet->backend_url_flag; ?>"});
+ pfccomet.onResponse = function(comet,data) {
+ document.getElementById('date').innerHTML = data;
+ };
+ pfccomet.connect();
+});
+
+</script>
+
+
+ </head>
+ <body>
+
+ <div id="date">here will be displayed the server time</div>
+ <input type="button" value="Disconnect" onclick="pfccomet.disconnect()" />
+ <input type="button" value="Connect" onclick="pfccomet.connect()" />
+
+ </body>
+</html>
\ No newline at end of file
Modified: branches/pfc-comet/misc/comet-tests/iframe2/tester.php
===================================================================
--- branches/pfc-comet/misc/comet-tests/iframe2/tester.php 2008-03-23 20:58:07 UTC (rev 1234)
+++ branches/pfc-comet/misc/comet-tests/iframe2/tester.php 2008-03-27 09:33:51 UTC (rev 1235)
@@ -1,14 +1,14 @@
<?php
function macallback($pfccomet) {
- return $pfccomet->formatResponse(time());
+ return time();
}
require_once 'pfccomet.class.php';
$pfccomet = new pfcComet();
$pfccomet->pfccometjs_url = './pfccomet.js';
$pfccomet->prototypejs_url = '../../../data/public/js/prototype.js';
-$pfccomet->backend_url = './tester.php';
+$pfccomet->backend_url = './'.basename(__FILE__);
$pfccomet->backend_callback = 'macallback';
$pfccomet->onresponse_callback = 'update_servertime_area';
$pfccomet->run();
@@ -28,7 +28,6 @@
<?php $pfccomet->printJavascript(); ?>
-
</head>
<body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:58:03
|
Revision: 1234
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1234&view=rev
Author: kerphi
Date: 2008-03-23 13:58:07 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
update index links
Modified Paths:
--------------
trunk/index.php
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2008-03-23 20:49:52 UTC (rev 1233)
+++ trunk/index.php 2008-03-23 20:58:07 UTC (rev 1234)
@@ -52,47 +52,44 @@
<li>
<ul>
<li class="item">
- <a href="http://www.phpfreechat.net/overview.en.html">Overview [en]</a>
+ <a href="http://www.phpfreechat.net/overview">Overview [en]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/overview.fr.html">Overview [fr]</a>
+ <a href="http://www.phpfreechat.net/fr/overview">Overview [fr]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/overview.es.html">Overview [es]</a>
+ <a href="http://www.phpfreechat.net/es/overview">Overview [es]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/overview.ar.html">Overview [zh]</a>
+ <a href="http://www.phpfreechat.net/zh/overview">Overview [zh]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/overview.ar.html">Overview [ar]</a>
+ <a href="http://www.phpfreechat.net/ar/overview">Overview [ar]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/install.en.html">Install [en]</a>
+ <a href="http://www.phpfreechat.net/quickstart">Quickstart [en]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/install.fr.html">Install [fr]</a>
+ <a href="http://www.phpfreechat.net/fr/quickstart">En avant ! [fr]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/parameters-list.en.html">Parameters list [en]</a>
+ <a href="http://www.phpfreechat.net/parameters">Parameters list [en]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/faq.en.html">FAQ [en]</a>
+ <a href="http://www.phpfreechat.net/faq">FAQ [en]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/faq.fr.html">FAQ [fr]</a>
+ <a href="http://www.phpfreechat.net/fr/faq">FAQ [fr]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/customize.en.html">Customize [en]</a>
+ <a href="http://www.phpfreechat.net/advanced-configuration">Advanced configuration [en]</a>
</li>
<li class="item">
- <a href="http://www.phpfreechat.net/customize.fr.html">Customize [fr]</a>
- </li>
+ <a href="http://www.phpfreechat.net/fr/advanced-configuration">Configuration avancée [fr]</a>
+ </li>
<li class="item">
- <a href="http://www.phpfreechat.net/changelog.en.html">ChangeLog [en]</a>
+ <a href="http://www.phpfreechat.net/customize">Customize [en]</a>
</li>
- <li class="item">
- <a href="http://www.phpfreechat.net/changelog.fr.html">ChangeLog [fr]</a>
- </li>
</ul>
</li>
</ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:49:48
|
Revision: 1233
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1233&view=rev
Author: kerphi
Date: 2008-03-23 13:49:52 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
remove unused dependencies
Modified Paths:
--------------
trunk/testcase/container_generic.php
Removed Paths:
-------------
trunk/demo/demo35_shared_memory.php
trunk/lib/pear/System/
Deleted: trunk/demo/demo35_shared_memory.php
===================================================================
--- trunk/demo/demo35_shared_memory.php 2008-03-23 20:28:58 UTC (rev 1232)
+++ trunk/demo/demo35_shared_memory.php 2008-03-23 20:49:52 UTC (rev 1233)
@@ -1,74 +0,0 @@
-<?php
-
-require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
-$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
-$params["container_type"] = "Memory";
-$params["container_cfg_sm_type"] = "auto"; // autodetect the best possible storage method
-/**
-Other (tested) storage types:
-Eaccelerator
-File // Plain text
-Shmop
-
-Not tested but available:
-Systemv // System V
-Mmcache // Turck MMCache
-Memcache // Memcached
-Apc // APC
-Apachenote // Apache note
-Sqlite // does not work at the moment
-Sharedance // Sharedance
-*/
-
-/*
-// Use these parameters to force using the file storage
-$params["container_cfg_sm_type"] = "File";
-$params["container_cfg_sm_options"] = array("tmp"=>"/tmp");
-*/
-
-/*
-// works not yet! (PEAR class error)
-// you have to create the needed tables before using them
-$params["container_cfg_sm_type"] = "Sqlite";
-$params["container_cfg_sm_options"] = array(
- 'db' => ':memory:',
- 'table' => 'sharedmemory',
- 'var' => 'key',
- 'value' => 'data',
- 'persistent' => false
-);
-*/
-
-/**
-For other parameters/options look into the documentation of the pear class System/SharedMemory.
-*/
-
-$chat = new phpFreeChat($params);
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>phpFreeChat demo</title>
- <?php $chat->printJavascript(); ?>
- <?php $chat->printStyle(); ?>
- </head>
-
- <body>
- <?php $chat->printChat(); ?>
-
-<?php
- // print the current file
- echo "<h2>The source code</h2>";
- $filename = __FILE__;
- echo "<p><code>".$filename."</code></p>";
- echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
- $content = file_get_contents($filename);
- highlight_string($content);
- echo "</pre>";
-?>
- </body>
-
-</html>
\ No newline at end of file
Modified: trunk/testcase/container_generic.php
===================================================================
--- trunk/testcase/container_generic.php 2008-03-23 20:28:58 UTC (rev 1232)
+++ trunk/testcase/container_generic.php 2008-03-23 20:49:52 UTC (rev 1233)
@@ -1,7 +1,7 @@
<?php
$delim = DIRECTORY_SEPARATOR == "\\" ? ";" : ":";
-$classpath = "." . $delim . dirname(__FILE__).'/../lib/pear/';
+$classpath = "." . $delim . dirname(__FILE__).'/../lib/pear/' . $delim . ini_get('include_path');
ini_set('include_path', $classpath);
require_once "PHPUnit.php";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:28:53
|
Revision: 1232
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1232&view=rev
Author: kerphi
Date: 2008-03-23 13:28:58 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Rename occitan (oc) locale to oc_FR
Modified Paths:
--------------
trunk/demo/demo66_in_occitan.php
trunk/src/pfci18n.class.php
Added Paths:
-----------
trunk/i18n/oc_FR/
Removed Paths:
-------------
trunk/i18n/oc/
Modified: trunk/demo/demo66_in_occitan.php
===================================================================
--- trunk/demo/demo66_in_occitan.php 2008-03-23 20:22:43 UTC (rev 1231)
+++ trunk/demo/demo66_in_occitan.php 2008-03-23 20:28:58 UTC (rev 1232)
@@ -3,7 +3,7 @@
require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
-$params["language"] = "oc";
+$params["language"] = "oc_FR";
$chat = new phpFreeChat( $params );
?>
Copied: trunk/i18n/oc_FR (from rev 1226, trunk/i18n/oc)
Modified: trunk/src/pfci18n.class.php
===================================================================
--- trunk/src/pfci18n.class.php 2008-03-23 20:22:43 UTC (rev 1231)
+++ trunk/src/pfci18n.class.php 2008-03-23 20:28:58 UTC (rev 1232)
@@ -103,7 +103,7 @@
*/
function GetAcceptedLanguage($type="main")
{
- return /*<GetAcceptedLanguage>*/array('nl_NL','ko_KR','nl_BE','tr_TR','pt_PT','en_US','eo','hr_HR','vi_VN','es_ES','zh_TW','nn_NO','ru_RU','id_ID','hu_HU','th_TH','hy_AM','oc','da_DK','de_DE-formal','uk_RO','nb_NO','fr_FR','it_IT','sv_SE','uk_UA','sr_CS','ar_LB','bg_BG','pt_BR','ba_BA','bn_BD','el_GR','zh_CN','gl_ES','pl_PL','de_DE-informal','ja_JP');/*</GetAcceptedLanguage>*/
+ return /*<GetAcceptedLanguage>*/array('nl_NL','ko_KR','nl_BE','tr_TR','pt_PT','en_US','eo','hr_HR','vi_VN','es_ES','zh_TW','nn_NO','ru_RU','id_ID','hu_HU','th_TH','hy_AM','oc_FR','da_DK','de_DE-formal','uk_RO','nb_NO','fr_FR','it_IT','sv_SE','uk_UA','sr_CS','ar_LB','bg_BG','pt_BR','ba_BA','bn_BD','el_GR','zh_CN','gl_ES','pl_PL','de_DE-informal','ja_JP');/*</GetAcceptedLanguage>*/
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:22:37
|
Revision: 1231
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1231&view=rev
Author: kerphi
Date: 2008-03-23 13:22:43 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Upgrade German (de_DE-formal) translation (thanks to Matthias C. Hormann)
Modified Paths:
--------------
trunk/i18n/de_DE-formal/main.php
Modified: trunk/i18n/de_DE-formal/main.php
===================================================================
--- trunk/i18n/de_DE-formal/main.php 2008-03-23 20:18:34 UTC (rev 1230)
+++ trunk/i18n/de_DE-formal/main.php 2008-03-23 20:22:43 UTC (rev 1231)
@@ -25,6 +25,7 @@
*
* @author BSEMF <bsemfger <at> aim.com>
* @author Thomas Stueven (ak Troubadix) <thomas.stueven <at> online.de>
+ * @author Matthias C. Hormann (aka Moonbase) <moonbase <at> quantentunnel.de>
*/
// line 45 in phpfreechatconfig.class.php
@@ -34,7 +35,7 @@
$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s wurde nicht gefunden, %s Programmbibliothek konnte nicht gefunden werden.";
// line 355 in phpfreechat.class.php
-$GLOBALS["i18n"]["Please enter your nickname"] = "Bitte geben Sie Ihren Spitznamen ein";
+$GLOBALS["i18n"]["Please enter your nickname"] = "Bitte geben Sie Ihren Benutzernamen ein";
// line 565 in phpfreechat.class.php
$GLOBALS["i18n"]["Text cannot be empty"] = "Text darf nicht leer sein";
@@ -91,10 +92,10 @@
$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"] = "Verstecke Nickname Farben";
+$GLOBALS["i18n"]["Hide nickname marker"] = "Benutzernamen nicht einfärben";
// line 304 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Show nickname marker"] = "Zeige Nickname Farben";
+$GLOBALS["i18n"]["Show nickname marker"] = "Benutzernamen einfärben";
// line 389 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Disconnect"] = "Verbindung beenden";
@@ -109,29 +110,32 @@
$GLOBALS["i18n"]["Cut down"] = "Verkleinern";
// line 345 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Hide dates and hours"] = "Verstecke Datum und Zeit";
+$GLOBALS["i18n"]["Hide dates and hours"] = "Datum/Uhrzeit ausblenden";
// line 353 in javascript1.js.tpl.php
-$GLOBALS["i18n"]["Show dates and hours"] = "Zeige Datum und Zeit";
+$GLOBALS["i18n"]["Show dates and hours"] = "Datum/Uhrzeit einblenden";
// line 21 in chat.html.tpl.php
$GLOBALS["i18n"]["Enter your message here"] = "Geben Sie Ihre Nachricht hier ein";
// line 24 in chat.html.tpl.php
-$GLOBALS["i18n"]["Enter your nickname here"] = "Bitte geben Sie Ihren Spitznamen hier ein";
+$GLOBALS["i18n"]["Enter your nickname here"] = "Bitte geben Sie Ihren Benutzernamen hier ein";
// line 93 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Fehler: Undefinierter oder falscher Parameter '%s', bitte korrigieren oder löschen Sie diesen Parameter";
-// line 48 in phpfreechattemplate.class.php
-$GLOBALS["i18n"]["%s template could not be found"] = "%s Template wurde nicht gefunden";
+// line 86 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Hide smiley box"] = "Emoticons ausblenden";
-// line 324 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'serverid' parameter is mandatory by default use 'md5(__FILE__)' value"] = "'serverid' Parameter is zwingend notwendig, nutzen sie standartmäßig den Wert 'md5(__FILE__)'";
+// line 87 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Show smiley box"] = "Emoticons einblenden";
-// 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' konnte nicht gefunden werden, bitte überprüfen Sie Ihren Themenpfad '%s' und Ihr Thema '%s'";
+// line 88 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Hide online users box"] = "Namensliste ausblenden";
+// line 89 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Show online users box"] = "Namensliste einblenden";
+
// line 33 in chat.html.tpl.php
$GLOBALS["i18n"]["Bold"] = "Fett";
@@ -139,32 +143,26 @@
$GLOBALS["i18n"]["Italics"] = "Kursiv";
// line 35 in chat.html.tpl.php
-$GLOBALS["i18n"]["Underline"] = "unterstrichen";
+$GLOBALS["i18n"]["Underline"] = "Unterstrichen";
// line 36 in chat.html.tpl.php
-$GLOBALS["i18n"]["Delete"] = "Löschen";
+$GLOBALS["i18n"]["Delete"] = "Durchgestrichen";
// line 37 in chat.html.tpl.php
$GLOBALS["i18n"]["Pre"] = "Pre";
// line 38 in chat.html.tpl.php
-$GLOBALS["i18n"]["Mail"] = "eMail";
+$GLOBALS["i18n"]["Mail"] = "Email";
// line 39 in chat.html.tpl.php
$GLOBALS["i18n"]["Color"] = "Farbe";
-// line 86 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Hide smiley box"] = "Smilie Box verstecken";
+// line 48 in phpfreechattemplate.class.php
+$GLOBALS["i18n"]["%s template could not be found"] = "%s Template nicht gefunden";
-// line 87 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Show smiley box"] = "Smilie Box zeigen";
+// 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"] = "Fehler: '%s' nicht gefunden, bitte prüfen Sie, ob Ihr Themen-Pfad '%s' und Ihr Thema '%s' korrekt sind";
-// line 88 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Hide online users box"] = "Online Nutzer Box verstecken";
-
-// line 89 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Show online users box"] = "Online Nutzer Box zeigen";
-
// line 75 in pfccommand.class.php
$GLOBALS["i18n"]["%s must be implemented"] = "%s muss implementiert werden";
@@ -178,9 +176,18 @@
// line 386 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "Der Parameter '%s' ist ungültig. Mögliche Werte sind '%s'";
-// line 186 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["My room"] = "Mein Chat";
+// line 185 in pfcglobalconfig.class.php
+$GLOBALS["i18n"]["My room"] = "My room";
+// line 109 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Private message"] = "Private Nachricht";
+
+// line 110 in pfcclient.js.tpl.php
+$GLOBALS["i18n"]["Close this tab"] = "Diesen Tab schliessen";
+
+// line 225 in pfcgui.js.tpl.php
+$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Möchten Sie wirklich diesen Raum verlassen?";
+
// line 19 in unban.class.php
$GLOBALS["i18n"]["Missing parameter"] = "Fehlende Parameter";
@@ -223,27 +230,18 @@
// line 47 in auth.class.php
$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Sie haben keine Berechtigung zur Ausführung von '%s'";
-// line 66 in auth.class.php
-$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Sie können an %s nicht teilnehmen, weil sie auf der Bannliste stehen";
+// line 67 in auth.class.php
+$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Sie können den Raum %s nicht betreten, da Sie verbannt wurden";
+// line 79 in auth.class.php
+$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Sie haben keine Berechtigung, Ihren Benutzernamen zu ändern";
+
// line 76 in auth.class.php
$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Sie können an %s nicht teilnehmen, weil der Zugang begrenzt wurde";
-// line 89 in auth.class.php
-$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Sie dürfen Ihren Nicknamen nicht ändern";
-
// line 56 in noflood.class.php
-$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Bitte überfluten sie den Chatraum nicht mit so vielen Postings";
+$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Bitte überfluten sie den Chatraum nicht mit so vielen Postings";
-// line 109 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Private message"] = "Private Nachricht";
-
-// line 110 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Close this tab"] = "Schließe diesen Reiter";
-
-// line 199 in pfcgui.js.tpl.php
-$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Möchten sie wirklich den Raum verlassen?";
-
// line 169 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Fehler: '%s' ist ein geschützter Parameter, sie dürfen ihn nicht ändern";
@@ -296,7 +294,7 @@
$GLOBALS["i18n"]["A problem occurs during rehash"] = "Ein Problem ist beim Laden der Konfiguration aufgetreten";
// line 83 in chat.js.tpl.php
-$GLOBALS["i18n"]["Chosen nickname is already used"] = "Der gewählte Nickname ist schon vergeben";
+$GLOBALS["i18n"]["Chosen nickname is already used"] = "Der gewählte Benutzername ist schon vergeben";
// line 84 in chat.js.tpl.php
$GLOBALS["i18n"]["phpfreechat current version is %s"] = "Die installierte Version von phpfreechat ist %s";
@@ -323,7 +321,7 @@
$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Sie können nicht mit sich selber sprechen";
// line 82 in chat.js.tpl.php
-$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "Der gewählte Nickname ist nicht zulässig";
+$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "Der gewählte Benutzername ist nicht zulässig";
// line 83 in chat.js.tpl.php
$GLOBALS["i18n"]["Enable sound notifications"] = "Akustische Signale einschalten";
@@ -332,77 +330,76 @@
$GLOBALS["i18n"]["Disable sound notifications"] = "Akustische Signale ausschalten";
// line 23 in kick.class.php
-$GLOBALS["i18n"]["no reason"] = "kein grund";
+$GLOBALS["i18n"]["no reason"] = "keine Angabe";
// line 24 in banlist.class.php
$GLOBALS["i18n"]["The banished user list is:"] = "Die verbannten Benutzer sind:";
// line 39 in banlist.class.php
-$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nickname}' hebt die Bannung für den Benutzer {nickname} auf";
+$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {name}' hebt die Bannung für den Benutzer {name} auf";
// line 43 in kick.class.php
-$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "rausgeworfen aus %s durch %s - Grund: %s";
+$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "wurde aus dem Raum %s geworfen von %s. Grund: %s";
-
// line 20 in quit.class.php
-$GLOBALS["i18n"]["%s quit (%s)"] = "";
+$GLOBALS["i18n"]["%s quit (%s)"] = "%s hat den Chat verlassen (%s)";
// line 124 in chat.js.tpl.php
-$GLOBALS["i18n"]["Chat loading ..."] = "";
+$GLOBALS["i18n"]["Chat loading ..."] = "Chat wird geladen ...";
// line 124 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please wait"] = "";
+$GLOBALS["i18n"]["Please wait"] = "Bitte warten";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "";
+$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s scheint in Ihrem Browser abgeschaltet zu sein oder wird nicht unterstützt.";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["This web application requires %s to work properly."] = "";
+$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Diese Anwendung erfordert %s für eine korrekte Funktion.";
// line 135 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "";
+$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Bitte aktivieren Sie %s in Ihrem Browser oder wechseln zu einem Browser, der %s unterstützt.";
// line 137 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "";
+$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Bitte wechseln Sie zu einem Browser mit %s-Unterstützung und versuchen es erneut.";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "";
+$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "In Internet Explorer-Versionen kleiner 7.0 wird AJAX über ActiveX implementiert. Bitte ActiveX/Active Scripting im Browser einschalten oder zu einem AJAX-tauglichen Browser upgraden.";
// line 359 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "";
+$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s exisitiert nicht, data_public_path kann nicht installiert werden";
// line 73 in invite.class.php
-$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "";
+$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "You must join %s to invite users in this channel";
// line 47 in chat.html.tpl.php
-$GLOBALS["i18n"]["Ping"] = "";
+$GLOBALS["i18n"]["Ping"] = "Ping";
// line 477 in phpfreechat.class.php
-$GLOBALS["i18n"]["Input Required"] = "";
+$GLOBALS["i18n"]["Input Required"] = "Eingabe erforderlich";
// line 478 in phpfreechat.class.php
-$GLOBALS["i18n"]["OK"] = "";
+$GLOBALS["i18n"]["OK"] = "Ok";
// line 479 in phpfreechat.class.php
-$GLOBALS["i18n"]["Cancel"] = "";
+$GLOBALS["i18n"]["Cancel"] = "Abbruch";
// line 430 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["cannot create %s"] = "";
+$GLOBALS["i18n"]["cannot create %s"] = "kann %s nicht anlegen";
// line 436 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["cannot copy %s in %s"] = "";
+$GLOBALS["i18n"]["cannot copy %s in %s"] = "kann %s nicht nach %s kopieren";
// line 667 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "";
// line 414 in phpfreechat.class.php
-$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "";
+$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "Sind Sie sicher, dass Sie diesen Tab schliessen möchten?";
// line 42 in ban.class.php
-$GLOBALS["i18n"]["%s banished from %s by %s"] = "";
+$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s wurde aus dem Raum %s verbannt von %s";
// line 461 in phpfreechat.class.php
-$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "";
+$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "Sie versuchen, einen unbekannten (oder nicht verbundenen) Benutzer anzusprechen";
// line 89 in invite.class.php
$GLOBALS["i18n"]["%s was invited by %s"] = "%s wurde von %s eingeladen";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:18:29
|
Revision: 1230
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1230&view=rev
Author: kerphi
Date: 2008-03-23 13:18:34 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Upgrade to prototype 1.6.0.2
Modified Paths:
--------------
trunk/data/public/js/prototype.js
Modified: trunk/data/public/js/prototype.js
===================================================================
--- trunk/data/public/js/prototype.js 2008-03-23 20:15:45 UTC (rev 1229)
+++ trunk/data/public/js/prototype.js 2008-03-23 20:18:34 UTC (rev 1230)
@@ -1,5 +1,5 @@
-/* Prototype JavaScript framework, version 1.6.0
- * (c) 2005-2007 Sam Stephenson
+/* Prototype JavaScript framework, version 1.6.0.2
+ * (c) 2005-2008 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
@@ -7,7 +7,7 @@
*--------------------------------------------------------------------------*/
var Prototype = {
- Version: '1.6.0',
+ Version: '1.6.0.2',
Browser: {
IE: !!(window.attachEvent && !window.opera),
@@ -36,8 +36,6 @@
if (Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions = false;
-if (Prototype.Browser.WebKit)
- Prototype.BrowserFeatures.XPath = false;
/* Based on Alex Arnell's inheritance implementation. */
var Class = {
@@ -110,9 +108,9 @@
Object.extend(Object, {
inspect: function(object) {
try {
- if (object === undefined) return 'undefined';
+ if (Object.isUndefined(object)) return 'undefined';
if (object === null) return 'null';
- return object.inspect ? object.inspect() : object.toString();
+ return object.inspect ? object.inspect() : String(object);
} catch (e) {
if (e instanceof RangeError) return '...';
throw e;
@@ -135,7 +133,7 @@
var results = [];
for (var property in object) {
var value = Object.toJSON(object[property]);
- if (value !== undefined)
+ if (!Object.isUndefined(value))
results.push(property.toJSON() + ': ' + value);
}
@@ -173,7 +171,8 @@
},
isArray: function(object) {
- return object && object.constructor === Array;
+ return object != null && typeof object == "object" &&
+ 'splice' in object && 'join' in object;
},
isHash: function(object) {
@@ -204,7 +203,7 @@
},
bind: function() {
- if (arguments.length < 2 && arguments[0] === undefined) return this;
+ if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
@@ -351,7 +350,7 @@
sub: function(pattern, replacement, count) {
replacement = this.gsub.prepareReplacement(replacement);
- count = count === undefined ? 1 : count;
+ count = Object.isUndefined(count) ? 1 : count;
return this.gsub(pattern, function(match) {
if (--count < 0) return match[0];
@@ -366,7 +365,7 @@
truncate: function(length, truncation) {
length = length || 30;
- truncation = truncation === undefined ? '...' : truncation;
+ truncation = Object.isUndefined(truncation) ? '...' : truncation;
return this.length > length ?
this.slice(0, length - truncation.length) + truncation : String(this);
},
@@ -486,7 +485,9 @@
},
isJSON: function() {
- var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+ var str = this;
+ if (str.blank()) return false;
+ str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
},
@@ -565,7 +566,8 @@
if (before == '\\') return match[2];
var ctx = object, expr = match[3];
- var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr);
+ var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+ match = pattern.exec(expr);
if (match == null) return before;
while (match != null) {
@@ -577,7 +579,7 @@
}
return before + String.interpret(ctx);
- }.bind(this));
+ });
}
});
Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
@@ -686,7 +688,7 @@
},
inGroupsOf: function(number, fillWith) {
- fillWith = fillWith === undefined ? null : fillWith;
+ fillWith = Object.isUndefined(fillWith) ? null : fillWith;
return this.eachSlice(number, function(slice) {
while(slice.length < number) slice.push(fillWith);
return slice;
@@ -713,7 +715,7 @@
var result;
this.each(function(value, index) {
value = iterator(value, index);
- if (result == undefined || value >= result)
+ if (result == null || value >= result)
result = value;
});
return result;
@@ -724,7 +726,7 @@
var result;
this.each(function(value, index) {
value = iterator(value, index);
- if (result == undefined || value < result)
+ if (result == null || value < result)
result = value;
});
return result;
@@ -805,20 +807,20 @@
function $A(iterable) {
if (!iterable) return [];
if (iterable.toArray) return iterable.toArray();
- var length = iterable.length, results = new Array(length);
+ var length = iterable.length || 0, results = new Array(length);
while (length--) results[length] = iterable[length];
return results;
}
if (Prototype.Browser.WebKit) {
- function $A(iterable) {
+ $A = function(iterable) {
if (!iterable) return [];
if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
iterable.toArray) return iterable.toArray();
- var length = iterable.length, results = new Array(length);
+ var length = iterable.length || 0, results = new Array(length);
while (length--) results[length] = iterable[length];
return results;
- }
+ };
}
Array.from = $A;
@@ -904,7 +906,7 @@
var results = [];
this.each(function(object) {
var value = Object.toJSON(object);
- if (value !== undefined) results.push(value);
+ if (!Object.isUndefined(value)) results.push(value);
});
return '[' + results.join(', ') + ']';
}
@@ -984,34 +986,6 @@
};
var Hash = Class.create(Enumerable, (function() {
- if (function() {
- var i = 0, Test = function(value) { this.key = value };
- Test.prototype.key = 'foo';
- for (var property in new Test('bar')) i++;
- return i > 1;
- }()) {
- function each(iterator) {
- var cache = [];
- for (var key in this._object) {
- var value = this._object[key];
- if (cache.include(key)) continue;
- cache.push(key);
- var pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- }
- } else {
- function each(iterator) {
- for (var key in this._object) {
- var value = this._object[key], pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- }
- }
function toQueryPair(key, value) {
if (Object.isUndefined(value)) return key;
@@ -1023,7 +997,14 @@
this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
},
- _each: each,
+ _each: function(iterator) {
+ for (var key in this._object) {
+ var value = this._object[key], pair = [key, value];
+ pair.key = key;
+ pair.value = value;
+ iterator(pair);
+ }
+ },
set: function(key, value) {
return this._object[key] = value;
@@ -1187,8 +1168,11 @@
Object.extend(this.options, options || { });
this.options.method = this.options.method.toLowerCase();
+
if (Object.isString(this.options.parameters))
this.options.parameters = this.options.parameters.toQueryParams();
+ else if (Object.isHash(this.options.parameters))
+ this.options.parameters = this.options.parameters.toObject();
}
});
@@ -1315,7 +1299,7 @@
var contentType = response.getHeader('Content-type');
if (this.options.evalJS == 'force'
- || (this.options.evalJS && contentType
+ || (this.options.evalJS && this.isSameOrigin() && contentType
&& contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
this.evalResponse();
}
@@ -1333,9 +1317,18 @@
}
},
+ isSameOrigin: function() {
+ var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+ return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+ protocol: location.protocol,
+ domain: document.domain,
+ port: location.port ? ':' + location.port : ''
+ }));
+ },
+
getHeader: function(name) {
try {
- return this.transport.getResponseHeader(name);
+ return this.transport.getResponseHeader(name) || null;
} catch (e) { return null }
},
@@ -1371,7 +1364,7 @@
if(readyState == 4) {
var xml = transport.responseXML;
- this.responseXML = xml === undefined ? null : xml;
+ this.responseXML = Object.isUndefined(xml) ? null : xml;
this.responseJSON = this._getResponseJSON();
}
},
@@ -1408,7 +1401,8 @@
if (!json) return null;
json = decodeURIComponent(escape(json));
try {
- return json.evalJSON(this.request.options.sanitizeJSON);
+ return json.evalJSON(this.request.options.sanitizeJSON ||
+ !this.request.isSameOrigin());
} catch (e) {
this.request.dispatchException(e);
}
@@ -1417,10 +1411,12 @@
_getResponseJSON: function() {
var options = this.request.options;
if (!options.evalJSON || (options.evalJSON != 'force' &&
- !(this.getHeader('Content-type') || '').include('application/json')))
- return null;
+ !(this.getHeader('Content-type') || '').include('application/json')) ||
+ this.responseText.blank())
+ return null;
try {
- return this.transport.responseText.evalJSON(options.sanitizeJSON);
+ return this.responseText.evalJSON(options.sanitizeJSON ||
+ !this.request.isSameOrigin());
} catch (e) {
this.request.dispatchException(e);
}
@@ -1434,11 +1430,11 @@
failure: (container.failure || (container.success ? null : container))
};
- options = options || { };
+ options = Object.clone(options);
var onComplete = options.onComplete;
- options.onComplete = (function(response, param) {
+ options.onComplete = (function(response, json) {
this.updateContent(response.responseText);
- if (Object.isFunction(onComplete)) onComplete(response, param);
+ if (Object.isFunction(onComplete)) onComplete(response, json);
}).bind(this);
$super(url, options);
@@ -1460,10 +1456,6 @@
}
else receiver.update(responseText);
}
-
- if (this.success()) {
- if (this.onComplete) this.onComplete.bind(this).defer();
- }
}
});
@@ -1628,25 +1620,29 @@
Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
insertions = {bottom:insertions};
- var content, t, range;
+ var content, insert, tagName, childNodes;
- for (position in insertions) {
+ for (var position in insertions) {
content = insertions[position];
position = position.toLowerCase();
- t = Element._insertionTranslations[position];
+ insert = Element._insertionTranslations[position];
if (content && content.toElement) content = content.toElement();
if (Object.isElement(content)) {
- t.insert(element, content);
+ insert(element, content);
continue;
}
content = Object.toHTML(content);
- range = element.ownerDocument.createRange();
- t.initializeRange(element, range);
- t.insert(element, range.createContextualFragment(content.stripScripts()));
+ tagName = ((position == 'before' || position == 'after')
+ ? element.parentNode : element).tagName.toUpperCase();
+ childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+ if (position == 'top' || position == 'after') childNodes.reverse();
+ childNodes.each(insert.curry(element));
+
content.evalScripts.bind(content).defer();
}
@@ -1690,7 +1686,7 @@
},
descendants: function(element) {
- return $A($(element).getElementsByTagName('*')).each(Element.extend);
+ return $(element).select("*");
},
firstDescendant: function(element) {
@@ -1729,32 +1725,31 @@
element = $(element);
if (arguments.length == 1) return $(element.parentNode);
var ancestors = element.ancestors();
- return expression ? Selector.findElement(ancestors, expression, index) :
- ancestors[index || 0];
+ return Object.isNumber(expression) ? ancestors[expression] :
+ Selector.findElement(ancestors, expression, index);
},
down: function(element, expression, index) {
element = $(element);
if (arguments.length == 1) return element.firstDescendant();
- var descendants = element.descendants();
- return expression ? Selector.findElement(descendants, expression, index) :
- descendants[index || 0];
+ return Object.isNumber(expression) ? element.descendants()[expression] :
+ element.select(expression)[index || 0];
},
previous: function(element, expression, index) {
element = $(element);
if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
var previousSiblings = element.previousSiblings();
- return expression ? Selector.findElement(previousSiblings, expression, index) :
- previousSiblings[index || 0];
+ return Object.isNumber(expression) ? previousSiblings[expression] :
+ Selector.findElement(previousSiblings, expression, index);
},
next: function(element, expression, index) {
element = $(element);
if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
var nextSiblings = element.nextSiblings();
- return expression ? Selector.findElement(nextSiblings, expression, index) :
- nextSiblings[index || 0];
+ return Object.isNumber(expression) ? nextSiblings[expression] :
+ Selector.findElement(nextSiblings, expression, index);
},
select: function() {
@@ -1795,10 +1790,11 @@
var attributes = { }, t = Element._attributeTranslations.write;
if (typeof name == 'object') attributes = name;
- else attributes[name] = value === undefined ? true : value;
+ else attributes[name] = Object.isUndefined(value) ? true : value;
for (var attr in attributes) {
- var name = t.names[attr] || attr, value = attributes[attr];
+ name = t.names[attr] || attr;
+ value = attributes[attr];
if (t.values[attr]) name = t.values[attr](element, value);
if (value === false || value === null)
element.removeAttribute(name);
@@ -1867,6 +1863,7 @@
descendantOf: function(element, ancestor) {
element = $(element), ancestor = $(ancestor);
+ var originalAncestor = ancestor;
if (element.compareDocumentPosition)
return (element.compareDocumentPosition(ancestor) & 8) === 8;
@@ -1878,11 +1875,12 @@
do { ancestor = ancestor.parentNode; }
while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode);
}
- if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex);
+ if (nextAncestor && nextAncestor.sourceIndex)
+ return (e > a && e < nextAncestor.sourceIndex);
}
while (element = element.parentNode)
- if (element == ancestor) return true;
+ if (element == originalAncestor) return true;
return false;
},
@@ -1921,7 +1919,7 @@
if (property == 'opacity') element.setOpacity(styles[property]);
else
elementStyle[(property == 'float' || property == 'cssFloat') ?
- (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
+ (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
property] = styles[property];
return element;
@@ -2022,7 +2020,7 @@
if (element) {
if (element.tagName == 'BODY') break;
var p = Element.getStyle(element, 'position');
- if (p == 'relative' || p == 'absolute') break;
+ if (p !== 'static') break;
}
} while (element);
return Element._returnOffset(valueL, valueT);
@@ -2171,72 +2169,75 @@
}
};
+if (Prototype.Browser.Opera) {
+ Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+ function(proceed, element, style) {
+ switch (style) {
+ case 'left': case 'top': case 'right': case 'bottom':
+ if (proceed(element, 'position') === 'static') return null;
+ case 'height': case 'width':
+ // returns '0px' for hidden elements; we want it to return null
+ if (!Element.visible(element)) return null;
-if (!document.createRange || Prototype.Browser.Opera) {
- Element.Methods.insert = function(element, insertions) {
- element = $(element);
+ // returns the border-box dimensions rather than the content-box
+ // dimensions, so we subtract padding and borders from the value
+ var dim = parseInt(proceed(element, style), 10);
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
- insertions = { bottom: insertions };
+ if (dim !== element['offset' + style.capitalize()])
+ return dim + 'px';
- var t = Element._insertionTranslations, content, position, pos, tagName;
-
- for (position in insertions) {
- content = insertions[position];
- position = position.toLowerCase();
- pos = t[position];
-
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) {
- pos.insert(element, content);
- continue;
+ var properties;
+ if (style === 'height') {
+ properties = ['border-top-width', 'padding-top',
+ 'padding-bottom', 'border-bottom-width'];
+ }
+ else {
+ properties = ['border-left-width', 'padding-left',
+ 'padding-right', 'border-right-width'];
+ }
+ return properties.inject(dim, function(memo, property) {
+ var val = proceed(element, property);
+ return val === null ? memo : memo - parseInt(val, 10);
+ }) + 'px';
+ default: return proceed(element, style);
}
+ }
+ );
- content = Object.toHTML(content);
- tagName = ((position == 'before' || position == 'after')
- ? element.parentNode : element).tagName.toUpperCase();
-
- if (t.tags[tagName]) {
- var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
- if (position == 'top' || position == 'after') fragments.reverse();
- fragments.each(pos.insert.curry(element));
- }
- else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());
-
- content.evalScripts.bind(content).defer();
+ Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+ function(proceed, element, attribute) {
+ if (attribute === 'title') return element.title;
+ return proceed(element, attribute);
}
-
- return element;
- };
+ );
}
-if (Prototype.Browser.Opera) {
- Element.Methods._getStyle = Element.Methods.getStyle;
- Element.Methods.getStyle = function(element, style) {
- switch(style) {
- case 'left':
- case 'top':
- case 'right':
- case 'bottom':
- if (Element._getStyle(element, 'position') == 'static') return null;
- default: return Element._getStyle(element, style);
+else if (Prototype.Browser.IE) {
+ // IE doesn't report offsets correctly for static elements, so we change them
+ // to "relative" to get the values, then change them back.
+ Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+ function(proceed, element) {
+ element = $(element);
+ var position = element.getStyle('position');
+ if (position !== 'static') return proceed(element);
+ element.setStyle({ position: 'relative' });
+ var value = proceed(element);
+ element.setStyle({ position: position });
+ return value;
}
- };
- Element.Methods._readAttribute = Element.Methods.readAttribute;
- Element.Methods.readAttribute = function(element, attribute) {
- if (attribute == 'title') return element.title;
- return Element._readAttribute(element, attribute);
- };
-}
+ );
-else if (Prototype.Browser.IE) {
- $w('positionedOffset getOffsetParent viewportOffset').each(function(method) {
+ $w('positionedOffset viewportOffset').each(function(method) {
Element.Methods[method] = Element.Methods[method].wrap(
function(proceed, element) {
element = $(element);
var position = element.getStyle('position');
- if (position != 'static') return proceed(element);
+ if (position !== 'static') return proceed(element);
+ // Trigger hasLayout on the offset parent so that IE6 reports
+ // accurate offsetTop and offsetLeft values for position: fixed.
+ var offsetParent = element.getOffsetParent();
+ if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+ offsetParent.setStyle({ zoom: 1 });
element.setStyle({ position: 'relative' });
var value = proceed(element);
element.setStyle({ position: position });
@@ -2301,7 +2302,7 @@
return node ? node.value : "";
},
_getEv: function(element, attribute) {
- var attribute = element.getAttribute(attribute);
+ attribute = element.getAttribute(attribute);
return attribute ? attribute.toString().slice(23, -2) : null;
},
_flag: function(element, attribute) {
@@ -2318,7 +2319,10 @@
};
Element._attributeTranslations.write = {
- names: Object.clone(Element._attributeTranslations.read.names),
+ names: Object.extend({
+ cellpadding: 'cellPadding',
+ cellspacing: 'cellSpacing'
+ }, Element._attributeTranslations.read.names),
values: {
checked: function(element, value) {
element.checked = !!value;
@@ -2398,7 +2402,7 @@
};
// Safari returns margins on body which is incorrect if the child is absolutely
- // positioned. For performance reasons, redefine Position.cumulativeOffset for
+ // positioned. For performance reasons, redefine Element#cumulativeOffset for
// KHTML/WebKit only.
Element.Methods.cumulativeOffset = function(element) {
var valueT = 0, valueL = 0;
@@ -2438,7 +2442,7 @@
};
}
-if (document.createElement('div').outerHTML) {
+if ('outerHTML' in document.createElement('div')) {
Element.Methods.replace = function(element, content) {
element = $(element);
@@ -2476,45 +2480,25 @@
Element._getContentFromAnonymousElement = function(tagName, html) {
var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
- div.innerHTML = t[0] + html + t[1];
- t[2].times(function() { div = div.firstChild });
+ if (t) {
+ div.innerHTML = t[0] + html + t[1];
+ t[2].times(function() { div = div.firstChild });
+ } else div.innerHTML = html;
return $A(div.childNodes);
};
Element._insertionTranslations = {
- before: {
- adjacency: 'beforeBegin',
- insert: function(element, node) {
- element.parentNode.insertBefore(node, element);
- },
- initializeRange: function(element, range) {
- range.setStartBefore(element);
- }
+ before: function(element, node) {
+ element.parentNode.insertBefore(node, element);
},
- top: {
- adjacency: 'afterBegin',
- insert: function(element, node) {
- element.insertBefore(node, element.firstChild);
- },
- initializeRange: function(element, range) {
- range.selectNodeContents(element);
- range.collapse(true);
- }
+ top: function(element, node) {
+ element.insertBefore(node, element.firstChild);
},
- bottom: {
- adjacency: 'beforeEnd',
- insert: function(element, node) {
- element.appendChild(node);
- }
+ bottom: function(element, node) {
+ element.appendChild(node);
},
- after: {
- adjacency: 'afterEnd',
- insert: function(element, node) {
- element.parentNode.insertBefore(node, element.nextSibling);
- },
- initializeRange: function(element, range) {
- range.setStartAfter(element);
- }
+ after: function(element, node) {
+ element.parentNode.insertBefore(node, element.nextSibling);
},
tags: {
TABLE: ['<table>', '</table>', 1],
@@ -2526,7 +2510,6 @@
};
(function() {
- this.bottom.initializeRange = this.top.initializeRange;
Object.extend(this.tags, {
THEAD: this.tags.TBODY,
TFOOT: this.tags.TBODY,
@@ -2687,10 +2670,11 @@
document.viewport = {
getDimensions: function() {
var dimensions = { };
+ var B = Prototype.Browser;
$w('width height').each(function(d) {
var D = d.capitalize();
- dimensions[d] = self['inner' + D] ||
- (document.documentElement['client' + D] || document.body['client' + D]);
+ dimensions[d] = (B.WebKit && !document.evaluate) ? self['inner' + D] :
+ (B.Opera) ? document.body['client' + D] : document.documentElement['client' + D];
});
return dimensions;
},
@@ -2719,9 +2703,26 @@
this.compileMatcher();
},
+ shouldUseXPath: function() {
+ if (!Prototype.BrowserFeatures.XPath) return false;
+
+ var e = this.expression;
+
+ // Safari 3 chokes on :*-of-type and :empty
+ if (Prototype.Browser.WebKit &&
+ (e.include("-of-type") || e.include(":empty")))
+ return false;
+
+ // XPath can't do namespaced attributes, nor can it read
+ // the "checked" property from DOM nodes
+ if ((/(\[[\w-]*?:|:checked)/).test(this.expression))
+ return false;
+
+ return true;
+ },
+
compileMatcher: function() {
- // Selectors with namespaced attributes can't use the XPath version
- if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(this.expression))
+ if (this.shouldUseXPath())
return this.compileXPathMatcher();
var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
@@ -2844,8 +2845,12 @@
},
className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
id: "[@id='#{1}']",
- attrPresence: "[@#{1}]",
+ attrPresence: function(m) {
+ m[1] = m[1].toLowerCase();
+ return new Template("[@#{1}]").evaluate(m);
+ },
attr: function(m) {
+ m[1] = m[1].toLowerCase();
m[3] = m[5] || m[6];
return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
},
@@ -2874,7 +2879,7 @@
'enabled': "[not(@disabled)]",
'not': function(m) {
var e = m[6], p = Selector.patterns,
- x = Selector.xpath, le, m, v;
+ x = Selector.xpath, le, v;
var exclusion = [];
while (e && le != e && (/\S/).test(e)) {
@@ -2931,13 +2936,13 @@
},
criteria: {
- tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
- className: 'n = h.className(n, r, "#{1}", c); c = false;',
- id: 'n = h.id(n, r, "#{1}", c); c = false;',
- attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
+ tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
+ className: 'n = h.className(n, r, "#{1}", c); c = false;',
+ id: 'n = h.id(n, r, "#{1}", c); c = false;',
+ attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
attr: function(m) {
m[3] = (m[5] || m[6]);
- return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
+ return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
},
pseudo: function(m) {
if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
@@ -2961,7 +2966,8 @@
tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
id: /^#([\w\-\*]+)(\b|$)/,
className: /^\.([\w\-\*]+)(\b|$)/,
- pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,
+ pseudo:
+/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
attrPresence: /^\[([\w]+)\]/,
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
},
@@ -2986,7 +2992,7 @@
attr: function(element, matches) {
var nodeValue = Element.readAttribute(element, matches[1]);
- return Selector.operators[matches[2]](nodeValue, matches[3]);
+ return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
}
},
@@ -3001,14 +3007,15 @@
// marks an array of nodes for counting
mark: function(nodes) {
+ var _true = Prototype.emptyFunction;
for (var i = 0, node; node = nodes[i]; i++)
- node._counted = true;
+ node._countedByPrototype = _true;
return nodes;
},
unmark: function(nodes) {
for (var i = 0, node; node = nodes[i]; i++)
- node._counted = undefined;
+ node._countedByPrototype = undefined;
return nodes;
},
@@ -3016,15 +3023,15 @@
// "ofType" flag indicates whether we're indexing for nth-of-type
// rather than nth-child
index: function(parentNode, reverse, ofType) {
- parentNode._counted = true;
+ parentNode._countedByPrototype = Prototype.emptyFunction;
if (reverse) {
for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
var node = nodes[i];
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
}
} else {
for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
}
},
@@ -3033,8 +3040,8 @@
if (nodes.length == 0) return nodes;
var results = [], n;
for (var i = 0, l = nodes.length; i < l; i++)
- if (!(n = nodes[i])._counted) {
- n._counted = true;
+ if (!(n = nodes[i])._countedByPrototype) {
+ n._countedByPrototype = Prototype.emptyFunction;
results.push(Element.extend(n));
}
return Selector.handlers.unmark(results);
@@ -3051,7 +3058,7 @@
child: function(nodes) {
var h = Selector.handlers;
for (var i = 0, results = [], node; node = nodes[i]; i++) {
- for (var j = 0, children = [], child; child = node.childNodes[j]; j++)
+ for (var j = 0, child; child = node.childNodes[j]; j++)
if (child.nodeType == 1 && child.tagName != '!') results.push(child);
}
return results;
@@ -3086,7 +3093,7 @@
// TOKEN FUNCTIONS
tagName: function(nodes, root, tagName, combinator) {
- tagName = tagName.toUpperCase();
+ var uTagName = tagName.toUpperCase();
var results = [], h = Selector.handlers;
if (nodes) {
if (combinator) {
@@ -3099,7 +3106,7 @@
if (tagName == "*") return nodes;
}
for (var i = 0, node; node = nodes[i]; i++)
- if (node.tagName.toUpperCase() == tagName) results.push(node);
+ if (node.tagName.toUpperCase() === uTagName) results.push(node);
return results;
} else return root.getElementsByTagName(tagName);
},
@@ -3146,16 +3153,18 @@
return results;
},
- attrPresence: function(nodes, root, attr) {
+ attrPresence: function(nodes, root, attr, combinator) {
if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
var results = [];
for (var i = 0, node; node = nodes[i]; i++)
if (Element.hasAttribute(node, attr)) results.push(node);
return results;
},
- attr: function(nodes, root, attr, value, operator) {
+ attr: function(nodes, root, attr, value, operator, combinator) {
if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
var handler = Selector.operators[operator], results = [];
for (var i = 0, node; node = nodes[i]; i++) {
var nodeValue = Element.readAttribute(node, attr);
@@ -3234,7 +3243,7 @@
var h = Selector.handlers, results = [], indexed = [], m;
h.mark(nodes);
for (var i = 0, node; node = nodes[i]; i++) {
- if (!node.parentNode._counted) {
+ if (!node.parentNode._countedByPrototype) {
h.index(node.parentNode, reverse, ofType);
indexed.push(node.parentNode);
}
@@ -3272,7 +3281,7 @@
var exclusions = new Selector(selector).findElements(root);
h.mark(exclusions);
for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!node._counted) results.push(node);
+ if (!node._countedByPrototype) results.push(node);
h.unmark(exclusions);
return results;
},
@@ -3306,11 +3315,19 @@
'|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
},
+ split: function(expression) {
+ var expressions = [];
+ expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+ expressions.push(m[1].strip());
+ });
+ return expressions;
+ },
+
matchElements: function(elements, expression) {
- var matches = new Selector(expression).findElements(), h = Selector.handlers;
+ var matches = $$(expression), h = Selector.handlers;
h.mark(matches);
for (var i = 0, results = [], element; element = elements[i]; i++)
- if (element._counted) results.push(element);
+ if (element._countedByPrototype) results.push(element);
h.unmark(matches);
return results;
},
@@ -3323,10 +3340,7 @@
},
findChildElements: function(element, expressions) {
- var exprs = expressions.join(','), expressions = [];
- exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
- expressions.push(m[1].strip());
- });
+ expressions = Selector.split(expressions.join(','));
var results = [], h = Selector.handlers;
for (var i = 0, l = expressions.length, selector; i < l; i++) {
selector = new Selector(expressions[i].strip());
@@ -3336,6 +3350,25 @@
}
});
+if (Prototype.Browser.IE) {
+ Object.extend(Selector.handlers, {
+ // IE returns comment nodes on getElementsByTagName("*").
+ // Filter them out.
+ concat: function(a, b) {
+ for (var i = 0, node; node = b[i]; i++)
+ if (node.tagName !== "!") a.push(node);
+ return a;
+ },
+
+ // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
+ unmark: function(nodes) {
+ for (var i = 0, node; node = nodes[i]; i++)
+ node.removeAttribute('_countedByPrototype');
+ return nodes;
+ }
+ });
+}
+
function $$() {
return Selector.findChildElements(document, $A(arguments));
}
@@ -3347,7 +3380,7 @@
serializeElements: function(elements, options) {
if (typeof options != 'object') options = { hash: !!options };
- else if (options.hash === undefined) options.hash = true;
+ else if (Object.isUndefined(options.hash)) options.hash = true;
var key, value, submitted = false, submit = options.submit;
var data = elements.inject({ }, function(result, element) {
@@ -3545,17 +3578,17 @@
},
inputSelector: function(element, value) {
- if (value === undefined) return element.checked ? element.value : null;
+ if (Object.isUndefined(value)) return element.checked ? element.value : null;
else element.checked = !!value;
},
textarea: function(element, value) {
- if (value === undefined) return element.value;
+ if (Object.isUndefined(value)) return element.value;
else element.value = value;
},
select: function(element, index) {
- if (index === undefined)
+ if (Object.isUndefined(index))
return this[element.type == 'select-one' ?
'selectOne' : 'selectMany'](element);
else {
@@ -3746,7 +3779,9 @@
findElement: function(event, expression) {
var element = Event.element(event);
- return element.match(expression) ? element : element.up(expression);
+ if (!expression) return element;
+ var elements = [element].concat(element.ancestors());
+ return Selector.findElement(elements, expression, 0);
},
pointer: function(event) {
@@ -3809,9 +3844,9 @@
var cache = Event.cache;
function getEventID(element) {
- if (element._eventID) return element._eventID;
+ if (element._prototypeEventID) return element._prototypeEventID[0];
arguments.callee.id = arguments.callee.id || 1;
- return element._eventID = ++arguments.callee.id;
+ return element._prototypeEventID = [++arguments.callee.id];
}
function getDOMEventName(eventName) {
@@ -3839,7 +3874,7 @@
return false;
Event.extend(event);
- handler.call(element, event)
+ handler.call(element, event);
};
wrapper.handler = handler;
@@ -3921,11 +3956,12 @@
if (element == document && document.createEvent && !element.dispatchEvent)
element = document.documentElement;
+ var event;
if (document.createEvent) {
- var event = document.createEvent("HTMLEvents");
+ event = document.createEvent("HTMLEvents");
event.initEvent("dataavailable", true, true);
} else {
- var event = document.createEventObject();
+ event = document.createEventObject();
event.eventType = "ondataavailable";
}
@@ -3938,7 +3974,7 @@
element.fireEvent(event.eventType, event);
}
- return event;
+ return Event.extend(event);
}
};
})());
@@ -3954,20 +3990,21 @@
Object.extend(document, {
fire: Element.Methods.fire.methodize(),
observe: Element.Methods.observe.methodize(),
- stopObserving: Element.Methods.stopObserving.methodize()
+ stopObserving: Element.Methods.stopObserving.methodize(),
+ loaded: false
});
(function() {
/* Support for the DOMContentLoaded event is based on work by Dan Webb,
Matthias Miller, Dean Edwards and John Resig. */
- var timer, fired = false;
+ var timer;
function fireContentLoadedEvent() {
- if (fired) return;
+ if (document.loaded) return;
if (timer) window.clearInterval(timer);
document.fire("dom:loaded");
- fired = true;
+ document.loaded = true;
}
if (document.addEventListener) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:15:38
|
Revision: 1229
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1229&view=rev
Author: kerphi
Date: 2008-03-23 13:15:45 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Portuguese Brazilian (pt_BR) translation update (thanks to Falci)
Modified Paths:
--------------
trunk/i18n/pt_BR/main.php
Modified: trunk/i18n/pt_BR/main.php
===================================================================
--- trunk/i18n/pt_BR/main.php 2008-03-23 20:09:00 UTC (rev 1228)
+++ trunk/i18n/pt_BR/main.php 2008-03-23 20:15:45 UTC (rev 1229)
@@ -25,6 +25,7 @@
*
* @author Frederico Costa <fre...@gm...>
* @author Alenônimo <ale...@gm...>
+ * @author Falci <fer...@ya...>
*/
// line 45 in phpfreechatconfig.class.php
@@ -43,7 +44,7 @@
$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s mudou de apelido para %s";
// line 398 in phpfreechat.class.php
-$GLOBALS["i18n"]["%s is connected"] = "%s acabou de entrar";
+$GLOBALS["i18n"]["%s is connected"] = "%s acabou de entrar na sala";
// line 452 in phpfreechat.class.php
$GLOBALS["i18n"]["%s quit"] = "%s desconectou-se";
@@ -124,7 +125,7 @@
$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Erro: indefinido ou parâmetro obsoleto '%s'. Por favor corrija ou remova esta parâmetro";
// line 48 in phpfreechattemplate.class.php
-$GLOBALS["i18n"]["%s template could not be found"] = "Template %s não pode ser encontrado ";
+$GLOBALS["i18n"]["%s template could not be found"] = "Template %s não pode ser encontrado";
// line 324 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["'serverid' parameter is mandatory by default use 'md5(__FILE__)' value"] = "O parâmetro 'serverid' é exigido. Por padrão, use o valor 'md5(__FILE__)'";
@@ -173,16 +174,16 @@
$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "O parâmetro '%s' é exigido. Por padrão, use o valor '%s'";
// line 378 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "O parametro '%s' deve ser um número positivo";
+$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "O parâmetro '%s' deve ser um número positivo";
// line 386 in phpfreechatconfig.class.php
-$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "O parametro '%s' não é válido. Valores disponíveis: '%s'";
+$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "O parâmetro '%s' não é válido. Valores disponíveis: '%s'";
// line 186 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["My room"] = "Minha Sala";
// line 19 in unban.class.php
-$GLOBALS["i18n"]["Missing parameter"] = "Faltando parametro";
+$GLOBALS["i18n"]["Missing parameter"] = "Faltando parâmetro";
// line 38 in ban.class.php
$GLOBALS["i18n"]["banished from %s by %s"] = "Banido de %s por %s";
@@ -236,7 +237,7 @@
$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Por favor, não poste tantas mensagens. Flood não será tolerado";
// line 109 in pfcclient.js.tpl.php
-$GLOBALS["i18n"]["Private message"] = "Mensagem Privada";
+$GLOBALS["i18n"]["Private message"] = "Mensagem Privada (MP)";
// line 110 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Close this tab"] = "Fechar Aba";
@@ -269,7 +270,7 @@
$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Erro: o arquivo de configuração não existe no cache";
// line 190 in phpfreechat.class.php
-$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Erro: o chat não foi carregado! Duas possibilidades: seu navegador não suporta JavaScript ou você não configurou corretamente as permissões dos diretórios do servidor — não hesite em pedir ajuda no nosso fórum";
+$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Erro: o chat não foi carregado! Duas possibilidades: seu navegador não suporta JavaScript ou você não configurou corretamente as permissões dos diretórios do servidor não hesite em pedir ajuda no nosso fórum";
// line 31 in help.class.php
$GLOBALS["i18n"]["Here is the command list:"] = "Aqui está a lista de comandos:";
@@ -311,73 +312,72 @@
$GLOBALS["i18n"]["Send"] = "Enviar";
// line 359 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s não existe, data_public_path não pode ser instalada";
+$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "%s não existe, \"data_public_path\" não pode ser instalada";
// line 489 in phpfreechat.class.php
-$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Você não pode falar consigo mesmo";
+$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Você não está autorizado a falar para si mesmo";
// line 491 in phpfreechat.class.php
-$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "O apelido escolhido não é permitido";
+$GLOBALS["i18n"]["Chosen nickname is not allowed"] = "Você não pode mudar o seu apelido";
// line 492 in phpfreechat.class.php
-$GLOBALS["i18n"]["Enable sound notifications"] = "Permitir notificações de som";
+$GLOBALS["i18n"]["Enable sound notifications"] = "Habilitar notificações por sons";
// line 493 in phpfreechat.class.php
-$GLOBALS["i18n"]["Disable sound notifications"] = "Desabilitar notificações de som";
+$GLOBALS["i18n"]["Disable sound notifications"] = "Desabilitar notificações por sons";
// line 23 in kick.class.php
-$GLOBALS["i18n"]["no reason"] = "sem razão";
+$GLOBALS["i18n"]["no reason"] = "qualquer motivo";
// line 24 in banlist.class.php
$GLOBALS["i18n"]["The banished user list is:"] = "A lista de usuários banidos é:";
// line 39 in banlist.class.php
-$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {apelido}' irá banir o usuário identificado por {apelido}";
+$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "/unban {nickname}' irá \"desbanir\" o usuário {nickname}";
// line 44 in kick.class.php
-$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "kickado de %s por %s - razão: %s";
+$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "chutado de %s por %s - Motivo: %s";
// line 20 in quit.class.php
-$GLOBALS["i18n"]["%s quit (%s)"] = "% sair (%s)";
+$GLOBALS["i18n"]["%s quit (%s)"] = "%s saiu (%s)";
// line 86 in mysql.class.php
-$GLOBALS["i18n"]["Mysql container: connect error"] = "Mysql container: erro de conexão";
+$GLOBALS["i18n"]["Mysql container: connect error"] = "MySQL: Conexão falhou";
// line 101 in mysql.class.php
-$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Mysql container: erro na criação de banco de dados";
+$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "MySQL: Falha ao criar database '%s'";
// line 112 in mysql.class.php
-$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Mysql container: erro na criação de tabela";
-
+$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "MySQL: Falha ao criar tabela '%s'";
// line 124 in chat.js.tpl.php
-$GLOBALS["i18n"]["Chat loading ..."] = "carregando o Chat..";
+$GLOBALS["i18n"]["Chat loading ..."] = "Iniciando Chat...";
// line 124 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please wait"] = "Por favor, espere..";
+$GLOBALS["i18n"]["Please wait"] = "Por favor aguarde";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s parece estar desabilitado ou não é suportado pelo navegador.";
+$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s parece estar desativado ou não suportado pelo seu navegador.";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["This web application requires %s to work properly."] = "A aplicação web requer %s para trabalhar adequadamente.";
+$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Esta web aplicação requer %s para funcionar corretamente.";
// line 135 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Por favor habilite %s na configuração de seu navegador, ou use um navegador com suporte a %s e tente de novo.";
+$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Ative %s nas configurações do seu navegador, ou atualizar para um navegador com suporte a %s e tente novamente.";
// line 137 in chat.js.tpl.php
-$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Por favor use um navegador com suporte a %s e tente de novo.";
+$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Atualizar para um navegador com suporte a %s e tente novamente.";
// line 139 in chat.js.tpl.php
-$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "Em versões anteriores ao Internet Explorer 7.0, o Ajax é implementado usando ActiveX. Por favor habilite ActiveX nas configurações de segurança do seu navegador ou use um navegador com suporte à Ajax e tente de novo.";
+$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "No Internet Explorer ( versão < 7.0), Ajax é implementado usando ActiveX. Ative o ActiveX no navegador nas configurações de segurança ou atualize para um navegador com Ajax apoio e tente novamente.";
// line 73 in invite.class.php
-$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "Você tem que entrar em %s para convidar usuários nesse canal";
+$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = "Você deve participar %s para convidar os usuários neste canal";
// line 47 in chat.html.tpl.php
$GLOBALS["i18n"]["Ping"] = "Ping";
// line 477 in phpfreechat.class.php
-$GLOBALS["i18n"]["Input Required"] = "Entrada obrigatória";
+$GLOBALS["i18n"]["Input Required"] = "Campo Obrigatório";
// line 478 in phpfreechat.class.php
$GLOBALS["i18n"]["OK"] = "OK";
@@ -392,16 +392,16 @@
$GLOBALS["i18n"]["cannot copy %s in %s"] = "não pode copiar %s em %s";
// line 667 in pfcglobalconfig.class.php
-$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "Erro: '%s' pode não ter sido encontrado, favor checar se seu theme_path '%s' e seu tema '%s' estão conectados";
+$GLOBALS["i18n"]["Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct"] = "Erro: '%s' não pode ser encontrada, verifique se o theme_path '%s' e o tema '%s' estão corretos";
// line 414 in phpfreechat.class.php
-$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "Você tem certeza que quer fechar esta aba ?";
+$GLOBALS["i18n"]["Are you sure you want to close this tab ?"] = "Tem certeza que deseja fechar esta aba?";
// line 42 in ban.class.php
$GLOBALS["i18n"]["%s banished from %s by %s"] = "%s banido de %s por %s";
// line 461 in phpfreechat.class.php
-$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "Você está tentando falar com um usuário desconhecido ou não conectado";
+$GLOBALS["i18n"]["You are trying to speak to a unknown (or not connected) user"] = "Você está tentando falar com um desconhecido ou usuário não conectado";
// line 89 in invite.class.php
$GLOBALS["i18n"]["%s was invited by %s"] = "%s foi convidado por %s";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2008-03-23 20:08:56
|
Revision: 1228
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1228&view=rev
Author: kerphi
Date: 2008-03-23 13:09:00 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
add a warning
Modified Paths:
--------------
trunk/index.php
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2008-03-23 20:07:12 UTC (rev 1227)
+++ trunk/index.php 2008-03-23 20:09:00 UTC (rev 1228)
@@ -4,7 +4,7 @@
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
-$params["isadmin"] = true; // just for debug ;)
+$params["isadmin"] = true; // do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
//$params["debug"] = true;
$chat = new phpFreeChat( $params );
@@ -110,6 +110,7 @@
<div class="content">
<?php $chat->printChat(); ?>
+ <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
</div>
</body></html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|