phpfreechat-svn Mailing List for phpFreeChat (Page 15)
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...> - 2007-01-14 18:42:55
|
Revision: 930 http://svn.sourceforge.net/phpfreechat/?rev=930&view=rev Author: kerphi Date: 2007-01-14 10:42:52 -0800 (Sun, 14 Jan 2007) Log Message: ----------- translation update Modified Paths: -------------- trunk/i18n/ar_LB/main.php trunk/i18n/ba_BA/main.php trunk/i18n/bg_BG/main.php trunk/i18n/bn_BD/main.php trunk/i18n/de_DE-formal/main.php trunk/i18n/de_DE-informal/main.php trunk/i18n/el_GR/main.php trunk/i18n/en_US/main.php trunk/i18n/eo/main.php trunk/i18n/es_ES/main.php trunk/i18n/fr_FR/main.php trunk/i18n/hu_HU/main.php trunk/i18n/hy_AM/main.php trunk/i18n/id_ID/main.php trunk/i18n/it_IT/main.php trunk/i18n/ja_JP/main.php trunk/i18n/ko_KR/main.php trunk/i18n/nb_NO/main.php trunk/i18n/nl_NL/main.php trunk/i18n/pl_PL/main.php trunk/i18n/pt_PT/main.php trunk/i18n/ru_RU/main.php trunk/i18n/sr_CS/main.php trunk/i18n/sv_SE/main.php trunk/i18n/tr_TR/main.php trunk/i18n/uk_RO/main.php trunk/i18n/uk_UA/main.php trunk/i18n/zh_CN/main.php trunk/i18n/zh_TW/main.php Modified: trunk/i18n/ar_LB/main.php =================================================================== --- trunk/i18n/ar_LB/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/ar_LB/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ba_BA/main.php =================================================================== --- trunk/i18n/ba_BA/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/ba_BA/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bg_BG/main.php =================================================================== --- trunk/i18n/bg_BG/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/bg_BG/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -361,4 +361,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bn_BD/main.php =================================================================== --- trunk/i18n/bn_BD/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/bn_BD/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -367,4 +367,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-formal/main.php =================================================================== --- trunk/i18n/de_DE-formal/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/de_DE-formal/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -368,4 +368,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-informal/main.php =================================================================== --- trunk/i18n/de_DE-informal/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/de_DE-informal/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -369,4 +369,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/el_GR/main.php =================================================================== --- trunk/i18n/el_GR/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/el_GR/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -362,4 +362,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/en_US/main.php =================================================================== --- trunk/i18n/en_US/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/en_US/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // line 139 in chat.js.tpl.php $GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "In Internet Explorer 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."; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/eo/main.php =================================================================== --- trunk/i18n/eo/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/eo/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/es_ES/main.php =================================================================== --- trunk/i18n/es_ES/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/es_ES/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -362,4 +362,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/fr_FR/main.php =================================================================== --- trunk/i18n/fr_FR/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/fr_FR/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = "Dans les version d\'Internet Explorer inférieures à 7.0, Ajax est implémenté par ActiveX. Veuillez activer ActiveX dans les paramètres de sécurité ou utiliser un navigateur qui supporte Ajax et essayez denouveau"; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/hu_HU/main.php =================================================================== --- trunk/i18n/hu_HU/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/hu_HU/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -365,4 +365,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/hy_AM/main.php =================================================================== --- trunk/i18n/hy_AM/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/hy_AM/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/id_ID/main.php =================================================================== --- trunk/i18n/id_ID/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/id_ID/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/it_IT/main.php =================================================================== --- trunk/i18n/it_IT/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/it_IT/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ja_JP/main.php =================================================================== --- trunk/i18n/ja_JP/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/ja_JP/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -364,4 +364,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ko_KR/main.php =================================================================== --- trunk/i18n/ko_KR/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/ko_KR/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -306,4 +306,65 @@ // line 88 in chat.js.tpl.php $GLOBALS["i18n"]["Send"] = "입력"; -?> + +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + +// line 489 in phpfreechat.class.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; + +// line 491 in phpfreechat.class.php +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; + +// line 492 in phpfreechat.class.php +$GLOBALS["i18n"]["Enable sound notifications"] = ""; + +// line 493 in phpfreechat.class.php +$GLOBALS["i18n"]["Disable sound notifications"] = ""; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = ""; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = ""; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = ""; + +// line 44 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = ""; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + +?> \ No newline at end of file Modified: trunk/i18n/nb_NO/main.php =================================================================== --- trunk/i18n/nb_NO/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/nb_NO/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/nl_NL/main.php =================================================================== --- trunk/i18n/nl_NL/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/nl_NL/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -364,4 +364,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pl_PL/main.php =================================================================== --- trunk/i18n/pl_PL/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/pl_PL/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -364,4 +364,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pt_PT/main.php =================================================================== --- trunk/i18n/pt_PT/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/pt_PT/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -364,4 +364,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ru_RU/main.php =================================================================== --- trunk/i18n/ru_RU/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/ru_RU/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -368,4 +368,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sr_CS/main.php =================================================================== --- trunk/i18n/sr_CS/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/sr_CS/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -366,4 +366,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sv_SE/main.php =================================================================== --- trunk/i18n/sv_SE/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/sv_SE/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -371,4 +371,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/tr_TR/main.php =================================================================== --- trunk/i18n/tr_TR/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/tr_TR/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/uk_RO/main.php =================================================================== --- trunk/i18n/uk_RO/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/uk_RO/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/uk_UA/main.php =================================================================== --- trunk/i18n/uk_UA/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/uk_UA/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_CN/main.php =================================================================== --- trunk/i18n/zh_CN/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/zh_CN/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -367,4 +367,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_TW/main.php =================================================================== --- trunk/i18n/zh_TW/main.php 2007-01-14 18:40:52 UTC (rev 929) +++ trunk/i18n/zh_TW/main.php 2007-01-14 18:42:52 UTC (rev 930) @@ -363,4 +363,7 @@ // 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."] = ""; +// line 359 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + ?> \ 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...> - 2007-01-12 17:22:59
|
Revision: 928 http://svn.sourceforge.net/phpfreechat/?rev=928&view=rev Author: kerphi Date: 2007-01-12 09:22:56 -0800 (Fri, 12 Jan 2007) Log Message: ----------- bug fix: it was impossible to overload the file container parameters Modified Paths: -------------- trunk/src/containers/file.class.php Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2007-01-12 16:29:19 UTC (rev 927) +++ trunk/src/containers/file.class.php 2007-01-12 17:22:56 UTC (rev 928) @@ -36,8 +36,10 @@ function loadPaths() { $c =& $this->c; - $c->container_cfg_chat_dir = $c->data_private_path."/chat"; - $c->container_cfg_server_dir = $c->container_cfg_chat_dir."/s_".$c->serverid; + if (!isset($c->container_cfg_chat_dir)) + $c->container_cfg_chat_dir = $c->data_private_path."/chat"; + if (!isset($c->container_cfg_server_dir)) + $c->container_cfg_server_dir = $c->container_cfg_chat_dir."/s_".$c->serverid; } function getDefaultConfig() @@ -56,8 +58,6 @@ $c =& $this->c; // generate the container parameters from other config parameters - if ($c->container_cfg_chat_dir == "") - $c->container_cfg_chat_dir = $c->data_private_path."/chat"; $this->loadPaths(); $errors = array_merge($errors, @test_writable_dir($c->container_cfg_chat_dir, "container_cfg_chat_dir")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-12 16:29:24
|
Revision: 927 http://svn.sourceforge.net/phpfreechat/?rev=927&view=rev Author: kerphi Date: 2007-01-12 08:29:19 -0800 (Fri, 12 Jan 2007) Log Message: ----------- bug fix : the data_public_path javascript content was not correctly copied when the data_public_path parameter was not the default. [1h] Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-01-06 12:45:49 UTC (rev 926) +++ trunk/src/pfcglobalconfig.class.php 2007-01-12 16:29:19 UTC (rev 927) @@ -339,9 +339,27 @@ // $this->errors = array_merge($this->errors, @test_writable_dir($this->data_public_path, "data_public_path")); $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path, "data_private_path")); - // $this->errors = array_merge($this->errors, @install_dir($this->jspath, $this->data_public_path."/javascript")); $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path."/cache", "data_private_path/cache")); + + // install the public directory content + $dir = dirname(__FILE__)."/../data/public/js"; + $dh = opendir($dir); + while (false !== ($file = readdir($dh))) + { + $f_src = $dir.'/'.$file; + $f_dst = $this->data_public_path.'/js/'.$file; + if ($file == "." || $file == ".." || !is_file($f_src)) continue; // skip . and .. generic files + // install js files only if the destination doesn't exists or if the destination timestamp is older than the source timestamp + if (!file_exists($f_dst) || filemtime($f_dst) < filemtime($f_src) ) + { + mkdir_r($this->data_public_path.'/js/'); + copy( $f_src, $f_dst ); + } + if (!file_exists($f_dst)) $this->errors[] = _pfc("%s doesn't exist, data_public_path cannot be installed", $f_dst); + } + closedir($dh); + // --- // test xajax lib existance $dir = $this->xajaxpath; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-06 12:45:51
|
Revision: 926 http://svn.sourceforge.net/phpfreechat/?rev=926&view=rev Author: kerphi Date: 2007-01-06 04:45:49 -0800 (Sat, 06 Jan 2007) Log Message: ----------- [en] Add the Korean translation (ko_KR) (thanks to Kim Taeho - http://zxcv.mireene.com/zb5/) [0h20] [fr] Ajoute la tranduction Cor?\195?\169enne (ko_KR) (merci ?\195?\160 Kim Taeho - http://zxcv.mireene.com/zb5/) [0h20] Modified Paths: -------------- trunk/demo/index.php Added Paths: ----------- trunk/demo/demo57_in_korean.php trunk/i18n/ko_KR/ trunk/i18n/ko_KR/main.php Added: trunk/demo/demo57_in_korean.php =================================================================== --- trunk/demo/demo57_in_korean.php (rev 0) +++ trunk/demo/demo57_in_korean.php 2007-01-06 12:45:49 UTC (rev 926) @@ -0,0 +1,36 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "ko_KR"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + + <?php $chat->printJavascript(); ?> + <?php $chat->printStyle(); ?> + + </head> + + <body> + <?php $chat->printChat(); ?> + +<?php + // print the current file + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-01-06 12:28:46 UTC (rev 925) +++ trunk/demo/index.php 2007-01-06 12:45:49 UTC (rev 926) @@ -122,6 +122,7 @@ <li><a href="demo53_in_armenian.php">demo53 - the Armenian translation of the chat</a></li> <li><a href="demo54_in_esperanto.php">demo54 - the Esperanto translation of the chat</a></li> <li><a href="demo56_in_romanian.php">demo56 - the Romanian translation of the chat</a></li> + <li><a href="demo57_in_korean.php">demo57 - the Korean translation of the chat</a></li> </ul> </div> Added: trunk/i18n/ko_KR/main.php =================================================================== --- trunk/i18n/ko_KR/main.php (rev 0) +++ trunk/i18n/ko_KR/main.php 2007-01-06 12:45:49 UTC (rev 926) @@ -0,0 +1,309 @@ +<?php +/** + * i18n/ko_KR/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 + */ + +/** + * Korean translation of the messages.. + * + * @author Kim Taeho (ta...@gm...) + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "내 채팅방"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s 를 찾을 수 없습니다, %s 라이브러리가 로드되지 않았습니다."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "사용할 닉네임을 입력하세요"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "빈칸을 입력하실 순 없습니다."; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s 님께서 %s로 닉을 바꾸셨습니다."; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s 님 반갑습니다. 즐거운 시간 되세요."; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s 님께서 나가셨습니다."; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s 님의 연결이 끊겼습니다 (타임아웃)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "존재하지 않는 명령입니다. [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s 는 존재하지 않습니다 : %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "%s 가 필요합니다."; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s 를 찾을 수 없습니다, %s 라이브러리가 로드되지 않았습니다."; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s 는 존재하지 않습니다."; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s 디렉토리는 선택되어야만 합니다."; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s 는 디렉토리 이어야만 합니다."; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s 는 생성될 수 없습니다."; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s 에 기록할 수 없습니다."; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s 를 읽을수 없습니다."; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s 는 파일이 아닙니다."; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s 는 디렉토리가 아닙니다."; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "닉네임에 색상 사용하지 않기"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "닉네임에 색상 사용하기"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "연결 해제"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "연결"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "확대"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "자르기"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "날짜와 시간 숨기기"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "날짜와 시간 표시하기"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "여기에 대화를 입력하세요"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "여기에 별명을 입력하세요"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "오류 : '%s'는 정의되지 않거나 사용할 수 없는 피라메터 입니다, 이 피라메터를 없애거나 수정하세요.."; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "이모티콘 숨기기"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "이모티콘 보이기"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "현재 접속자 숨기기"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "현재 접속자 보이기"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "굵게"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "이탤릭"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "밑줄"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "취소선"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "메일주소"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "색상"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s 템플릿을 찾을 수 없습니다."; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' 를 찾을 수 없습니다. 테마의 위치인 '%s' 를 찾아보시고 지정한 테마가 '%s' 가 맞는지 확인하세요"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s 는 권한이 있어야만 합니다."; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' 피라메터는 필수적으로 요구됩니다. '%s' 값을 사용하기 위해..."; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' 피라메터는 양수 이어야 합니다."; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' 피라메터는 유효하지 않습니다. 사용가능한 목록 : '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "내 방"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "개인 메세지"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "이 탭 닫기"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "이 채널을 떠나길 원하십니까?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "피라미터를 찾을수 없습니다."; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "%s 로 부터 강퇴되었습니다. %s에 의해.."; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "접근 금지자 목록:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "비어있음"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' 명령은 {id}로 식별되는 사용자를 추방한걸 취소합니다."; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' 명령은 이 채널에 있는 모든 사용자를 추방한걸 취소합니다."; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s 님께서 나갔습니다. (타임아웃)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s 님께서 %s 에 들어오셨습니다."; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "%s 로 부터 퇴장 되었습니다. %s에 의해"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "메시지를 보낼 수 없습니다, %s 님은 오프라인 상태 입니다."; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "아무도 추방 취소되지 않았습니다."; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s 님의 추방을 취소했습니다."; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s 님은 추방이 취소 되어 있습니다."; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "'%s'명령을 실행할 권한이 없습니다."; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "%s 에 참여할수 없습니다(강퇴)"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "닉을 바꿀 권한이 없습니다."; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "%s 에 참여할 수 없습니다(제한된 채널)"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "도배 하지 마세요..."; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Error: '%s' 는 개인 피라메터 입니다. 수정하실 수 없습니다."; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "'%s' 피라메터는 어레이로 처리되어야 합니다."; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "'%s' 피라메터는 부울값으로 있어야 합니다."; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "'%s' 피라메터는 글자이어야 합니다."; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' 에 쓸 수 있어야 합니다."; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' 디렉토리가 존재하지 않습니다."; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "위 오류를 수정해 주시기 바랍니다."; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "오류 : 저장된 설정이 존재하지 않습니다."; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "오류 : 채팅이 로드될 수 없습니다! 두가지 가능성: 브라우저에서 자바스크립트를 지원하지 않거나, 서버의 폴더 권한을 잘 설정하지 못했을 수 있습니다. - 포럼의 누군가에게 묻는것에 대해 망설이지 마십시오."; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "명령어 목록:"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "성공적으로 인증됨"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "인증 실패"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "메세지를 보내려면 연결해야 합니다."; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "여기를 눌러 메세지를 보내세요"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "형식화 할 글자를 넣으세요.."; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "재설정"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "재설정중 문제가 생겼습니다."; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "이미 사용중인 별명입니다."; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "phpfreechat 의 현재 버전은 %s 입니다."; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "최대 방 인원에 도달하였습니다."; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "최대 개인채팅수에 도달하였습니다."; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "입력"; + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-06 12:28:48
|
Revision: 925 http://svn.sourceforge.net/phpfreechat/?rev=925&view=rev Author: kerphi Date: 2007-01-06 04:28:46 -0800 (Sat, 06 Jan 2007) Log Message: ----------- [en] German formal and informal translation update (thanks to Troubadix - http://www.hinkelstein.info/) [0h30] [fr] Traduction allemande (formal/informal) update (merci ?\195?\160 Troubadix - http://www.hinkelstein.info/) [0h30] Modified Paths: -------------- trunk/i18n/de_DE-formal/main.php trunk/i18n/de_DE-informal/main.php Modified: trunk/i18n/de_DE-formal/main.php =================================================================== --- trunk/i18n/de_DE-formal/main.php 2007-01-05 23:13:21 UTC (rev 924) +++ trunk/i18n/de_DE-formal/main.php 2007-01-06 12:28:46 UTC (rev 925) @@ -24,6 +24,7 @@ * German (formal) translation of the messages (utf8 encoded!) * * @author BSEMF <bsemfger <at> aim.com> + * @author Thomas Stueven (ak Troubadix) <thomas.stueven <at> online.de> */ // line 45 in phpfreechatconfig.class.php @@ -120,7 +121,7 @@ $GLOBALS["i18n"]["Enter your nickname here"] = "Bitte geben Sie Ihren Spitznamen hier ein"; // line 93 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: Undefinierter oder falscher Parameter '%s', bitte korrigieren oder löschen Sie diesen Parameter"; +$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"; @@ -169,179 +170,180 @@ // line 343 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = ""; +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' ist ein obligatorischer Parameter. Voreinstellungswert: '%s' "; // line 378 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "Der Parameter '%s' muss eine natürliche Zahl sein"; // line 386 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = ""; +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "Der Parameter '%s' ist ungültig. Mögliche Werte sind '%s'"; // line 186 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["My room"] = ""; +$GLOBALS["i18n"]["My room"] = "Mein Chat"; // line 19 in unban.class.php -$GLOBALS["i18n"]["Missing parameter"] = ""; +$GLOBALS["i18n"]["Missing parameter"] = "Fehlende Parameter"; // line 38 in ban.class.php -$GLOBALS["i18n"]["banished from %s by %s"] = ""; +$GLOBALS["i18n"]["banished from %s by %s"] = "wurde gebannt von %s durch %s"; // line 23 in banlist.class.php -$GLOBALS["i18n"]["The banished user's id list is:"] = ""; +$GLOBALS["i18n"]["The banished user's id list is:"] = "Die Liste der gebannten Benutzer-IDs"; // line 32 in banlist.class.php -$GLOBALS["i18n"]["Empty"] = ""; +$GLOBALS["i18n"]["Empty"] = "leer"; // line 34 in banlist.class.php -$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = ""; +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' streicht den Benutzer mit der ID {id} von der Bannliste"; // line 35 in banlist.class.php -$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = ""; +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' hebt die Bannung aller Benutzer des Channels auf"; // line 24 in update.class.php -$GLOBALS["i18n"]["%s quit (timeout)"] = ""; +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s verließ den Raum (timeout?)"; // line 46 in join.class.php -$GLOBALS["i18n"]["%s joins %s"] = ""; +$GLOBALS["i18n"]["%s joins %s"] = "%s kommt in den Raum %s"; // line 31 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s"] = "wurde herausgeworfen aus %s von %s"; // line 38 in send.class.php -$GLOBALS["i18n"]["Can't send the message, %s is offline"] = ""; +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Kann keine Nachricht senden, %s is offline"; // line 27 in unban.class.php -$GLOBALS["i18n"]["Nobody has been unbanished"] = ""; +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Niemand wurde von der Bannliste gestrichen"; // line 42 in unban.class.php -$GLOBALS["i18n"]["%s has been unbanished"] = ""; +$GLOBALS["i18n"]["%s has been unbanished"] = "%s wurde von der Bannliste gestrichen"; // line 49 in unban.class.php -$GLOBALS["i18n"]["%s users have been unbanished"] = ""; +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s Benutzer wurden von der Bannliste gestrichen"; // line 47 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = ""; +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "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"] = ""; +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Sie können an %s nicht teilnehmen, weil sie auf der Bannliste stehen"; // line 76 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = ""; +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "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"] = ""; +$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"] = ""; +$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"] = ""; +$GLOBALS["i18n"]["Private message"] = "Private Nachricht"; // line 110 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Close this tab"] = ""; +$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 ?"] = ""; +$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"] = ""; +$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"; // line 253 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be an array"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "Der Parameter '%s' muss ein Array sein"; // line 265 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "Der Parameter '%s' muss ein Boolean sein"; // line 271 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "Der Parameter '%s' muss eine Zeichenkette sein"; // line 395 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' must be writable"] = ""; +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' muss beschreibbar sein"; // line 425 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' directory doesn't exist"] = ""; +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' Verzeichnis existiert nicht"; // line 544 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["Please correct these errors"] = ""; +$GLOBALS["i18n"]["Please correct these errors"] = "Bitte korrigieren sie diese Fehler"; // line 21 in pfcinfo.class.php -$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = ""; +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Fehler: Die gesuchte Konfigurations-Datei existiert nicht im 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"] = ""; +$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"] = "Fehler: Der Chat kann nicht geladen werden! Es gibt zwei Möglichkeiten: Ihr Browser unterstützt kein JavaScript oder die Verzeichnisrechte auf dem Server sind nicht korrekt eingerichtet. Zögern sie nicht, im Forum nach Hilfe zu suchen"; // line 31 in help.class.php -$GLOBALS["i18n"]["Here is the command list:"] = ""; +$GLOBALS["i18n"]["Here is the command list:"] = "Hier ist die Liste möglicher Befehle:"; // line 63 in identify.class.php -$GLOBALS["i18n"]["Succesfully identified"] = ""; +$GLOBALS["i18n"]["Succesfully identified"] = "Identifizierung erfolgt"; // line 68 in identify.class.php -$GLOBALS["i18n"]["Identification failure"] = ""; +$GLOBALS["i18n"]["Identification failure"] = "Identifizierung fehlgeschlagen"; // line 25 in send.class.php -$GLOBALS["i18n"]["Your must be connected to send a message"] = ""; +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Sie müssen verbunden sein, um eine Nachricht zu schicken"; // line 87 in chat.js.tpl.php -$GLOBALS["i18n"]["Click here to send your message"] = ""; +$GLOBALS["i18n"]["Click here to send your message"] = "Hier klicken, um die Nachricht zu senden"; // line 80 in chat.js.tpl.php -$GLOBALS["i18n"]["Enter the text to format"] = ""; +$GLOBALS["i18n"]["Enter the text to format"] = "Geben sie erst den Text ein, der formatiert werden soll"; // line 81 in chat.js.tpl.php -$GLOBALS["i18n"]["Configuration has been rehashed"] = ""; +$GLOBALS["i18n"]["Configuration has been rehashed"] = "Die Konfiguration wurde neu geladen"; // line 82 in chat.js.tpl.php -$GLOBALS["i18n"]["A problem occurs during rehash"] = ""; +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Ein Problem ist beim Laden der Konfiguration aufgetreten"; // line 83 in chat.js.tpl.php -$GLOBALS["i18n"]["Choosen nickname is allready used"] = ""; +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "Der gewählte Nickname ist schon vergeben"; // line 84 in chat.js.tpl.php -$GLOBALS["i18n"]["phpfreechat current version is %s"] = ""; +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "Die installierte Version von phpfreechat ist %s"; // line 85 in chat.js.tpl.php -$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = ""; +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Die maximale Anzahl der Channels ist erreicht"; // line 86 in chat.js.tpl.php -$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = ""; +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Die maximale Anzahl der privaten Channels ist erreicht"; // line 88 in chat.js.tpl.php -$GLOBALS["i18n"]["Send"] = ""; +$GLOBALS["i18n"]["Send"] = "Senden"; // line 86 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: connect error"] = ""; +$GLOBALS["i18n"]["Mysql container: connect error"] = "Mysql container: Verbindungsfehler"; // line 101 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Mysql container: Fehler beim erstellen der Datenbank %s"; // line 112 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Mysql container: Fehler beim erstellen einer Tabelle %s"; // line 80 in chat.js.tpl.php -$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; +$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"]["Choosen nickname is not allowed"] = ""; +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = "Der gewählte Nickname ist nicht zulässig"; // line 83 in chat.js.tpl.php -$GLOBALS["i18n"]["Enable sound notifications"] = ""; +$GLOBALS["i18n"]["Enable sound notifications"] = "Akustische Signale einschalten"; // line 84 in chat.js.tpl.php -$GLOBALS["i18n"]["Disable sound notifications"] = ""; +$GLOBALS["i18n"]["Disable sound notifications"] = "Akustische Signale ausschalten"; // line 23 in kick.class.php -$GLOBALS["i18n"]["no reason"] = ""; +$GLOBALS["i18n"]["no reason"] = "kein grund"; // line 24 in banlist.class.php -$GLOBALS["i18n"]["The banished user list is:"] = ""; +$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}"] = ""; +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nickname}' hebt die Bannung für den Benutzer {nickname} auf"; // line 43 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "rausgeworfen aus %s durch %s - Grund: %s"; + // line 20 in quit.class.php $GLOBALS["i18n"]["%s quit (%s)"] = ""; Modified: trunk/i18n/de_DE-informal/main.php =================================================================== --- trunk/i18n/de_DE-informal/main.php 2007-01-05 23:13:21 UTC (rev 924) +++ trunk/i18n/de_DE-informal/main.php 2007-01-06 12:28:46 UTC (rev 925) @@ -25,6 +25,7 @@ * * @author BSEMF <bsemfger <at> aim.com> * @author Karsten Hens www.karsten-hens.de + * @author Thomas Stueven (ak Troubadix) <thomas.stueven <at> online.de> */ // line 45 in phpfreechatconfig.class.php @@ -121,7 +122,7 @@ $GLOBALS["i18n"]["Enter your nickname here"] = "Gib hier deinen Nicknamen ein"; // line 93 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Fehler: Undefinierter oder obsoleter Parameter '%s', bitte korrigiere oder lösche diesen Parameter"; +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Fehler: Undefinierter oder falscher Parameter '%s', bitte korrigiere oder lösche diesen Parameter"; // line 48 in phpfreechattemplate.class.php $GLOBALS["i18n"]["%s template could not be found"] = "%s Template wurde nicht gefunden"; @@ -142,7 +143,7 @@ $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"; @@ -173,7 +174,7 @@ $GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' ist ein obligatorischer Parameter. Voreinstellungswert: '%s' "; // line 378 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "Der Parameter '%s' muß eine natürliche Zahl sein"; +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "Der Parameter '%s' muss eine natürliche Zahl sein"; // 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'"; @@ -203,7 +204,7 @@ $GLOBALS["i18n"]["%s quit (timeout)"] = "%s verließ den Raum (timeout?)"; // line 46 in join.class.php -$GLOBALS["i18n"]["%s joins %s"] = "%s kommt in den Channel %s"; +$GLOBALS["i18n"]["%s joins %s"] = "%s kommt in den Raum %s"; // line 31 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s"] = "wurde herausgeworfen aus %s von %s"; @@ -257,7 +258,7 @@ $GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "Der Parameter '%s' muss eine Zeichenkette sein"; // line 395 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' muß beschreibbar sein"; +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' muss beschreibbar sein"; // line 425 in pfcglobalconfig.class.php $GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' Verzeichnis existiert nicht"; @@ -311,38 +312,39 @@ $GLOBALS["i18n"]["Send"] = "Senden"; // line 86 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: connect error"] = ""; +$GLOBALS["i18n"]["Mysql container: connect error"] = "Mysql container: Verbindungsfehler"; // line 101 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Mysql container: Fehler beim erstellen der Datenbank %s"; // line 112 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Mysql container: Fehler beim erstellen einer Tabelle %s"; // line 80 in chat.js.tpl.php -$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "Du kannst nicht mit dir selber sprechen"; // line 82 in chat.js.tpl.php -$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = "Der gewählte Nickname ist nicht zulässig"; // line 83 in chat.js.tpl.php -$GLOBALS["i18n"]["Enable sound notifications"] = ""; +$GLOBALS["i18n"]["Enable sound notifications"] = "Akustische Signale einschalten"; // line 84 in chat.js.tpl.php -$GLOBALS["i18n"]["Disable sound notifications"] = ""; +$GLOBALS["i18n"]["Disable sound notifications"] = "Akustische Signale ausschalten"; // line 23 in kick.class.php -$GLOBALS["i18n"]["no reason"] = ""; +$GLOBALS["i18n"]["no reason"] = "kein grund"; // line 24 in banlist.class.php -$GLOBALS["i18n"]["The banished user list is:"] = ""; +$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}"] = ""; +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "'/unban {nickname}' hebt die Verbannung für den Benutzer {nickname} auf"; // line 43 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "rausgeworfen aus %s durch %s - Grund: %s"; + // line 20 in quit.class.php $GLOBALS["i18n"]["%s quit (%s)"] = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 23:13:23
|
Revision: 924 http://svn.sourceforge.net/phpfreechat/?rev=924&view=rev Author: kerphi Date: 2007-01-05 15:13:21 -0800 (Fri, 05 Jan 2007) Log Message: ----------- fix a problem with multiple translations on a single line Modified Paths: -------------- trunk/src/pfci18n.class.php Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2007-01-05 23:10:22 UTC (rev 923) +++ trunk/src/pfci18n.class.php 2007-01-05 23:13:21 UTC (rev 924) @@ -140,8 +140,8 @@ $files = array_merge($files, glob(dirname(__FILE__)."/commands/*.php")); $files = array_merge($files, glob(dirname(__FILE__)."/containers/*.php")); $files = array_merge($files, glob(dirname(__FILE__)."/proxies/*.php")); - $files = array_merge($files, glob(dirname(__FILE__)."/client/*.php")); - $files = array_merge($files, glob(dirname(__FILE__)."/../themes/default/templates/*.php")); + $files = array_merge($files, glob(dirname(__FILE__)."/client/*.php")); + $files = array_merge($files, glob(dirname(__FILE__)."/../themes/default/*.php")); $res = array(); foreach ( $files as $src_filename ) @@ -151,10 +151,13 @@ foreach( $lines as $l) { // the labels server side - if( preg_match_all('/_pfc\("([^\"]*)"(\s*\,.*|)\)/', $l, $matches) ) + if( preg_match_all('/_pfc\("([^\"]+)"/', $l, $matches) ) { - echo "line: ".$line_nb."\t- ".$matches[1][0]."\n"; - $res[$matches[1][0]] = "// line ".$line_nb." in ".basename($src_filename); + foreach($matches[1] as $label) + { + echo "line: ".$line_nb."\t- ".$label."\n"; + $res[$label] = "// line ".$line_nb." in ".basename($src_filename); + } } // the labels client side (JS) if( preg_match_all('/"([^"]*)",\s\/\/\s_pfc/', $l, $matches) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 23:10:24
|
Revision: 923 http://svn.sourceforge.net/phpfreechat/?rev=923&view=rev Author: kerphi Date: 2007-01-05 15:10:22 -0800 (Fri, 05 Jan 2007) Log Message: ----------- translation updates Modified Paths: -------------- trunk/i18n/ar_LB/main.php trunk/i18n/ba_BA/main.php trunk/i18n/bg_BG/main.php trunk/i18n/bn_BD/main.php trunk/i18n/de_DE-formal/main.php trunk/i18n/de_DE-informal/main.php trunk/i18n/el_GR/main.php trunk/i18n/en_US/main.php trunk/i18n/eo/main.php trunk/i18n/es_ES/main.php trunk/i18n/fr_FR/main.php trunk/i18n/hu_HU/main.php trunk/i18n/hy_AM/main.php trunk/i18n/id_ID/main.php trunk/i18n/it_IT/main.php trunk/i18n/ja_JP/main.php trunk/i18n/nb_NO/main.php trunk/i18n/nl_NL/main.php trunk/i18n/pl_PL/main.php trunk/i18n/pt_BR/main.php trunk/i18n/pt_PT/main.php trunk/i18n/ru_RU/main.php trunk/i18n/sr_CS/main.php trunk/i18n/sv_SE/main.php trunk/i18n/tr_TR/main.php trunk/i18n/uk_RO/main.php trunk/i18n/uk_UA/main.php trunk/i18n/zh_CN/main.php trunk/i18n/zh_TW/main.php Modified: trunk/i18n/ar_LB/main.php =================================================================== --- trunk/i18n/ar_LB/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/ar_LB/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ba_BA/main.php =================================================================== --- trunk/i18n/ba_BA/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/ba_BA/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bg_BG/main.php =================================================================== --- trunk/i18n/bg_BG/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/bg_BG/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -337,4 +337,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bn_BD/main.php =================================================================== --- trunk/i18n/bn_BD/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/bn_BD/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -343,4 +343,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-formal/main.php =================================================================== --- trunk/i18n/de_DE-formal/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/de_DE-formal/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-informal/main.php =================================================================== --- trunk/i18n/de_DE-informal/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/de_DE-informal/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -343,4 +343,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/el_GR/main.php =================================================================== --- trunk/i18n/el_GR/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/el_GR/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -338,4 +338,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/en_US/main.php =================================================================== --- trunk/i18n/en_US/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/en_US/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "kicked from %s by %s - reason: %s"; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s quit (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "Chat loading ..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "Please wait"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s appears to be either disabled or unsupported by your browser."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "This web application requires %s to work properly."; + +// 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."] = "Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Please upgrade to a browser with %s support and try again."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "In Internet Explorer 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 newline at end of file Modified: trunk/i18n/eo/main.php =================================================================== --- trunk/i18n/eo/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/eo/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/es_ES/main.php =================================================================== --- trunk/i18n/es_ES/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/es_ES/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -338,4 +338,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/fr_FR/main.php =================================================================== --- trunk/i18n/fr_FR/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/fr_FR/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "kické de %s par %s"; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = "%s a quitté (%s)"; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = "Chargement du chat ..."; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = "Patientez"; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s semble être désactivé ou pas/mal supporté par votre navigateur."; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Cette application web nécessite %s pour fonctionner correctement."; + +// 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."] = "Veuillez activer %s dans les paramètres de votre navigateur, ou utilisez un navigateur qui supporte %s et essayez denouveau."; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = "Veuillez utiliser un navigateur qui supporte %s et essayez denouveau."; + +// 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."] = "Dans les version d\'Internet Explorer inférieures à 7.0, Ajax est implémenté par ActiveX. Veuillez activer ActiveX dans les paramètres de sécurité ou utiliser un navigateur qui supporte Ajax et essayez denouveau"; + ?> \ No newline at end of file Modified: trunk/i18n/hu_HU/main.php =================================================================== --- trunk/i18n/hu_HU/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/hu_HU/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -341,4 +341,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/hy_AM/main.php =================================================================== --- trunk/i18n/hy_AM/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/hy_AM/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/id_ID/main.php =================================================================== --- trunk/i18n/id_ID/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/id_ID/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/it_IT/main.php =================================================================== --- trunk/i18n/it_IT/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/it_IT/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ja_JP/main.php =================================================================== --- trunk/i18n/ja_JP/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/ja_JP/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -340,4 +340,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/nb_NO/main.php =================================================================== --- trunk/i18n/nb_NO/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/nb_NO/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/nl_NL/main.php =================================================================== --- trunk/i18n/nl_NL/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/nl_NL/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -340,4 +340,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pl_PL/main.php =================================================================== --- trunk/i18n/pl_PL/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/pl_PL/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -340,4 +340,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pt_BR/main.php =================================================================== --- trunk/i18n/pt_BR/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/pt_BR/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pt_PT/main.php =================================================================== --- trunk/i18n/pt_PT/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/pt_PT/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -340,4 +340,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ru_RU/main.php =================================================================== --- trunk/i18n/ru_RU/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/ru_RU/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -344,4 +344,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sr_CS/main.php =================================================================== --- trunk/i18n/sr_CS/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/sr_CS/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -342,4 +342,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sv_SE/main.php =================================================================== --- trunk/i18n/sv_SE/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/sv_SE/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -347,4 +347,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/tr_TR/main.php =================================================================== --- trunk/i18n/tr_TR/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/tr_TR/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -305,4 +305,62 @@ // line 88 in chat.js.tpl.php $GLOBALS["i18n"]["Send"] = "Gönder"; -?> + +// line 489 in phpfreechat.class.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; + +// line 491 in phpfreechat.class.php +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; + +// line 492 in phpfreechat.class.php +$GLOBALS["i18n"]["Enable sound notifications"] = ""; + +// line 493 in phpfreechat.class.php +$GLOBALS["i18n"]["Disable sound notifications"] = ""; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = ""; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = ""; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = ""; + +// line 44 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = ""; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + +?> \ No newline at end of file Modified: trunk/i18n/uk_RO/main.php =================================================================== --- trunk/i18n/uk_RO/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/uk_RO/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -306,4 +306,61 @@ // line 88 in chat.js.tpl.php $GLOBALS["i18n"]["Send"] = "Trimite"; +// line 489 in phpfreechat.class.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; + +// line 491 in phpfreechat.class.php +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; + +// line 492 in phpfreechat.class.php +$GLOBALS["i18n"]["Enable sound notifications"] = ""; + +// line 493 in phpfreechat.class.php +$GLOBALS["i18n"]["Disable sound notifications"] = ""; + +// line 23 in kick.class.php +$GLOBALS["i18n"]["no reason"] = ""; + +// line 24 in banlist.class.php +$GLOBALS["i18n"]["The banished user list is:"] = ""; + +// line 39 in banlist.class.php +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = ""; + +// line 44 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; + +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 86 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = ""; + +// line 101 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; + +// line 112 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/uk_UA/main.php =================================================================== --- trunk/i18n/uk_UA/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/uk_UA/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_CN/main.php =================================================================== --- trunk/i18n/zh_CN/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/zh_CN/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -343,4 +343,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_TW/main.php =================================================================== --- trunk/i18n/zh_TW/main.php 2007-01-05 22:34:20 UTC (rev 922) +++ trunk/i18n/zh_TW/main.php 2007-01-05 23:10:22 UTC (rev 923) @@ -339,4 +339,28 @@ // line 43 in kick.class.php $GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +// line 20 in quit.class.php +$GLOBALS["i18n"]["%s quit (%s)"] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 124 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 139 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// 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."] = ""; + +// line 137 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// 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."] = ""; + ?> \ 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...> - 2007-01-05 22:34:20
|
Revision: 922 http://svn.sourceforge.net/phpfreechat/?rev=922&view=rev Author: kerphi Date: 2007-01-05 14:34:20 -0800 (Fri, 05 Jan 2007) Log Message: ----------- remove data_public_path writable check Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-01-05 22:26:55 UTC (rev 921) +++ trunk/src/pfcglobalconfig.class.php 2007-01-05 22:34:20 UTC (rev 922) @@ -337,7 +337,7 @@ $f_list["get_object_vars"] = _pfc("You need %s", "PHP 4 or PHP 5"); $this->errors = array_merge($this->errors, check_functions_exist($f_list)); - $this->errors = array_merge($this->errors, @test_writable_dir($this->data_public_path, "data_public_path")); + // $this->errors = array_merge($this->errors, @test_writable_dir($this->data_public_path, "data_public_path")); $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path, "data_private_path")); // $this->errors = array_merge($this->errors, @install_dir($this->jspath, $this->data_public_path."/javascript")); $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path."/cache", "data_private_path/cache")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 22:26:55
|
Revision: 921 http://svn.sourceforge.net/phpfreechat/?rev=921&view=rev Author: kerphi Date: 2007-01-05 14:26:55 -0800 (Fri, 05 Jan 2007) Log Message: ----------- remove a empty <li> Modified Paths: -------------- trunk/themes/default/chat.html.tpl.php Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-05 15:07:39 UTC (rev 920) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 22:26:55 UTC (rev 921) @@ -4,7 +4,7 @@ <div id="pfc_content_expandable"> <div id="pfc_channels"> - <ul id="pfc_channels_list"><li></li></ul> + <ul id="pfc_channels_list"></ul> <div id="pfc_channels_content"></div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 15:07:40
|
Revision: 920 http://svn.sourceforge.net/phpfreechat/?rev=920&view=rev Author: kerphi Date: 2007-01-05 07:07:39 -0800 (Fri, 05 Jan 2007) Log Message: ----------- code cleaning (themes) Modified Paths: -------------- trunk/themes/blune/style.css trunk/themes/default/style.css trunk/themes/green/style.css trunk/themes/zilveer/style.css Modified: trunk/themes/blune/style.css =================================================================== --- trunk/themes/blune/style.css 2007-01-05 13:46:55 UTC (rev 919) +++ trunk/themes/blune/style.css 2007-01-05 15:07:39 UTC (rev 920) @@ -2,7 +2,8 @@ div#pfc_container { color: #2A4064; background-color: #BEC5D0; - background-image: url("proxy.php?p=default/images/shade.gif"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); + background-repeat: repeat-y; } div.pfc_chat { @@ -22,20 +23,14 @@ color:#2A4064; } -div.pfc_btn img:hover { - border: 1px solid #000; -} - -p#pfc_errors { +div#pfc_errors { display: none; margin-top: 5px; padding: 2px; height: 18px; - border: #555 solid 1px; color: #EC4A1F; background-color: #BEC5D0; - text-align: center; font-style: italic; font-weight: bold; } @@ -50,10 +45,10 @@ color: #000; font-weight: bold; } -ul#pfc_channels_list li > div:hover { +ul#pfc_channels_list li div:hover { background-color: #CED4DF; border-bottom: 1px solid #CED4DF; } -ul#pfc_channels_list li.selected > div:hover { +ul#pfc_channels_list li.selected div:hover { background-color: #CED4DF; } Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-01-05 13:46:55 UTC (rev 919) +++ trunk/themes/default/style.css 2007-01-05 15:07:39 UTC (rev 920) @@ -1,11 +1,11 @@ /* +will break display (margins, paddings) on IE6 div#pfc_container * { border: none; margin: 0; padding: 0; } */ - div#pfc_container { margin: 0; padding: 0; border: 1px solid #555; @@ -19,7 +19,7 @@ font-family: Verdana, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ } -div#pfc_container a img { border: none; } +div#pfc_container a img { border: 0px; } #pfc_minmax { margin: 0; padding: 0; @@ -80,7 +80,7 @@ color: #000; font-weight: bold; } -ul#pfc_channels_list li > div:hover { +ul#pfc_channels_list li div:hover { background-color: #FFF; } ul#pfc_channels_list li a { @@ -262,10 +262,7 @@ a#pfc_logo { margin: 0; padding: 0; - display: block; - position: absolute; - right: 0; - top: 0; + float: right; } a#pfc_logo img { margin: 0; padding: 0; Modified: trunk/themes/green/style.css =================================================================== --- trunk/themes/green/style.css 2007-01-05 13:46:55 UTC (rev 919) +++ trunk/themes/green/style.css 2007-01-05 15:07:39 UTC (rev 920) @@ -2,7 +2,7 @@ border: 1px solid #555; color: #338822; background-color: #d9edd8; - background-image: url("proxy.php?p=green/images/shade.gif"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); background-position: right; background-repeat: repeat-y; } @@ -30,7 +30,7 @@ border-bottom: 1px solid #e0edde; color: #000; } -ul#pfc_channels_list li > div:hover { +ul#pfc_channels_list li div:hover { background-color: #e0edde; } ul#pfc_channels_list li a { @@ -41,14 +41,6 @@ border: 1px solid #000; background-color: #EEE; } -div.pfc_online { - border: black solid 1px; - color: #000; - background-color: #DDD; -} -div.pfc_online li { - border-bottom: 1px solid #DDD; -} h2#pfc_title { font-size: 110%; @@ -57,36 +49,17 @@ div.pfc_oldmsg { } -span.pfc_heure, span.pfc_date { +span.pfc_heure { color: #bebebe; } +span.pfc_date { + color: #bebebe; +} span.pfc_nick { color: #fbac17; } -input#pfc_words { - border: black solid 1px; -} - -p#pfc_handle { - border: black solid 1px; - color: black; -} - -div.pfc_btn img { - border: 1px solid #393; /* same as container color */ -} -div.pfc_btn img:hover { - border: 1px solid #000; -} - -p#pfc_errors { - border: black solid 1px; - color: #EC4A1F; - background-color: #FFBA76; -} - /* commands */ .pfc_cmd_msg { color: black; @@ -99,9 +72,14 @@ font-style: italic; color: #888; } -pre.pfc_cmd_rehash, -pre.pfc_cmd_help +pre.pfc_cmd_rehash { color: #888; font-style: italic; } + +pre.pfc_cmd_help +{ + color: #888; + font-style: italic; +} \ No newline at end of file Modified: trunk/themes/zilveer/style.css =================================================================== --- trunk/themes/zilveer/style.css 2007-01-05 13:46:55 UTC (rev 919) +++ trunk/themes/zilveer/style.css 2007-01-05 15:07:39 UTC (rev 920) @@ -1,17 +1,10 @@ -div#pfc_container * { - border: 0px; - margin: 0px; - padding: 0px; - -} - div#pfc_container { border: 1px solid #555; color: #000; padding: 10px; min-height: 20px; background-color: #FFF; - background-image: url("proxy.php?p=default/images/background.gif"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/background.gif'); ?>"); background-position: right; /* background-repeat: repeat-xy;*/ font: 12px Trebuchet MS, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ @@ -38,7 +31,7 @@ background-color: #FFF; margin-top: 5px; - background-image: url("proxy.php?p=zilveer/images/channels_content_bg.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/channels_content_bg.png'); ?>"); width: 640px; } div.pfc_content { @@ -63,7 +56,7 @@ padding: 0 4px 0 4px; border: 1px solid #555; background-color: #DDD; - background-image: url("proxy.php?p=zilveer/images/tab_off.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_off.png'); ?>"); font-size: 11px; font-weight: bold; @@ -77,7 +70,7 @@ color: #000; font-weight: bold; font-size: 11px; - background-image: url("proxy.php?p=zilveer/images/tab_on.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_on.png'); ?>"); /*these 2 lines below is to make the tabs looks the same in IE and FF */ PADDING-BOTTOM: 6px; @@ -129,7 +122,7 @@ /* height: 100%;*/ color: #000; /* colors can be overriden by js nickname colorization */ background-color: #FFF; - background-image: url("proxy.php?p=zilveer/images/pfc_online.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_online.png'); ?>"); background-position: left; background-repeat: repeat-y; /* borders are drawn by the javascript routines */ @@ -163,22 +156,22 @@ .pfc_oddmsg { background-color: #fff; color: #000; - background-image: url("proxy.php?p=zilveer/images/pfc_message1.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message1.png'); ?>"); } .pfc_evenmsg { background-color: #ccc; color: #000; - background-image: url("proxy.php?p=zilveer/images/pfc_message2.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message2.png'); ?>"); } div.pfc_message { - background-image: url("proxy.php?p=zilveer/images/newmsg.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.png'); ?>"); background-position: right; background-repeat: no-repeat; } div.pfc_oldmsg { - background-image: url("proxy.php?p=zilveer/images/oldmsg.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.png'); ?>"); background-position: right; background-repeat: no-repeat; } @@ -198,18 +191,22 @@ margin-top: 5px; font-size: 12px; } +p#pfc_handle { display: none; } +div#pfc_input_container td.pfc_td2 { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_words.png'); ?>"); + background-repeat: no-repeat; + padding-left: 5px; +} + input#pfc_words { border: 0px; background-color: #FAFAFA; width: 520px; - padding: 4px 5px 0px 5px; /*top right bottom left*/ font-size: 12px; - height: 20Px; + height: 20px; vertical-align: bottom; - background-image: url("proxy.php?p=zilveer/images/pfc_words.png"); font: 12px Trebuchet MS; - } input#pfc_send { @@ -223,7 +220,7 @@ color: #333; height: 24px; cursor: pointer; - background-image: url("proxy.php?p=zilveer/images/pfc_send.png"); + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_send.png'); ?>"); cursor: pointer; } @@ -239,20 +236,8 @@ margin-right: 2px; } -p#pfc_handle { - display: inline; - cursor: pointer; - border: 1px solid #555; - padding: 2px 10px 2px 10px; - color: black; - margin-bottom: 5px; - font-weight: bold; - background-color: #EEE; - font-size: 70%; /* these two line fix a display problem in IE6 : */ - vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ - -} + a#pfc_logo { position: absolute; right: 0px; @@ -263,14 +248,6 @@ display: inline; cursor: pointer; } -div.pfc_btn img { - /* doesn't work */ - /* border: 1px solid #393;*/ /* same as container color */ -} -div.pfc_btn img:hover { - /* doesn't work */ - /* border: 1px solid #000;*/ -} div#pfc_bbcode_container * { margin-right: 2px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 13:46:57
|
Revision: 919 http://svn.sourceforge.net/phpfreechat/?rev=919&view=rev Author: kerphi Date: 2007-01-05 05:46:55 -0800 (Fri, 05 Jan 2007) Log Message: ----------- [en] Add the "display_pfc_logo" parameter which should be used only for commercial licenses (see the license page for explainations). [0h20] [fr] Ajout du param?\195?\168tre "display_pfc_logo" qui doit ?\195?\170tre utilis?\195?\169 seulement pour les utilisations commerciales (cf la page licence) [0h20] Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.html.tpl.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-01-05 13:34:37 UTC (rev 918) +++ trunk/src/pfcglobalconfig.class.php 2007-01-05 13:46:55 UTC (rev 919) @@ -86,6 +86,10 @@ var $startwithsound = true; // start with sound enabled var $openlinknewwindow = true; // used to open the links in a new window var $notify_window = true; // true : appends a prefix to the window title with the number of new posted messages + + // Be sure that you are conform to the license page before setting this to false ! + // http://www.phpfreechat.net/license.en.html + var $display_pfc_logo = true; var $displaytabimage = true; var $displaytabclosebutton = true; Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-05 13:34:37 UTC (rev 918) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 13:46:55 UTC (rev 919) @@ -37,12 +37,14 @@ <div id="pfc_cmd_container"> +<?php if ($display_pfc_logo) { ?> <a href="http://www.phpfreechat.net" id="pfc_logo"<?php if($openlinknewwindow) echo ' onclick="window.open(this.href,\'_blank\');return false;"'; ?>> <img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> +<?php } ?> <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 13:34:38
|
Revision: 918 http://svn.sourceforge.net/phpfreechat/?rev=918&view=rev Author: kerphi Date: 2007-01-05 05:34:37 -0800 (Fri, 05 Jan 2007) Log Message: ----------- [en] Bug fix: cannot close the private chat tab if the chatter is disconnected [0h30] [fr] Bug fix : impossible de fermer l'onglet des messages priv?\195?\169s si l'autre chatteur est d?\195?\169connect?\195?\169 [0h30] Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-05 13:11:18 UTC (rev 917) +++ trunk/data/public/js/pfcclient.js 2007-01-05 13:34:37 UTC (rev 918) @@ -888,12 +888,12 @@ * Call the ajax request function * Will query the server */ - sendRequest: function(cmd) + sendRequest: function(cmd, recipientid) { if (pfc_debug) if (cmd != "/update") trace('sendRequest: '+cmd); var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); - var recipientid = this.gui.getTabId(); + if (!recipientid) recipientid = this.gui.getTabId(); cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); return eval('pfc_handleRequest(cmd);'); }, Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-01-05 13:11:18 UTC (rev 917) +++ trunk/data/public/js/pfcgui.js 2007-01-05 13:34:37 UTC (rev 918) @@ -255,7 +255,7 @@ a2.onclick = function(){ var res = confirm(pfc.res.getLabel('Do you really want to leave this room ?')); if (res == true) - pfc.sendRequest('/leave '+this.pfc_tabtype+' "'+this.pfc_tabname+'"'); + pfc.sendRequest('/leave',this.pfc_tabid); return false; } a2.alt = pfc.res.getLabel('Close this tab'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 13:11:17
|
Revision: 917 http://svn.sourceforge.net/phpfreechat/?rev=917&view=rev Author: kerphi Date: 2007-01-05 05:11:18 -0800 (Fri, 05 Jan 2007) Log Message: ----------- prepare the next release Modified Paths: -------------- trunk/version Modified: trunk/version =================================================================== --- trunk/version 2007-01-05 12:57:52 UTC (rev 916) +++ trunk/version 2007-01-05 13:11:18 UTC (rev 917) @@ -1 +1 @@ -1.0-beta8 +1.0-beta9-pre \ 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...> - 2007-01-05 12:58:00
|
Revision: 916 http://svn.sourceforge.net/phpfreechat/?rev=916&view=rev Author: kerphi Date: 2007-01-05 04:57:52 -0800 (Fri, 05 Jan 2007) Log Message: ----------- code cleaning (themes styles) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php trunk/themes/default/style.css Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcclient.js 2007-01-05 12:57:52 UTC (rev 916) @@ -858,7 +858,7 @@ var recipientdiv = this.gui.getChatContentFromTabId(tabid); // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('span'); + var m = document.createElement('div'); // do not setup a inline element (ex: span) because the element height will be wrong on FF2 -> scrollDown(..) will be broken m.innerHTML = msg_html[recipientid]; this.colorizeNicks(m); this.refresh_clock(m); @@ -950,7 +950,7 @@ updateNickListBox: function(chanid) { var nickidlst = this.chanmeta[chanid]['users']['nickid']; - var nickdiv = this.gui.getOnlineContentFromTabId(chanid).firstChild; + var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); ul.setAttribute('class', 'pfc_nicklist'); ul.setAttribute('className', 'pfc_nicklist'); // IE6 @@ -1077,7 +1077,6 @@ if (isadmin == '') isadmin = false; var li = document.createElement('li'); - li.style.borderBottom = '1px solid #AAA'; var a = document.createElement('a'); a.setAttribute('href','#'); Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcgui.js 2007-01-05 12:57:52 UTC (rev 916) @@ -47,7 +47,6 @@ // the next line seems to help with IE6 scroll on the first load // http://sourceforge.net/tracker/index.php?func=detail&aid=1568264&group_id=158880&atid=809601 var dudVar = content.scrollTop; - content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; }, @@ -158,11 +157,6 @@ // I set the border style here because seting it in the CSS is not taken in account // oc.style.borderLeft = "1px solid #555"; oc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) - - // Create a dummy div to add padding - var div = document.createElement('div'); - div.style.padding = "5px"; - oc.appendChild(div); this.onlinecontent[tabid] = oc; return oc; Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -10,16 +10,21 @@ <div id="pfc_input_container"> - <table style="margin:0; padding:0; border-collapse:collapse;"> + <table style="margin:0;padding:0;border-collapse:collapse;"> <tbody> <tr> <td class="pfc_td1"> + <p id="pfc_handle" + title="<?php echo _pfc("Enter your nickname here"); ?>" + onclick="pfc.askNick('')"><?php echo $u->nick; ?></p> + </td> + <td class="pfc_td2"> <input type="text" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len; ?>"/> </td> - <td class="pfc_td2"> + <td class="pfc_td3"> <input type="button" id="pfc_send" value="<?php echo _pfc("Send"); ?>" @@ -39,12 +44,6 @@ title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> - <p id="pfc_handle" - title="<?php echo _pfc("Enter your nickname here"); ?>" - onclick="pfc.askNick('')"> - <?php echo $u->nick; ?> - </p> - <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" alt="" title="" Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.js.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -116,45 +116,39 @@ <div id="pfc_container"> - <div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0 0 10px 0;margin:0;text-align:center;"> + <p style="padding:0;margin:0;text-align:center;"> <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" alt="" style="float:left;margin:0;"/> - Chat loading ...<br style="margin:0"/>Please wait + <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?> </p> </div> <div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> - <noscript> -<p><?php echo _pfc("JavaScript appears to be either disabled or unsupported by your browser. This web application requires JavaScript to work properly. Please enable JavaScript in your browser settings, or upgrade to a browser with JavaScript support and try again."); ?></p> +<p><?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","JavaScript"); ?> <?php echo _pfc("This web application requires %s to work properly.","JavaScript"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","JavaScript","JavaScript"); ?></p> </noscript> -<p> -<script type="text/javascript"> +<p><script type="text/javascript"> + // <![CDATA[ if (!browserSupportsCookies()) - document.write('<?php echo _pfc("Cookies appear to be either disabled or unsupported by your browser. This web application requires Cookies to function properly. Please enable Cookies in your browser settings or upgrade to a browser with Cookie support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Cookies"); ?> <?php echo _pfc("This web application requires %s to work properly.","Cookies"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","Cookies","Cookies"); ?>'); else if (!browserSupportsAjax()) - document.write('<?php echo _pfc("Your browser does not appear to support Ajax technology. This web application requires Ajax to function properly. Please upgrade to a browser with Ajax support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Ajax"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("Please upgrade to a browser with %s support and try again.","Ajax"); ?>'); else if (!ActiveXEnabledOrUnnecessary()) - document.write('<?php echo _pfc("ActiveX appears to be disabled in your browser. This web application requires Ajax technology to function properly. 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."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","ActiveX"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("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."); ?>'); else { $('pfc_notloading').style.display = 'none'; pfc_isready = true; } -</script> -</p> - + // ]]> +</script></p> <a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +</div> <!-- pfc_notloading --> -</div> +</div> <!-- pfc_container --> -</div> - -</div> - <?php if ($debug) { ?> <div id="pfc_debug"></div> <?php } ?> Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/style.css 2007-01-05 12:57:52 UTC (rev 916) @@ -61,7 +61,7 @@ } ul#pfc_channels_list li img { margin: 0; padding: 0; - vertical-align: middle; + vertical-align: bottom; } ul#pfc_channels_list li div { margin: 0; padding: 0; @@ -72,12 +72,13 @@ border-left: 1px solid #555; border-bottom: 1px solid #555; background-color: #DDD; + vertical-align: bottom; } ul#pfc_channels_list li.selected div { background-color: #FFF; border-bottom: 1px solid #FFF; color: #000; - font-weight: bold; + font-weight: bold; } ul#pfc_channels_list li > div:hover { background-color: #FFF; @@ -115,6 +116,9 @@ overflow: auto; word-wrap: break-word; } +div.pfc_chat div { + margin: 0; padding: 0; border: none; +} div.pfc_online { margin: 0; padding: 0; @@ -134,22 +138,30 @@ background-repeat: repeat-y; } div.pfc_online ul { - margin: 0; padding: 0; + margin: 4px; padding: 0; list-style-type: none; - margin-left: 8px; - margin-right: 8px; -} -div.pfc_online li { - margin: 0; padding: 0; - font-weight: bold; font-size: 90%; - /* bottom borders are drawn by the javascript routines */ + font-weight: bold; } -ul.pfc_nicklist li img { +ul.pfc_nicklist li { + margin: 0 0 5px 0; padding: 0; + border-bottom: 1px solid #AAA; +} +ul.pfc_nicklist img { + vertical-align: middle; /* fix icon position problem in IE6 */ +} +ul.pfc_nicklist a { + text-decoration: none; +} +ul.pfc_nicklist nobr span { margin: 0; padding: 0; + display: inline; + text-decoration: none; } + + h2#pfc_title { margin:0; padding:0; border: none; font-size: 110%; @@ -200,12 +212,13 @@ div#pfc_input_container input { margin: 0; padding: 0; } -div#pfc_input_container td.pfc_td1 { +div#pfc_input_container td.pfc_td2 { padding-right: 5px; width: 100%; } input#pfc_words { + margin: 0; padding: 0; border: #555 solid 1px; background-color: #FAFAFA; width: 100%; @@ -217,16 +230,15 @@ } input#pfc_send { + margin: 0; padding: 0; display: block; padding: 2px; - margin-left: 5px; border: 1px solid #555; background-color: #CCC; font-size: 10px; - height: 21px; vertical-align: bottom; font-size: 0.7em; - height: 1.8em; + height: 1.9em; cursor: pointer; } @@ -239,14 +251,13 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - border: 1px solid #555; - padding: 2px 10px 2px 10px; + margin-right: 5px; color: black; - margin-bottom: 5px; font-weight: bold; - background-color: #EEE; + /*background-color: #EEE;*/ font-size: 70%; /* these two line fix a display problem in IE6 : */ - vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ + vertical-align: top; + white-space: pre; } a#pfc_logo { @@ -263,18 +274,11 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - margin-right: 5px; } div.pfc_btn img { - margin: 0; padding: 0; - vertical-align: middle; - /* doesn't work */ - /* border: 1px solid #393;*/ /* same as container color */ + margin: 0; padding: 0; border: none; + vertical-align: middle; } -div.pfc_btn img:hover { - /* doesn't work */ - /* border: 1px solid #000;*/ -} div#pfc_bbcode_container { margin: 4px 0 4px 0; padding: 0; @@ -373,11 +377,6 @@ text-decoration: none; } -ul.pfc_nicklist span.pfc_nickmarker { -} -ul.pfc_nicklist a { - text-decoration: none; -} img.pfc_nickbutton { cursor: pointer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 19:21:26
|
Revision: 915 http://svn.sourceforge.net/phpfreechat/?rev=915&view=rev Author: kerphi Date: 2007-01-04 11:21:26 -0800 (Thu, 04 Jan 2007) Log Message: ----------- improve the error handling process Modified Paths: -------------- trunk/themes/default/chat.js.tpl.php Added Paths: ----------- trunk/data/public/js/compat.js Added: trunk/data/public/js/compat.js =================================================================== --- trunk/data/public/js/compat.js (rev 0) +++ trunk/data/public/js/compat.js 2007-01-04 19:21:26 UTC (rev 915) @@ -0,0 +1,89 @@ + // Cookie handling + var Cookie = + { + read: function (name) + { + var arrCookies = document.cookie.split ('; '); + for (var i=0; i<arrCookies.length; i++) + { + var arrCookie = arrCookies[i].split ('='); + + if (arrCookie[0] == name) + { + return decodeURIComponent (arrCookie[1]); + } + } + return false; + }, + + write: function (name, value, expires, path) + { + if (expires) + { + var date = new Date (); + date.setTime (date.getTime () + (((((expires * 24) * 60) * 60) * 1000))); + expires = '; expires=' + date.toGMTString (); + } + else expires = ''; + + if (!path) path = '/'; + + document.cookie = name+'='+encodeURIComponent (value)+expires+'; path='+path; + }, + + remove: function (name) + { + this.write (name, '', -1); + } + } + + // Detects if can set a cookie in the browser + function browserSupportsCookies() + { + Cookie.write('cookiesEnabled', 1); + var boolCookiesEnabled = Cookie.read('cookiesEnabled'); + Cookie.remove('cookiesEnabled'); + if (boolCookiesEnabled != 1) + { + return false; + } + return true; + } + + // Detects if the browser supports Ajax + function browserSupportsAjax() + { + if (typeof XMLHttpRequest == "undefined" && typeof ActiveXObject == "undefined" && window.createRequest == "undefined") + { + return false; + } + return true + } + + // Detects if the browser can use ActiveX if necessary + function ActiveXEnabledOrUnnecessary () + { + if (typeof ActiveXObject != "undefined") + { + var xhr = null; + try{ + xhr=new ActiveXObject("Msxml2.XMLHTTP"); + }catch (e){ + try{ + xhr=new ActiveXObject("Microsoft.XMLHTTP"); + }catch (e2){ + try{ + xhr=new ActiveXObject("Msxml2.XMLHTTP.4.0"); + }catch (e3){ + xhr=null; + } + } + } + if (xhr == null) + { + return false + } + } + + return true; + } \ No newline at end of file Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-01-04 17:58:02 UTC (rev 914) +++ trunk/themes/default/chat.js.tpl.php 2007-01-04 19:21:26 UTC (rev 915) @@ -40,8 +40,8 @@ var pfc_nickname_color_list = <?php echo $json->encode($nickname_colorlist); ?>; var pfc_proxy_url = '<?php echo $data_public_url."/".$serverid."/proxy.php"; ?>'; var pfc_theme = <?php echo $json->encode($theme); ?>; +var pfc_isready = false; - var xajaxConfig = { requestURI: "<?php echo $c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""); ?>", debug: false, @@ -58,7 +58,7 @@ window.onload = function () { pfc = new pfcClient(); - pfc_loadChat(pfc_theme); + if (pfc_isready) pfc_loadChat(pfc_theme); } <?php if ($debugxajax) { ?> @@ -99,6 +99,7 @@ <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/xajax.js"></script> +<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/compat.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/md5.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/cookie.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/image_preloader.js"></script> @@ -115,35 +116,43 @@ <div id="pfc_container"> + <div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0;margin:0;text-align:center;"> + <p style="padding:0 0 10px 0;margin:0;text-align:center;"> <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" alt="" style="float:left;margin:0;"/> Chat loading ...<br style="margin:0"/>Please wait -</p> - <img src="http://img332.imageshack.us/img332/1756/helpiv1.gif" -alt="help" -style="position:absolute;bottom:2px;right:2px;margin:0;padding:0;cursor:help" -onmouseover="document.getElementById('pfc_notloading').style.display='block';" -/> + </p> </div> -<div id="pfc_notloading" style="width:270px;background-color:#FFF;border:1px solid #000;text-align:center;display:none;margin:5px auto 0 auto"> +<div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> + +<noscript> +<p><?php echo _pfc("JavaScript appears to be either disabled or unsupported by your browser. This web application requires JavaScript to work properly. Please enable JavaScript in your browser settings, or upgrade to a browser with JavaScript support and try again."); ?></p> +</noscript> <p> -<?php echo _pfc("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"); ?> <a href="http://www.phpfreechat.net/forum/">www.phpfreechat.net/forum</a> -<a href="http://www.phpfreechat.net"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +<script type="text/javascript"> +if (!browserSupportsCookies()) + document.write('<?php echo _pfc("Cookies appear to be either disabled or unsupported by your browser. This web application requires Cookies to function properly. Please enable Cookies in your browser settings or upgrade to a browser with Cookie support and try again."); ?>'); +else if (!browserSupportsAjax()) + document.write('<?php echo _pfc("Your browser does not appear to support Ajax technology. This web application requires Ajax to function properly. Please upgrade to a browser with Ajax support and try again."); ?>'); +else if (!ActiveXEnabledOrUnnecessary()) + document.write('<?php echo _pfc("ActiveX appears to be disabled in your browser. This web application requires Ajax technology to function properly. 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."); ?>'); +else +{ + $('pfc_notloading').style.display = 'none'; + pfc_isready = true; +} +</script> </p> + +<a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> + </div> </div> - -<?php /* ?> -<p><?php echo _pfc("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"); ?> <a href="http://www.phpfreechat.net/forum/">www.phpfreechat.net/forum</a></p> -<a href="http://www.phpfreechat.net"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> -<?php */ ?> - </div> <?php if ($debug) { ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 17:58:04
|
Revision: 914 http://svn.sourceforge.net/phpfreechat/?rev=914&view=rev Author: kerphi Date: 2007-01-04 09:58:02 -0800 (Thu, 04 Jan 2007) Log Message: ----------- fix a margin problem Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-04 17:30:14 UTC (rev 913) +++ trunk/data/public/js/pfcclient.js 2007-01-04 17:58:02 UTC (rev 914) @@ -858,7 +858,7 @@ var recipientdiv = this.gui.getChatContentFromTabId(tabid); // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('div'); + var m = document.createElement('span'); m.innerHTML = msg_html[recipientid]; this.colorizeNicks(m); this.refresh_clock(m); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 17:30:14
|
Revision: 913 http://svn.sourceforge.net/phpfreechat/?rev=913&view=rev Author: kerphi Date: 2007-01-04 09:30:14 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Bug fix: the kick command was broken (thanks to http://sourceforge.net/tracker/index.php?func=detail&aid=1625158&group_id=158880&atid=809603) Modified Paths: -------------- trunk/src/commands/kick.class.php Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2007-01-04 17:18:13 UTC (rev 912) +++ trunk/src/commands/kick.class.php 2007-01-04 17:30:14 UTC (rev 913) @@ -39,6 +39,7 @@ $channame = $u->channels[$recipientid]["name"]; $cmdstr = 'leave'; $cmdp = array(); + $cmdp['params'][] = 'ch'; $cmdp['params'][] = $channame; // channel name $cmdp['params'][] = _pfc("kicked from %s by %s - reason: %s", $channame, $sender, $reason); // reason pfcCommand::AppendCmdToPlay($otherid, $cmdstr, $cmdp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 17:18:14
|
Revision: 912 http://svn.sourceforge.net/phpfreechat/?rev=912&view=rev Author: kerphi Date: 2007-01-04 09:18:13 -0800 (Thu, 04 Jan 2007) Log Message: ----------- [en] Bug fix: on php4 servers, private messages / kick / ban was broken ( see http://sourceforge.net/tracker/index.php?func=detail&aid=1625155&group_id=158880&atid=809603 ) [fr] Bug fix : en php4 les messages priv?\195?\169s / kick / ban ne fonctionnaient plus ( cf http://sourceforge.net/tracker/index.php?func=detail&aid=1625155&group_id=158880&atid=809603 ) Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-12-29 12:22:57 UTC (rev 911) +++ trunk/src/pfccommand.class.php 2007-01-04 17:18:13 UTC (rev 912) @@ -205,7 +205,7 @@ return false; } - function RunPendingCmdToPlay($nickid,$clientid,$xml_reponse) + function RunPendingCmdToPlay($nickid,$clientid,&$xml_reponse) { $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-12-29 12:23:06
|
Revision: 911 http://svn.sourceforge.net/phpfreechat/?rev=911&view=rev Author: kerphi Date: 2006-12-29 04:22:57 -0800 (Fri, 29 Dec 2006) Log Message: ----------- [en] Bandwidth optimization: do not return any bytes when the periodic /update command returns nothing. [0h30] [fr] Optimisation de la bande passante : retourne rien du tout lorsque la commande periodique /update ne retourne rien. [0h30] Modified Paths: -------------- trunk/src/commands/update.class.php trunk/src/phpfreechat.class.php Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2006-12-29 11:57:52 UTC (rev 910) +++ trunk/src/commands/update.class.php 2006-12-29 12:22:57 UTC (rev 911) @@ -69,7 +69,8 @@ $cmd->run($xml_reponse, $cmdp); } - $xml_reponse->script("pfc.handleResponse('update', 'ok', '');"); + // do not send ok response to save bandwidth + // $xml_reponse->script("pfc.handleResponse('update', 'ok', '');"); } else $xml_reponse->script("pfc.handleResponse('update', 'ko', '');"); Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-12-29 11:57:52 UTC (rev 910) +++ trunk/src/phpfreechat.class.php 2006-12-29 12:22:57 UTC (rev 911) @@ -61,11 +61,11 @@ { require_once $c->xajaxpath."/xajax_core/xajax.inc.php"; $this->xajax = new xajax($c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""), 'pfc_'); - if ($c->debugxajax) $this->xajax->debugOn(); + if ($c->debugxajax) $this->xajax->setFlag('debug', true); $this->xajax->setWrapperPrefix('pfc_'); - // $this->xajax->waitCursorOff(); // do not show a wait cursor during chat updates - //$this->xajax->cleanBufferOff(); - //$this->xajax->errorHandlerOn(); // used to have verbose error logs + $this->xajax->setFlag('waitCursor', false); + $this->xajax->setFlag('cleanBuffer', false); + $this->xajax->setFlag('errorHandler', true); $this->xajax->registerFunction(array('handleRequest',&$this,'handleRequest')); $this->xajax->registerFunction(array('loadStyles',&$this,'loadStyles')); $this->xajax->registerFunction(array('loadScripts',&$this,'loadScripts')); @@ -386,8 +386,8 @@ ob_end_clean(); } - // do nothing else if the xml response is empty - //if ($xml_reponse->xml == "") die(); + // do nothing else if the xml response is empty in order to save bandwidth + if ($xml_reponse->getCommandCount() == 0) die(); return $xml_reponse; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-12-29 11:57:58
|
Revision: 910 http://svn.sourceforge.net/phpfreechat/?rev=910&view=rev Author: kerphi Date: 2006-12-29 03:57:52 -0800 (Fri, 29 Dec 2006) Log Message: ----------- fix the loadBBCodeColorList function Modified Paths: -------------- trunk/data/public/js/pfcgui.js trunk/src/phpfreechat.class.php Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2006-12-21 06:35:09 UTC (rev 909) +++ trunk/data/public/js/pfcgui.js 2006-12-29 11:57:52 UTC (rev 910) @@ -418,6 +418,27 @@ } }, + loadBBCodeColorList: function() + { + // color list + var clist = $('pfc_colorlist'); + var clist_v = pfc_bbcode_color_list; + for (var i=0 ; i<clist_v.length ; i++) + { + var bbc = clist_v[i]; + var elt = document.createElement('img'); + elt.bbc = bbc; + elt.setAttribute('class', 'pfc_color'); + elt.setAttribute('className', 'pfc_color'); // for IE6 + elt.setAttribute('id', 'pfc_color_'+bbc); + elt.style.backgroundColor = '#'+bbc; + elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif')); + elt.setAttribute('alt', bbc); + elt.onclick = function(){ pfc.switch_text_color(this.bbc); } + clist.appendChild(elt); + } + }, + buildChat: function() { var container = $('pfc_container'); @@ -714,6 +735,5 @@ var soundcontainerbox = document.createElement('div'); soundcontainerbox.setAttribute('id', 'pfc_sound_container'); container.appendChild(soundcontainerbox); - } - + } }; Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-12-21 06:35:09 UTC (rev 909) +++ trunk/src/phpfreechat.class.php 2006-12-29 11:57:52 UTC (rev 910) @@ -393,7 +393,7 @@ } - function loadStyles($theme = 'default', &$xml_reponse = null) + function loadStyles($theme = 'default', &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -440,7 +440,7 @@ return $xml_reponse; } - function loadScripts($theme = 'default', &$xml_reponse = null) + function loadScripts($theme, &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -556,7 +556,7 @@ } - function loadInterface($theme = 'default', &$xml_reponse = null) + function loadInterface($theme = 'default', &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -581,9 +581,9 @@ return $xml_reponse; } - function loadChat($theme = 'default', &$xml_reponse = null) + function loadChat($theme = 'default') { - if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); + $xml_reponse = new xajaxResponse(); $this->loadInterface($theme,$xml_reponse); $this->loadStyles($theme,$xml_reponse); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-12-21 06:35:11
|
Revision: 909 http://svn.sourceforge.net/phpfreechat/?rev=909&view=rev Author: kerphi Date: 2006-12-20 22:35:09 -0800 (Wed, 20 Dec 2006) Log Message: ----------- optimizations on interface loading (work in progress) Modified Paths: -------------- trunk/debug/console.php trunk/index.php trunk/src/commands/asknick.class.php trunk/src/commands/banlist.class.php trunk/src/commands/clear.class.php trunk/src/commands/connect.class.php trunk/src/commands/debug.class.php trunk/src/commands/error.class.php trunk/src/commands/getnewmsg.class.php trunk/src/commands/help.class.php trunk/src/commands/identify.class.php trunk/src/commands/join.class.php trunk/src/commands/leave.class.php trunk/src/commands/nick.class.php trunk/src/commands/privmsg.class.php trunk/src/commands/quit.class.php trunk/src/commands/rehash.class.php trunk/src/commands/send.class.php trunk/src/commands/unban.class.php trunk/src/commands/update.class.php trunk/src/commands/version.class.php trunk/src/commands/who.class.php trunk/src/commands/who2.class.php trunk/src/commands/whois.class.php trunk/src/pfccommand.class.php trunk/src/pfcglobalconfig.class.php trunk/src/phpfreechat.class.php trunk/src/proxies/auth.class.php trunk/src/proxies/checknickchange.class.php trunk/src/proxies/noflood.class.php trunk/themes/default/style.css Added Paths: ----------- trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php Removed Paths: ------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js trunk/src/client/pfcresource.js trunk/src/client/proxy.php.tpl Modified: trunk/debug/console.php =================================================================== --- trunk/debug/console.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/debug/console.php 2006-12-21 06:35:09 UTC (rev 909) @@ -19,7 +19,7 @@ unlink($filename); $xml_reponse->addAppend("debug".$section, "innerHTML", $html); } - $xml_reponse->addScript("window.setTimeout('phpfreechat_getnewlog(\'".$chatid."\',\'".$section."\')', 1000);"); + $xml_reponse->script("window.setTimeout('phpfreechat_getnewlog(\'".$chatid."\',\'".$section."\')', 1000);"); return $xml_reponse->getXML(); } $xajax = new xajax("", "phpfreechat_"); Modified: trunk/index.php =================================================================== --- trunk/index.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/index.php 2006-12-21 06:35:09 UTC (rev 909) @@ -6,6 +6,7 @@ $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params["isadmin"] = true; // just for debug ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["debug"] = true; $chat = new phpFreeChat( $params ); ?> @@ -19,8 +20,6 @@ <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> - <?php $chat->printJavascript(); ?> - <?php $chat->printStyle(); ?> </head> <body> Deleted: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/src/client/chat.js.tpl.php 2006-12-21 06:35:09 UTC (rev 909) @@ -1,174 +0,0 @@ -<?php -require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); -$json = new Services_JSON(); -?> -<?php $nick = $u->nick != "" ? $json->encode($u->nick) : $json->encode($c->nick); ?> - -var pfc_nickname = <?php echo ($GLOBALS["output_encoding"]=="UTF-8" ? $nick : iconv("UTF-8", $GLOBALS["output_encoding"],$nick)); ?>; -var pfc_nickid = <?php echo $json->encode($u->nickid); ?>; -var pfc_version = <?php echo $json->encode($version); ?>; -var pfc_clientid = <?php echo $json->encode(md5(uniqid(rand(), true))); ?>; -var pfc_title = <?php echo $json->encode($title); ?>; -var pfc_refresh_delay = <?php echo $json->encode($refresh_delay); ?>; -var pfc_max_refresh_delay = <?php echo $json->encode($max_refresh_delay); ?>; -var pfc_start_minimized = <?php echo $json->encode($start_minimized); ?>; -var pfc_nickmarker = <?php echo $json->encode($nickmarker); ?>; -var pfc_clock = <?php echo $json->encode($clock); ?>; -var pfc_startwithsound = <?php echo $json->encode($startwithsound); ?>; -var pfc_showsmileys = <?php echo $json->encode($showsmileys); ?>; -var pfc_showwhosonline = <?php echo $json->encode($showwhosonline); ?>; -var pfc_focus_on_connect = <?php echo $json->encode($focus_on_connect); ?>; -var pfc_max_text_len = <?php echo $json->encode($max_text_len); ?>; -var pfc_max_displayed_lines = <?php echo $json->encode($max_displayed_lines); ?>; -var pfc_quit_on_closedwindow = <?php echo $json->encode($quit_on_closedwindow); ?>; -var pfc_debug = <?php echo $json->encode($debug); ?>; -var pfc_btn_sh_smileys = <?php echo $json->encode($btn_sh_smileys); ?>; -var pfc_btn_sh_whosonline = <?php echo $json->encode($btn_sh_whosonline); ?>; -var pfc_displaytabimage = <?php echo $json->encode($displaytabimage); ?>; -var pfc_displaytabclosebutton = <?php echo $json->encode($displaytabclosebutton); ?>; -var pfc_connect_at_startup = <?php echo $json->encode($connect_at_startup); ?>; -var pfc_notify_window = <?php echo $json->encode($notify_window); ?>; -var pfc_defaultchan = <?php echo $json->encode($c->channels); ?>; -var pfc_userchan = <?php $list = array(); foreach($u->channels as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>; -var pfc_defaultprivmsg = <?php echo $json->encode($c->privmsg); ?>; -var pfc_userprivmsg = <?php $list = array(); foreach($u->privmsg as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>; -var pfc_openlinknewwindow = <?php echo $json->encode($openlinknewwindow); ?>; -var pfc_bbcode_color_list = <?php $list = array(); foreach($bbcode_colorlist as $v) {$list[] = substr($v,1);} echo $json->encode($list); ?>; -var pfc_nickname_color_list = <?php echo $json->encode($nickname_colorlist); ?>; -var pfc_proxy_url = '<?php echo $data_public_url."/".$serverid."/proxy.php"; ?>'; - - -// create our client which will do all the work on the client side ! -var pfc = new pfcClient(); -<?php - -$labels_to_load = -array( "Do you really want to leave this room ?", // _pfc - "Hide nickname marker", // _pfc - "Show nickname marker", // _pfc - "Hide dates and hours", // _pfc - "Show dates and hours", // _pfc - "Disconnect", // _pfc - "Connect", // _pfc - "Magnify", // _pfc - "Cut down", // _pfc - "Hide smiley box", // _pfc - "Show smiley box", // _pfc - "Hide online users box", // _pfc - "Show online users box", // _pfc - "Please enter your nickname", // _pfc - "Private message", // _pfc - "Close this tab", // _pfc - "Enter your message here", // _pfc - "Enter your nickname here", // _pfc - "Bold", // _pfc - "Italics", // _pfc - "Underline", // _pfc - "Delete", // _pfc - "Mail", // _pfc - "Color", // _pfc - "PHP FREE CHAT [powered by phpFreeChat-%s]", // _pfc - "Enter the text to format", // _pfc - "Configuration has been rehashed", // _pfc - "A problem occurs during rehash", // _pfc - "Choosen nickname is allready used", // _pfc - "phpfreechat current version is %s", // _pfc - "Maximum number of joined channels has been reached", // _pfc - "Maximum number of private chat has been reached", // _pfc - "Click here to send your message", // _pfc - "Send", // _pfc - "You are not allowed to speak to yourself", // _pfc - "Close", // _pfc - "Choosen nickname is not allowed", // _pfc - "Enable sound notifications", // _pfc - "Disable sound notifications", // _pfc - ); -foreach($labels_to_load as $l) -{ - echo "pfc.res.setLabel(".$json->encode($l).",".$json->encode(_pfc2($l)).");\n"; -} - -$fileurl_to_load = -array( 'images/ch.gif', - 'images/pv.gif', - 'images/tab_remove.gif', - 'images/ch-active.gif', - 'images/pv-active.gif', - 'images/user.gif', - 'images/user-me.gif', - 'images/color-on.gif', - 'images/color-off.gif', - 'images/clock-on.gif', - 'images/clock-off.gif', - 'images/logout.gif', - 'images/login.gif', - 'images/maximize.gif', - 'images/minimize.gif', - 'images/smiley-on.gif', - 'images/smiley-off.gif', - 'images/online-on.gif', - 'images/online-off.gif', - 'images/bt_strong.gif', - 'images/bt_em.gif', - 'images/bt_ins.gif', - 'images/bt_del.gif', - 'images/bt_mail.gif', - 'images/bt_color.gif', - 'images/color_transparent.gif', - 'images/close-whoisbox.gif', - 'images/openpv.gif', - 'images/user-admin.gif', - 'images/sound-on.gif', - 'images/sound-off.gif', - 'sound.swf', - ); - -foreach($fileurl_to_load as $f) -{ - echo "pfc.res.setFileUrl(".$json->encode($f).",pfc_proxy_url+'".$c->getFileUrlByProxy($f,false)."');\n"; -} - -foreach($smileys as $s_file => $s_str) { - for($j = 0; $j<count($s_str) ; $j++) { - echo "pfc.res.setSmiley(".$json->encode($s_str[$j]).",pfc_proxy_url+'".$c->getFileUrlByProxy($s_file,false)."');\n"; - } -} - -?> -pfc.gui.buildChat(); -pfc.connectListener(); -pfc.refreshGUI(); -if (pfc_connect_at_startup) pfc.connect_disconnect(); - -<?php if ($debugxajax) { ?> -xajax.DebugMessage = function(text) -{ - var s = new String(text); - text = s.escapeHTML(); - rx = new RegExp('<','g'); - text = text.replace(rx, '\n<'); - $('pfc_debugxajax').innerHTML += '\n---------------\n' + text; -} -<?php } ?> - -<?php if ($debug) { ?> -var pfc_debug_color = true; -function trace(text) { - var s = new String(text); - text = s.escapeHTML(); - rx = new RegExp('<','g'); - text = text.replace(rx, '\n<'); - var color = ''; - if (pfc_debug_color) - { - color = '#BBB'; - pfc_debug_color = false; - } - else - { - color = '#DDD'; - pfc_debug_color = true; - } - $('pfc_debug').innerHTML = '<p style="margin:0;border-bottom:1px solid #555;background-color:'+color+'">' + text + '</p>' + $('pfc_debug').innerHTML ; -} -<?php } ?> Deleted: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/src/client/pfcclient.js 2006-12-21 06:35:09 UTC (rev 909) @@ -1,1736 +0,0 @@ -var is_ie = navigator.appName.match("Explorer"); -var is_khtml = navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML"); -var is_ff = navigator.appName.match("Netscape"); - -/** - * This class is the client part of phpFreeChat - * (depends on prototype library) - * @author Stephane Gully - */ -var pfcClient = Class.create(); - -//defining the rest of the class implmentation -pfcClient.prototype = { - - initialize: function() - { - // load the graphical user interface builder - this.gui = new pfcGui(); - // load the resources manager (labels and urls) - this.res = new pfcResource(); - - this.nickname = pfc_nickname; - this.nickid = pfc_nickid; - this.usermeta = $H(); - this.chanmeta = $H(); - this.nickwhoisbox = $H(); - - // this array contains all the sent command - // used the up and down key to navigate in the history - // (doesn't work on IE6) - this.cmdhistory = Array(); - this.cmdhistoryid = -1; - this.cmdhistoryissearching = false; - - /* - this.channels = Array(); - this.channelids = Array(); - */ - this.privmsgs = Array(); - this.privmsgids = Array(); - - this.timeout = null; - this.refresh_delay = pfc_refresh_delay; - this.max_refresh_delay = pfc_max_refresh_delay; - this.last_refresh_time = 0; - /* unique client id for each windows used to identify a open window - * this id is passed every time the JS communicate with server - * (2 clients can use the same session: then only the nickname is shared) */ - this.clientid = pfc_clientid; - - this.isconnected = false; - this.nicklist = $H(); - this.nickcolor = Array(); - this.colorlist = Array(); - - this.blinktmp = Array(); - this.blinkloop = Array(); - this.blinktimeout = Array(); - }, - - connectListener: function() - { - this.el_words = $('pfc_words'); - this.el_handle = $('pfc_handle'); - this.el_container = $('pfc_container'); -// this.el_online = $('pfc_online'); - this.el_errors = $('pfc_errors'); - - this.detectactivity = new DetectActivity(this.el_container); - // restore the window title when user come back to the active zone - if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow.bindAsEventListener(this.gui); - - /* the events callbacks */ - this.el_words.onkeypress = this.callbackWords_OnKeypress.bindAsEventListener(this); -// don't use this line because when doing completeNick the "return false" doesn't work (focus is lost) -// Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); - Event.observe(this.el_words, 'keydown', this.callbackWords_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_words, 'focus', this.callbackWords_OnFocus.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'keydown', this.callbackHandle_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'change', this.callbackHandle_OnChange.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mousemove', this.callbackContainer_OnMousemove.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mousedown', this.callbackContainer_OnMousedown.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mouseup', this.callbackContainer_OnMouseup.bindAsEventListener(this), false); - Event.observe(document.body, 'unload', this.callback_OnUnload.bindAsEventListener(this), false); - }, - - refreshGUI: function() - { - this.minmax_status = pfc_start_minimized; - var cookie = getCookie('pfc_minmax_status'); - if (cookie != null) - this.minmax_status = (cookie == 'true'); - - cookie = getCookie('pfc_nickmarker'); - this.nickmarker = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.nickmarker = pfc_nickmarker; - - cookie = getCookie('pfc_clock'); - this.clock = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.clock = pfc_clock; - - cookie = getCookie('pfc_showsmileys'); - this.showsmileys = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showsmileys = pfc_showsmileys; - - cookie = getCookie('pfc_showwhosonline'); - this.showwhosonline = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showwhosonline = pfc_showwhosonline; - - // '' means no forced color, let CSS choose the text color - this.current_text_color = ''; - cookie = getCookie('pfc_current_text_color'); - if (cookie != null) - this.switch_text_color(cookie); - - cookie = getCookie('pfc_issoundenable'); - this.issoundenable = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.issoundenable = pfc_startwithsound; - - this.refresh_loginlogout(); - this.refresh_minimize_maximize(); - this.refresh_Smileys(); - this.refresh_sound(); - this.refresh_nickmarker(); - }, - - /** - * Show a popup dialog to ask user to choose a nickname - */ - askNick: function(nickname) - { - // ask to choose a nickname - if (nickname == '') nickname = this.nickname; - var newnick = prompt(this.res.getLabel('Please enter your nickname'), nickname); - if (newnick) - this.sendRequest('/nick "'+newnick+'"'); - }, - - /** - * Reacte to the server response - */ - handleResponse: function(cmd, resp, param) - { - if (pfc_debug) - if (cmd != "update") trace('handleResponse: '+cmd + "-"+resp+"-"+param); - if (cmd == "connect") - { - //alert(cmd + "-"+resp+"-"+param); - if (resp == "ok") - { - if (this.nickname == '') - // ask to choose a nickname - this.askNick(this.nickname); - else - { - this.sendRequest('/nick "'+this.nickname+'"'); - } - - // give focus the the input text box if wanted - if (pfc_focus_on_connect) this.el_words.focus(); - - this.isconnected = true; - - // start the polling system - this.updateChat(true); - } - else - this.isconnected = false; - this.refresh_loginlogout(); - } - else if (cmd == "quit") - { - if (resp =="ok") - { - // stop updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - } - else if (cmd == "join" || cmd == "join2") - { - if (resp =="ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "ch"); - if (cmd != "join2") this.gui.setTabById(tabid); - this.refresh_Smileys(); - this.refresh_WhosOnline(); - } - else if (resp == "max_channels") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of joined channels has been reached') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "leave") - { - //alert(cmd + "-"+resp+"-"+param); - if (resp =="ok") - { - // remove the channel - var tabid = param; - this.gui.removeTabById(tabid); - - // synchronize the channel client arrays - /* - var index = -1; - index = this.channelids.indexOf(tabid); - this.channelids = this.channelids.without(tabid); - this.channels = this.channels.without(this.channels[index]); - */ - - // synchronize the privmsg client arrays - index = -1; - index = indexOf(this.privmsgids, tabid); - this.privmsgids = without(this.privmsgids, tabid); - this.privmsgs = without(this.privmsgs, this.privmsgs[index]); - - } - } - else if (cmd == "privmsg" || cmd == "privmsg2") - { - if (resp == "ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "pv"); - if (cmd != "privmsg2") this.gui.setTabById(tabid); - - this.privmsgs.push(name); - this.privmsgids.push(tabid); - - } - else if (resp == "max_privmsg") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of private chat has been reached') ); - } - else if (resp == "unknown") - { - // speak to unknown user - } - else if (resp == "speak_to_myself") - { - this.displayMsg( cmd, this.res.getLabel('You are not allowed to speak to yourself') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "nick") - { - if (resp == "connected" || resp == "notchanged") - { - cmd = ''; - - // join the default channels comming from the parameter list - for (var i=0; i<pfc_defaultchan.length; i++) - { - if (i<pfc_defaultchan.length-1) - cmd = '/join2'; - else - cmd = '/join'; - cmd += ' "'+pfc_defaultchan[i]+'"'; - this.sendRequest(cmd); - } - // now join channels comming from sessions - for (var i=0; i<pfc_userchan.length; i++) - { - if (i<pfc_userchan.length-1) - cmd = '/join2'; - else - cmd = '/join'; - cmd += ' "'+pfc_userchan[i]+'"'; - this.sendRequest(cmd); - } - - // join the default privmsg comming from the parameter list - for (var i=0; i<pfc_defaultprivmsg.length; i++) - { - if (i<pfc_defaultprivmsg.length-1) - cmd = '/privmsg2'; - else - cmd = '/privmsg'; - cmd += ' "'+pfc_defaultprivmsg[i]+'"'; - this.sendRequest(cmd); - } - // now join privmsg comming from the sessions - for (var i=0; i<pfc_userprivmsg.length; i++) - { - this.sendRequest('/privmsg "'+pfc_userprivmsg[i]+'"'); - } - } - - if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") - { - this.el_handle.innerHTML = param; - this.nickname = param; - this.usermeta[this.nickid]['nick'] = param; - this.updateNickBox(this.nickid); - - // clear the possible error box generated by the bellow displayMsg(...) function - this.clearError(Array(this.el_words)); - } - else if (resp == "isused") - { - this.setError(this.res.getLabel('Choosen nickname is allready used'), Array()); - this.askNick(param); - } - else if (resp == "notallowed") - { - // when frozen_nick is true and the nickname is allready used, server will return - // the 'notallowed' status. It will display a message and stop chat update. - // if the chat update is not stopped, this will loop forever - // as long as the forced nickname is not changed - - // display a message - this.setError(this.res.getLabel('Choosen nickname is not allowed'), Array()); - // then stop chat updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - - } - else if (cmd == "update") - { - this.canupdatenexttime = true; - // if the first ever refresh request never makes it back then the chat will keep - // trying to refresh as usual - // this only helps if we temporarily lose connection in the middle of an established - // chat session - this.last_refresh_time = new Date().getTime(); - } - else if (cmd == "version") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('phpfreechat current version is %s',param) ); - } - } - else if (cmd == "help") - { - if (resp == "ok") - { - this.displayMsg( cmd, param); - } - } - else if (cmd == "rehash") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('Configuration has been rehashed') ); - } - else if (resp == "ko") - { - this.displayMsg( cmd, this.res.getLabel('A problem occurs during rehash') ); - } - } - else if (cmd == "banlist") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "unban") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "auth") - { - if (resp == "ban") - { - alert(param); - } - if (resp == "frozen") - { - alert(param); - } - else if (resp == "nick") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "debug") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "clear") - { - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - container.innerHTML = ""; - } - else if (cmd == "identify") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "checknickchange") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "whois" || cmd == "whois2") - { - var nickid = param['nickid']; - if (resp == "ok") - { - this.usermeta[nickid] = $H(param); - this.updateNickBox(nickid); - this.updateNickWhoisBox(nickid); - } - if (cmd == "whois") - { - // display the whois info - var um = this.getAllUserMeta(nickid); - var um_keys = um.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = um[k]; - if (v && - // these parameter are used internaly (don't display it) - k != 'nickid' && - k != 'floodtime' && - k != 'flood_nbmsg' && - k != 'flood_nbchar') - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "who" || cmd == "who2") - { - var chan = param['chan']; - var chanid = param['chanid']; - var meta = $H(param['meta']); - if (resp == "ok") - { - this.chanmeta[chanid] = meta; - - // send /whois commands for unknown users - for (var i=0; i<meta['users']['nickid'].length; i++) - { - var nickid = meta['users']['nickid'][i]; - var nick = meta['users']['nick'][i]; - var um = this.getAllUserMeta(nickid); - if (!um) this.sendRequest('/whois2 "'+nick+'"'); - } - - // update the nick list display on the current channel - this.updateNickListBox(chanid); - } - if (cmd == "who") - { - // display the whois info - var cm = this.getAllChanMeta(chanid); - var cm_keys = cm.keys(); - var msg = ''; - for (var i=0; i<cm_keys.length; i++) - { - var k = cm_keys[i]; - var v = cm[k]; - if (k != 'users') - { - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "getnewmsg") - { - if (resp == "ok") - { - this.handleComingRequest(param); - } - } - else - alert(cmd + "-"+resp+"-"+param); - }, - - getAllUserMeta: function(nickid) - { - if (nickid && this.usermeta[nickid]) - return this.usermeta[nickid]; - else - return null; - }, - - getUserMeta: function(nickid, key) - { - if (nickid && key && this.usermeta[nickid] && this.usermeta[nickid][key]) - return this.usermeta[nickid][key]; - else - return ''; - }, - - getAllChanMeta: function(chanid) - { - if (chanid && this.chanmeta[chanid]) - return this.chanmeta[chanid]; - else - return null; - }, - - getChanMeta: function(chanid, key) - { - if (chanid && key && this.chanmeta[chanid] && this.chanmeta[chanid][key]) - return this.chanmeta[chanid][key]; - else - return ''; - }, - - doSendMessage: function() - { - var w = this.el_words; - var wval = w.value; - - // append the string to the history - this.cmdhistory.push(wval); - this.cmdhistoryid = this.cmdhistory.length; - this.cmdhistoryissearching = false; - - // send the string to the server - re = new RegExp("^(\/[a-zA-Z0-9]+)( (.*)|)"); - if (wval.match(re)) - { - // a user command - cmd = wval.replace(re, '$1'); - param = wval.replace(re, '$3'); - this.sendRequest(cmd +' '+ param.substr(0, pfc_max_text_len + 2*this.clientid.length)); - } - else - { - // a classic 'send' command - - // empty messages with only spaces - rx = new RegExp('^[ ]*$','g'); - wval = wval.replace(rx,''); - - // truncate the text length - wval = wval.substr(0,pfc_max_text_len); - - // colorize the text with current_text_color - if (this.current_text_color != '' && wval.length != '') - wval = '[color=#' + this.current_text_color + '] ' + wval + ' [/color]'; - - this.sendRequest('/send '+ wval); - } - w.value = ''; - return false; - }, - - /** - * Try to complete a nickname like on IRC when pressing the TAB key - * @todo: improve the algorithme, it should take into account the cursor position - */ - completeNick: function() - { - var w = this.el_words; - var nick_src = w.value.substring(w.value.lastIndexOf(' ')+1,w.value.length); - if (nick_src != '') - { - var tabid = this.gui.getTabId(); - var n_list = this.chanmeta[tabid]['users']['nick']; - for (var i=0; i<n_list.length; i++) - { - var nick = n_list[i]; - if (nick.indexOf(nick_src) == 0) - w.value = w.value.replace(nick_src, nick); - } - } - }, - - /** - * Handle the pressed keys - * see also callbackWords_OnKeydown - */ - callbackWords_OnKeypress: function(evt) - { - var code = (evt.which) ? evt.which : evt.keyCode; - if (code == Event.KEY_TAB) /* tab key */ - { - /* FF & Konqueror workaround : ignore TAB key here */ - /* do the nickname completion work like on IRC */ - this.completeNick(); - return false; /* do not leave the tab key default behavior */ - } - else if (code == Event.KEY_RETURN) /* enter key */ - { - return this.doSendMessage(); - } - else if (code == 33 && false) // page up key - { - // write the last command in the history - if (this.cmdhistory.length>0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid-1; - if (this.cmdhistoryid<0) this.cmdhistoryid = this.cmdhistory.length-1; - w.value = this.cmdhistory[this.cmdhistoryid]; - } - } - else if (code == 34 && false) // page down key - { - // write the next command in the history - if (this.cmdhistory.length>0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid+1; - if (this.cmdhistoryid>=this.cmdhistory.length) this.cmdhistoryid = 0; - w.value = this.cmdhistory[this.cmdhistoryid]; - } - } - else - { - /* allow other keys */ - return true; - } - }, - /** - * Handle the pressed keys - * see also callbackWords_OnKeypress - */ - callbackWords_OnKeydown: function(evt) - { - if (!this.isconnected) return false; - this.clearError(Array(this.el_words)); - var code = (evt.which) ? evt.which : evt.keyCode - if (code == 9) /* tab key */ - { - /* IE workaround : ignore TAB key here */ - /* do the nickname completion work like on IRC */ - this.completeNick(); - return false; /* do not leave the tab key default behavior */ - } - else - { - return true; - } - }, - callbackWords_OnFocus: function(evt) - { - // if (this.el_handle && this.el_handle.value == '' && !this.minmax_status) - // this.el_handle.focus(); - }, - callbackHandle_OnKeydown: function(evt) - { - }, - callbackHandle_OnChange: function(evt) - { - }, - callback_OnUnload: function(evt) - { - /* don't disconnect users when they reload the window - * this event doesn't only occurs when the page is closed but also when the page is reloaded */ - if (pfc_quit_on_closedwindow) - { - if (!this.isconnected) return false; - this.sendRequest('/quit'); - } - }, - - callbackContainer_OnMousemove: function(evt) - { - this.isdraging = true; - }, - callbackContainer_OnMousedown: function(evt) - { - if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) - this.isdraging = false; - }, - callbackContainer_OnMouseup: function(evt) - { - if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) - if (!this.isdraging) - if (this.el_words && !this.minmax_status) - this.el_words.focus(); - }, - - /** - * hide error area and stop blinking fields - */ - clearError: function(ids) - { - this.el_errors.style.display = 'none'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'stop'); - }, - - /** - * show error area and assign to it an error message and start the blinking of given fields - */ - setError: function(str, ids) - { - this.el_errors.innerHTML = str; - this.el_errors.style.display = 'block'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'start'); - }, - - /** - * blink routines used by Error functions - */ - blink: function(id, action) - { - clearTimeout(this.blinktimeout[id]); - if ($(id) == null) return; - if (action == 'start') - { - this.blinktmp[id] = $(id).style.backgroundColor; - clearTimeout(this.blinktimeout[id]); - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - if (action == 'stop') - { - $(id).style.backgroundColor = this.blinktmp[id]; - } - if (action == 'loop') - { - if (this.blinkloop[id] == 1) - { - $(id).style.backgroundColor = '#FFDFC0'; - this.blinkloop[id] = 2; - } - else - { - $(id).style.backgroundColor = '#FFFFFF'; - this.blinkloop[id] = 1; - } - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - }, - - displayMsg: function( cmd, msg ) - { - this.setError(msg, Array()); - - // @todo find a better crossbrowser way to display messages -/* - // get the current selected tab container - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - - // to fix IE6 display bug - // http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 - div = document.createElement('div'); - // div.style.padding = "2px 5px 2px 5px"; // this will clear the screen in IE6 - div.innerHTML = '<div class="pfc_info pfc_info_'+cmd+'" style="margin:5px">'+msg+'</div>'; - - // finaly append this to the message list - container.appendChild(div); - this.gui.scrollDown(tabid, div); -*/ - }, - - handleComingRequest: function( cmds ) - { - var msg_html = $H(); - var max_msgid = $H(); - - //alert(cmds.inspect()); - - // var html = ''; - for(var mid = 0; mid < cmds.length ; mid++) - { - var id = cmds[mid][0]; - var date = cmds[mid][1]; - var time = cmds[mid][2]; - var sender = cmds[mid][3]; - var recipientid = cmds[mid][4]; - var cmd = cmds[mid][5]; - var param = cmds[mid][6]; - var fromtoday = cmds[mid][7]; - var oldmsg = cmds[mid][8]; - - // format and post message - var line = ''; - line += '<div id="pfc_msg_'+recipientid+'_'+id+'" class="pfc_cmd_'+ cmd +' pfc_message'; - line += (id % 2 == 0) ? ' pfc_evenmsg' : ' pfc_oddmsg'; - if (oldmsg == 1) line += ' pfc_oldmsg'; - line += '">'; - line += '<span class="pfc_date'; - if (fromtoday == 1) line += ' pfc_invisible'; - line += '">'+ date +'</span> '; - line += '<span class="pfc_heure">'+ time +'</span> '; - if (cmd == 'send') - { - line += ' <span class="pfc_nick">'; - line += '‹'; - line += '<span '; - line += 'onclick="pfc.insert_text(\'' + sender.replace("'", '\\\'') + ', \',\'\',false)" '; - line += 'class="pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(sender)) +'">'; - line += sender; - line += '</span>'; - line += '›'; - line += '</span> '; - } - if (cmd == 'notice' || cmd == 'me') - line += '<span class="pfc_words">* '+ this.parseMessage(param) +'</span> '; - else - line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> '; - line += '</div>'; - - if (oldmsg == 0) - if (cmd == 'send' || cmd == 'me') - { - // notify the hidden tab a message has been received - // don't notify anything if this is old messages - var tabid = recipientid; - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); - // notify the window (change the title) - if (!this.detectactivity.isActive() && pfc_notify_window) - this.gui.notifyWindow(); - } - - if (msg_html[recipientid] == null) - msg_html[recipientid] = line; - else - msg_html[recipientid] += line; - - // remember the max message id in order to clean old lines - if (!max_msgid[recipientid]) max_msgid[recipientid] = 0; - if (max_msgid[recipientid] < id) max_msgid[recipientid] = id; - } - - // loop on all recipients and post messages - var keys = msg_html.keys(); - for( var i=0; i<keys.length; i++) - { - var recipientid = keys[i]; - var tabid = recipientid; - - // create the tab if it doesn't exists yet - var recipientdiv = this.gui.getChatContentFromTabId(tabid); - - // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('div'); - m.innerHTML = msg_html[recipientid]; - this.colorizeNicks(m); - this.refresh_clock(m); - // finaly append this to the message list - recipientdiv.appendChild(m); - this.gui.scrollDown(tabid, m); - - // delete the old messages from the client (save some memory) - var limit_msgid = max_msgid[recipientid] - pfc_max_displayed_lines; - var elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - while (elt) - { - // delete this element to save browser memory - if (is_ff) - elt.innerHTML = ''; - else - // this code don't work in FF, why ? don't know .. - elt.parentElement.removeChild(elt); - limit_msgid--; - elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - } - } - - }, - - /** - * Call the ajax request function - * Will query the server - */ - sendRequest: function(cmd) - { - if (pfc_debug) - if (cmd != "/update") trace('sendRequest: '+cmd); - var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); - var recipientid = this.gui.getTabId(); - cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); - return eval('pfc_handleRequest(cmd);'); - }, - - /** - * update function to poll the server each 'refresh_delay' time - */ - updateChat: function(start) - { - clearTimeout(this.timeout); - if (start) - { - var res = true; - if (this.canupdatenexttime || (new Date().getTime() - this.last_refresh_time) > this.max_refresh_delay) - { - res = this.sendRequest('/update'); - this.canupdatenexttime = false; // don't update since the 'ok' response is received - } - // adjust the refresh_delay if the connection was lost - if (res == false) { - this.refresh_delay = this.refresh_delay * 2; - if(this.refresh_delay > this.max_refresh_delay) - { - this.refresh_delay = this.max_refresh_delay; - } - } - // setup the next update - this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); - } - }, - - /** - * insert a smiley - */ - insertSmiley: function(s) - { - this.el_words.value += s; - this.el_words.focus(); - }, - - updateNickBox: function(nickid) - { - // @todo optimize this function because it is called lot of times so it could cause CPU consuming on client side - var chanids = this.chanmeta.keys(); - for(var i = 0; chanids.length > i; i++) - { - this.updateNickListBox(chanids[i]); - } - }, - - /** - * fill the nickname list with connected nicknames - */ - updateNickListBox: function(chanid) - { - var nickidlst = this.chanmeta[chanid]['users']['nickid']; - var nickdiv = this.gui.getOnlineContentFromTabId(chanid).firstChild; - var ul = document.createElement('ul'); - ul.setAttribute('class', 'pfc_nicklist'); - ul.setAttribute('className', 'pfc_nicklist'); // IE6 - for (var i=0; i<nickidlst.length; i++) - { - var nickid = nickidlst[i]; - var li = this.buildNickItem(nickid); - li.setAttribute('class', 'pfc_nickitem_'+nickid); - li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE6 - ul.appendChild(li); - } - var fc = nickdiv.firstChild; - if (fc) - nickdiv.replaceChild(ul,fc); - else - nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); - }, - - getNickWhoisBox: function(nickid) - { - if (!this.nickwhoisbox[nickid]) - this.updateNickWhoisBox(nickid); - return this.nickwhoisbox[nickid]; - }, - - updateNickWhoisBox: function(nickid) - { - var div = document.createElement('div'); - div.setAttribute('class', 'pfc_nickwhois'); - div.setAttribute('className', 'pfc_nickwhois'); // for IE6 - - var ul = document.createElement('ul'); - div.appendChild(ul); - - // add the close button - var li = document.createElement('li'); - li.setAttribute('class', 'pfc_nickwhois_close'); - li.setAttribute('className', 'pfc_nickwhois_close'); // for IE6 - ul.appendChild(li); - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_parent = div; - a.onclick = function(evt){ - this.pfc_parent.style.display = 'none'; - return false; - } - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/close-whoisbox.gif')); - img.alt = document.createTextNode(this.res.getLabel('Close')); - a.appendChild(img); - li.appendChild(a); - - // add the privmsg link (do not add it if this button is yourself) - if (pfc.getUserMeta(nickid,'nick') != this.nickname) - { - var li = document.createElement('li'); - li.setAttribute('class', 'pfc_nickwhois_pv'); - li.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6 - ul.appendChild(li); - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_nickid = nickid; - a.pfc_parent = div; - a.onclick = function(evt){ - var nick = pfc.getUserMeta(this.pfc_nickid,'nick'); - pfc.sendRequest('/privmsg "'+nick+'"'); - this.pfc_parent.style.display = 'none'; - return false; - } - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/openpv.gif')); - img.alt = document.createTextNode(this.res.getLabel('Private message')); - a.appendChild(img); - a.appendChild(document.createTextNode(this.res.getLabel('Private message'))); - li.appendChild(a); - } - - - // add the whois information table - var table = document.createElement('table'); -// table.setAttribute('cellspacing',0); -// table.setAttribute('cellpadding',0); -// table.setAttribute('border',0); - var tbody = document.createElement('tbody'); - table.appendChild(tbody); - var um = this.getAllUserMeta(nickid); - var um_keys = um.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = um[k]; - if (v && k != 'nickid' - && k != 'isadmin' // useless because of the gold shield icon - && k != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - ) - { - var tr = document.createElement('tr'); - var td1 = document.createElement('td'); - td1.setAttribute('class', 'pfc_nickwhois_c1'); - td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6 - var td2 = document.createElement('td'); - td2.setAttribute('class', 'pfc_nickwhois_c2'); - td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6 - td1.appendChild(document.createTextNode(k)); - td2.appendChild(document.createTextNode(v)); - tr.appendChild(td1); - tr.appendChild(td2); - tbody.appendChild(tr); - } - } - div.appendChild(table); - - this.nickwhoisbox[nickid] = div; - }, - - buildNickItem: function(nickid) - { - var nick = this.getUserMeta(nickid, 'nick'); - var isadmin = this.getUserMeta(nickid, 'isadmin'); - if (isadmin == '') isadmin = false; - - var li = document.createElement('li'); - li.style.borderBottom = '1px solid #AAA'; - - var a = document.createElement('a'); - a.setAttribute('href','#'); - a.pfc_nick = nick; - a.pfc_nickid = nickid; - a.onclick = function(evt){ - var d = pfc.getNickWhoisBox(this.pfc_nickid); - document.body.appendChild(d); - d.style.display = 'block'; - d.style.zIndex = '400'; - d.style.position = 'absolute'; - d.style.left = (mousePosX(evt)-5)+'px'; - d.style.top = (mousePosY(evt)-5)+'px'; - return false; - } - li.appendChild(a); - - - var img = document.createElement('img'); - if (isadmin) - img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); - else - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.style.marginRight = '5px'; - img.setAttribute('class', 'pfc_nickbutton'); - img.setAttribute('className', 'pfc_nickbutton'); // for IE6 - a.appendChild(img); - - // nobr is not xhtml valid but it's a workeround - // for IE which doesn't support 'white-space: pre' css rule - var nobr = document.createElement('nobr'); - var span = document.createElement('span'); - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); - span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE6 - span.appendChild(document.createTextNode(nick)); - nobr.appendChild(span); - a.appendChild(nobr); - - return li; - }, - - /** - * clear the nickname list - */ - clearNickList: function() - { - /* - var nickdiv = this.el_online; - var fc = nickdiv.firstChild; - if (fc) nickdiv.removeChild(fc); - */ - }, - - - /** - * clear the message list history - */ - clearMessages: function() - { - //var msgdiv = $('pfc_chat'); - //msgdiv.innerHTML = ''; - }, - - /** - * parse the message - */ - parseMessage: function(msg) - { - var rx = null; - - // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\~\\/\\?\\=\\&\\-\\_\\#:;%]*)([^\\"]|$)','ig'); - var ttt = msg.split(rx_url); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - var offset = (ttt[i].length - 7) / 2; - var delta = (ttt[i].length - 7 - 60); - var range1 = 7+offset-delta; - var range2 = 7+offset+delta; - if (ttt[i].match(rx_url)) - { - msg = msg + '<a href="' + ttt[i] + '"'; - if (pfc_openlinknewwindow) - msg = msg + ' onclick="window.open(this.href,\'_blank\');return false;"'; - msg = msg + '>' + (delta>0 ? ttt[i].substring(7,range1)+ ' ... ' + ttt[i].substring(range2,ttt[i].length) : ttt[i]) + '</a>'; - } - else - { - msg = msg + ttt[i]; - } - } - } - else - { - // fallback for IE6/Konqueror which do not support split with regexp - replace = '$1<a href="$2"'; - if (pfc_openlinknewwindow) - replace = replace + ' onclick="window.open(this.href,\'_blank\');return false;"'; - replace = replace + '>$2</a>$3'; - msg = msg.replace(rx_url, replace); - } - - // replace double spaces by entity - rx = new RegExp(' ','g'); - msg = msg.replace(rx, ' '); - - // try to parse bbcode - rx = new RegExp('\\[b\\](.+?)\\[\/b\\]','ig'); - msg = msg.replace(rx, '<span style="font-weight: bold">$1</span>'); - rx = new RegExp('\\[i\\](.+?)\\[\/i\\]','ig'); - msg = msg.replace(rx, '<span style="font-style: italic">$1</span>'); - rx = new RegExp('\\[u\\](.+?)\\[\/u\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: underline">$1</span>'); - rx = new RegExp('\\[s\\](.+?)\\[\/s\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: line-through">$1</span>'); - // rx = new RegExp('\\[pre\\](.+?)\\[\/pre\\]','ig'); - // msg = msg.replace(rx, '<pre>$1</pre>'); - rx = new RegExp('\\[email\\]([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$1</a>'); - rx = new RegExp('\\[email=([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\](.+?)\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$2</a>'); - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - // parse bbcode colors twice because the current_text_color is a bbcolor - // so it's possible to have a bbcode color imbrication - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - - // try to parse smileys - var smileys = this.res.getSmileyHash(); - var sl = smileys.keys(); - for(var i = 0; i < sl.length; i++) - { - rx = new RegExp(RegExp.escape(sl[i]),'g'); - msg = msg.replace(rx, '<img src="'+ smileys[sl[i]] +'" alt="' + sl[i] + '" title="' + sl[i] + '" />'); - } - - // try to parse nickname for highlighting - rx = new RegExp('(^|[ :,;])'+RegExp.escape(this.nickname)+'([ :,;]|$)','gi'); - msg = msg.replace(rx, '$1<strong>'+ this.nickname +'</strong>$2'); - - - // this piece of code is replaced by the word-wrap CSS3 rule. - /* - // don't allow to post words bigger than 65 caracteres - // doesn't work with crappy IE and Konqueror ! - rx = new RegExp('([^ \\:\\<\\>\\/\\&\\;]{60})','ig'); - var ttt = msg.split(rx); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - msg = msg + ttt[i] + ' '; - } - } - */ - return msg; - }, - - /** - * apply nicknames color to the root childs - */ - colorizeNicks: function(root) - { - if (this.nickmarker) - { - var nicklist = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; i < nicklist.length; i++) - { - var cur_nick = nicklist[i].innerHTML; - var cur_color = this.getAndAssignNickColor(cur_nick); - nicklist[i].style.color = cur_color; - } - } - }, - - /** - * Initialize the color array used to colirize the nicknames - */ - reloadColorList: function() - { - this.colorlist = $A(pfc_nickname_color_list); - }, - - - /** - * get the corresponding nickname color - */ - getAndAssignNickColor: function(nick) - { - /* check the nickname is colorized or not */ - var allready_colorized = false; - var nc = ''; - for(var j = 0; j < this.nickcolor.length; j++) - { - if (this.nickcolor[j][0] == nick) - { - allready_colorized = true; - nc = this.nickcolor[j][1]; - } - } - if (!allready_colorized) - { - /* reload the color stack if it's empty */ - if (this.colorlist.length == 0) this.reloadColorList(); - /* take the next color from the list and colorize this nickname */ - var cid = Math.round(Math.random()*(this.colorlist.length-1)); - nc = this.colorlist[cid]; - this.colorlist.splice(cid,1); - this.nickcolor.push(new Array(nick, nc)); - } - - return nc; - }, - - - /** - * Colorize with 'color' all the nicknames found as a 'root' child - */ - applyNickColor: function(root, nick, color) - { - - var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ hex_md5(_to_utf8(nick)), ''); - for(var i = 0; nicktochange.length > i; i++) - nicktochange[i].style.color = color; - - }, - - /** - * Returns a list of elements which have a clsName class - */ - getElementsByClassName: function( root, clsName, clsIgnore ) - { - var i, matches = new Array(); - var els = root.getElementsByTagName('*'); - var rx1 = new RegExp('.*'+clsName+'.*'); - var rx2 = new RegExp('.*'+clsIgnore+'.*'); - for(i=0; i<els.length; i++) { - if(els.item(i).className.match(rx1) && - (clsIgnore == '' || !els.item(i).className.match(rx2)) ) { - matches.push(els.item(i)); - } - } - return matches; - }, - - showClass: function(root, clsName, clsIgnore, show) - { - var elts = this.getElementsByClassName(root, clsName, clsIgnore); - for(var i = 0; elts.length > i; i++) - if (show) - elts[i].style.display = 'inline'; - else - elts[i].style.display = 'none'; - }, - - - /** - * Nickname marker show/hide - */ - nickmarker_swap: function() - { - if (this.nickmarker) { - this.nickmarker = false; - } else { - this.nickmarker = true; - } - this.refresh_nickmarker() - setCookie('pfc_nickmarker', this.nickmarker); - }, - refresh_nickmarker: function(root) - { - var nickmarker_icon = $('pfc_nickmarker'); - if (!root) root = $('pfc_channels_content'); - if (this.nickmarker) - { - nickmarker_icon.src = this.res.getFileUrl('images/color-on.gif'); - nickmarker_icon.alt = this.res.getLabel("Hide nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - this.colorizeNicks(root); - } - else - { - nickmarker_icon.src = this.res.getFileUrl('images/color-off.gif'); - nickmarker_icon.alt = this.res.getLabel("Show nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - var elts = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; elts.length > i; i++) - { - // this is not supported in konqueror =>>> elts[i].removeAttribute('style'); - elts[i].style.color = ''; - } - } - }, - - - /** - * Date/Hour show/hide - */ - clock_swap: function() - { - if (this.clock) { - this.clock = false; - } else { - this.clock = true; - } - this.refresh_clock(); - setCookie('pfc_clock', this.clock); - }, - refresh_clock: function( root ) - { - var clock_icon = $('pfc_clock'); - if (!root) root = $('pfc_channels_content'); - if (this.clock) - { - clock_icon.src = this.res.getFileUrl('images/clock-on.gif'); - clock_icon.alt = this.res.getLabel('Hide dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', true); - this.showClass(root, 'pfc_heure', 'pfc_invisible', true); - } - else - { - clock_icon.src = this.res.getFileUrl('images/clock-off.gif'); - clock_icon.alt = this.res.getLabel('Show dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', false); - this.showClass(root, 'pfc_heure', 'pfc_invisible', false); - } - // browser automaticaly scroll up misteriously when showing the dates - // $('pfc_chat').scrollTop += 30; - }, - - /** - * Sound button - */ - sound_swap: function() - { - if (this.issoundenable) { - this.issoundenable = false; - } else { - this.issoundenable = true; - } - this.refresh_sound(); - setCookie('pfc_issoundenable', this.issoundenable); - }, - refresh_sound: function( root ) - { - var snd_icon = $('pfc_sound'); - if (this.issoundenable) - { - snd_icon.src = this.res.getFileUrl('images/sound-on.gif'); - snd_icon.alt = this.res.getLabel('Disable sound notifications'); - snd_icon.title = snd_icon.alt; - } - else - { - snd_icon.src = this.res.getFileUrl('images/sound-off.gif'); - snd_icon.alt = this.res.getLabel('Enable sound notifications'); - snd_icon.title = snd_icon.alt; - } - }, - - /** - * Connect/disconnect button - */ - connect_disconnect: function() - { - if (this.isconnected) - this.sendRequest('/quit'); - else - this.sendRequest('/connect'); - }, - refresh_loginlogout: function() - { - var loginlogout_icon = $('pfc_loginlogout'); - if (this.isconnected) - { - loginlogout_icon.src = this.res.getFileUrl('images/logout.gif'); - loginlogout_icon.alt = this.res.getLabel('Disconnect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - else - { - this.clearMessages(); - this.clearNickList(); - loginlogout_icon.src = this.res.getFileUrl('images/login.gif'); - loginlogout_icon.alt = this.res.getLabel('Connect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - }, - - - - /** - * Minimize/Maximized the chat zone - */ - swap_minimize_maximize: function() - { - if (this.minmax_status) { - this.minmax_status = false; - } else { - this.minmax_status = true; - } - setCookie('pfc_minmax_status', this.minmax_status); - this.refresh_minimize_maximize(); - }, - refresh_minimize_maximize: function() - { - var content = $('pfc_content_expandable'); - var btn = $('pfc_minmax'); - if (this.minmax_status) - { - btn.src = this.res.getFileUrl('images/maximize.gif'); - btn.alt = this.res.getLabel('Magnify'); - btn.title = btn.alt; - content.style.display = 'none'; - } - else - { - btn.src = this.res.getFileUrl('images/minimize.gif'); - btn.alt = this.res.getLabel('Cut down'); - btn.title = btn.alt; - content.style.display = 'block'; - } - }, - - /** - * BBcode ToolBar - */ - insert_text: function(open, close, promptifselempty) - { - var msgfield = $('pfc_words'); - - // IE support - if (document.selection && document.selection.createRange) - { - msgfield.focus(); - sel = document.selection.createRange(); - var text = sel.text; - if (text == "" && promptifselempty) - text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - if (text.length > 0 || !promptifselempty) - { - sel.text = open + text + close; - // @todo move the cursor just after the BBCODE, this doesn't work when the text to enclose is selected, IE6 keeps the whole selection active after the operation. - msgfield.focus(); - } - } - - // Moz support - else if (msgfield.selectionStart || msgfield.selectionStart == '0') - { - var startPos = msgfield.selectionStart; - var endPos = msgfield.selectionEnd; - - var text = msgfield.value.substring(startPos, endPos); - var extralength = 0; - if (startPos == endPos && promptifselempty) - { - text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - extralength = text.length; - } - if (text.length > 0 || !promptifselempty) - { - msgfield.value = msgfield.value.substring(0, startPos) + open + text + close + msgfield.value.substring(endPos, msgfield.value.length); - msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + extralength + close.length; - msgfield.focus(); - } - } - - // Fallback support for other browsers - else - { - var text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - if (text.length > 0 || !promptifselempty) - { - msgfield.value += open + text + close; - msgfield.focus(); - } - } - return; - }, - - /** - * Minimize/Maximize none/inline - */ - minimize_maximize: function(idname, type) - { - var element = $(idname); - if(element.style) - { - if(element.sty... [truncated message content] |
From: <ke...@us...> - 2006-12-21 06:34:20
|
Revision: 908 http://svn.sourceforge.net/phpfreechat/?rev=908&view=rev Author: kerphi Date: 2006-12-20 22:34:20 -0800 (Wed, 20 Dec 2006) Log Message: ----------- optimizations on interface loading (work in progress) Added Paths: ----------- trunk/data/public/js/activity.js trunk/data/public/js/cookie.js trunk/data/public/js/createstylerule.js trunk/data/public/js/image_preloader.js trunk/data/public/js/md5.js trunk/data/public/js/mousepos.js trunk/data/public/js/myprototype.js trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/data/public/js/pfcresource.js trunk/data/public/js/regex.js trunk/data/public/js/sprintf2.js trunk/data/public/js/utf8.js trunk/data/public/js/xajax.js Added: trunk/data/public/js/activity.js =================================================================== --- trunk/data/public/js/activity.js (rev 0) +++ trunk/data/public/js/activity.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,67 @@ +var DetectActivity = Class.create(); +DetectActivity.prototype = { + initialize: function(subject) + { + this.onunactivate = function() {}; + this.onactivate = function() {}; + this.subject = subject; + this.isactive = true; + Event.observe(subject, 'mousemove', this._OnFocus.bindAsEventListener(this), false); + Event.observe(subject, 'mouseout', this._OnBlur.bindAsEventListener(this), false); + }, + _OnFocus: function(e) + { + this.isactive = true; + if (this.onactivate) this.onactivate(); + }, + _OnBlur: function(e) + { + this.isactive = false; + if (this.onunactivate) this.onunactivate(); + }, + isActive: function() + { + return this.isactive; + } +} + + + +/* +// Unused code, by usefull for further auto idle features + + _launchTimeout: function(myself) + { +var oldisactive = this.isactive; + if (this.oldposx == this.posx && + this.oldposy == this.posy) + this.isactive = false; + else + this.isactive = true; +this.oldposx = this.posx; +this.oldposy = this.posy; +if (oldisactive != this.isactive) alert("switch"); + setTimeout(function() { myself._launchTimeout(myself); }, 1000); + }, + + _OnMouseMove: function(e) + { + var posx = 0; + var posy = 0; + if (!e) var e = window.event; + if (e.pageX || e.pageY) + { + posx = e.pageX; + posy = e.pageY; + } + else if (e.clientX || e.clientY) + { + posx = e.clientX + document.body.scrollLeft + + document.documentElement.scrollLeft; + posy = e.clientY + document.body.scrollTop + + document.documentElement.scrollTop; + } + this.posx = posx; + this.posy = posy; + }, +*/ Added: trunk/data/public/js/cookie.js =================================================================== --- trunk/data/public/js/cookie.js (rev 0) +++ trunk/data/public/js/cookie.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,59 @@ +// Cookie API v1.0.1 +// documentation: http://www.dithered.com/javascript/cookies/index.html +// license: http://creativecommons.org/licenses/by/1.0/ +// code (mostly) by Chris Nott (chris[at]dithered[dot]com) + + +// Write a cookie value +function setCookie(name, value, expires, path, domain, secure) { + var curCookie = name + '=' + escape(value) + ((expires) ? '; expires=' + expires.toGMTString() : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : ''); + document.cookie = curCookie; +} + + +// Retrieve a named cookie value +function getCookie(name) { + var dc = document.cookie; + + // find beginning of cookie value in document.cookie + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } + else begin += 2; + + // find end of cookie value + var end = document.cookie.indexOf(";", begin); + if (end == -1) end = dc.length; + + // return cookie value + return unescape(dc.substring(begin + prefix.length, end)); +} + + +// Delete a named cookie value +function deleteCookie(name, path, domain) { + var value = getCookie(name); + if (value != null) document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT'; + return value; +} + + +// Fix Netscape 2.x Date bug +function fixDate(date) { + var workingDate = date; + var base = new Date(0); + var skew = base.getTime(); + if (skew > 0) workingDate.setTime(workingDate.getTime() - skew); + return workingDate; +} + + +// Test for cookie support +function supportsCookies(rootPath) { + setCookie('checking_for_cookie_support', 'testing123', '', (rootPath != null ? rootPath : '')); + if (getCookie('checking_for_cookie_support')) return true; + else return false; +} \ No newline at end of file Added: trunk/data/public/js/createstylerule.js =================================================================== --- trunk/data/public/js/createstylerule.js (rev 0) +++ trunk/data/public/js/createstylerule.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,27 @@ +// from http://www.bobbyvandersluis.com/articles/dynamicCSS.php +function createStyleRule(selector, declaration) { + if (!document.getElementsByTagName || + !(document.createElement || document.createElementNS)) return; + var agt = navigator.userAgent.toLowerCase(); + var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); + var is_iewin = (is_ie && (agt.indexOf("win") != -1)); + var is_iemac = (is_ie && (agt.indexOf("mac") != -1)); + if (is_iemac) return; // script doesn't work properly in IE/Mac + var head = document.getElementsByTagName("head")[0]; + var style = (typeof document.createElementNS != "undefined") ? + document.createElementNS("http://www.w3.org/1999/xhtml", "style") : + document.createElement("style"); + if (!is_iewin) { + var styleRule = document.createTextNode(selector + " {" + declaration + "}"); + style.appendChild(styleRule); // bugs in IE/Win + } + style.setAttribute("type", "text/css"); + style.setAttribute("media", "screen"); + head.appendChild(style); + if (is_iewin && document.styleSheets && document.styleSheets.length > 0) { + var lastStyle = document.styleSheets[document.styleSheets.length - 1]; + if (typeof lastStyle.addRule == "object") { + lastStyle.addRule(selector, declaration); + } + } +} \ No newline at end of file Added: trunk/data/public/js/image_preloader.js =================================================================== --- trunk/data/public/js/image_preloader.js (rev 0) +++ trunk/data/public/js/image_preloader.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,13 @@ +// Image Preloader v1.0.1 +// documentation: http://www.dithered.com/javascript/image_preloader/index.html +// license: http://creativecommons.org/licenses/by/1.0/ +// code by Chris Nott (chris[at]dithered[dot]com) + + +function preloadImages() { + if (document.images) { + for (var i = 0; i < preloadImages.arguments.length; i++) { + (new Image()).src = preloadImages.arguments[i]; + } + } +} \ No newline at end of file Added: trunk/data/public/js/md5.js =================================================================== --- trunk/data/public/js/md5.js (rev 0) +++ trunk/data/public/js/md5.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,256 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} +function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} +function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} +function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } +function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } +function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() +{ + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Calculate the HMAC-MD5, of a key and some data + */ +function core_hmac_md5(key, data) +{ + var bkey = str2binl(key); + if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert a string to an array of little-endian words + * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + */ +function str2binl(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); + return bin; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); + return str; +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of little-endian words to a base-64 string + */ +function binl2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} Added: trunk/data/public/js/mousepos.js =================================================================== --- trunk/data/public/js/mousepos.js (rev 0) +++ trunk/data/public/js/mousepos.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,25 @@ +function mousePosX(e) { + var posx = 0; + if (!e) var e = window.event; + if (e.pageX) { + posx = e.pageX; + } + else if (e.clientX) { + posx = e.clientX + document.body.scrollLeft + + document.documentElement.scrollLeft; + } + return posx; +} + +function mousePosY(e) { + var posy = 0; + if (!e) var e = window.event; + if (e.pageY) { + posy = e.pageY; + } + else if (e.clientY) { + posy = e.clientY + document.body.scrollTop + + document.documentElement.scrollTop; + } + return posy; +} Added: trunk/data/public/js/myprototype.js =================================================================== --- trunk/data/public/js/myprototype.js (rev 0) +++ trunk/data/public/js/myprototype.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,1514 @@ +// modified prototype library + +var Prototype = { + Version: '1.4.0', + ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)', + + emptyFunction: function() {}, + K: function(x) {return x} +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.inspect = function(object) { + try { + if (object == undefined) return 'undefined'; + if (object == null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } +} + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + } +} + +/*--------------------------------------------------------------------------*/ + +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} +Object.extend(String.prototype, { + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(eval); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; + }, + + toQueryParams: function() { + var pairs = this.match(/^\??(.*)$/)[1].split('&'); + return pairs.inject({}, function(params, pairString) { + var pair = pairString.split('='); + params[pair[0]] = pair[1]; + return params; + }); + }, + + toArray: function() { + return this.split(''); + }, + + camelize: function() { + var oStringList = this.split('-'); + if (oStringList.length == 1) return oStringList[0]; + + var camelizedString = this.indexOf('-') == 0 + ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) + : oStringList[0]; + + for (var i = 1, len = oStringList.length; i < len; i++) { + var s = oStringList[i]; + camelizedString += s.charAt(0).toUpperCase() + s.substring(1); + } + + return camelizedString; + }, + + inspect: function() { + return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; + } +}); + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = true; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function (iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.collect(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value >= (result || value)) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value <= (result || value)) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.collect(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.collect(Prototype.K); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + iterator(value = collections.pluck(index)); + return value; + }); + }, + + inspect: function() { + return '#<Enumerable:' + this.toArray().inspect() + '>'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray + }); + +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0; i < iterable.length; i++) + results.push(iterable[i]); + return results; + } +} + +//Array.prototype._reverse = Array.prototype.reverse; + +//Object.extend(Array.prototype, Enumerable); +/* +Array.prototype._reverse = Array.prototype.reverse; + + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0; i < this.length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != undefined || value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0; i < this.length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + shift: function() { + var result = this[0]; + for (var i = 0; i < this.length - 1; i++) + this[i] = this[i + 1]; + this.length--; + return result; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); +*/ + + +var Hash = { + _each: function(iterator) { + for (key in this) { + var value = this[key]; + if (typeof value == 'function') continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject($H(this), function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + return pair.map(encodeURIComponent).join('='); + }).join('&'); + }, + + inspect: function() { + return '#<Hash:{' + this.map(function(pair) { + return pair.map(Object.inspect).join(': '); + }).join(', ') + '}>'; + } +} + +function $H(object) { + var hash = Object.extend({}, object || {}); + Object.extend(hash, Enumerable); + Object.extend(hash, Hash); + return hash; +} +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + do { + iterator(value); + value = value.succ(); + } while (this.include(value)); + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +document.getElementsByClassName = function(className, parentElement) { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + return $A(children).inject([], function(elements, child) { + if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + elements.push(child); + return elements; + }); +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) { + var Element = new Object(); +} + +Object.extend(Element, { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + Element[Element.visible(element) ? 'hide' : 'show'](element); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + update: function(element, html) { + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).include(className); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).add(className); + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).remove(className); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + for (var i = 0; i < element.childNodes.length; i++) { + var node = element.childNodes[i]; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + Element.remove(node); + } + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + scrollTo: function(element) { + element = $(element); + var x = element.x ? element.x : element.offsetLeft, + y = element.y ? element.y : element.offsetTop; + window.scrollTo(x, y); + }, + + getStyle: function(element, style) { + element = $(element); + var value = element.style[style.camelize()]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css.getPropertyValue(style) : null; + } else if (element.currentStyle) { + value = element.currentStyle[style.camelize()]; + } + } + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (name in style) + element.style[name.camelize()] = style[name]; + }, + + getDimensions: function(element) { + element = $(element); + if (Element.getStyle(element, 'display') != 'none') + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = ''; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = 'none'; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return; + element._overflow = element.style.overflow; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + }, + + undoClipping: function(element) { + element = $(element); + if (element._overflow) return; + element.style.overflow = element._overflow; + element._overflow = undefined; + } +}); + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + if (this.element.tagName.toLowerCase() == 'tbody') { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>'; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set(this.toArray().concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set(this.select(function(className) { + return className != classNameToRemove; + }).join(' ')); + }, + + toString: function() { + return this.toArray().join(' '); + } +} + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + focus: function(element) { + $(element).focus(); + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select) + element.select(); + } +} + +/*--------------------------------------------------------------------------*/ + +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) + return inputs; + + var matchingInputs = new Array(); + for (var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || + (name && input.name != name)) + continue; + matchingInputs.push(input); + } + + return matchingInputs; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disabled = 'true'; + } + }, + + enable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.disabled = ''; + } + }, + + findFirstElement: function(form) { + return Form.getElements(form).find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + Field.activate(Form.findFirstElement(form)); + }, + + reset: function(form) { + $(form).reset(); + } +} + +Form.Element = { + serialize: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) { + var key = encodeURIComponent(parameter[0]); + if (key.length == 0) return; + + if (parameter[1].constructor != Array) + parameter[1] = [parameter[1]]; + + return parameter[1].map(function(value) { + return key + '=' + encodeURIComponent(value); + }).join('&'); + } + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +} + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'submit': + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + return Form.Element.Serializers[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var value = '', opt, index = element.selectedIndex; + if (index >= 0) { + opt = element.options[index]; + value = opt.value; + if (!value && !('value' in opt)) + value = opt.text; + } + return [element.name, value]; + }, + + selectMany: function(element) { + var value = new Array(); + for (var i = 0; i < element.length; i++) { + var opt = element.options[i]; + if (opt.selected) { + var optValue = opt.value; + if (!optValue && !('value' in opt)) + optValue = opt.text; + value.push(optValue); + } + } + return [element.name, value]; + } +} + +/*--------------------------------------------------------------------------*/ + +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + var elements = Form.getElements(this.element); + for (var i = 0; i < elements.length; i++) + this.registerCallback(elements[i]); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + case 'password': + case 'text': + case 'textarea': + case 'select-one': + case 'select-multiple': + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0; i < Event.observers.length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + this._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } +}); + +/* prevent memory leaks in IE */ +Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + clone: function(source, target) { + source = $(source); + target = $(target); + target.style.position = 'absolute'; + var offsets = this.cumulativeOffset(source); + target.style.top = offsets[1] + 'px'; + target.style.left = offsets[0] + 'px'; + target.style.width = source.offsetWidth + 'px'; + target.style.height = source.offsetHeight + 'px'; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px';; + element.style.left = left + 'px';; + element.style.width = width + 'px';; + element.style.height = height + 'px';; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} + + +function indexOf(array, object) +{ + for (var i = 0; i < array.length; i++) + if (array[i] == object) return i; + return -1; +} + +function without(array,value) { + var res = Array(); + for( var i = 0 ; i < array.length; i++) + { + if (array[i] != value) res.push(array[i]); + } + return res; +} Added: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js (rev 0) +++ trunk/data/public/js/pfcclient.js 2006-12-21 06:34:20 UTC (rev 908) @@ -0,0 +1,1736 @@ +var is_ie = navigator.appName.match("Explorer"); +var is_khtml = navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML"); +var is_ff = navigator.appName.match("Netscape"); + +/** + * This class is the client part of phpFreeChat + * (depends on prototype library) + * @author Stephane Gully + */ +var pfcClient = Class.create(); + +//defining the rest of the class implmentation +pfcClient.prototype = { + + initialize: function() + { + // load the graphical user interface builder + this.gui = new pfcGui(); + // load the resources manager (labels and urls) + this.res = new pfcResource(); + + this.nickname = pfc_nickname; + this.nickid = pfc_nickid; + this.usermeta = $H(); + this.chanmeta = $H(); + this.nickwhoisbox = $H(); + + // this array contains all the sent command + // used the up and down key to navigate in the history + // (doesn't work on IE6) + this.cmdhistory = Array(); + this.cmdhistoryid = -1; + this.cmdhistoryissearching = false; + + /* + this.channels = Array(); + this.channelids = Array(); + */ + this.privmsgs = Array(); + this.privmsgids = Array(); + + this.timeout = null; + this.refresh_delay = pfc_refresh_delay; + this.max_refresh_delay = pfc_max_refresh_delay; + this.last_refresh_time = 0; + /* unique client id for each windows used to identify a open window + * this id is passed every time the JS communicate with server + * (2 clients can use the same session: then only the nickname is shared) */ + this.clientid = pfc_clientid; + + this.isconnected = false; + this.nicklist = $H(); + this.nickcolor = Array(); + this.colorlist = Array(); + + this.blinktmp = Array(); + this.blinkloop = Array(); + this.blinktimeout = Array(); + }, ... [truncated message content] |
From: <ke...@us...> - 2006-12-21 06:33:18
|
Revision: 907 http://svn.sourceforge.net/phpfreechat/?rev=907&view=rev Author: kerphi Date: 2006-12-20 22:33:18 -0800 (Wed, 20 Dec 2006) Log Message: ----------- optimizations on interface loading (work in progress) Added Paths: ----------- trunk/data/public/js/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-12-21 06:30:25
|
Revision: 906 http://svn.sourceforge.net/phpfreechat/?rev=906&view=rev Author: kerphi Date: 2006-12-20 22:30:19 -0800 (Wed, 20 Dec 2006) Log Message: ----------- optimizations on interface loading (work in progress) Added Paths: ----------- trunk/lib/csstidy-1.2/ trunk/lib/csstidy-1.2/COPYING trunk/lib/csstidy-1.2/README trunk/lib/csstidy-1.2/class.csstidy.php trunk/lib/csstidy-1.2/class.csstidy_optimise.php trunk/lib/csstidy-1.2/class.csstidy_print.php trunk/lib/csstidy-1.2/css_optimiser.php trunk/lib/csstidy-1.2/cssparse.css trunk/lib/csstidy-1.2/data.inc.php trunk/lib/csstidy-1.2/lang.inc.php trunk/lib/csstidy-1.2/template.tpl trunk/lib/csstidy-1.2/template1.tpl trunk/lib/csstidy-1.2/template2.tpl trunk/lib/csstidy-1.2/template3.tpl trunk/lib/xajax_0.5_beta1/ trunk/lib/xajax_0.5_beta1/LICENSE.txt trunk/lib/xajax_0.5_beta1/xajax_core/ trunk/lib/xajax_0.5_beta1/xajax_core/legacy.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/ trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxDefaultIncludePlugin.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxDefaultRequestProcessorPlugin.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxIncludePlugin.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxPluginManager.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxRequestProcessorPlugin.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/plugin_layer/xajaxResponsePlugin.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/xajax.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/xajaxCompress.inc.php trunk/lib/xajax_0.5_beta1/xajax_core/xajaxResponse.inc.php trunk/lib/xajax_0.5_beta1/xajax_js/ trunk/lib/xajax_0.5_beta1/xajax_js/xajax.js trunk/lib/xajax_0.5_beta1/xajax_js/xajax_uncompressed.js Removed Paths: ------------- trunk/lib/javascript/activity.js trunk/lib/javascript/cookie.js trunk/lib/javascript/image_preloader.js trunk/lib/javascript/md5.js trunk/lib/javascript/mousepos.js trunk/lib/javascript/myprototype.js trunk/lib/javascript/regex.js trunk/lib/javascript/sprintf2.js trunk/lib/javascript/utf8.js trunk/lib/xajax_0.2.3/ Added: trunk/lib/csstidy-1.2/COPYING =================================================================== --- trunk/lib/csstidy-1.2/COPYING (rev 0) +++ trunk/lib/csstidy-1.2/COPYING 2006-12-21 06:30:19 UTC (rev 906) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/lib/csstidy-1.2/README =================================================================== --- trunk/lib/csstidy-1.2/README (rev 0) +++ trunk/lib/csstidy-1.2/README 2006-12-21 06:30:19 UTC (rev 906) @@ -0,0 +1,28 @@ +CSSTidy + +Changelog: http://cdburnerxp.se/cssparse/csstidy/changelog.php + +css_optimiser.php is the web-interface, css_parser.php contains the PHP class (CSSTidy). + +This class represents a CSS parser which reads CSS code and saves it in an array. +In opposite to most other CSS parsers, it does not use regular expressions and +thus has full CSS2 support and a higher reliability. The downside of not using regular expressions +is a lower speed though. +Additional to that it applies some optimisations and fixes to the CSS code. +An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php + + + +CSSTidy is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +CSSTidy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with CSSTidy; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Added: trunk/lib/csstidy-1.2/class.csstidy.php =================================================================== --- trunk/lib/csstidy-1.2/class.csstidy.php (rev 0) +++ trunk/lib/csstidy-1.2/class.csstidy.php 2006-12-21 06:30:19 UTC (rev 906) @@ -0,0 +1,986 @@ +<?php +/** + * CSSTidy - CSS Parser and Optimiser + * + * CSS Parser class + * + * This file is part of CSSTidy. + * + * CSSTidy is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * CSSTidy 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CSSTidy; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @package csstidy + * @author Florian Schmitz (floele at gmail dot com) 2005-2006 + */ + +/** + * Various CSS data needed for correct optimisations etc. + * + * @version 1.2 + */ +require('data.inc.php'); + +/** + * Contains a class for printing CSS code + * + * @version 1.0 + */ +require('class.csstidy_print.php'); + +/** + * Contains a class for optimising CSS code + * + * @version 1.0 + */ +require('class.csstidy_optimise.php'); + +/** + * CSS Parser class + * + * This class represents a CSS parser which reads CSS code and saves it in an array. + * In opposite to most other CSS parsers, it does not use regular expressions and + * thus has full CSS2 support and a higher reliability. + * Additional to that it applies some optimisations and fixes to the CSS code. + * An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php + * @package csstidy + * @author Florian Schmitz (floele at gmail dot com) 2005-2006 + * @version 1.2 + */ +class csstidy { + +/** + * Saves the parsed CSS + * @var array + * @access public + */ +var $css = array(); + +/** + * Saves the parsed CSS (raw) + * @var array + * @access private + */ +var $tokens = array(); + +/** + * Printer class + * @see csstidy_print + * @var object + * @access public + */ +var $print; + +/** + * Optimiser class + * @see csstidy_optimise + * @var object + * @access private + */ +var $optimise; + +/** + * Saves the CSS charset (@charset) + * @var string + * @access private + */ +var $charset = ''; + +/** + * Saves all @import URLs + * @var array + * @access private + */ +var $import = array(); + +/** + * Saves the namespace + * @var string + * @access private + */ +var $namespace = ''; + +/** + * Contains the version of csstidy + * @var string + * @access private + */ +var $version = '1.2'; + +/** + * Stores the settings + * @var array + * @access private + */ +var $settings = array(); + +/** + * Saves the parser-status. + * + * Possible values: + * - is = in selector + * - ip = in property + * - iv = in value + * - instr = in string (started at " or ' or ( ) + * - ic = in comment (ignore everything) + * - at = in @-block + * + * @var string + * @access private + */ +var $status = 'is'; + + +/** + * Saves the current at rule (@media) + * @var string + * @access private + */ +var $at = ''; + +/** + * Saves the current selector + * @var string + * @access private + */ +var $selector = ''; + +/** + * Saves the current property + * @var string + * @access private + */ +var $property = ''; + +/** + * Saves the position of , in selectors + * @var array + * @access private + */ +var $sel_separate = array(); + +/** + * Saves the current value + * @var string + * @access private + */ +var $value = ''; + +/** + * Saves the current sub-value + * + * Example for a subvalue: + * background:url(foo.png) red no-repeat; + * "url(foo.png)", "red", and "no-repeat" are subvalues, + * seperated by whitespace + * @var string + * @access private + */ +var $sub_value = ''; + +/** + * Array which saves all subvalues for a property. + * @var array + * @see sub_value + * @access private + */ +var $sub_value_arr = array(); + +/** + * Saves the char which opened the last string + * @var string + * @access private + */ +var $str_char = ''; + +/** + * Status from which the parser switched to ic or instr + * @var string + * @access private + */ +var $from = ''; + +/** + * Variable needed to manage string-in-strings, for example url("foo.png") + * @var string + * @access private + */ +var $str_in_str = false; + +/** + * =true if in invalid at-rule + * @var bool + * @access private + */ +var $invalid_at = false; + +/** + * =true if something has been added to the current selector + * @var bool + * @access private + */ +var $added = false; + +/** + * Array which saves the message log + * @var array + * @access private + */ +var $log = array(); + +/** + * Saves the line number + * @var integer + * @access private + */ +var $line = 1; + +/** + * Loads standard template and sets default settings + * @access private + * @version 1.2 + */ +function csstidy() +{ + $this->settings['remove_bslash'] = true; + $this->settings['compress_colors'] = true; + $this->settings['compress_font-weight'] = true; + $this->settings['lowercase_s'] = false; + $this->settings['optimise_shorthands'] = 1; + $this->settings['remove_last_;'] = false; + $this->settings['case_properties'] = 1; + $this->settings['sort_properties'] = false; + $this->settings['sort_selectors'] = false; + $this->settings['merge_selectors'] = 2; + $this->settings['discard_invalid_properties'] = false; + $this->settings['css_level'] = 'CSS2.1'; + $this->settings['preserve_css'] = false; + $this->settings['timestamp'] = false; + + $this->load_template('default'); + $this->print = new csstidy_print($this); + $this->optimise = new csstidy_optimise($this); +} + +/** + * Get the value of a setting. + * @param string $setting + * @access public + * @return mixed + * @version 1.0 + */ +function get_cfg($setting) +{ + if(isset($this->settings[$setting])) + { + return $this->settings[$setting]; + } + return false; +} + +/** + * Set the value of a setting. + * @param string $setting + * @param mixed $value + * @access public + * @return bool + * @version 1.0 + */ +function set_cfg($setting,$value) +{ + if(isset($this->settings[$setting]) && $value !== '') + { + $this->settings[$setting] = $value; + return true; + } + return false; +} + +/** + * Adds a token to $this->tokens + * @param mixed $type + * @param string $data + * @param bool $do add a token even if preserve_css is off + * @access private + * @version 1.0 + */ +function _add_token($type, $data, $do = false) { + if($this->get_cfg('preserve_css') || $do) { + $this->tokens[] = array($type, ($type == COMMENT) ? $data : trim($data)); + } +} + +/** + * Add a message to the message log + * @param string $message + * @param string $type + * @param integer $line + * @access private + * @version 1.0 + */ +function log($message,$type,$line = -1) +{ + if($line === -1) + { + $line = $this->line; + } + $line = intval($line); + $add = array('m' => $message, 't' => $type); + if(!isset($this->log[$line]) || !in_array($add,$this->log[$line])) + { + $this->log[$line][] = $add; + } +} + +/** + * Parse unicode notations and find a replacement character + * @param string $string + * @param integer $i + * @access private + * @return string + * @version 1.2 + */ +function _unicode(&$string, &$i) +{ + ++$i; + $add = ''; + $tokens =& $GLOBALS['csstidy']['tokens']; + $replaced = false; + + while($i < strlen($string) && (ctype_xdigit($string{$i}) || ctype_space($string{$i})) && strlen($add) < 6) + { + $add .= $string{$i}; + + if(ctype_space($string{$i})) { + break; + } + $i++; + } + + if(hexdec($add) > 47 && hexdec($add) < 58 || hexdec($add) > 64 && hexdec($add) < 91 || hexdec($add) > 96 && hexdec($add) < 123) + { + $this->log('Replaced unicode notation: Changed \\'. $add .' to ' . chr(hexdec($add)),'Information'); + $add = chr(hexdec($add)); + $replaced = true; + } + else { + $add = trim('\\'.$add); + } + + if(@ctype_xdigit($string{$i+1}) && ctype_space($string{$i}) + && !$replaced || !ctype_space($string{$i})) { + $i--; + } + + if($add != '\\' || !$this->get_cfg('remove_bslash') || strpos($tokens, $string{$i+1}) !== false) { + return $add; + } + + if($add == '\\') { + $this->log('Removed unnecessary backslash','Information'); + } + return ''; +} + +/** + * Loads a new template + * @param string $content either filename (if $from_file == true), content of a template file, "high_compression", "highest_compression", "low_compression", or "default" + * @param bool $from_file uses $content as filename if true + * @access public + * @version 1.1 + * @see http://csstidy.sourceforge.net/templates.php + */ +function load_template($content, $from_file=true) +{ + $predefined_templates =& $GLOBALS['csstidy']['predefined_templates']; + if($content == 'high_compression' || $content == 'default' || $content == 'highest_compression' || $content == 'low_compression') + { + $this->template = $predefined_templates[$content]; + return; + } + + if($from_file) + { + $content = strip_tags(file_get_contents($content),'<span>'); + } + $content = str_replace("\r\n","\n",$content); // Unify newlines (because the output also only uses \n) + $template = explode('|',$content); + + for ($i = 0; $i < count($template); $i++ ) + { + $this->template[$i] = $template[$i]; + } +} + +/** + * Starts parsing from URL + * @param string $url + * @access public + * @version 1.0 + */ +function parse_from_url($url) +{ + return $this->parse(@file_get_contents($url)); +} + +/** + * Checks if there is a token at the current position + * @param string $string + * @param integer $i + * @access public + * @version 1.11 + */ +function is_token(&$string, $i) +{ + $tokens =& $GLOBALS['csstidy']['tokens']; + return (strpos($tokens, $string{$i}) !== false && !csstidy::escaped($string,$i)); +} + + +/** + * Parses CSS in $string. The code is saved as array in $this->css + * @param string $string the CSS code + * @access public + * @return bool + * @version 1.1 + */ +function parse($string) { + // PHP bug? Settings need to be refreshed in PHP4 + $this->print = new csstidy_print($this); + $this->optimise = new csstidy_optimise($this); + + $all_properties =& $GLOBALS['csstidy']['all_properties']; + $at_rules =& $GLOBALS['csstidy']['at_rules']; + + $this->css = array(); + $this->print->input_css = $string; + $string = str_replace("\r\n","\n",$string) . ' '; + $cur_comment = ''; + + for ($i = 0, $size = strlen($string); $i < $size; $i++ ) + { + if($string{$i} == "\n" || $string{$i} == "\r") + { + ++$this->line; + } + + switch($this->status) + { + /* Case in at-block */ + case 'at': + if(csstidy::is_token($string,$i)) + { + if($string{$i} == '/' && @$string{$i+1} == '*') + { + $this->status = 'ic'; ++$i; + $this->from = 'at'; + } + elseif($string{$i} == '{') + { + $this->status = 'is'; + $this->_add_token(AT_START, $this->at); + } + elseif($string{$i} == ',') + { + $this->at = trim($this->at).','; + } + elseif($string{$i} == '\\') + { + $this->at .= $this->_unicode($string,$i); + } + } + else + { + $lastpos = strlen($this->at)-1; + if(!( (ctype_space($this->at{$lastpos}) || csstidy::is_token($this->at,$lastpos) && $this->at{$lastpos} == ',') && ctype_space($string{$i}))) + { + $this->at .= $string{$i}; + } + } + break; + + /* Case in-selector */ + case 'is': + if(csstidy::is_token($string,$i)) + { + if($string{$i} == '/' && @$string{$i+1} == '*' && trim($this->selector) == '') + { + $this->status = 'ic'; ++$i; + $this->from = 'is'; + } + elseif($string{$i} == '@' && trim($this->selector) == '') + { + // Check for at-rule + $this->invalid_at = true; + foreach($at_rules as $name => $type) + { + if(!strcasecmp(substr($string,$i+1,strlen($name)),$name)) + { + ($type == 'at') ? $this->at = '@'.$name : $this->selector = '@'.$name; + $this->status = $type; + $i += strlen($name); + $this->invalid_at = false; + } + } + + if($this->invalid_at) + { + $this->selector = '@'; + $invalid_at_name = ''; + for($j = $i+1; $j < $size; ++$j) + { + if(!ctype_alpha($string{$j})) + { + break; + } + $invalid_at_name .= $string{$j}; + } + $this->log('Invalid @-rule: '.$invalid_at_name.' (removed)','Warning'); + } + } + elseif(($string{$i} == '"' || $string{$i} == "'")) + { + $this->selector .= $string{$i}; + $this->status = 'instr'; + $this->str_char = $string{$i}; + $this->from = 'is'; + } + elseif($this->invalid_at && $string{$i} == ';') + { + $this->invalid_at = false; + $this->status = 'is'; + } + elseif($string{$i} == '{') + { + $this->status = 'ip'; + $this->_add_token(SEL_START, $this->selector); + $this->added = false; + } + elseif($string{$i} == '}') + { + $this->_add_token(AT_END, $this->at); + $this->at = ''; + $this->selector = ''; + $this->sel_separate = array(); + } + elseif($string{$i} == ',') + { + $this->selector = trim($this->selector).','; + $this->sel_separate[] = strlen($this->selector); + } + elseif($string{$i} == '\\') + { + $this->selector .= $this->_unicode($string,$i); + } + else $this->selector .= $string{$i}; + } + else + { + $lastpos = strlen($this->selector)-1; + if($lastpos == -1 || !( (ctype_space($this->selector{$lastpos}) || csstidy::is_token($this->selector,$lastpos) && $this->selector{$lastpos} == ',') && ctype_space($string{$i}))) + { + $this->selector .= $string{$i}; + } + } + break; + + /* Case in-property */ + case 'ip': + if(csstidy::is_token($string,$i)) + { + if(($string{$i} == ':' || $string{$i} == '=') && $this->property != '') + { + $this->status = 'iv'; + if(csstidy::property_is_valid($this->property) || !$this->get_cfg('discard_invalid_properties')) { + $this->_add_token(PROPERTY, $this->property); + } + } + elseif($string{$i} == '/' && @$string{$i+1} == '*' && $this->property == '') + { + $this->status = 'ic'; ++$i; + $this->from = 'ip'; + } + elseif($string{$i} == '}') + { + $this->explode_selectors(); + $this->status = 'is'; + $this->invalid_at = false; + $this->_add_token(SEL_END, $this->selector); + $this->selector = ''; + $this->property = ''; + } + elseif($string{$i} == ';') + { + $this->property = ''; + } + elseif($string{$i} == '\\') + { + $this->property .= $this->_unicode($string,$i); + } + } + elseif(!ctype_space($string{$i})) + { + $this->property .= $string{$i}; + } + break; + + /* Case in-value */ + case 'iv': + $pn = (($string{$i} == "\n" || $string{$i} == "\r") && $this->property_is_next($string,$i+1) || $i == strlen($string)-1); + if(csstidy::is_token($string,$i) || $pn) + { + if($string{$i} == '/' && @$string{$i+1} == '*') + { + $this->status = 'ic'; ++$i; + $this->from = 'iv'; + } + elseif(($string{$i} == '"' || $string{$i} == "'" || $string{$i} == '(')) + { + $this->sub_value .= $string{$i}; + $this->str_char = ($string{$i} == '(') ? ')' : $string{$i}; + $this->status = 'instr'; + $this->from = 'iv'; + } + elseif($string{$i} == ',') + { + $this->sub_value = trim($this->sub_value).','; + } + elseif($string{$i} == '\\') + { + $this->sub_value .= $this->_unicode($string,$i); + } + elseif($string{$i} == ';' || $pn) + { + if($this->selector{0} == '@' && isset($at_rules[substr($this->selector,1)]) && $at_rules[substr($this->selector,1)] == 'iv') + { + $this->sub_value_arr[] = trim($this->sub_value); + + $this->status = 'is'; + + switch($this->selector) + { + case '@charset': $this->charset = $this->sub_value_arr[0]; break; + case '@namespace': $this->namespace = implode(' ',$this->sub_value_arr); break; + case '@import': $this->import[] = implode(' ',$this->sub_value_arr); break; + } + + $this->sub_value_arr = array(); + $this->sub_value = ''; + $this->selector = ''; + $this->sel_separate = array(); + } + else + { + $this->status = 'ip'; + } + } + elseif($string{$i} != '}') + { + $this->sub_value .= $string{$i}; + } + if(($string{$i} == '}' || $string{$i} == ';' || $pn) && !empty($this->selector)) + { + if($this->at == '') + { + $this->at = DEFAULT_AT; + } + + // case settings + if($this->get_cfg('lowercase_s')) + { + $this->selector = strtolower($this->selector); + } + $this->property = strtolower($this->property); + + $this->optimise->subvalue(); + if($this->sub_value != '') { + $this->sub_value_arr[] = $this->sub_value; + $this->sub_value = ''; + } + + $this->value = implode(' ',$this->sub_value_arr); + + $this->selector = trim($this->selector); + + $this->optimise->value(); + + $valid = csstidy::property_is_valid($this->property); + if((!$this->invalid_at || $this->get_cfg('preserve_css')) && (!$this->get_cfg('discard_invalid_properties') || $valid)) + { + $this->css_add_property($this->at,$this->selector,$this->property,$this->value); + $this->_add_token(VALUE, $this->value); + $this->optimise->shorthands(); + } + if(!$valid) + { + if($this->get_cfg('discard_invalid_properties')) + { + $this->log('Removed invalid property: '.$this->property,'Warning'); + } + else + { + $this->log('Invalid property in '.strtoupper($this->get_cfg('css_level')).': '.$this->property,'Warning'); + } + } + + $this->property = ''; + $this->sub_value_arr = array(); + $this->value = ''; + } + if($string{$i} == '}') + { + $this->explode_selectors(); + $this->_add_token(SEL_END, $this->selector); + $this->status = 'is'; + $this->invalid_at = false; + $this->selector = ''; + } + } + elseif(!$pn) + { + $this->sub_value .= $string{$i}; + + if(ctype_space($string{$i})) + { + $this->optimise->subvalue(); + if($this->sub_value != '') { + $this->sub_value_arr[] = $this->sub_value; + $this->sub_value = ''; + } + } + } + break; + + /* Case in string */ + case 'instr': + if($this->str_char == ')' && $string{$i} == '"' && !$this->str_in_str && !csstidy::escaped($string,$i)) + { + $this->str_in_str = true; + } + elseif($this->str_char == ')' && $string{$i} == '"' && $this->str_in_str && !csstidy::escaped($string,$i)) + { + $this->str_in_str = false; + } + if($string{$i} == $this->str_char && !csstidy::escaped($string,$i) && !$this->str_in_str) + { + $this->status = $this->from; + } + $temp_add = $string{$i}; + // ...and no not-escaped backslash at the previous position + if( ($string{$i} == "\n" || $string{$i} == "\r") && !($string{$i-1} == '\\' && !csstidy::escaped($string,$i-1)) ) + { + $temp_add = "\\A "; + $this->log('Fixed incorrect newline in string','Warning'); + } + if($this->from == 'iv') + { + $this->sub_value .= $temp_add; + } + elseif($this->from == 'is') + { + $this->selector .= $temp_add; + } + break; + + /* Case in-comment */ + case 'ic': + if($string{$i} == '*' && $string{$i+1} == '/') + { + $this->status = $this->from; + $i++; + $this->_add_token(COMMENT, $cur_comment); + $cur_comment = ''; + } + else + { + $cur_comment .= $string{$i}; + } + break; + } + } + + $this->optimise->postparse(); + + $this->print->_reset(); + + return !(empty($this->css) && empty($this->import) && empty($this->charset) && empty($this->tokens) && empty($this->namespace)); +} + +/** + * Explodes selectors + * @access private + * @version 1.0 + */ +function explode_selectors() +{ + // Explode multiple selectors + if($this->get_cfg('merge_selectors') == 1) + { + $new_sels = array(); + $lastpos = 0; + $this->sel_separate[] = strlen($this->selector); + foreach($this->sel_separate as $num => $pos) + { + if($num == count($this->sel_separate)-1) { + $pos += 1; + } + + $new_sels[] = substr($this->selector,$lastpos,$pos-$lastpos-1); + $lastpos = $pos; + } + + if(count($new_sels) > 1) + { + foreach($new_sels as $selector) + { + $this->merge_css_blocks($this->at,$selector,$this->css[$this->at][$this->selector]); + } + unset($this->css[$this->at][$this->selector]); + } + } + $this->sel_separate = array(); +} + +/** + * Checks if a character is escaped (and returns true if it is) + * @param string $string + * @param integer $pos + * @access public + * @return bool + * @version 1.02 + */ +function escaped(&$string,$pos) +{ + return !(@($string{$pos-1} != '\\') || csstidy::escaped($string,$pos-1)); +} + +/** + * Adds a property with value to the existing CSS code + * @param string $media + * @param string $selector + * @param string $property + * @param string $new_val + * @access private + * @version 1.2 + */ +function css_add_property($media,$selector,$property,$new_val) +{ + if($this->get_cfg('preserve_css') || trim($new_val) == '') { + return; + } + + $this->added = true; + if(isset($this->css[$media][$selector][$property])) + { + if((csstidy::is_important($this->css[$media][$selector][$property]) && csstidy::is_important($new_val)) || !csstidy::is_important($this->css[$media][$selector][$property])) + { + unset($this->css[$media][$selector][$property]); + $this->css[$media][$selector][$property] = trim($new_val); + } + } + else + { + $this->css[$media][$selector][$property] = trim($new_val); + } +} + +/** + * Adds CSS to an existing media/selector + * @param string $media + * @param string $selector + * @param array $css_add + * @access private + * @version 1.1 + */ +function merge_css_blocks($media,$selector,$css_add) +{ + foreach($css_add as $property => $value) + { + $this->css_add_property($media,$selector,$property,$value,false); + } +} + +/** + * Checks if $value is !important. + * @param string $value + * @return bool + * @access public + * @version 1.0 + */ +function is_important(&$value) +{ + return (!strcasecmp(substr(str_replace($GLOBALS['csstidy']['whitespace'],'',$value),-10,10),'!important')); +} + +/** + * Returns a value without !important + * @param string $value + * @return string + * @access public + * @version 1.0 + */ +function gvw_important($value) +{ + if(csstidy::is_important($value)) + { + $value = trim($value); + $value = substr($value,0,-9); + $value = trim($value); + $value = substr($value,0,-1); + $value = trim($value); + return $value; + } + return $value; +} + +/** + * Checks if the next word in a string from pos is a CSS property + * @param string $istring + * @param integer $pos + * @return bool + * @access private + * @version 1.2 + */ +function property_is_next($istring, $pos) +{ + $all_properties =& $GLOBALS['csstidy']['all_properties']; + $istring = substr($istring,$pos,strlen($istring)-$pos); + $pos = strpos($istring,':'); + if($pos === false) + { + return false; + } + $istring = strtolower(trim(substr($istring,0,$pos))); + if(isset($all_properties[$istring])) + { + $this->log('Added semicolon to the end of declaration','Warning'); + return true; + } + return false; +} + +/** + * Checks if a property is valid + * @param string $property + * @return bool; + * @access public + * @version 1.0 + */ +function property_is_valid($property) { + $all_properties =& $GLOBALS['csstidy']['all_properties']; + return (isset($all_properties[$property]) && strpos($all_properties[$property],strtoupper($this->get_cfg('css_level'))) !== false ); +} + +} +?> \ No newline at end of file Added: trunk/lib/csstidy-1.2/class.csstidy_optimise.php =================================================================== --- trunk/lib/csstidy-1.2/class.csstidy_optimise.php (rev 0) +++ trunk/lib/csstidy-1.2/class.csstidy_optimise.php 2006-12-21 06:30:19 UTC (rev 906) @@ -0,0 +1,799 @@ +<?php +/** + * CSSTidy - CSS Parser and Optimiser + * + * CSS Optimising Class + * This class optimises CSS data generated by csstidy. + * + * This file is part of CSSTidy. + * + * CSSTidy is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * CSSTidy 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CSSTidy; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @package csstidy + * @author Florian Schmitz (floele at gmail dot com) 2005-2006 + */ + +/** + * CSS Optimising Class + * + * This class optimises CSS data generated by csstidy. + * + * @package csstidy + * @author Florian Schmitz (floele at gmail dot com) 2005-2006 + * @version 1.0 + */ + +class csstidy_optimise +{ + /** + * Constructor + * @param array $css contains the class csstidy + * @access private + * @version 1.0 + */ + function csstidy_optimise(&$css) + { + $this->parser =& $css; + $this->css =& $css->css; + $this->sub_value =& $css->sub_value; + $this->at =& $css->at; + $this->selector =& $css->selector; + $this->property =& $css->property; + $this->value =& $css->value; + } + + /** + * Optimises $css after parsing + * @access public + * @version 1.0 + */ + function postparse() + { + if ($this->parser->get_cfg('preserve_css')) { + return; + } + + if ($this->parser->get_cfg('merge_selectors') == 2) + { + foreach ($this->css as $medium => $value) + { + $this->merge_selectors($this->css[$medium]); + } + } + + if ($this->parser->get_cfg('optimise_shorthands') > 0) + { + foreach ($this->css as $medium => $value) + { + foreach ($value as $selector => $value1) + { + $this->css[$medium][$selector] = csstidy_optimise::merge_4value_shorthands($this->css[$medium][$selector]); + + if ($this->parser->get_cfg('optimise_shorthands') < 2) { + continue; + } + + $this->css[$medium][$selector] = csstidy_optimise::merge_bg($this->css[$medium][$selector]); + if (empty($this->css[$medium][$selector])) { + unset($this->css[$medium][$selector]); + } + } + } + } + } + + /** + * Optimises values + * @access public + * @version 1.0 + */ + function value() + { + $shorthands =& $GLOBALS['csstidy']['shorthands']; + + // optimise shorthand properties + if(isset($shorthands[$this->property])) + { + $temp = csstidy_optimise::shorthand($this->value); // FIXME - move + if($temp != $this->value) + { + $this->parser->log('Optimised shorthand notation ('.$this->property.'): Changed "'.$this->value.'" to "'.$temp.'"','Information'); + } + $this->value = $temp; + } + + // Remove whitespace at ! important + if($this->value != $this->compress_important($this->value)) + { + $this->parser->log('Optimised !important','Information'); + } + } + + /** + * Optimises shorthands + * @access public + * @version 1.0 + */ + function shorthands() + { + $shorthands =& $GLOBALS['csstidy']['shorthands']; + + if(!$this->parser->get_cfg('optimise_shorthands') || $this->parser->get_cfg('preserve_css')) { + return; + } + + if($this->property == 'background' && $this->parser->get_cfg('optimise_shorthands') > 1) + { + unset($this->css[$this->at][$this->selector]['background']); + $this->parser->merge_css_blocks($this->at,$this->selector,csstidy_optimise::dissolve_short_bg($this->value)); + } + if(isset($shorthands[$this->property])) + { + $this->parser->merge_css_blocks($this->at,$this->selector,csstidy_optimise::dissolve_4value_shorthands($this->property,$this->value)); + if(is_array($shorthands[$this->property])) + { + unset($this->css[$this->at][$this->selector][$this->property]); + } + } + } + + /** + * Optimises a sub-value + * @access public + * @version 1.0 + */ + function subvalue() + { + $replace_colors =& $GLOBALS['csstidy']['replace_colors']; + + $this->sub_value = trim($this->sub_value); + if($this->sub_value == '') // caution : '0' + { + return; + } + + // Compress font-weight + if($this->property == 'font-weight' && $this->parser->get_cfg('compress_font-weight')) + { + $important = ''; + if(csstidy::is_important($this->sub_value)) + { + $important = ' !important'; + $this->sub_value = csstidy::gvw_important($this->sub_value); + } + if($this->sub_value == 'bold') + { + $this->sub_value = '700'.$important; + $this->parser->log('Optimised font-weight: Changed "bold" to "700"','Information'); + } + else if($this->sub_value == 'normal') + { + $this->sub_value = '400'.$important; + $this->parser->log('Optimised font-weight: Changed "normal" to "400"','Information'); + } + } + + $temp = $this->compress_numbers($this->sub_value); + if($temp != $this->sub_value) + { + if(strlen($temp) > strlen($this->sub_value)) { + $this->parser->log('Fixed invalid number: Changed "'.$this->sub_value.'" to "'.$temp.'"','Warning'); + } else { + $this->parser->log('Optimised number: Changed "'.$this->sub_value.'" to "'.$temp.'"','Information'); + } + $this->sub_value = $temp; + } + if($this->parser->get_cfg('compress_colors')) + { + $temp = $this->cut_color($this->sub_value); + if($temp !== $this->sub_value) + { + if(isset($replace_colors[$this->sub_value])) { + $this->parser->log('Fixed invalid color name: Changed "'.$this->sub_value.'" to "'.$temp.'"','Warning'); + } else { + $this->parser->log('Optimised color: Changed "'.$this->sub_value.'" to "'.$temp.'"','Information'); + } + $this->sub_value = $temp; + } + } + } + + /** + * Compresses shorthand values. Example: margin:1px 1px 1px 1px -> margin:1px + * @param string $value + * @access public + * @return string + * @version 1.0 + */ + function shorthand($value) + { + $important = ''; + if(csstidy::is_important($value)) + { + $values = csstidy::gvw_important($value); + $important = ' !important'; + } + else $values = $value; + + $values = explode(' ',$values); + switch(count($values)) + { + case 4: + if($values[0] == $values[1] && $values[0] == $values[2] && $values[0] == $values[3]) + { + return $values[0].$important; + } + elseif($values[1] == $values[3] && $values[0] == $values[2]) + { + return $values[0].' '.$values[1].$important; + } + elseif($values[1] == $values[3]) + { + return $values[0].' '.$values[1].' '.$values[2].$important; + } + break; + + case 3: + if($values[0] == $values[1] && $values[0] == $values[2]) + { + return $values[0].$important; + } + elseif($values[0] == $values[2]) + { + return $values[0].' '.$values[1].$important; + } + break; + + case 2: + if($values[0] == $values[1]) + ... [truncated message content] |
From: <ke...@us...> - 2006-12-20 10:31:46
|
Revision: 905 http://svn.sourceforge.net/phpfreechat/?rev=905&view=rev Author: kerphi Date: 2006-12-20 02:31:43 -0800 (Wed, 20 Dec 2006) Log Message: ----------- Add an option to enable or disable the container memory cache + change the getContainerInstance() function to return the same container instance each time this function is called. Modified Paths: -------------- trunk/src/pfccontainer.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2006-12-19 22:35:09 UTC (rev 904) +++ trunk/src/pfccontainer.class.php 2006-12-20 10:31:43 UTC (rev 905) @@ -32,11 +32,14 @@ class pfcContainer extends pfcContainerInterface { var $_container = null; // contains the concrete container instance + var $_usememorycache = true; - function pfcContainer(&$c, $type = 'File') + function pfcContainer(&$c, $type = 'File', $usememorycache = true) { pfcContainerInterface::pfcContainerInterface($c); + $this->_usememorycache = $usememorycache; + // create the concrete container instance require_once dirname(__FILE__)."/containers/".strtolower($type).".class.php"; $container_classname = "pfcContainer_".$type; @@ -493,23 +496,25 @@ { $ret = $this->_container->setMeta($group, $subgroup, $leaf, $leafvalue); - // echo "setMeta($group, $subgroup, $leaf, $leafvalue)\n"; - - if (isset($this->_cache[$group]['value']) && - !in_array($subgroup, $this->_cache[$group]['value'])) + if ($this->_usememorycache) { - $this->_cache[$group]['value'][] = $subgroup; - $this->_cache[$group]['timestamp'][] = time(); + // store the modifications in the cache + if (isset($this->_cache[$group]['value']) && + !in_array($subgroup, $this->_cache[$group]['value'])) + { + $this->_cache[$group]['value'][] = $subgroup; + $this->_cache[$group]['timestamp'][] = time(); + } + if (isset($this->_cache[$group]['childs'][$subgroup]['value']) && + !in_array($leaf, $this->_cache[$group]['childs'][$subgroup]['value'])) + { + $this->_cache[$group]['childs'][$subgroup]['value'][] = $leaf; + $this->_cache[$group]['childs'][$subgroup]['timestamp'][] = time(); + } + $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = array($leafvalue); + $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = array(time()); } - if (isset($this->_cache[$group]['childs'][$subgroup]['value']) && - !in_array($leaf, $this->_cache[$group]['childs'][$subgroup]['value'])) - { - $this->_cache[$group]['childs'][$subgroup]['value'][] = $leaf; - $this->_cache[$group]['childs'][$subgroup]['timestamp'][] = time(); - } - $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = array($leafvalue); - $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = array(time()); - + return $ret; } @@ -527,73 +532,73 @@ $ret = array('timestamp' => array(), 'value' => array()); - - // check in the cache - $incache = false; - if ($subgroup == null && - isset($this->_cache[$group]['value'])) + if ($this->_usememorycache) { - $incache = true; - $ret = $this->_cache[$group]; - } - else if ($leaf == null && - isset($this->_cache[$group]['childs'][$subgroup]['value'])) - { - $incache = true; - $ret = $this->_cache[$group]['childs'][$subgroup]; - } - else - { - if ($withleafvalue) + // check if the data exists in the cache + $incache = false; + if ($subgroup == null && + isset($this->_cache[$group]['value'])) { - if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'])) - { - $incache = true; - $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]; - } + $incache = true; + $ret = $this->_cache[$group]; } + else if ($leaf == null && + isset($this->_cache[$group]['childs'][$subgroup]['value'])) + { + $incache = true; + $ret = $this->_cache[$group]['childs'][$subgroup]; + } else { - if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'])) + if ($withleafvalue) { - $incache = true; - $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]; + if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'])) + { + $incache = true; + $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]; + } } + else + { + if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'])) + { + $incache = true; + $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]; + } + } } + if ($incache) + { + $ret = array('timestamp' => $ret['timestamp'], + 'value' => $ret['value']); + return $ret; + } } - - // echo "getMeta($group, $subgroup, $leaf, $withleafvalue)".($incache?"incache":"notincache")."\n"; - - if ($incache) - { - $ret = array('timestamp' => $ret['timestamp'], - 'value' => $ret['value']); - return $ret; - } - // get the fresh data $ret = $this->_container->getMeta($group, $subgroup, $leaf, $withleafvalue); - - // store in the cache - if ($subgroup == null) + if ($this->_usememorycache) { - $this->_cache[$group]['value'] = $ret['value']; - $this->_cache[$group]['timestamp'] = $ret['timestamp']; - } - else if ($leaf == null) - { - $this->_cache[$group]['childs'][$subgroup]['value'] = $ret['value']; - $this->_cache[$group]['childs'][$subgroup]['timestamp'] = $ret['timestamp']; - } - else - { - if ($withleafvalue) - $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = $ret['value']; + // store in the cache + if ($subgroup == null) + { + $this->_cache[$group]['value'] = $ret['value']; + $this->_cache[$group]['timestamp'] = $ret['timestamp']; + } + else if ($leaf == null) + { + $this->_cache[$group]['childs'][$subgroup]['value'] = $ret['value']; + $this->_cache[$group]['childs'][$subgroup]['timestamp'] = $ret['timestamp']; + } else - unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value']); - $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = $ret['timestamp']; + { + if ($withleafvalue) + $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = $ret['value']; + else + unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value']); + $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = $ret['timestamp']; + } } return $ret; @@ -609,45 +614,40 @@ */ function rmMeta($group, $subgroup = null, $leaf = null) { - //echo "rmMeta($group, $subgroup, $leaf)\n"; - - // if ($group == "channelid-to-nickid") - // { echo "avant\n"; print_r($this->_cache[$group]); } - - // remove from the cache - if ($group == null) - $this->_cache = array(); - else if ($subgroup == null) - unset($this->_cache[$group]); - else if ($leaf == null) + if ($this->_usememorycache) { - if (isset($this->_cache[$group]['value'])) + // remove from the cache + if ($group == null) + $this->_cache = array(); + else if ($subgroup == null) + unset($this->_cache[$group]); + else if ($leaf == null) { - $i = array_search($subgroup,$this->_cache[$group]['value']); - if ($i !== FALSE) + if (isset($this->_cache[$group]['value'])) { - unset($this->_cache[$group]['value'][$i]); - unset($this->_cache[$group]['timestamp'][$i]); + $i = array_search($subgroup,$this->_cache[$group]['value']); + if ($i !== FALSE) + { + unset($this->_cache[$group]['value'][$i]); + unset($this->_cache[$group]['timestamp'][$i]); + } } + unset($this->_cache[$group]['childs'][$subgroup]); } - unset($this->_cache[$group]['childs'][$subgroup]); - } - else - { - if (isset($this->_cache[$group]['childs'][$subgroup]['value'])) + else { - $i = array_search($leaf,$this->_cache[$group]['childs'][$subgroup]['value']); - if ($i !== FALSE) + if (isset($this->_cache[$group]['childs'][$subgroup]['value'])) { - unset($this->_cache[$group]['childs'][$subgroup]['value'][$i]); - unset($this->_cache[$group]['childs'][$subgroup]['timestamp'][$i]); + $i = array_search($leaf,$this->_cache[$group]['childs'][$subgroup]['value']); + if ($i !== FALSE) + { + unset($this->_cache[$group]['childs'][$subgroup]['value'][$i]); + unset($this->_cache[$group]['childs'][$subgroup]['timestamp'][$i]); + } } + unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]); } - unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]); } - - // if ($group == "channelid-to-nickid") - // { echo "apres\n"; print_r($this->_cache[$group]); } return $this->_container->rmMeta($group, $subgroup, $leaf); } Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-12-19 22:35:09 UTC (rev 904) +++ trunk/src/pfcglobalconfig.class.php 2006-12-20 10:31:43 UTC (rev 905) @@ -235,19 +235,22 @@ */ function &getContainerInstance() { - // bug in php4: cant make a static pfcContainer instance because // it make problems with pfcGlobalConfig references (not updated) // it works well in php5, maybe there is a workeround but I don't have time to debug this // to reproduce the bug: uncomment the next lines and try to change your nickname // the old nickname will not be removed - // static $container; - // if (!isset($container)) - // { - require_once dirname(__FILE__).'/pfccontainer.class.php'; - $container =& new pfcContainer($this,$this->container_type); + // @todo : check if this bug is already present in php4 + static $container; + if (!isset($container)) + { + require_once dirname(__FILE__).'/pfccontainer.class.php'; + $container =& new pfcContainer($this, // the config instance + $this->container_type, // the container type + true // usememorycache + ); + } return $container; - // } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |