phpfreechat-svn Mailing List for phpFreeChat (Page 13)
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-02-25 15:48:15
|
Revision: 979 http://svn.sourceforge.net/phpfreechat/?rev=979&view=rev Author: kerphi Date: 2007-02-25 07:48:12 -0800 (Sun, 25 Feb 2007) Log Message: ----------- remove the obsolete pfc_proxy_url parameter Modified Paths: -------------- trunk/themes/default/chat.js.tpl.php Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-02-23 13:50:56 UTC (rev 978) +++ trunk/themes/default/chat.js.tpl.php 2007-02-25 15:48:12 UTC (rev 979) @@ -42,16 +42,15 @@ 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"; ?>'; -var pfc_theme = <?php echo $json->encode($theme); ?>; -var pfc_isready = false; +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_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"] : ""); ?>", @@ -157,4 +156,4 @@ <?php } ?> <?php if ($debugxajax) { ?> <div id="pfc_debugxajax"></div> -<?php } ?> \ No newline at end of file +<?php } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-23 13:50:57
|
Revision: 978 http://svn.sourceforge.net/phpfreechat/?rev=978&view=rev Author: kerphi Date: 2007-02-23 05:50:56 -0800 (Fri, 23 Feb 2007) Log Message: ----------- fix this demo Modified Paths: -------------- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-02-20 17:53:57 UTC (rev 977) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-02-23 13:50:56 UTC (rev 978) @@ -1,61 +1,50 @@ -pfcClient.prototype.updateNickList = function(tabid,lst) +pfcClient.prototype.buildNickItem = function(nickid) { - this.nicklist[tabid] = lst; - var nicks = lst; - var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild; - var ul = document.createElement('ul'); - for (var i=0; i<nicks.length; i++) - { + var nick = this.getUserMeta(nickid, 'nick'); + var isadmin = this.getUserMeta(nickid, 'isadmin'); + if (isadmin == '') isadmin = false; + var li = document.createElement('li'); - if (nicks[i] != this.nickname) - { - // this is someone -> create a privmsg link - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.alt = this.res.getLabel('Private message'); - img.title = img.alt; - img.style.marginRight = '5px'; - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_nick = nicks[i]; - a.onclick = function(){pfc.sendRequest('/privmsg "'+this.pfc_nick+'"'); return false;} - a.appendChild(img); - li.appendChild(a); + + var a = document.createElement('a'); + a.pfc_nick = nick; + a.pfc_nickid = nickid; + a.setAttribute('target','_blank'); + a.setAttribute('href','http://www.google.com/search?q='+nick); + /* + 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 - { - // this is myself -> do not create a privmsg link - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/user-me.gif')); - img.alt = ''; - img.title = img.alt; - img.style.marginRight = '5px'; - li.appendChild(img); - } - + 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 a = document.createElement('a'); - a.pfc_nick = nicks[i]; - a.setAttribute('href','http://www.google.com/search?q='+nicks[i]); - a.setAttribute('target','_blank'); - //a.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} - a.appendChild(document.createTextNode(nicks[i])); - a.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); - a.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 + 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); - nobr.appendChild(a); - li.appendChild(nobr); - li.style.borderBottom = '1px solid #AAA'; - - ul.appendChild(li); - } - var fc = nickdiv.firstChild; - if (fc) - nickdiv.replaceChild(ul,fc); - else - nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); + return li; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-20 17:54:01
|
Revision: 977 http://svn.sourceforge.net/phpfreechat/?rev=977&view=rev Author: kerphi Date: 2007-02-20 09:53:57 -0800 (Tue, 20 Feb 2007) Log Message: ----------- [en] Makes compatible csstidy and php without ctype enabled (thanks to Andreas) [0h40] [fr] Rend compatible la librairie csstidy pour les installations de php n'ayant pas le module ctype (merci ?\195?\160 Andreas) [0h40] Modified Paths: -------------- trunk/src/phpfreechat.class.php Added Paths: ----------- trunk/lib/ctype/ trunk/lib/ctype/ctype.php trunk/testcase/ctype.php Added: trunk/lib/ctype/ctype.php =================================================================== --- trunk/lib/ctype/ctype.php (rev 0) +++ trunk/lib/ctype/ctype.php 2007-02-20 17:53:57 UTC (rev 977) @@ -0,0 +1,24 @@ +<?php + +if (!function_exists('ctype_alpha')) { + function ctype_alpha($string) + { + return preg_match('/^[a-z]+$/i', $string); + } +} + +if (!function_exists('ctype_xdigit')) { + function ctype_xdigit($string) + { + return preg_match('/^[0-9a-f]+$/i', $string); + } +} + +if (!function_exists('ctype_space')) { + function ctype_space($string) + { + return preg_match('/^[\s]$/', $string); + } +} + +?> \ No newline at end of file Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-20 17:19:29 UTC (rev 976) +++ trunk/src/phpfreechat.class.php 2007-02-20 17:53:57 UTC (rev 977) @@ -381,6 +381,7 @@ $js = '';//file_get_contents(dirname(__FILE__).'/client/createstylerule.js'); $js .= 'var c = $H();'; $path = $c->getFilePathFromTheme('style.css.php'); + require_once dirname(__FILE__).'/../lib/ctype/ctype.php'; // to keep compatibility for php without ctype support require_once dirname(__FILE__).'/../lib/csstidy-1.2/class.csstidy.php'; $css = new csstidy(); $css->set_cfg('preserve_css',false); Added: trunk/testcase/ctype.php =================================================================== --- trunk/testcase/ctype.php (rev 0) +++ trunk/testcase/ctype.php 2007-02-20 17:53:57 UTC (rev 977) @@ -0,0 +1,47 @@ +<?php + +// +// TO RUN THIS TESTCASE : PREFIX THE FUNCTIONS NAMES BY my_ IN lib/ctype/ctype.php +// + +require_once dirname(__FILE__).'/../lib/ctype/ctype.php'; + +// examples for verifying +$test[] = ""; +$test[] = "\t"; +$test[] = "\r"; +$test[] = "\n"; +$test[] = " "; +$test[] = "\n-"; +$test[] = " x"; +$test[] = "12 3"; +$test[] = ". abc"; +$test[] = "abc"; +$test[] = "AzEdFDe"; +$test[] = "ABC9"; +$test[] = "aBcF4"; +$test[] = "0123456789ABCDEFabcdef"; +$test[] = "034DEFa5612789ABCbcdef"; +$test[] = "012djgfbbku3456789ABCDEFabcdef"; + + +echo "ctype_space()"."<br />"; +foreach ($test as $a) +{ + echo $a . " : " . ((my_ctype_space($a)) ? "true" : "false") ." : " . ((ctype_space($a)) ? "true" : "false") ."<br />"; +} + + +echo "ctype_xdigit()"."<br />"; +foreach ($test as $a) +{ + echo $a . " : " . ((my_ctype_xdigit($a)) ? "true" : "false"). " : " . ((ctype_xdigit($a)) ? "true" : "false") ."<br />"; +} + +echo "ctype_alpha()"."<br />"; +foreach ($test as $a) +{ + echo $a . " : " . ((my_ctype_alpha($a)) ? "true" : "false") ." : " . ((ctype_alpha($a)) ? "true" : "false") ."<br />"; +} + +?> \ 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-02-20 17:19:29
|
Revision: 976 http://svn.sourceforge.net/phpfreechat/?rev=976&view=rev Author: kerphi Date: 2007-02-20 09:19:29 -0800 (Tue, 20 Feb 2007) Log Message: ----------- [en] Bug fix: Cannot post " character (sourceforge bug 1657437) [2h15] [fr] Bug fix : On ne pouvait pas poster le caract?\195?\168re " (sourceforge bug 1657437) [2h15] Modified Paths: -------------- trunk/src/pfccommand.class.php trunk/testcase/parsecommand.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-02-20 13:47:44 UTC (rev 975) +++ trunk/src/pfccommand.class.php 2007-02-20 17:19:29 UTC (rev 976) @@ -253,19 +253,33 @@ } - function ParseCommand($cmd_str) + function ParseCommand($cmd_str, $one_parameter = false) { $pattern_quote = '/([^\\\]|^)"([^"]+[^\\\])"/'; $pattern_quote = '/"([^"]+)"/'; $pattern_noquote = '/([^"\s]+)/'; - $pattern_command = '/^\/([a-z0-9]+)\s*(.*)/'; + $pattern_command = '/^\/([a-z0-9]+)\s*([a-z0-9]+)\s*([a-z0-9]+)\s*(.*)/'; $result = array(); - + // parse the command name (ex: '/invite') if (preg_match($pattern_command, $cmd_str, $res)) { - $cmd = $res[1]; - $params_str = $res[2]; + $cmd = $res[1]; + $clientid = $res[2]; + $recipientid = $res[3]; + $params_str = $res[4]; + + // don't parse multiple parameters for special commands with only one parameter + // this make possible to send double quotes (") in these commands + if ($one_parameter || $cmd == 'send' || $cmd == 'notice' || $cmd == 'me') + { + $result['cmdstr'] = $cmd_str; + $result['cmdname'] = $cmd; + $result['params'] = array($clientid, $recipientid, $params_str); + return $result; + } + + // parse the quotted parameters (ex: '/invite "nickname with spaces"') preg_match_all($pattern_quote,$params_str,$res1,PREG_OFFSET_CAPTURE); $params_res = $res1[1]; @@ -288,7 +302,54 @@ ksort($params); $params = array_values($params); $params = array_map("trim",$params); + $params = array_merge(array($clientid,$recipientid), $params); + + + // THIS IS ANOTHER WAY TO PARSE THE PARAMETERS + // IT'S NOT SIMPLIER BUT MAYBE FASTER + // @todo : take the faster methode + /* + $params = array($clientid, $recipientid); + $sep = preg_match('/[^\\\\]"/',$params_str) ? '"' : ' '; + if ($sep == ' ') $params_str = ' ' . $params_str; + $offset = 0; + while (1) + { + $i1 = strpos($params_str,$sep,$offset); + // capture the parameter value + if ($i1 !== FALSE) + { + // remove multi-separators + while (1) + { + if (strpos($params_str,$sep,$i1+1) - $i1 == 1) + $i1++; + else + break; + } + // search the parameter terminason + $offset = $i1+1; + $i2 = strpos($params_str,$sep,$offset); + if ($i2 !== FALSE) + { + $offset = $i2 + ($sep == '"' ? 1 : 0); + $p = substr($params_str, $i1+1, $i2-$i1-1); + if (!preg_match('/^\s*$/',$p)) + $params[] = $p; + } + else + break; + } + else + break; + } + // append the tail + if ($offset < strlen($params_str)) + $params[] = substr($params_str,$offset); + */ + + $result['cmdstr'] = $cmd_str; $result['cmdname'] = $cmd; $result['params'] = $params; Modified: trunk/testcase/parsecommand.php =================================================================== --- trunk/testcase/parsecommand.php 2007-02-20 13:47:44 UTC (rev 975) +++ trunk/testcase/parsecommand.php 2007-02-20 17:19:29 UTC (rev 976) @@ -3,36 +3,47 @@ require_once dirname(__FILE__).'/../src/pfccommand.class.php'; $results = array(); -$results[] = array('cmdstr' => '/cmdname', + +$results[] = array('cmdstr' => '/cmdname clientid recipientid', 'cmdname' => 'cmdname', - 'params' => array()); -$results[] = array('cmdstr' => '/cmdname "param1" "param2"', + 'params' => array('clientid', 'recipientid')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid param1 param2', 'cmdname' => 'cmdname', - 'params' => array('param1','param2')); -$results[] = array('cmdstr' => '/cmdname "param1" "param2" "param3"', + 'params' => array('clientid', 'recipientid', 'param1','param2')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid param1 param2 param3', 'cmdname' => 'cmdname', - 'params' => array('param1','param2','param3')); -$results[] = array('cmdstr' => '/cmdname "param1 with spaces" "param2 with spaces"', + 'params' => array('clientid', 'recipientid', 'param1','param2','param3')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1" "param2"', 'cmdname' => 'cmdname', - 'params' => array('param1 with spaces','param2 with spaces')); -$results[] = array('cmdstr' => '/cmdname000 "param1" "param2"', + 'params' => array('clientid', 'recipientid', 'param1','param2')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1" "param2" "param3"', + 'cmdname' => 'cmdname', + 'params' => array('clientid', 'recipientid', 'param1','param2','param3')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1 with spaces" "param2 with spaces"', + 'cmdname' => 'cmdname', + 'params' => array('clientid', 'recipientid', 'param1 with spaces','param2 with spaces')); +$results[] = array('cmdstr' => '/cmdname000 clientid recipientid "param1" "param2"', 'cmdname' => 'cmdname000', - 'params' => array('param1','param2')); -$results[] = array('cmdstr' => '/cmdname param1 param2', + 'params' => array('clientid', 'recipientid', 'param1','param2')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid param1 param2', 'cmdname' => 'cmdname', - 'params' => array('param1','param2')); -$results[] = array('cmdstr' => '/cmdname "param1 with spaces" param2 param3', + 'params' => array('clientid', 'recipientid', 'param1','param2')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1 with spaces" param2 param3', 'cmdname' => 'cmdname', - 'params' => array('param1 with spaces','param2','param3')); -$results[] = array('cmdstr' => '/cmdname "param1" param2 "param3 with spaces" param4', + 'params' => array('clientid', 'recipientid', 'param1 with spaces','param2', 'param3')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1" param2 "param3 with spaces" param4', 'cmdname' => 'cmdname', - 'params' => array('param1', 'param2', 'param3 with spaces', 'param4')); -$results[] = array('cmdstr' => '/cmdname "param1""param2"', + 'params' => array('clientid', 'recipientid', 'param1', 'param2', 'param3 with spaces', 'param4')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1""param2"', 'cmdname' => 'cmdname', - 'params' => array('param1', 'param2')); -$results[] = array('cmdstr' => '/cmdname "param1withoutspace"', + 'params' => array('clientid', 'recipientid', 'param1', 'param2')); +$results[] = array('cmdstr' => '/cmdname clientid recipientid "param1withoutspace"', 'cmdname' => 'cmdname', - 'params' => array('param1withoutspace')); + 'params' => array('clientid', 'recipientid', 'param1withoutspace')); +$results[] = array('cmdstr' => '/send clientid recipientid my sentance " with double " quotes', + 'cmdname' => 'send', + 'params' => array('clientid', 'recipientid', 'my sentance " with double " quotes')); + echo '<pre>'; for($i = 0; $i<count($results); $i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-20 13:47:43
|
Revision: 975 http://svn.sourceforge.net/phpfreechat/?rev=975&view=rev Author: kerphi Date: 2007-02-20 05:47:44 -0800 (Tue, 20 Feb 2007) Log Message: ----------- Bug fix : fix a "Call-time pass-by-reference has been deprecated " warning : http://www.phpfreechat.net/forum/viewtopic.php?id=1228 Modified Paths: -------------- trunk/src/containers/file.class.php Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2007-02-20 13:43:18 UTC (rev 974) +++ trunk/src/containers/file.class.php 2007-02-20 13:47:44 UTC (rev 975) @@ -59,7 +59,7 @@ $errors = pfcContainerInterface::init($c); // generate the container parameters from other config parameters - $this->loadPaths(&$c); + $this->loadPaths($c); $errors = array_merge($errors, @test_writable_dir($c->container_cfg_chat_dir, "container_cfg_chat_dir")); $errors = array_merge($errors, @test_writable_dir($c->container_cfg_server_dir, "container_cfg_chat_dir/serverid")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-20 13:43:18
|
Revision: 974 http://svn.sourceforge.net/phpfreechat/?rev=974&view=rev Author: kerphi Date: 2007-02-20 05:43:18 -0800 (Tue, 20 Feb 2007) Log Message: ----------- [en] Bug fix: the prompt dialog position was calculated incorrectly [0h45] [fr] Bug fix : la position de la boite de dialogue prompt ?\195?\169tait mal calcul?\195?\169e [0h45] Modified Paths: -------------- trunk/data/public/js/pfcprompt.js trunk/themes/default/style.css.php Modified: trunk/data/public/js/pfcprompt.js =================================================================== --- trunk/data/public/js/pfcprompt.js 2007-02-20 10:18:56 UTC (rev 973) +++ trunk/data/public/js/pfcprompt.js 2007-02-20 13:43:18 UTC (rev 974) @@ -24,7 +24,6 @@ this.box = document.createElement('div'); this.box.id = 'pfc_promptbox'; this.box.style.position = 'absolute'; - this.box.style.width = '330px'; this.box.style.zIndex = 100; this.box.style.display = 'none'; @@ -64,7 +63,8 @@ submit.value = pfc.res.getLabel('OK'); form.appendChild(submit); - this.container.appendChild(this.box); + var ct = document.getElementsByTagName('body')[0]; + ct.appendChild(this.box); } }, @@ -77,14 +77,13 @@ // assign the styles to the blackout division. this.bgbox.style.opacity = '.7'; this.bgbox.style.position = 'absolute'; -// this.bgbox.style.top = '0px'; -// this.bgbox.style.left = '0px'; this.bgbox.style.backgroundColor = '#555'; this.bgbox.style.filter = 'alpha(opacity=70)'; -// this.bgbox.style.height = (document.body.offsetHeight<screen.height) ? screen.height+'px' : document.body.offsetHeight+20+'px'; this.bgbox.style.display = 'none'; this.bgbox.style.zIndex = 50; - this.container.appendChild(this.bgbox); + + var ct = document.getElementsByTagName('body')[0]; + ct.appendChild(this.bgbox); } }, @@ -96,16 +95,17 @@ // Stretch the blackout division to fill the entire document // and make it visible. Because it has a high z-index it should // make all other elements on the page unclickable. - this.bgbox.style.top = (this.container.offsetTop-8)+'px'; // -8 because strange margin when the container is not 'body' - this.bgbox.style.left = this.container.offsetLeft+'px'; + var pos = this._findPos(this.container); + this.bgbox.style.top = pos[1]+'px'; + this.bgbox.style.left = pos[0]+'px'; this.bgbox.style.height = this.container.offsetHeight+'px'; this.bgbox.style.width = this.container.offsetWidth+'px'; this.bgbox.style.display = 'block'; // Position the dialog box on the screen and make it visible. - this.box.style.top = parseInt(this.container.offsetTop+(this.container.offsetHeight-200)/2)+'px'; - this.box.style.left = parseInt(this.container.offsetLeft+(this.container.offsetWidth-315)/2)+'px'; this.box.style.display = 'block'; + this.box.style.top = parseInt(pos[1]+(this.bgbox.offsetHeight-this.box.offsetHeight)/2)+'px'; + this.box.style.left = parseInt(pos[0]+(this.bgbox.offsetWidth-this.box.offsetWidth)/2)+'px'; this.prompt_field.value = def; this.prompt_field.focus(); // Give the dialog box's input field the focus. this.prompt_title.innerHTML = text; @@ -125,6 +125,20 @@ return false; }, + _findPos: function(obj) + { + var curleft = curtop = 0; + if (obj.offsetParent) { + curleft = obj.offsetLeft; + curtop = obj.offsetTop; + while (obj = obj.offsetParent) { + curleft += obj.offsetLeft; + curtop += obj.offsetTop; + } + } + return [curleft,curtop]; + }, + focus: function() { this.prompt_field.focus(); @@ -133,4 +147,7 @@ callback: function(v,pfcp) { } -} \ No newline at end of file + + +} + Modified: trunk/themes/default/style.css.php =================================================================== --- trunk/themes/default/style.css.php 2007-02-20 10:18:56 UTC (rev 973) +++ trunk/themes/default/style.css.php 2007-02-20 13:43:18 UTC (rev 974) @@ -399,8 +399,9 @@ /* The DHTML prompt */ div#pfc_promptbox { - border: 2px solid #000; - background-color: #DDD; + border: 2px solid #000; + background-color: #DDD; + width: 350px; } div#pfc_promptbox h2 { margin: 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-20 10:18:57
|
Revision: 973 http://svn.sourceforge.net/phpfreechat/?rev=973&view=rev Author: kerphi Date: 2007-02-20 02:18:56 -0800 (Tue, 20 Feb 2007) Log Message: ----------- [en] Bug fix: the pfcInfo methodes should not print errors when the chat cache could not be found [0h15] [fr] Bug fix : les m?\195?\169thodes de pfcInfo ne doivent pas afficher une erreur lors le cache du chat n'existe pas [0h15] Modified Paths: -------------- trunk/src/pfcinfo.class.php Modified: trunk/src/pfcinfo.class.php =================================================================== --- trunk/src/pfcinfo.class.php 2007-02-20 08:23:37 UTC (rev 972) +++ trunk/src/pfcinfo.class.php 2007-02-20 10:18:56 UTC (rev 973) @@ -20,8 +20,9 @@ { $this->errors[] = _pfc("Error: the cached config file doesn't exists"); return; - } + } // then intitialize the pfcglobalconfig + $params = array(); $params["serverid"] = $serverid; $params["data_private_path"] = $data_private_path; $this->c =& pfcGlobalConfig::Instance($params); @@ -32,8 +33,15 @@ */ function getErrors() { - return array_merge($this->errors, $this->c->getErrors()); + if ($this->c != null) + return array_merge($this->errors, $this->c->getErrors()); + else + return $this->errors; } + function hasErrors() + { + return count($this->getErrors()) > 0; + } /** * @param $channel the returned list is the list of nicknames present on the given channel (NULL for the whole server) @@ -42,6 +50,8 @@ */ function getOnlineNick($channel = NULL, $timeout = 20) { + if ($this->hasErrors()) return array(); + $ct =& pfcContainer::Instance(); if ($channel != NULL) $channel = pfcCommand_join::GetRecipient($channel); @@ -65,6 +75,8 @@ */ function getLastMsg($channel, $nb) { + if ($this->hasErrors()) return array(); + // to be sure the $nb params is a positive number if ( !( $nb >= 0 ) ) $nb = 10; @@ -84,6 +96,8 @@ */ function rehash() { + if ($this->hasErrors()) return false; + $destroyed = $this->c->destroyCache(); return $destroyed; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-20 08:23:37
|
Revision: 972 http://svn.sourceforge.net/phpfreechat/?rev=972&view=rev Author: kerphi Date: 2007-02-20 00:23:37 -0800 (Tue, 20 Feb 2007) Log Message: ----------- [en] Bug fix: the focus was lost in the new prompt dialog box [0h40] [fr] Bug fix : le focus ?\195?\169tait perdu dans la boite de dialogue demandant le pseudo [0h40] Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcprompt.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-02-19 16:33:16 UTC (rev 971) +++ trunk/data/public/js/pfcclient.js 2007-02-20 08:23:37 UTC (rev 972) @@ -80,9 +80,6 @@ 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); }, @@ -699,22 +696,6 @@ } }, - 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 Modified: trunk/data/public/js/pfcprompt.js =================================================================== --- trunk/data/public/js/pfcprompt.js 2007-02-19 16:33:16 UTC (rev 971) +++ trunk/data/public/js/pfcprompt.js 2007-02-20 08:23:37 UTC (rev 972) @@ -25,7 +25,7 @@ this.box.id = 'pfc_promptbox'; this.box.style.position = 'absolute'; this.box.style.width = '330px'; - this.box.style.zIndex = '100'; + this.box.style.zIndex = 100; this.box.style.display = 'none'; var div = document.createElement('h2'); @@ -83,7 +83,7 @@ this.bgbox.style.filter = 'alpha(opacity=70)'; // this.bgbox.style.height = (document.body.offsetHeight<screen.height) ? screen.height+'px' : document.body.offsetHeight+20+'px'; this.bgbox.style.display = 'none'; - this.bgbox.style.zIndex = '50'; + this.bgbox.style.zIndex = 50; this.container.appendChild(this.bgbox); } }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-19 16:33:17
|
Revision: 971 http://svn.sourceforge.net/phpfreechat/?rev=971&view=rev Author: kerphi Date: 2007-02-19 08:33:16 -0800 (Mon, 19 Feb 2007) Log Message: ----------- release 1.0-beta9 Added Paths: ----------- tags/1.0-beta9/ Copied: tags/1.0-beta9 (from rev 970, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-19 10:59:22
|
Revision: 970 http://svn.sourceforge.net/phpfreechat/?rev=970&view=rev Author: kerphi Date: 2007-02-19 02:59:22 -0800 (Mon, 19 Feb 2007) Log Message: ----------- cleanup Modified Paths: -------------- trunk/misc/sendSource Modified: trunk/misc/sendSource =================================================================== --- trunk/misc/sendSource 2007-02-19 10:52:17 UTC (rev 969) +++ trunk/misc/sendSource 2007-02-19 10:59:22 UTC (rev 970) @@ -2,11 +2,9 @@ NAME_TGZ=phpfreechat-`cat ../version`.tar.gz NAME_ZIP=phpfreechat-`cat ../version`.zip -PFCSETUP_TGZ=pfcsetup-`cat ../version`.tar.gz -PFCSETUP_ZIP=pfcsetup-`cat ../version`.zip +NAME_SETUP=phpfreechat-`cat ../version`-setup.php -scp ./$NAME_ZIP ./$NAME_TGZ mic...@ph...:/home/micropolia/svn/phpfreechat/prod/www/download/ +#scp ./$NAME_ZIP ./$NAME_TGZ mic...@ph...:/home/micropolia/svn/phpfreechat/prod/www/download/ lftp -c "mput -O ftp://upload.sourceforge.net/incoming/ $NAME_TGZ" lftp -c "mput -O ftp://upload.sourceforge.net/incoming/ $NAME_ZIP" -#lftp -c "mput -O ftp://upload.sourceforge.net/incoming/ $PFCSETUP_TGZ" -#lftp -c "mput -O ftp://upload.sourceforge.net/incoming/ $PFCSETUP_ZIP" +lftp -c "mput -O ftp://upload.sourceforge.net/incoming/ $NAME_SETUP" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-19 10:52:18
|
Revision: 969 http://svn.sourceforge.net/phpfreechat/?rev=969&view=rev Author: kerphi Date: 2007-02-19 02:52:17 -0800 (Mon, 19 Feb 2007) Log Message: ----------- prepare the 1.0-beta9 release Modified Paths: -------------- trunk/version Modified: trunk/version =================================================================== --- trunk/version 2007-02-19 10:24:46 UTC (rev 968) +++ trunk/version 2007-02-19 10:52:17 UTC (rev 969) @@ -1 +1 @@ -1.0-beta9-pre3 +1.0-beta9 \ 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-02-19 10:24:47
|
Revision: 968 http://svn.sourceforge.net/phpfreechat/?rev=968&view=rev Author: kerphi Date: 2007-02-19 02:24:46 -0800 (Mon, 19 Feb 2007) Log Message: ----------- Translate the DHTML prompt labels Modified Paths: -------------- trunk/data/public/js/pfcprompt.js 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/da_DK/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_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 trunk/src/phpfreechat.class.php trunk/themes/default/style.css.php Modified: trunk/data/public/js/pfcprompt.js =================================================================== --- trunk/data/public/js/pfcprompt.js 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/data/public/js/pfcprompt.js 2007-02-19 10:24:46 UTC (rev 968) @@ -29,7 +29,7 @@ this.box.style.display = 'none'; var div = document.createElement('h2'); - div.appendChild(document.createTextNode('Input Required')); + div.appendChild(document.createTextNode(pfc.res.getLabel('Input Required'))); this.box.appendChild(div); this.prompt_title = document.createElement('p'); @@ -50,20 +50,20 @@ var br = document.createElement('br'); form.appendChild(br); - var submit = document.createElement('input'); - submit.id = 'pfc_promptbox_submit'; - submit.type = 'submit'; - submit.value = 'OK'; - form.appendChild(submit); - var cancel = document.createElement('input'); cancel.id = 'pfc_promptbox_cancel'; cancel.type = 'button'; - cancel.value = 'Cancel'; + cancel.value = pfc.res.getLabel('Cancel'); cancel.pfc_prompt = this; cancel.onclick = function(evt) { return this.pfc_prompt._doSubmit(true); }; form.appendChild(cancel); + var submit = document.createElement('input'); + submit.id = 'pfc_promptbox_submit'; + submit.type = 'submit'; + submit.value = pfc.res.getLabel('OK'); + form.appendChild(submit); + this.container.appendChild(this.box); } }, Modified: trunk/i18n/ar_LB/main.php =================================================================== --- trunk/i18n/ar_LB/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/ar_LB/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ba_BA/main.php =================================================================== --- trunk/i18n/ba_BA/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/ba_BA/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bg_BG/main.php =================================================================== --- trunk/i18n/bg_BG/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/bg_BG/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -370,4 +370,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/bn_BD/main.php =================================================================== --- trunk/i18n/bn_BD/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/bn_BD/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -376,4 +376,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/da_DK/main.php =================================================================== --- trunk/i18n/da_DK/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/da_DK/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 140 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 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-formal/main.php =================================================================== --- trunk/i18n/de_DE-formal/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/de_DE-formal/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -377,4 +377,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/de_DE-informal/main.php =================================================================== --- trunk/i18n/de_DE-informal/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/de_DE-informal/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -378,4 +378,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/el_GR/main.php =================================================================== --- trunk/i18n/el_GR/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/el_GR/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -371,4 +371,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/en_US/main.php =================================================================== --- trunk/i18n/en_US/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/en_US/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = "Ping"; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "Input Required"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "OK"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "Cancel"; + ?> \ No newline at end of file Modified: trunk/i18n/eo/main.php =================================================================== --- trunk/i18n/eo/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/eo/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/es_ES/main.php =================================================================== --- trunk/i18n/es_ES/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/es_ES/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/fr_FR/main.php =================================================================== --- trunk/i18n/fr_FR/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/fr_FR/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = "Temps de réponse"; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = "Veuillez répondre"; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = "OK"; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = "Annuler"; + ?> \ No newline at end of file Modified: trunk/i18n/hu_HU/main.php =================================================================== --- trunk/i18n/hu_HU/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/hu_HU/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/hy_AM/main.php =================================================================== --- trunk/i18n/hy_AM/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/hy_AM/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/id_ID/main.php =================================================================== --- trunk/i18n/id_ID/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/id_ID/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/it_IT/main.php =================================================================== --- trunk/i18n/it_IT/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/it_IT/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ja_JP/main.php =================================================================== --- trunk/i18n/ja_JP/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/ja_JP/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ko_KR/main.php =================================================================== --- trunk/i18n/ko_KR/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/ko_KR/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/nb_NO/main.php =================================================================== --- trunk/i18n/nb_NO/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/nb_NO/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/nl_NL/main.php =================================================================== --- trunk/i18n/nl_NL/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/nl_NL/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pl_PL/main.php =================================================================== --- trunk/i18n/pl_PL/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/pl_PL/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pt_BR/main.php =================================================================== --- trunk/i18n/pt_BR/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/pt_BR/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -377,4 +377,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/pt_PT/main.php =================================================================== --- trunk/i18n/pt_PT/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/pt_PT/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -373,4 +373,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/ru_RU/main.php =================================================================== --- trunk/i18n/ru_RU/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/ru_RU/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -377,4 +377,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sr_CS/main.php =================================================================== --- trunk/i18n/sr_CS/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/sr_CS/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -375,4 +375,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/sv_SE/main.php =================================================================== --- trunk/i18n/sv_SE/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/sv_SE/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -380,4 +380,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/tr_TR/main.php =================================================================== --- trunk/i18n/tr_TR/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/tr_TR/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/uk_RO/main.php =================================================================== --- trunk/i18n/uk_RO/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/uk_RO/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/uk_UA/main.php =================================================================== --- trunk/i18n/uk_UA/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/uk_UA/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_CN/main.php =================================================================== --- trunk/i18n/zh_CN/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/zh_CN/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -376,4 +376,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/i18n/zh_TW/main.php =================================================================== --- trunk/i18n/zh_TW/main.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/i18n/zh_TW/main.php 2007-02-19 10:24:46 UTC (rev 968) @@ -372,4 +372,13 @@ // line 47 in chat.html.tpl.php $GLOBALS["i18n"]["Ping"] = ""; +// line 477 in phpfreechat.class.php +$GLOBALS["i18n"]["Input Required"] = ""; + +// line 478 in phpfreechat.class.php +$GLOBALS["i18n"]["OK"] = ""; + +// line 479 in phpfreechat.class.php +$GLOBALS["i18n"]["Cancel"] = ""; + ?> \ No newline at end of file Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/src/phpfreechat.class.php 2007-02-19 10:24:46 UTC (rev 968) @@ -473,7 +473,10 @@ "Close", // _pfc "Choosen nickname is not allowed", // _pfc "Enable sound notifications", // _pfc - "Disable sound notifications", // _pfc + "Disable sound notifications", // _pfc + "Input Required", // _pfc + "OK", // _pfc + "Cancel", // _pfc ); foreach($labels_to_load as $l) { Modified: trunk/themes/default/style.css.php =================================================================== --- trunk/themes/default/style.css.php 2007-02-19 09:29:16 UTC (rev 967) +++ trunk/themes/default/style.css.php 2007-02-19 10:24:46 UTC (rev 968) @@ -399,7 +399,6 @@ /* The DHTML prompt */ div#pfc_promptbox { - /* color:red;*/ border: 2px solid #000; background-color: #DDD; } @@ -427,8 +426,8 @@ width: 100%; } input#pfc_promptbox_submit { - margin: 5px 10px 0 0; + margin: 0; } input#pfc_promptbox_cancel { - margin: 0; + margin: 5px 10px 0 0; } \ 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-02-19 09:29:23
|
Revision: 967 http://svn.sourceforge.net/phpfreechat/?rev=967&view=rev Author: kerphi Date: 2007-02-19 01:29:16 -0800 (Mon, 19 Feb 2007) Log Message: ----------- [en] New danish da_DK translation [0h20] [fr] Nouvelle traduction danoise da_DK [0h20] Modified Paths: -------------- trunk/demo/index.php trunk/src/pfci18n.class.php Added Paths: ----------- trunk/demo/demo58_in_danish.php trunk/i18n/da_DK/ trunk/i18n/da_DK/admin.php trunk/i18n/da_DK/main.php Added: trunk/demo/demo58_in_danish.php =================================================================== --- trunk/demo/demo58_in_danish.php (rev 0) +++ trunk/demo/demo58_in_danish.php 2007-02-19 09:29:16 UTC (rev 967) @@ -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"] = "da_DK"; +$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-02-19 09:11:17 UTC (rev 966) +++ trunk/demo/index.php 2007-02-19 09:29:16 UTC (rev 967) @@ -123,6 +123,7 @@ <li><a href="demo54_in_esperanto.php">demo54 - Esperanto translation of the chat</a></li> <li><a href="demo56_in_romanian.php">demo56 - Romanian translation of the chat</a></li> <li><a href="demo57_in_korean.php">demo57 - Korean translation of the chat</a></li> + <li><a href="demo58_in_danish.php">demo58 - Danish translation of the chat</a></li> </ul> </div> Added: trunk/i18n/da_DK/admin.php =================================================================== --- trunk/i18n/da_DK/admin.php (rev 0) +++ trunk/i18n/da_DK/admin.php 2007-02-19 09:29:16 UTC (rev 967) @@ -0,0 +1,72 @@ +<?php +/** + * i18n/da_DK/admin.php + * + * Copyright © 2006 Stephane Gully <ste...@gm...> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * Danish translation of the messages (utf8 encoded!) + * + * @author Mads Ovesen <mo...@wi...> + */ + +$GLOBALS["i18n"]["lang"] = "Dansk"; + +// admin/index.php +$GLOBALS["i18n"]["Administration"] = "Administration"; +$GLOBALS["i18n"]["Available Languages"] = "Tilgængelige sprog"; +$GLOBALS["i18n"]["PFC version verification"] = "PFC version verifikation"; +$GLOBALS["i18n"]["Internet connection is not possible"] = "Internet-forbindelse er ikke mulig"; +$GLOBALS["i18n"]["PFC is update"] = "PFC er opdateret"; +$GLOBALS["i18n"]["PFC version"] = "PFC version"; +$GLOBALS["i18n"]["The last official version"] = "Den sidste officielle version"; +$GLOBALS["i18n"]["PFC is not update"] = "PFC er ikke opdateret"; +$GLOBALS["i18n"]["Your version"] = "Din version"; +$GLOBALS["i18n"]["Download the last version %s here %s."] = "Hent den sidste version %s her %s."; + + +// admin/user.php +$GLOBALS["i18n"]["Users management"] = "Brugerhåndtering"; +$GLOBALS["i18n"]["At least one user must be declare to activate authentication."] = "Mindst en bruger skal være erklæret for at aktivere autentifikationen."; +$GLOBALS["i18n"]["It is not possible to delete the last user."] = "Det er ikke muligt at slette den sidste bruger."; + +$GLOBALS["i18n"]["User %s deleted."] = "Bruger %s slettet."; +$GLOBALS["i18n"]["User %s added."] = "Bruger %s tilføjet."; +$GLOBALS["i18n"]["User %s edited."] = "Bruger %s redigeret."; + +$GLOBALS["i18n"]["Authentication disable"] = "Deaktiver autentificering"; +$GLOBALS["i18n"]["Enable here"] = "Aktiver her"; +$GLOBALS["i18n"]["Authentication enable"] = "Aktiver autentificering"; +$GLOBALS["i18n"]["Disable here"] = "Deaktiver her"; + +$GLOBALS["i18n"]["Username"] = "Brugernavn"; +$GLOBALS["i18n"]["Password"] = "Kodeord"; +$GLOBALS["i18n"]["Group"] = "Gruppe"; + +$GLOBALS["i18n"]["Do you really want to delete %s ?"] = "Ønsker du virkelig at slette %s ?"; +$GLOBALS["i18n"]["Add a new user"] = "Tilføj en ny bruger"; + +$GLOBALS["i18n"]["Edit"] = "Rediger"; +$GLOBALS["i18n"]["Delete"] = "Slet"; + +// admin/themes.php +$GLOBALS["i18n"]["Available themes"] = "Tilgængelige temaer"; +$GLOBALS["i18n"]["Screenshot"] = "Screenshot"; + +?> Added: trunk/i18n/da_DK/main.php =================================================================== --- trunk/i18n/da_DK/main.php (rev 0) +++ trunk/i18n/da_DK/main.php 2007-02-19 09:29:16 UTC (rev 967) @@ -0,0 +1,375 @@ +<?php +/** + * i18n/da_DK/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 + */ + +/** + * Danish translation of the messages (utf8 encoded!) + * + * @author Mads Ovesen <mo...@wi...> + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "Min chat"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s ikke fundet, %s biblioteket findes ikke."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "Venligst indtast dit chatnavn"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "Teksten må ikke være tom"; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s ændrer sit chatnavn til %s"; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s er tilsluttet"; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s har forladt chatten"; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s ikke tilsluttet (tidsgrænse nået)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "ukendt kommando [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s eksisterer ikke: %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "Du har brug for %s"; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s eksisterer ikke, %s biblioteket findes ikke"; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s eksisterer ikke"; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s filkataloget skal specificeres"; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s skal være en filkatalog"; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s kan ikke oprettes"; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s er ikke skrivbar"; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s er ikke læsbar"; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s er ikke en fil"; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s er ikke en filkatalog"; + +// 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"] = "Gem farver på chatnavne"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "Vis farver på chatnavne"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "Afbryd"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "Tilslut"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "Maksimer"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "Minimer"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "Gem dato og tid"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "Vis dato og tid"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "Skriv din besked her"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "Skriv dit chatnavn her"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Fejl: Udefineret eller overflødig parameter '%s', Venligst ret eller fjern denne parameter"; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "Gem smileyboks"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "Vis smileyboks"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "Gem online brugerboks"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "Vis online brugerboks"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "Fed"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "Kursiv"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "Understreget"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "Slet"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Præ"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "Mail"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "Farve"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s visningen blev ikke fundet"; + +// 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"] = "Fejl: '%s' kunne ikke findes, venligst undersøg stien til temaet '%s' og dit tema '%s' er korrekt"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s skal implementeres"; + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' parameter er obligatorisk ved default brug '%s' værdi"; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' parameter skal være et positivt tal"; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' parameter er ikke gyldig. Mulige værdier er: '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "Mit rum"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "Privat besked"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "Luk dette faneblad"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Ønsker du at forlade dette rum?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "Manglende parameter"; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "nægtet adgang til %s af %s"; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "Listen over brugerid med nægtet adgang er:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "Tom"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' vil tillade adgang til brugeren med id'et {id}"; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' vil tillade alle brugere adgang til dette rum"; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s har forladt chatten (tidsgrænse nået)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s tilslutter til %s"; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "udelukket fra %s af %s"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "Kan ikke sende besked, %s er offline"; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Ingen er nægtet adgang"; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s er blevet tilladt adgang"; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s brugere er blevet tilladt adgang"; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Du har ikke tilladelse til at eksekverer '%s' kommandoen"; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "Kan ikke tilslutte til %s fordi du er blevet nægtet adgang"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Du har ikke lov til at ændre dit chatnavn"; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "Kan ikke logge ind i %s fordi rummet er privat"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Venligst lad være med at sende så mange beskeder, flood er ikke tolereret"; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Fejl: '%s' er en privat parameter, du har ikke adgang til at ændre den"; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "'%s' parameter skal være et array"; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "'%s' parameter skal være en boolean"; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "'%s' parameter skal være en string af karakterer"; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' skal være skrivbar"; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' filkataloget eksisterer ikke"; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "Venligst ret disse fejl"; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Fejl: Den gemte konfigfil findes ikke"; + +// 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"] = "Fejl: Chatten kunne ikke startes! To muligheder: Din browser understøtter ikke javascript eller rettighederne til filkatalogerne er forkerte - tøv ikke med at spørge om hjælp på forumet"; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "Her er kommandolisten:"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "Succesful identifikation"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "Identifikationsfejl"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Du skal være tilsluttet for at sende en besked"; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "Klik her for at sende din besked"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "Indtast den tekst der skal formateres"; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "Konfigurationen er blevet rehashed"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Der opstår et problem under rehash"; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "Det valgte chatnavn er allerede i brug"; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "phpfreechat nuværende version er %s"; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Det maksimale antal login er nået"; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Det maksimale antal af private chats er nået"; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "Send"; + + +// line 335 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; + +// line 472 in phpfreechat.class.php +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; + +// line 474 in phpfreechat.class.php +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; + +// line 475 in phpfreechat.class.php +$GLOBALS["i18n"]["Enable sound notifications"] = ""; + +// line 476 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 73 in invite.class.php +$GLOBALS["i18n"]["You must join %s to invite users in this channel"] = ""; + +// 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 103 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: connect error"] = ""; + +// line 118 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; + +// line 137 in mysql.class.php +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; + +// line 47 in chat.html.tpl.php +$GLOBALS["i18n"]["Ping"] = ""; + +// line 8 in chat.js.tpl.php +$GLOBALS["i18n"]["Chat loading ..."] = ""; + +// line 8 in chat.js.tpl.php +$GLOBALS["i18n"]["Please wait"] = ""; + +// line 140 in chat.js.tpl.php +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; + +// line 140 in chat.js.tpl.php +$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; + +// line 136 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 138 in chat.js.tpl.php +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; + +// line 140 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/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2007-02-19 09:11:17 UTC (rev 966) +++ trunk/src/pfci18n.class.php 2007-02-19 09:29:16 UTC (rev 967) @@ -97,7 +97,7 @@ */ function GetAcceptedLanguage($type="main") { - return /*<GetAcceptedLanguage>*/array('ar_LB','bg_BG','de_DE-formal','el_GR','eo','fr_FR','hy_AM','it_IT','ko_KR','nl_NL', 'pt_BR','ru_RU','sv_SE','uk_RO','zh_CN','ba_BA','bn_BD','de_DE-informal','en_US','es_ES','hu_HU','id_ID','ja_JP','nb_NO','pl_PL','pt_PT','sr_CS','tr_TR','uk_UA','zh_TW');/*</GetAcceptedLanguage>*/ + return /*<GetAcceptedLanguage>*/array('ar_LB','sv_SE','ja_JP','ba_BA','pt_PT','el_GR','tr_TR','hy_AM','nb_NO','zh_TW','ru_RU','fr_FR','es_ES','bg_BG','zh_CN','nl_NL','de_DE-informal','pl_PL','pt_BR','it_IT','id_ID','hu_HU','en_US','sr_CS','de_DE-formal','eo','bn_BD','uk_UA','uk_RO','ko_KR','da_DK');/*</GetAcceptedLanguage>*/ } /** @@ -118,9 +118,10 @@ closedir($dh); $i18n_accepted_lang_str = "array('" . implode("','", $i18n_accepted_lang) . "');"; $data = file_get_contents(__FILE__); - $data = preg_replace("/\/\*<GetAcceptedLanguage>\*\/(.*)\/\*<\/GetAcceptedLanguage>\*\//", - "/*<GetAcceptedLanguage>*/$i18n_accepted_lang_str/*</GetAcceptedLanguage>*/", + $data = preg_replace("/(\/\*<GetAcceptedLanguage>\*\/)(.*)(\/\*<\/GetAcceptedLanguage>\*\/)/", + "$1".$i18n_accepted_lang_str."$3", $data); + file_put_contents(__FILE__,$data); // Now scan the source code in order to find "_pfc" patterns $files = array(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-19 09:11:21
|
Revision: 966 http://svn.sourceforge.net/phpfreechat/?rev=966&view=rev Author: kerphi Date: 2007-02-19 01:11:17 -0800 (Mon, 19 Feb 2007) Log Message: ----------- remove the lib/pear/.registry directory from the release Modified Paths: -------------- trunk/misc/tarSource Removed Paths: ------------- trunk/lib/javascript/ Modified: trunk/misc/tarSource =================================================================== --- trunk/misc/tarSource 2007-02-18 21:23:11 UTC (rev 965) +++ trunk/misc/tarSource 2007-02-19 09:11:17 UTC (rev 966) @@ -9,6 +9,7 @@ svn export .. ./$NAME rm -rf ./$NAME/contrib rm -rf ./$NAME/admin +rm -rf ./$NAME/lib/pear/.registry #echo "-> downloading documentation" #wget http://www.phpfreechat.net/pages/fr/install.html -q -O ./$NAME/install.fr.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-18 21:23:14
|
Revision: 965 http://svn.sourceforge.net/phpfreechat/?rev=965&view=rev Author: kerphi Date: 2007-02-18 13:23:11 -0800 (Sun, 18 Feb 2007) Log Message: ----------- [en] Replace default prompt() javascript function by a DHTML popup to fix IE7 problems [5h15] [fr] Remplace la fonction prompt() de javascript par un popup DHTML pour r?\195?\169soudre les probl?\195?\168mes IE7 [5h15] Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/themes/default/chat.js.tpl.php trunk/themes/default/style.css.php Added Paths: ----------- trunk/data/public/js/pfcprompt.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-02-16 20:49:27 UTC (rev 964) +++ trunk/data/public/js/pfcclient.js 2007-02-18 21:23:11 UTC (rev 965) @@ -1,7 +1,7 @@ -var is_ie = navigator.appName.match("Explorer"); +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"); - +var is_ff = navigator.appName.match("Netscape"); +var is_ie7 = navigator.userAgent.indexOf('MSIE 7') > 0; /** * This class is the client part of phpFreeChat * (depends on prototype library) @@ -57,7 +57,7 @@ this.blinktmp = Array(); this.blinkloop = Array(); - this.blinktimeout = Array(); + this.blinktimeout = Array(); }, connectListener: function() @@ -137,12 +137,20 @@ 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 (nickname == '' || nickname == undefined) nickname = this.nickname; + + // build a dhtml prompt box + var pfcp = this.getPrompt();//new pfcPrompt($('pfc_container')); + pfcp.callback = function(v) { pfc.askNickResponse(v); } + pfcp.prompt(this.res.getLabel('Please enter your nickname'), nickname); + pfcp.focus(); + }, + askNickResponse: function(newnick) + { if (newnick) this.sendRequest('/nick "'+newnick+'"'); }, - + /** * Reacte to the server response */ @@ -171,9 +179,6 @@ 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 @@ -268,6 +273,9 @@ } else if (cmd == "nick") { + // give focus the the input text box if wanted + if (pfc_focus_on_connect) this.el_words.focus(); + if (resp == "connected" || resp == "notchanged") { cmd = ''; @@ -339,7 +347,6 @@ this.isconnected = false; this.refresh_loginlogout(); } - } else if (cmd == "update") { @@ -1536,7 +1543,14 @@ insert_text: function(open, close, promptifselempty) { var msgfield = $('pfc_words'); - + + var pfcp = this.getPrompt(); + pfcp.msgfield = msgfield; + pfcp.open = open; + pfcp.close = close; + pfcp.promptifselempty = promptifselempty; + pfcp.callback = this.insert_text_callback; + // IE support if (document.selection && document.selection.createRange) { @@ -1544,7 +1558,51 @@ sel = document.selection.createRange(); var text = sel.text; if (text == "" && promptifselempty) - text = prompt(this.res.getLabel('Enter the text to format'),''); + { + pfcp.sel = document.selection.createRange(); + pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); + pfcp.focus(); + } + else + this.insert_text_callback(text,pfcp); + } + + // Mozilla 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) + { + pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); + pfcp.focus(); + } + else + this.insert_text_callback(text,pfcp); + } + + // Fallback support for other browsers + else + { + pfcp.prompt(this.res.getLabel('Enter the text to format'), ''); + pfcp.focus(); + } + return; + }, + insert_text_callback: function(text,pfcp) + { + var open = pfcp.open; + var close = pfcp.close; + var promptifselempty = pfcp.promptifselempty; + var msgfield = pfcp.msgfield; + var sel = pfcp.sel; + + // IE support + if (document.selection && document.selection.createRange) + { if (text == null) text = ""; if (text.length > 0 || !promptifselempty) { @@ -1553,18 +1611,15 @@ msgfield.focus(); } } - - // Moz support + // Mozilla support else if (msgfield.selectionStart || msgfield.selectionStart == '0') { var startPos = msgfield.selectionStart; - var endPos = msgfield.selectionEnd; + 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; } @@ -1575,11 +1630,9 @@ 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) { @@ -1587,7 +1640,6 @@ msgfield.focus(); } } - return; }, /** @@ -1749,5 +1801,12 @@ chatdiv.style.width = ''; } } + }, + + getPrompt: function() + { + if (!this.pfc) + this.pfc = new pfcPrompt($('pfc_container')); + return this.pfc; } }; Added: trunk/data/public/js/pfcprompt.js =================================================================== --- trunk/data/public/js/pfcprompt.js (rev 0) +++ trunk/data/public/js/pfcprompt.js 2007-02-18 21:23:11 UTC (rev 965) @@ -0,0 +1,136 @@ +// DHTML prompt() function replacement inspirated by : +// http://www.hunlock.com/blogs/Working_around_IE7s_prompt_bug,_er_feature + +var pfcPrompt = Class.create(); +pfcPrompt.prototype = { + initialize: function(container) + { + if (container == undefined || is_ie) + container = document.getElementsByTagName('body')[0]; + this.container = container; + this.box = $('pfc_promptbox'); + this.bgbox = $('pfc_promptbgbox'); + this.prompt_field = $('pfc_promptbox_field'); + this.prompt_title = $('pfc_promptbox_title'); + + this.buildBox(); + this.buildBgBox(); + }, + + buildBox: function() + { + if (!this.box) + { + this.box = document.createElement('div'); + this.box.id = 'pfc_promptbox'; + this.box.style.position = 'absolute'; + this.box.style.width = '330px'; + this.box.style.zIndex = '100'; + this.box.style.display = 'none'; + + var div = document.createElement('h2'); + div.appendChild(document.createTextNode('Input Required')); + this.box.appendChild(div); + + this.prompt_title = document.createElement('p'); + this.prompt_title.id = 'pfc_promptbox_title'; + this.box.appendChild(this.prompt_title); + + var form = document.createElement('form'); + form.pfc_prompt = this; + form.onsubmit = function(evt) { return this.pfc_prompt._doSubmit(); }; + this.box.appendChild(form); + + this.prompt_field = document.createElement('input'); + this.prompt_field.id = 'pfc_promptbox_field'; + this.prompt_field.type = 'text'; + this.prompt_field.value = ''; + form.appendChild(this.prompt_field); + + var br = document.createElement('br'); + form.appendChild(br); + + var submit = document.createElement('input'); + submit.id = 'pfc_promptbox_submit'; + submit.type = 'submit'; + submit.value = 'OK'; + form.appendChild(submit); + + var cancel = document.createElement('input'); + cancel.id = 'pfc_promptbox_cancel'; + cancel.type = 'button'; + cancel.value = 'Cancel'; + cancel.pfc_prompt = this; + cancel.onclick = function(evt) { return this.pfc_prompt._doSubmit(true); }; + form.appendChild(cancel); + + this.container.appendChild(this.box); + } + }, + + buildBgBox: function() + { + if (!this.bgbox) + { + this.bgbox = document.createElement('div'); + this.bgbox.id = 'pfc_promptbgbox'; + // assign the styles to the blackout division. + this.bgbox.style.opacity = '.7'; + this.bgbox.style.position = 'absolute'; +// this.bgbox.style.top = '0px'; +// this.bgbox.style.left = '0px'; + this.bgbox.style.backgroundColor = '#555'; + this.bgbox.style.filter = 'alpha(opacity=70)'; +// this.bgbox.style.height = (document.body.offsetHeight<screen.height) ? screen.height+'px' : document.body.offsetHeight+20+'px'; + this.bgbox.style.display = 'none'; + this.bgbox.style.zIndex = '50'; + this.container.appendChild(this.bgbox); + } + }, + + prompt: function(text,def) + { + // if def wasn't actually passed, initialize it to null + if (def==undefined) { def=''; } + + // Stretch the blackout division to fill the entire document + // and make it visible. Because it has a high z-index it should + // make all other elements on the page unclickable. + this.bgbox.style.top = (this.container.offsetTop-8)+'px'; // -8 because strange margin when the container is not 'body' + this.bgbox.style.left = this.container.offsetLeft+'px'; + this.bgbox.style.height = this.container.offsetHeight+'px'; + this.bgbox.style.width = this.container.offsetWidth+'px'; + this.bgbox.style.display = 'block'; + + // Position the dialog box on the screen and make it visible. + this.box.style.top = parseInt(this.container.offsetTop+(this.container.offsetHeight-200)/2)+'px'; + this.box.style.left = parseInt(this.container.offsetLeft+(this.container.offsetWidth-315)/2)+'px'; + this.box.style.display = 'block'; + this.prompt_field.value = def; + this.prompt_field.focus(); // Give the dialog box's input field the focus. + this.prompt_title.innerHTML = text; + }, + + _doSubmit: function(canceled) + { + // _doSubmit is called when the user enters or cancels the box. + var val = this.prompt_field.value; + this.box.style.display = 'none'; // clear out the dialog box + this.bgbox.style.display = 'none'; // clear out the screen + this.prompt_field.value = ''; // clear out the text field + // if the cancel button was pushed, force value to null. + if (canceled) { val = '' } + // call the user's function + this.callback(val,this); + return false; + }, + + focus: function() + { + this.prompt_field.focus(); + }, + + callback: function(v,pfcp) + { + } +} \ No newline at end of file Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-02-16 20:49:27 UTC (rev 964) +++ trunk/themes/default/chat.js.tpl.php 2007-02-18 21:23:11 UTC (rev 965) @@ -123,6 +123,7 @@ <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcclient.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcgui.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcresource.js"></script> +<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/pfcprompt.js"></script> <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;"> Modified: trunk/themes/default/style.css.php =================================================================== --- trunk/themes/default/style.css.php 2007-02-16 20:49:27 UTC (rev 964) +++ trunk/themes/default/style.css.php 2007-02-18 21:23:11 UTC (rev 965) @@ -396,3 +396,39 @@ height: 0; } + +/* The DHTML prompt */ +div#pfc_promptbox { + /* color:red;*/ + border: 2px solid #000; + background-color: #DDD; +} +div#pfc_promptbox h2 { + margin: 0; + width: 100%; + background-color: #888; + color: white; + font-family: verdana; + font-size: 10pt; + font-weight: bold; + height: 20px; +} +div#pfc_promptbox p { + margin: 10px 0 0 10px; +} +div#pfc_promptbox form { + margin: 0 10px 10px 10px; + text-align: right; +} +div#pfc_promptbox input { + border: 1px solid #000; +} +input#pfc_promptbox_field { + width: 100%; +} +input#pfc_promptbox_submit { + margin: 5px 10px 0 0; +} +input#pfc_promptbox_cancel { + margin: 0; +} \ 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-02-16 20:49:31
|
Revision: 964 http://svn.sourceforge.net/phpfreechat/?rev=964&view=rev Author: kerphi Date: 2007-02-16 12:49:27 -0800 (Fri, 16 Feb 2007) Log Message: ----------- load customize.js.php during the ajax loading process Modified Paths: -------------- trunk/src/phpfreechat.class.php Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-16 20:44:05 UTC (rev 963) +++ trunk/src/phpfreechat.class.php 2007-02-16 20:49:27 UTC (rev 964) @@ -424,6 +424,13 @@ $js = ''; + // load customize.js.php + $path = $c->getFilePathFromTheme('customize.js.php'); + $t = new pfcTemplate($path); + $t->assignObject($c,"c"); + $js .= $t->getOutput(); + + // load translations require_once dirname(__FILE__).'/pfcjson.class.php'; $json = new pfcJSON(); @@ -472,7 +479,8 @@ { $js .= "pfc.res.setLabel(".$json->encode($l).",".$json->encode(_pfc2($l)).");\n"; } - + + // load ressources $fileurl_to_load = array( 'images/ch.gif', 'images/pv.gif', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-16 20:44:05
|
Revision: 963 http://svn.sourceforge.net/phpfreechat/?rev=963&view=rev Author: kerphi Date: 2007-02-16 12:44:05 -0800 (Fri, 16 Feb 2007) Log Message: ----------- rename to be ok with refactoring Added Paths: ----------- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php Removed Paths: ------------- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js Deleted: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js 2007-02-16 20:43:01 UTC (rev 962) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js 2007-02-16 20:44:05 UTC (rev 963) @@ -1,61 +0,0 @@ -pfcClient.prototype.updateNickList = function(tabid,lst) -{ - this.nicklist[tabid] = lst; - var nicks = lst; - var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild; - var ul = document.createElement('ul'); - for (var i=0; i<nicks.length; i++) - { - var li = document.createElement('li'); - if (nicks[i] != this.nickname) - { - // this is someone -> create a privmsg link - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.alt = this.res.getLabel('Private message'); - img.title = img.alt; - img.style.marginRight = '5px'; - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_nick = nicks[i]; - a.onclick = function(){pfc.sendRequest('/privmsg "'+this.pfc_nick+'"'); return false;} - a.appendChild(img); - li.appendChild(a); - } - else - { - // this is myself -> do not create a privmsg link - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/user-me.gif')); - img.alt = ''; - img.title = img.alt; - img.style.marginRight = '5px'; - li.appendChild(img); - } - - - // nobr is not xhtml valid but it's a workeround - // for IE which doesn't support 'white-space: pre' css rule - var nobr = document.createElement('nobr'); - var a = document.createElement('a'); - a.pfc_nick = nicks[i]; - a.setAttribute('href','http://www.google.com/search?q='+nicks[i]); - a.setAttribute('target','_blank'); - //a.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} - a.appendChild(document.createTextNode(nicks[i])); - a.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); - a.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 - - nobr.appendChild(a); - li.appendChild(nobr); - li.style.borderBottom = '1px solid #AAA'; - - ul.appendChild(li); - } - var fc = nickdiv.firstChild; - if (fc) - nickdiv.replaceChild(ul,fc); - else - nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); -} Copied: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php (from rev 960, trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js) =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php (rev 0) +++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-02-16 20:44:05 UTC (rev 963) @@ -0,0 +1,61 @@ +pfcClient.prototype.updateNickList = function(tabid,lst) +{ + this.nicklist[tabid] = lst; + var nicks = lst; + var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild; + var ul = document.createElement('ul'); + for (var i=0; i<nicks.length; i++) + { + var li = document.createElement('li'); + if (nicks[i] != this.nickname) + { + // this is someone -> create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user.gif')); + img.alt = this.res.getLabel('Private message'); + img.title = img.alt; + img.style.marginRight = '5px'; + var a = document.createElement('a'); + a.setAttribute('href', ''); + a.pfc_nick = nicks[i]; + a.onclick = function(){pfc.sendRequest('/privmsg "'+this.pfc_nick+'"'); return false;} + a.appendChild(img); + li.appendChild(a); + } + else + { + // this is myself -> do not create a privmsg link + var img = document.createElement('img'); + img.setAttribute('src', this.res.getFileUrl('images/user-me.gif')); + img.alt = ''; + img.title = img.alt; + img.style.marginRight = '5px'; + li.appendChild(img); + } + + + // nobr is not xhtml valid but it's a workeround + // for IE which doesn't support 'white-space: pre' css rule + var nobr = document.createElement('nobr'); + var a = document.createElement('a'); + a.pfc_nick = nicks[i]; + a.setAttribute('href','http://www.google.com/search?q='+nicks[i]); + a.setAttribute('target','_blank'); + //a.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} + a.appendChild(document.createTextNode(nicks[i])); + a.setAttribute('class', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); + a.setAttribute('className', 'pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6 + + nobr.appendChild(a); + li.appendChild(nobr); + li.style.borderBottom = '1px solid #AAA'; + + ul.appendChild(li); + } + var fc = nickdiv.firstChild; + if (fc) + nickdiv.replaceChild(ul,fc); + else + nickdiv.appendChild(ul,fc); + this.colorizeNicks(nickdiv); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-16 20:43:05
|
Revision: 962 http://svn.sourceforge.net/phpfreechat/?rev=962&view=rev Author: kerphi Date: 2007-02-16 12:43:01 -0800 (Fri, 16 Feb 2007) Log Message: ----------- rename to be ok with refactoring Added Paths: ----------- trunk/themes/default/customize.js.php Removed Paths: ------------- trunk/themes/default/customize.js Deleted: trunk/themes/default/customize.js =================================================================== --- trunk/themes/default/customize.js 2007-02-16 20:41:51 UTC (rev 961) +++ trunk/themes/default/customize.js 2007-02-16 20:43:01 UTC (rev 962) @@ -1,6 +0,0 @@ -/** - * Put here the pfcClient, pfcGui, pfcResources customizations - * ex: you can override the pfcClient::updateNickList methode - * in order to display links on the nicknames (see demo34 for a concrete example) - */ - Copied: trunk/themes/default/customize.js.php (from rev 960, trunk/themes/default/customize.js) =================================================================== --- trunk/themes/default/customize.js.php (rev 0) +++ trunk/themes/default/customize.js.php 2007-02-16 20:43:01 UTC (rev 962) @@ -0,0 +1,6 @@ +/** + * Put here the pfcClient, pfcGui, pfcResources customizations + * ex: you can override the pfcClient::updateNickList methode + * in order to display links on the nicknames (see demo34 for a concrete example) + */ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-16 20:41:51
|
Revision: 961 http://svn.sourceforge.net/phpfreechat/?rev=961&view=rev Author: kerphi Date: 2007-02-16 12:41:51 -0800 (Fri, 16 Feb 2007) Log Message: ----------- rename to be ok with refactoring Added Paths: ----------- trunk/demo/demo50_data/mytheme/customize.js.php trunk/demo/demo50_data/mytheme/style.css.php Removed Paths: ------------- trunk/demo/demo50_data/mytheme/customize.js trunk/demo/demo50_data/mytheme/style.css Deleted: trunk/demo/demo50_data/mytheme/customize.js =================================================================== --- trunk/demo/demo50_data/mytheme/customize.js 2007-02-16 09:00:14 UTC (rev 960) +++ trunk/demo/demo50_data/mytheme/customize.js 2007-02-16 20:41:51 UTC (rev 961) @@ -1,99 +0,0 @@ -pfcClient.prototype.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 != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - && k != 'avatar' - ) - { - 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); - - // append the avatar image - var img = document.createElement('img'); - img.setAttribute('src',this.getUserMeta(nickid,'avatar')); - img.setAttribute('class', 'pfc_nickwhois_avatar'); - img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE6 - div.appendChild(img); - - this.nickwhoisbox[nickid] = div; - } Copied: trunk/demo/demo50_data/mytheme/customize.js.php (from rev 960, trunk/demo/demo50_data/mytheme/customize.js) =================================================================== --- trunk/demo/demo50_data/mytheme/customize.js.php (rev 0) +++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-02-16 20:41:51 UTC (rev 961) @@ -0,0 +1,99 @@ +pfcClient.prototype.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 != 'floodtime' + && k != 'flood_nbmsg' + && k != 'flood_nbchar' + && k != 'avatar' + ) + { + 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); + + // append the avatar image + var img = document.createElement('img'); + img.setAttribute('src',this.getUserMeta(nickid,'avatar')); + img.setAttribute('class', 'pfc_nickwhois_avatar'); + img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE6 + div.appendChild(img); + + this.nickwhoisbox[nickid] = div; + } Deleted: trunk/demo/demo50_data/mytheme/style.css =================================================================== --- trunk/demo/demo50_data/mytheme/style.css 2007-02-16 09:00:14 UTC (rev 960) +++ trunk/demo/demo50_data/mytheme/style.css 2007-02-16 20:41:51 UTC (rev 961) @@ -1,3 +0,0 @@ -img.pfc_nickwhois_avatar { - margin: 10px; -} \ No newline at end of file Copied: trunk/demo/demo50_data/mytheme/style.css.php (from rev 960, trunk/demo/demo50_data/mytheme/style.css) =================================================================== --- trunk/demo/demo50_data/mytheme/style.css.php (rev 0) +++ trunk/demo/demo50_data/mytheme/style.css.php 2007-02-16 20:41:51 UTC (rev 961) @@ -0,0 +1,3 @@ +img.pfc_nickwhois_avatar { + margin: 10px; +} \ 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-02-16 09:00:18
|
Revision: 960 http://svn.sourceforge.net/phpfreechat/?rev=960&view=rev Author: kerphi Date: 2007-02-16 01:00:14 -0800 (Fri, 16 Feb 2007) Log Message: ----------- next release step Modified Paths: -------------- trunk/version Modified: trunk/version =================================================================== --- trunk/version 2007-02-15 17:38:23 UTC (rev 959) +++ trunk/version 2007-02-16 09:00:14 UTC (rev 960) @@ -1 +1 @@ -1.0-beta9-pre2 +1.0-beta9-pre3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-15 17:38:42
|
Revision: 959 http://svn.sourceforge.net/phpfreechat/?rev=959&view=rev Author: kerphi Date: 2007-02-15 09:38:23 -0800 (Thu, 15 Feb 2007) Log Message: ----------- revert my changes about in_array replacments Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/src/proxies/log.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-02-15 17:27:13 UTC (rev 958) +++ trunk/src/pfcglobalconfig.class.php 2007-02-15 17:38:23 UTC (rev 959) @@ -537,7 +537,7 @@ foreach($pfc_configvar as $key => $val) { // the dynamics parameters must not be cached - if (!isset($this->_dyn_params[$key])) + if (!in_array($key,$this->_dyn_params)) $this->$key = $val; } Modified: trunk/src/proxies/log.class.php =================================================================== --- trunk/src/proxies/log.class.php 2007-02-15 17:27:13 UTC (rev 958) +++ trunk/src/proxies/log.class.php 2007-02-15 17:38:23 UTC (rev 959) @@ -33,7 +33,7 @@ function run(&$xml_reponse, $p) { $cmdtocheck = array("send", "me", "notice"); - if ( isset($cmdtocheck[$this->name]) ) + if ( in_array($this->name, $cmdtocheck) ) { $clientid = $p["clientid"]; $param = $p["param"]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-15 17:27:15
|
Revision: 958 http://svn.sourceforge.net/phpfreechat/?rev=958&view=rev Author: kerphi Date: 2007-02-15 09:27:13 -0800 (Thu, 15 Feb 2007) Log Message: ----------- optimization : replace the in_array test by a isset test Modified Paths: -------------- trunk/src/proxies/log.class.php Modified: trunk/src/proxies/log.class.php =================================================================== --- trunk/src/proxies/log.class.php 2007-02-15 17:26:38 UTC (rev 957) +++ trunk/src/proxies/log.class.php 2007-02-15 17:27:13 UTC (rev 958) @@ -33,7 +33,7 @@ function run(&$xml_reponse, $p) { $cmdtocheck = array("send", "me", "notice"); - if ( in_array($this->name, $cmdtocheck) ) + if ( isset($cmdtocheck[$this->name]) ) { $clientid = $p["clientid"]; $param = $p["param"]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-15 17:26:43
|
Revision: 957 http://svn.sourceforge.net/phpfreechat/?rev=957&view=rev Author: kerphi Date: 2007-02-15 09:26:38 -0800 (Thu, 15 Feb 2007) Log Message: ----------- fix the ping calculation Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-02-15 16:13:34 UTC (rev 956) +++ trunk/data/public/js/pfcclient.js 2007-02-15 17:26:38 UTC (rev 957) @@ -42,7 +42,9 @@ this.timeout = null; this.refresh_delay = pfc_refresh_delay; this.max_refresh_delay = pfc_max_refresh_delay; - this.last_refresh_time = new Date().getTime(); + this.last_response_time = new Date().getTime(); + this.last_request_time = new Date().getTime(); + /* 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) */ @@ -148,6 +150,14 @@ { if (pfc_debug) if (cmd != "update") trace('handleResponse: '+cmd + "-"+resp+"-"+param); + + // store the new refresh time + this.last_response_time = new Date().getTime(); + + // calculate the ping and display it + this.ping = this.last_response_time - this.last_request_time; + $('pfc_ping').innerHTML = this.ping+'ms'; + if (cmd == "connect") { //alert(cmd + "-"+resp+"-"+param); @@ -333,12 +343,11 @@ } 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(); + this.canupdatenexttime = true; } else if (cmd == "version") { @@ -890,8 +899,17 @@ */ sendRequest: function(cmd, recipientid) { - if (pfc_debug) - if (cmd != "/update") trace('sendRequest: '+cmd); + if (cmd != "/update") + { + // setup a new timeout to update the chat in 5 seconds (in refresh_delay more exactly) + clearTimeout(this.timeout); + this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); + + if (pfc_debug) + trace('sendRequest: '+cmd); + } + + this.last_request_time = new Date().getTime(); var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); if (!recipientid) recipientid = this.gui.getTabId(); cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); @@ -906,10 +924,6 @@ clearTimeout(this.timeout); if (start) { - // calculate the ping and display it - this.ping = Math.abs(this.refresh_delay-(new Date().getTime() - this.last_refresh_time)); - $('pfc_ping').innerHTML = this.ping+'ms'; - var res = true; if (this.canupdatenexttime) { @@ -917,12 +931,12 @@ res = this.sendRequest('/update'); this.canupdatenexttime = false; // don't update if the last 'ok' response is not yet received } - else if ((new Date().getTime() - this.last_refresh_time) > this.max_refresh_delay) + else if ((new Date().getTime() - this.last_response_time) > this.max_refresh_delay) { // the connection is probably closed or very slow res = this.sendRequest('/update'); this.canupdatenexttime = false; // don't update if the last 'ok' response is not yet received - this.last_refresh_time = new Date().getTime(); + this.last_response_time = new Date().getTime(); } // setup the next update this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-15 16:13:34
|
Revision: 956 http://svn.sourceforge.net/phpfreechat/?rev=956&view=rev Author: kerphi Date: 2007-02-15 08:13:34 -0800 (Thu, 15 Feb 2007) Log Message: ----------- Code cleaning on pfcglobalconfig and pfccontainer singleton instances Modified Paths: -------------- trunk/demo/demo27_customized_command.php trunk/demo/demo55_mysql_container.php trunk/src/commands/asknick.class.php trunk/src/commands/ban.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/deop.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/init.class.php trunk/src/commands/invite.class.php trunk/src/commands/join.class.php trunk/src/commands/kick.class.php trunk/src/commands/leave.class.php trunk/src/commands/me.class.php trunk/src/commands/nick.class.php trunk/src/commands/notice.class.php trunk/src/commands/op.class.php trunk/src/commands/privmsg.class.php trunk/src/commands/quit.class.php trunk/src/commands/redirect.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/updatemynick.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/containers/file.class.php trunk/src/containers/mysql.class.php trunk/src/pfccommand.class.php trunk/src/pfccontainer.class.php trunk/src/pfccontainerinterface.class.php trunk/src/pfcglobalconfig.class.php trunk/src/pfcinfo.class.php trunk/src/pfcproxycommand.class.php trunk/src/phpfreechat.class.php trunk/src/proxies/auth.class.php trunk/src/proxies/censor.class.php trunk/src/proxies/checknickchange.class.php trunk/src/proxies/checktimeout.class.php trunk/src/proxies/lock.class.php trunk/src/proxies/log.class.php trunk/src/proxies/noflood.class.php trunk/testcase/container_generic.php Added Paths: ----------- trunk/demo/demo5_customized_style_data/mytheme/style.css.php Removed Paths: ------------- trunk/demo/demo5_customized_style_data/mytheme/style.css Modified: trunk/demo/demo27_customized_command.php =================================================================== --- trunk/demo/demo27_customized_command.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/demo/demo27_customized_command.php 2007-02-15 16:13:34 UTC (rev 956) @@ -13,11 +13,11 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); - $nick = $c->nick; - $container =& $c->getContainerInstance(); - $text = trim($param); + $nick = $c->nick; + $ct =& pfcContainer::Instance(); + $text = trim($param); // Call parse roll require_once dirname(__FILE__).'/demo27_dice.class.php'; @@ -33,7 +33,7 @@ else { $result = $dice->roll(); - $container->write($recipient, $nick, "send", $result); + $ct->write($recipient, $nick, "send", $result); } if ($c->debug) pxlog("Cmd_roll[".$c->sessionid."]: msg=".$result, "chat", $c->getId()); } Modified: trunk/demo/demo55_mysql_container.php =================================================================== --- trunk/demo/demo55_mysql_container.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/demo/demo55_mysql_container.php 2007-02-15 16:13:34 UTC (rev 956) @@ -1,6 +1,7 @@ <?php require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; +$params = array(); $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["nick"] = "guest".rand(1,1000); $params["container_type"] = "mysql"; Deleted: trunk/demo/demo5_customized_style_data/mytheme/style.css =================================================================== --- trunk/demo/demo5_customized_style_data/mytheme/style.css 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/demo/demo5_customized_style_data/mytheme/style.css 2007-02-15 16:13:34 UTC (rev 956) @@ -1,66 +0,0 @@ - -div#pfc_container { - border: black double 5px; - background-image: url("proxy.php?p=mytheme/images/brick.jpg"); - background-repeat: repeat; - padding: 20px; - color: black; - margin: auto; -} -div#pfc_chat { - background-color: #FFF; -} - -div#pfc_content { - border: none; -} - -div.pfc_message { - background-color: transparent; - background-image: url("proxy.php?p=mytheme/images/newmsg.gif"); - background-repeat: no-repeat; - background-position: right center; -} - -div.pfc_oldmsg { - background-image: url("proxy.php?p=mytheme/images/oldmsg.gif"); -} - -span.pfc_heure { - margin-left: 25px; - color: #888; -} - -span.pfc_date { - display: none; -} - -span.pfc_pseudo { - color: black; - font-weight: bold; -} - -input#pfc_handle { - color: black; - font-weight: bold; -} - -div#pfc_online { -} - -div.pfc_btn img { - border: 1px solid #FFF; /* same as container color */ -} -div.pfc_btn img:hover { - border: 1px solid #000; - background-color: #CCC; -} - - -/* commands */ -.pfc_cmd_notice { - color: red; -} -.pfc_cmd_msg { - color: #555; -} \ No newline at end of file Added: trunk/demo/demo5_customized_style_data/mytheme/style.css.php =================================================================== --- trunk/demo/demo5_customized_style_data/mytheme/style.css.php (rev 0) +++ trunk/demo/demo5_customized_style_data/mytheme/style.css.php 2007-02-15 16:13:34 UTC (rev 956) @@ -0,0 +1,66 @@ + +div#pfc_container { + border: black double 5px; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/brick.jpg'); ?>"); + background-repeat: repeat; + padding: 20px; + color: black; + margin: auto; +} +div#pfc_chat { + background-color: #FFF; +} + +div#pfc_content { + border: none; +} + +div.pfc_message { + background-color: transparent; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.gif'); ?>"); + background-repeat: no-repeat; + background-position: right center; +} + +div.pfc_oldmsg { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.gif'); ?>"); +} + +span.pfc_heure { + margin-left: 25px; + color: #888; +} + +span.pfc_date { + display: none; +} + +span.pfc_pseudo { + color: black; + font-weight: bold; +} + +input#pfc_handle { + color: black; + font-weight: bold; +} + +div#pfc_online { +} + +div.pfc_btn img { + border: 1px solid #FFF; /* same as container color */ +} +div.pfc_btn img:hover { + border: 1px solid #000; + background-color: #CCC; +} + + +/* commands */ +.pfc_cmd_notice { + color: red; +} +.pfc_cmd_msg { + color: #555; +} \ No newline at end of file Modified: trunk/src/commands/asknick.class.php =================================================================== --- trunk/src/commands/asknick.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/asknick.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,8 +12,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $nicktochange = phpFreeChat::FilterNickname($param); Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/ban.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -15,8 +15,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $nick = isset($params[0]) ? $params[0] : ''; $reason = isset($params[1]) ? $params[1] : ''; @@ -34,7 +34,7 @@ return; } - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $nickidtoban = $ct->getNickId($nick); // notify all the channel Modified: trunk/src/commands/banlist.class.php =================================================================== --- trunk/src/commands/banlist.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/banlist.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -13,10 +13,10 @@ function run(&$xml_reponse, $p) { - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $banlist = $ct->getChanMeta($p["recipient"], 'banlist_nickid'); if ($banlist == NULL) $banlist = array(); else $banlist = unserialize($banlist); Modified: trunk/src/commands/clear.class.php =================================================================== --- trunk/src/commands/clear.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/clear.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -6,8 +6,8 @@ { function run(&$xml_reponse, $p) { - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', '');"); } Modified: trunk/src/commands/connect.class.php =================================================================== --- trunk/src/commands/connect.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/connect.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -13,9 +13,9 @@ $recipientid = $p["recipientid"]; $getoldmsg = isset($p["getoldmsg"]) ? $p["getoldmsg"] : true; - $c =& $this->c; - $u =& $this->u; - $ct =& $c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); + $ct =& pfcContainer::Instance(); // reset the message id indicator (see getnewmsg.class.php) // i.e. be ready to re-get all last posted messages Modified: trunk/src/commands/debug.class.php =================================================================== --- trunk/src/commands/debug.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/debug.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -6,8 +6,8 @@ { function run(&$xml_reponse, $p) { - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if ($p["param"] == "userconfig") { Modified: trunk/src/commands/deop.class.php =================================================================== --- trunk/src/commands/deop.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/deop.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -8,8 +8,8 @@ function run(&$xml_reponse, $p) { - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if (trim($p["param"]) == "") { @@ -24,7 +24,7 @@ // just change the "isadmin" meta flag $nicktodeop = trim($p["param"]); - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $nicktodeopid = $container->getNickId($nicktodeop); $container->setUserMeta($nicktodeopid, 'isadmin', false); Modified: trunk/src/commands/error.class.php =================================================================== --- trunk/src/commands/error.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/error.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -6,7 +6,7 @@ { function run(&$xml_reponse, $p) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); $errors = $p["param"]; if (is_array($errors)) { Modified: trunk/src/commands/getnewmsg.class.php =================================================================== --- trunk/src/commands/getnewmsg.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/getnewmsg.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -32,7 +32,7 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); // do nothing if the recipient is not defined if ($recipient == "") return; @@ -50,7 +50,7 @@ // read the last from_id value - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $from_id_sid = "pfc_from_id_".$c->getId()."_".$clientid."_".$recipientid; $from_id = 0; if (isset($_SESSION[$from_id_sid])) Modified: trunk/src/commands/help.class.php =================================================================== --- trunk/src/commands/help.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/help.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $ignore = array("updatemynick", "getnewmsg", "notice", "getonlinenick", "error", "update", "asknick"); Modified: trunk/src/commands/identify.class.php =================================================================== --- trunk/src/commands/identify.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/identify.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -39,8 +39,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $password = trim($param); $isadmin = false; @@ -57,7 +57,7 @@ if ($isadmin) { // ok the current user is an admin, just save the isadmin flag in the metadata - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $ct->setUserMeta($u->nickid, 'isadmin', $isadmin); $this->forceWhoisReload($u->nick); Modified: trunk/src/commands/init.class.php =================================================================== --- trunk/src/commands/init.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/init.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,8 +12,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $cmd =& pfcCommand::Factory("quit"); $cmd->run($xml_reponse, $p); Modified: trunk/src/commands/invite.class.php =================================================================== --- trunk/src/commands/invite.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/invite.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -46,9 +46,9 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; // pfcGlobalConfig - $u =& $this->u; // pfcUserConfig - $ct =& $c->getContainerInstance(); // Connection to the chatbackend + $c =& pfcGlobalConfig::Instance(); // pfcGlobalConfig + $u =& pfcUserConfig::Instance(); // pfcUserConfig + $ct =& pfcContainer::Instance(); // Connection to the chatbackend $nicktoinvite = isset($params[0]) ? $params[0] : ''; $channeltarget = isset($params[1]) ? $params[1] : $u->channels[$recipientid]["name"]; // Default: current channel Modified: trunk/src/commands/join.class.php =================================================================== --- trunk/src/commands/join.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/join.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $channame = trim($param); $chanrecip = pfcCommand_join::GetRecipient($channame); @@ -55,7 +55,7 @@ } // register the user (and his metadata) in the channel - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $ct->createNick($chanrecip, $u->nick, $u->nickid); $this->forceWhoisReload($u->nick); Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/kick.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -15,8 +15,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $nick = isset($params[0]) ? $params[0] : ''; $reason = isset($params[1]) ? $params[1] : ''; @@ -34,7 +34,7 @@ } // kicking a user just add a command to play to the aimed user metadata. - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $otherid = $ct->getNickId($nick); $channame = $u->channels[$recipientid]["name"]; $cmdstr = 'leave'; Modified: trunk/src/commands/leave.class.php =================================================================== --- trunk/src/commands/leave.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/leave.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -15,9 +15,9 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; - $ct =& $c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); + $ct =& pfcContainer::Instance(); $type = isset($params[0]) ? $params[0] : ''; $name = isset($params[1]) ? $params[1] : ''; Modified: trunk/src/commands/me.class.php =================================================================== --- trunk/src/commands/me.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/me.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if (trim($param) == "") { @@ -28,7 +28,7 @@ return; } - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $msg = phpFreeChat::PreFilterMsg($param); $container->write($recipient, "*me*", $this->name, $u->nick." ".$msg); Modified: trunk/src/commands/nick.class.php =================================================================== --- trunk/src/commands/nick.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/nick.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if (trim($param) == "") { @@ -31,7 +31,7 @@ $newnick = phpFreeChat::FilterNickname($param); $oldnick = $u->nick; - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $newnickid = $container->getNickId($newnick); $oldnickid = $container->getNickId($oldnick); Modified: trunk/src/commands/notice.class.php =================================================================== --- trunk/src/commands/notice.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/notice.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -13,13 +13,13 @@ $recipientid = $p["recipientid"]; $flag = isset($p["flag"]) ? $p["flag"] : 3; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if ($c->shownotice > 0 && ($c->shownotice & $flag) == $flag) { - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $msg = phpFreeChat::FilterSpecialChar($msg); $res = $container->write($recipient, $u->nick, "notice", $msg); if (is_array($res)) Modified: trunk/src/commands/op.class.php =================================================================== --- trunk/src/commands/op.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/op.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if (trim($param) == "") { @@ -30,7 +30,7 @@ // just change the "isadmin" meta flag $nicktoop = trim($param); - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $nicktoopid = $container->getNickId($nicktoop); $container->setUserMeta($nicktoopid, 'isadmin', true); Modified: trunk/src/commands/privmsg.class.php =================================================================== --- trunk/src/commands/privmsg.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/privmsg.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,13 +12,13 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $pvname = $param; // check the pvname exists on the server - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $pvnickid = $container->getNickId($pvname); $nickid = $u->nickid; @@ -83,7 +83,7 @@ } // register the user (and his metadata) in this pv - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $ct->createNick($pvrecipient, $u->nick, $u->nickid); $this->forceWhoisReload($u->nick); Modified: trunk/src/commands/quit.class.php =================================================================== --- trunk/src/commands/quit.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/quit.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,11 +12,11 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); // then remove the nickname file - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $quitmsg = $param == "" ? _pfc("%s quit", $u->nick) : _pfc("%s quit (%s)", $u->nick, $param); // from the channels Modified: trunk/src/commands/redirect.class.php =================================================================== --- trunk/src/commands/redirect.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/redirect.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if (trim($param) == '') { // error Modified: trunk/src/commands/rehash.class.php =================================================================== --- trunk/src/commands/rehash.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/rehash.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -19,7 +19,7 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); // just destroy the cache // do not synchronizeWithCache() because it will reload the same parameters as the current one // the right way is to wait for the next page reload and the new parameters will be taken into account Modified: trunk/src/commands/send.class.php =================================================================== --- trunk/src/commands/send.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/send.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,8 +12,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $nick = phpFreeChat::FilterSpecialChar($sender); $text = phpFreeChat::PreFilterMsg($param); @@ -37,7 +37,7 @@ $can_send = true; if (isset($u->privmsg[$recipientid])) { - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $pvnick = $u->privmsg[$recipientid]["name"]; $pvnickid = $container->getNickId($pvnick); @@ -77,7 +77,7 @@ // Now send the message if there is no errors if ($can_send) { - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $msgid = $container->write($recipient, $nick, "send", $text); if (is_array($msgid)) { Modified: trunk/src/commands/unban.class.php =================================================================== --- trunk/src/commands/unban.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/unban.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -15,10 +15,10 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $nick = isset($params[0]) ? $params[0] : ''; $nickid = $ct->getNickId($nick); Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/update.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,15 +12,15 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); // do not update if user isn't active (didn't connect) if ($u->active) { // check the user has not been disconnected from the server by timeout // if I found he has been disconnected, then I reconnect him with /connect command - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); if ($ct->isNickOnline(NULL, $u->nickid) < 0) { $cmd =& pfcCommand::Factory("connect"); Modified: trunk/src/commands/updatemynick.class.php =================================================================== --- trunk/src/commands/updatemynick.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/updatemynick.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -12,10 +12,10 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $container->updateNick($u->nickid); } } Modified: trunk/src/commands/version.class.php =================================================================== --- trunk/src/commands/version.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/version.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -14,8 +14,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', '".$c->version."');"); } Modified: trunk/src/commands/who.class.php =================================================================== --- trunk/src/commands/who.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/who.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -34,8 +34,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if ($param != "") { @@ -51,8 +51,8 @@ function _getChanMeta($recipient, $recipientid) { - $c =& $this->c; - $ct =& $c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $ct =& pfcContainer::Instance(); $chanmeta = array(); $chanmeta['chan'] = $recipient; $chanmeta['chanid'] = $recipientid; Modified: trunk/src/commands/who2.class.php =================================================================== --- trunk/src/commands/who2.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/who2.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -33,8 +33,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if ($param != "") { Modified: trunk/src/commands/whois.class.php =================================================================== --- trunk/src/commands/whois.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/commands/whois.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -34,9 +34,9 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; - $ct =& $c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); + $ct =& pfcContainer::Instance(); $nickid = $ct->getNickId($param); if ($nickid) Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/containers/file.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -33,14 +33,13 @@ "timestamp" => array()); var $_meta = array(); - function pfcContainer_File(&$config) + function pfcContainer_File() { - pfcContainerInterface::pfcContainerInterface($config); + pfcContainerInterface::pfcContainerInterface(); } - function loadPaths() + function loadPaths(&$c) { - $c =& $this->c; if (!isset($c->container_cfg_chat_dir) || $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 == '') @@ -49,21 +48,18 @@ function getDefaultConfig() { - $c =& $this->c; $cfg = pfcContainerInterface::getDefaultConfig(); $cfg["chat_dir"] = ''; // will be generated from the other parameters into the init step $cfg["server_dir"] = ''; // will be generated from the other parameters into the init step return $cfg; } - function init() + function init(&$c) { - $errors = pfcContainerInterface::init(); - $c =& $this->c; - + $errors = pfcContainerInterface::init($c); // generate the container parameters from other config parameters - $this->loadPaths(); + $this->loadPaths(&$c); $errors = array_merge($errors, @test_writable_dir($c->container_cfg_chat_dir, "container_cfg_chat_dir")); $errors = array_merge($errors, @test_writable_dir($c->container_cfg_server_dir, "container_cfg_chat_dir/serverid")); @@ -74,7 +70,7 @@ function setMeta($group, $subgroup, $leaf, $leafvalue = NULL) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($c->debug) file_put_contents("/tmp/debug", "\nsetMeta(".$group.",".$subgroup.",".$leaf.",".$leafvalue.")", FILE_APPEND); @@ -111,7 +107,7 @@ function getMeta($group, $subgroup = null, $leaf = null, $withleafvalue = false) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($c->debug) file_put_contents("/tmp/debug", "\ngetMeta(".$group.",".$subgroup.",".$leaf.",".$withleafvalue.")", FILE_APPEND); @@ -171,7 +167,7 @@ function rmMeta($group, $subgroup = null, $leaf = null) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($c->debug) file_put_contents("/tmp/debug", "\nrmMeta(".$group.",".$subgroup.",".$leaf.")", FILE_APPEND); Modified: trunk/src/containers/mysql.class.php =================================================================== --- trunk/src/containers/mysql.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/containers/mysql.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -67,14 +67,13 @@ INDEX (`server`,`group`,`subgroup`,`timestamp`) ) ENGINE=%engine%;"; - function pfcContainer_Mysql(&$config) + function pfcContainer_Mysql() { - pfcContainerInterface::pfcContainerInterface($config); + pfcContainerInterface::pfcContainerInterface(); } function getDefaultConfig() - { - $c =& $this->c; + { $cfg = pfcContainerInterface::getDefaultConfig(); $cfg["mysql_host"] = 'localhost'; $cfg["mysql_port"] = 3306; @@ -93,13 +92,12 @@ return $cfg; } - function init() + function init(&$c) { - $errors = pfcContainerInterface::init(); - $c =& $this->c; + $errors = pfcContainerInterface::init($c); // connect to the db - $db = $this->_connect(); + $db = $this->_connect($c); if ($db === FALSE) { $errors[] = _pfc("Mysql container: connect error"); @@ -122,7 +120,7 @@ } mysql_select_db($c->container_cfg_mysql_database, $db); } - + // create the table if it doesn't exists $query = $this->_sql_create_table; $query = str_replace('%engine%', $c->container_cfg_mysql_engine,$query); @@ -142,11 +140,11 @@ return $errors; } - function _connect() + function _connect($c = null) { if (!$this->_db) { - $c =& $this->c; + if ($c == null) $c =& pfcGlobalConfig::Instance(); $this->_db = mysql_pconnect($c->container_cfg_mysql_host.':'.$c->container_cfg_mysql_port, $c->container_cfg_mysql_username, $c->container_cfg_mysql_password); @@ -157,8 +155,8 @@ function setMeta($group, $subgroup, $leaf, $leafvalue = NULL) { - $c =& $this->c; - + $c =& pfcGlobalConfig::Instance(); + if ($c->debug) file_put_contents("/tmp/debug.txt", "\nsetMeta(".$group.",".$subgroup.",".$leaf.",".$leafvalue.")", FILE_APPEND); @@ -196,7 +194,8 @@ function getMeta($group, $subgroup = null, $leaf = null, $withleafvalue = false) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); + if ($c->debug) file_put_contents("/tmp/debug.txt", "\ngetMeta(".$group.",".$subgroup.",".$leaf.",".$withleafvalue.")", FILE_APPEND); @@ -265,7 +264,7 @@ function rmMeta($group, $subgroup = null, $leaf = null) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($c->debug) file_put_contents("/tmp/debug.txt", "\nrmMeta(".$group.",".$subgroup.",".$leaf.")", FILE_APPEND); Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfccommand.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -34,30 +34,20 @@ /** * Command name (lowercase) */ - var $name; + var $name = ''; /** * Contains the command syntaxe (how to use the command) */ - var $usage; + var $usage = ''; /** * Not used for now */ - var $desc; - var $help; + var $desc = ''; + var $help = ''; /** - * This is the pfcGlobalConfig instance - */ - var $c; - - /** - * This is the pfcUserConfig instance - */ - var $u; - - /** * Used to instanciate a command * $tag is the command name : "nick", "me", "update" ... */ @@ -67,54 +57,58 @@ // instanciate the real command $cmd = NULL; - $cmd_name = strtolower($name); + $cmd_name = $name; $cmd_classname = "pfcCommand_".$name; + + $cmd_filename = $c->cmd_path_default.'/'.$cmd_name.'.class.php'; + if (file_exists($cmd_filename)) require_once($cmd_filename); + $cmd_filename = $c->cmd_path.'/'.$cmd_name.'.class.php'; + if (file_exists($cmd_filename)) require_once($cmd_filename); + if (!class_exists($cmd_classname)) + return NULL; + + $cmd =& new $cmd_classname; + $cmd->name = $cmd_name; + + // instanciate the proxies chaine + $firstproxy =& $cmd; + for($i = count($c->_proxies)-1; $i >= 0; $i--) { - $cmd_paths = array($c->cmd_path_default,$c->cmd_path); - foreach($cmd_paths as $cp) - { - $cmd_filename = $cp."/".$cmd_name.".class.php"; - if (@file_exists($cmd_filename)) require_once($cmd_filename); - } + $proxy_name = $c->_proxies[$i]; + $proxy_classname = "pfcProxyCommand_" . $proxy_name; + + // try to include the proxy class file from the default path or from the customized path + $proxy_filename = $c->proxies_path_default.'/'.$proxy_name.".class.php"; + if (file_exists($proxy_filename)) require_once($proxy_filename); + $proxy_filename = $c->proxies_path.'/'.$proxy_name.".class.php"; + if (file_exists($proxy_filename)) require_once($proxy_filename); + + if (!class_exists($proxy_classname)) + return $firstproxy; + + // instanciate the proxy + $proxy =& new $proxy_classname; + $proxy->name = $cmd_name; + $proxy->proxyname = $proxy_name; + $proxy->linkTo($firstproxy); + $firstproxy =& $proxy; } - if (class_exists($cmd_classname)) + + /* + $tmp = ''; + $cur = $firstproxy; + while($cur) { - $cmd =& new $cmd_classname(); - $cmd->name = $cmd_name; - - // instanciate the proxies chaine - $firstproxy =& $cmd; - for($i = count($c->_proxies)-1; $i >= 0; $i--) - { - $proxy_name = $c->_proxies[$i]; - $proxy_classname = "pfcProxyCommand_" . $proxy_name; - if (!class_exists($proxy_classname)) - { - // try to include the proxy class file from the default path or from the customized path - $proxy_filename = $c->proxies_path_default.'/'.$proxy_name.".class.php"; - if (file_exists($proxy_filename)) - require_once($proxy_filename); - else - { - $proxy_filename = $c->proxies_path.'/'.$proxy_name.".class.php"; - if (file_exists($proxy_filename)) require_once($proxy_filename); - } - } - if (class_exists($proxy_classname)) - { - // instanciate the proxy - $proxy =& new $proxy_classname(); - $proxy->name = $cmd_name; - $proxy->proxyname = $proxy_name; - $proxy->linkTo($firstproxy); - $firstproxy =& $proxy; - } - } - // return the proxy, not the command (the proxy will forward the request to the real command) - return $firstproxy; + $tmp .= (isset($cur->proxyname)?$cur->proxyname:$cur->name).'|'; + $cur = $cur->next; } - return $cmd; + $tmp .= var_export($firstproxy,true); + file_put_contents('/tmp/debug1',$tmp); +*/ + + // return the proxy, not the command (the proxy will forward the request to the real command) + return $firstproxy; } /** @@ -123,8 +117,6 @@ */ function pfcCommand() { - $this->c =& pfcGlobalConfig::Instance(); - $this->u =& pfcUserConfig::Instance(); } /** @@ -141,9 +133,9 @@ */ function forceWhoisReload($nicktorewhois) { - $c = $this->c; - $u = $this->u; - $ct =& $c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); + $ct =& pfcContainer::Instance(); $nickid = $ct->getNickid($nicktorewhois); @@ -189,7 +181,7 @@ $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); if ($nickid != "") { $cmdtoplay = $ct->getUserMeta($nickid, 'cmdtoplay'); @@ -209,7 +201,7 @@ { $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $morecmd = true; while($morecmd) Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfccontainer.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -33,17 +33,27 @@ { var $_container = null; // contains the concrete container instance var $_usememorycache = true; + + + function &Instance($type = 'File', $usememorycache = true) + { + static $i; + if (!isset($i)) + $i = new pfcContainer($type, $usememorycache); + return $i; + } - function pfcContainer(&$c, $type = 'File', $usememorycache = true) + function pfcContainer($type = 'File', $usememorycache = true) { - pfcContainerInterface::pfcContainerInterface($c); + pfcContainerInterface::pfcContainerInterface(); $this->_usememorycache = $usememorycache; + $type = strtolower($type); // create the concrete container instance - require_once dirname(__FILE__)."/containers/".strtolower($type).".class.php"; + require_once dirname(__FILE__)."/containers/".$type.".class.php"; $container_classname = "pfcContainer_".$type; - $this->_container =& new $container_classname($this->c); + $this->_container =& new $container_classname(); } function getDefaultConfig() { @@ -52,10 +62,10 @@ else return array(); } - function init() + function init(&$c) { if ($this->_container) - return $this->_container->init(); + return $this->_container->init($c); } /** @@ -67,7 +77,7 @@ */ function createNick($chan, $nick, $nickid) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($nick == '') user_error('pfcContainer::createNick nick is empty', E_USER_ERROR); @@ -98,7 +108,7 @@ */ function removeNick($chan, $nickid) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($chan == NULL) $chan = 'SERVER'; @@ -157,7 +167,7 @@ */ function updateNick($nickid) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); $chan = 'SERVER'; @@ -175,7 +185,7 @@ */ function changeNick($newnick, $oldnick) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); $oldnickid = $this->getNickId($oldnick); $newnickid = $this->getNickId($newnick); @@ -225,7 +235,7 @@ */ function removeObsoleteNick($timeout) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); $deleted_user = array('nick'=>array(), 'nickid'=>array(), @@ -273,7 +283,7 @@ */ function getOnlineNick($chan) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($chan == NULL) $chan = 'SERVER'; @@ -323,7 +333,7 @@ */ function write($chan, $nick, $cmd, $param) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($chan == NULL) $chan = 'SERVER'; $msgid = $this->_requestMsgId($chan); @@ -357,7 +367,7 @@ */ function read($chan, $from_id) { - $c =& $this->c; + $c =& pfcGlobalConfig::Instance(); if ($chan == NULL) $chan = 'SERVER'; // read new messages id Modified: trunk/src/pfccontainerinterface.class.php =================================================================== --- trunk/src/pfccontainerinterface.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfccontainerinterface.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -28,10 +28,9 @@ */ class pfcContainerInterface { - var $c; - function pfcContainerInterface(&$config) { $this->c =& $config; } - function getDefaultConfig() { return array(); } - function init() { return array(); } + function pfcContainerInterface() { } + function getDefaultConfig() { return array(); } + function init(&$c) { return array(); } /** * Write a meta data value identified by a group / subgroup / leaf [with a value] Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfcglobalconfig.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -22,6 +22,7 @@ require_once dirname(__FILE__)."/pfctools.php"; require_once dirname(__FILE__)."/pfci18n.class.php"; +require_once dirname(__FILE__).'/pfccontainer.class.php'; /** * pfcGlobalConfig stock configuration data into sessions and initialize some stuff @@ -146,16 +147,15 @@ $this->errors[] = _pfc("'%s' parameter is mandatory by default use '%s' value", "serverid", "md5(__FILE__)"); $this->serverid = $params["serverid"]; - // setup data_private_path because _getCacheFile needs it + // setup data_private_path because _GetCacheFile needs it if (!isset($params["data_private_path"])) $this->data_private_path = dirname(__FILE__)."/../data/private"; else $this->data_private_path = $params["data_private_path"]; - // check if a cached configuration allready exists // don't load parameters if the cache exists - $cachefile = $this->_getCacheFile(); + $cachefile = $this->_GetCacheFile(); if (!file_exists($cachefile)) { // first of all, save our current state in order to be able to check for variable types later @@ -169,11 +169,13 @@ // load users container or keep default one if (isset($params["container_type"])) $this->container_type = $params["container_type"]; + + // load default container's config - $container =& $this->getContainerInstance(); - $container_cfg = $container->getDefaultConfig(); - foreach( $container_cfg as $k => $v ) + $ct =& pfcContainer::Instance($this->container_type, true); + $ct_cfg = $ct->getDefaultConfig(); + foreach( $ct_cfg as $k => $v ) { $attr = "container_cfg_".$k; if (!isset($this->$attr)) @@ -219,6 +221,9 @@ // now load or save the configuration in the cache $this->synchronizeWithCache(); + // to be sure the container instance is initialized + $ct =& pfcContainer::Instance($this->container_type, true); + // This is a dirty workaround which fix a infinite loop when: // 'frozen_nick' is true // 'nick' length is > 'max_nick_len' @@ -228,7 +233,6 @@ function &Instance( $params = array() ) { static $i; - if (!isset($i)) $i = new pfcGlobalConfig( $params ); return $i; @@ -236,30 +240,6 @@ /** - * Return the selected container instance - * by default it is the File container - */ - 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 - // @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 function saves all the parameters types in order to check later if the types are ok */ function _saveParamsTypes() @@ -284,7 +264,7 @@ $ok = true; if ($this->debug) pxlog("pfcGlobalConfig::init()", "chatconfig", $this->getId()); - + // check the parameters types $array_params = $this->_params_type["array"]; foreach( $array_params as $ap ) @@ -420,11 +400,12 @@ // --- // run specific container initialisation - $container_classname = "pfcContainer_".$this->container_type; + $ct =& pfcContainer::Instance(); + /* $container_classname = "pfcContainer_".$this->container_type; require_once dirname(__FILE__)."/containers/".strtolower($this->container_type).".class.php"; - $container = new $container_classname($this); - $container_errors = $container->init(); - $this->errors = array_merge($this->errors, $container_errors); + $container = new $container_classname($this);*/ + $ct_errors = $ct->init($this); + $this->errors = array_merge($this->errors, $ct_errors); // load debug url $this->debugurl = relativePath($this->client_script_path, dirname(__FILE__)."/../debug"); @@ -434,32 +415,6 @@ if ( $this->language != "" && !in_array($this->language, $lg_list) ) $this->errors[] = _pfc("'%s' parameter is not valid. Available values are : '%s'", "language", implode(", ", $lg_list)); - /* - // install the proxy file - if (count($this->errors) == 0) - { - $proxyfile = $this->_getProxyFile(); - $allowedpath_string = ""; - $allowedpath_string .= "\$allowedpath[] = '".realpath(dirname(__FILE__)."/../lib")."';\n"; - $allowedpath_string .= "\$allowedpath[] = '".realpath(dirname(__FILE__)."/../src/client")."';\n"; - $allowedpath_string .= "\$allowedpath[] = '".realpath($this->themepath_default)."';\n"; - $allowedpath_string .= "\$allowedpath[] = '".realpath($this->themepath)."';\n"; - $proxycontent = file_get_contents(dirname(__FILE__)."/client/proxy.php.tpl"); - $proxycontent = str_replace("//%allowedpath%", $allowedpath_string, $proxycontent); - if (!file_exists(dirname($proxyfile))) - mkdir_r(dirname($proxyfile)); - if (file_exists($proxyfile) && - !is_writable($proxyfile)) - $this->errors[] = _pfc("'%s' must be writable", $proxyfile); - else - { - file_put_contents($proxyfile, $proxycontent); - chmod( $proxyfile, 0755 ); // should fix problems on OVH mutualized servers - } - } - */ - - // calculate the proxies chaine $this->_proxies = array(); foreach($this->pre_proxies as $px) @@ -544,7 +499,7 @@ } */ - function _getCacheFile($serverid = "", $data_private_path = "") + function _GetCacheFile($serverid = "", $data_private_path = "") { if ($serverid == "") $serverid = $this->getId(); if ($data_private_path == "") $data_private_path = $this->data_private_path; @@ -553,7 +508,7 @@ function destroyCache() { - $cachefile = $this->_getCacheFile(); + $cachefile = $this->_GetCacheFile(); if (!file_exists($cachefile)) return false; $this->is_init = false; @@ -570,7 +525,7 @@ */ function synchronizeWithCache() { - $cachefile = $this->_getCacheFile(); + $cachefile = $this->_GetCacheFile(); $cachefile_lock = $cachefile."_lock"; if (file_exists($cachefile)) @@ -618,7 +573,7 @@ } function saveInCache() { - $cachefile = $this->_getCacheFile(); + $cachefile = $this->_GetCacheFile(); file_put_contents($cachefile, serialize(get_object_vars($this))); if ($this->debug) pxlog("pfcGlobalConfig::saveInCache()", "chatconfig", $this->getId()); } @@ -675,4 +630,4 @@ } } -?> +?> \ No newline at end of file Modified: trunk/src/pfcinfo.class.php =================================================================== --- trunk/src/pfcinfo.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfcinfo.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -4,9 +4,9 @@ require_once dirname(__FILE__)."/pfci18n.class.php"; require_once dirname(__FILE__)."/commands/join.class.php"; -class pfcInfo extends pfcGlobalConfig +class pfcInfo { - var $container; + var $c = null; var $errors = array(); function pfcInfo( $serverid, $data_private_path = "" ) @@ -15,7 +15,7 @@ // if it doesn't exists, just stop the process // because we can't initialize the chat from the external API if ($data_private_path == "") $data_private_path = dirname(__FILE__)."/../data/private"; - $cachefile = $this->_getCacheFile( $serverid, $data_private_path ); + $cachefile = pfcGlobalConfig::_GetCacheFile( $serverid, $data_private_path ); if (!file_exists($cachefile)) { $this->errors[] = _pfc("Error: the cached config file doesn't exists"); @@ -24,7 +24,7 @@ // then intitialize the pfcglobalconfig $params["serverid"] = $serverid; $params["data_private_path"] = $data_private_path; - pfcGlobalConfig::pfcGlobalConfig($params); + $this->c =& pfcGlobalConfig::Instance($params); } /** @@ -32,7 +32,7 @@ */ function getErrors() { - return $this->errors; + return array_merge($this->errors, $this->c->getErrors()); } /** @@ -42,18 +42,18 @@ */ function getOnlineNick($channel = NULL, $timeout = 20) { - $container =& $this->getContainerInstance(); + $ct =& pfcContainer::Instance(); if ($channel != NULL) $channel = pfcCommand_join::GetRecipient($channel); - $res = $container->getOnlineNick($channel); + $res = $ct->getOnlineNick($channel); $users = array(); if (isset($res["nickid"])) { for($i = 0; $i < count($res["nickid"]); $i++) { if (time()-$timeout < $res["timestamp"][$i]) - $users[] = $container->getNickname($res["nickid"][$i]); + $users[] = $ct->getNickname($res["nickid"][$i]); } } return $users; @@ -72,9 +72,9 @@ // @todo must use another function to get a private message last messages $channel = pfcCommand_join::GetRecipient($channel); - $container =& $this->getContainerInstance(); - $lastmsg_id = $container->getLastId($channel); - $lastmsg_raw = $container->read($channel, $lastmsg_id-$nb); + $ct =& pfcContainer::Instance(); + $lastmsg_id = $ct->getLastId($channel); + $lastmsg_raw = $ct->read($channel, $lastmsg_id-$nb); return $lastmsg_raw; } @@ -84,7 +84,7 @@ */ function rehash() { - $destroyed = $this->destroyCache(); + $destroyed = $this->c->destroyCache(); return $destroyed; } } Modified: trunk/src/pfcproxycommand.class.php =================================================================== --- trunk/src/pfcproxycommand.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/pfcproxycommand.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -33,12 +33,12 @@ /** * Next proxy command */ - var $next; + var $next = null; /** * The proxy name (similare to the command name) */ - var $proxyname; + var $proxyname = ''; /** * Constructor @@ -50,7 +50,7 @@ function linkTo(&$cmd) { - $this->next = $cmd; + $this->next =& $cmd; } } Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/phpfreechat.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -243,7 +243,7 @@ { $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); - + if ($c->debug) ob_start(); // capture output $xml_reponse = new xajaxResponse(); @@ -286,7 +286,7 @@ // alert the other from the new pv // (warn other user that someone talk to him) - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $nickidtopv = $u->privmsg[$recipientid]["pvnickid"]; $cmdstr = 'privmsg2'; $cmdp = array(); Modified: trunk/src/proxies/auth.class.php =================================================================== --- trunk/src/proxies/auth.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/proxies/auth.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -38,14 +38,14 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); // protect admin commands $admincmd = array("kick", "ban", "unban", "op", "deop", "debug", "rehash"); if ( in_array($this->name, $admincmd) ) { - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $nickid = $u->nickid; $isadmin = $container->getUserMeta($nickid, 'isadmin'); if (!$isadmin) @@ -59,7 +59,7 @@ if ($this->name == "join" || $this->name == "join2") { - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $channame = $param; // check the user is not listed in the banished channel list Modified: trunk/src/proxies/censor.class.php =================================================================== --- trunk/src/proxies/censor.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/proxies/censor.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -38,8 +38,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); $cmdtocheck = array("send", "nick", "me"); if ( in_array($this->name, $cmdtocheck) ) Modified: trunk/src/proxies/checknickchange.class.php =================================================================== --- trunk/src/proxies/checknickchange.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/proxies/checknickchange.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -38,8 +38,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; $owner = isset($p["owner"]) ? $p["owner"] : ''; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); if ( $this->name == 'nick' ) { @@ -59,7 +59,7 @@ return; } - $container =& $c->getContainerInstance(); + $container =& pfcContainer::Instance(); $newnickid = $container->getNickId($newnick); $oldnickid = $u->nickid; @@ -109,7 +109,8 @@ function _checkNickIsUsed($newnick, $oldnickid) { - $ct =& $this->c->getContainerInstance(); + $c =& pfcGlobalConfig::Instance(); + $ct =& pfcContainer::Instance(); $nick_in_use = false; $online_users = $ct->getOnlineNick(NULL); if (isset($online_users["nickid"])) Modified: trunk/src/proxies/checktimeout.class.php =================================================================== --- trunk/src/proxies/checktimeout.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/proxies/checktimeout.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -39,11 +39,11 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $c =& $this->c; - $u =& $this->u; + $c =& pfcGlobalConfig::Instance(); + $u =& pfcUserConfig::Instance(); // disconnect users from specific channels - $ct =& $c->getContainerInstance(); + $ct =& pfcContainer::Instance(); $disconnected_users = $ct->removeObsoleteNick($c->timeout); for($i=0; $i<count($disconnected_users["nick"]); $i++) { Modified: trunk/src/proxies/lock.class.php =================================================================== --- trunk/src/proxies/lock.class.php 2007-02-15 11:29:18 UTC (rev 955) +++ trunk/src/proxies/lock.class.php 2007-02-15 16:13:34 UTC (rev 956) @@ -38,8 +38,8 @@ $recipient = $p["rec... [truncated message content] |
From: <ke...@us...> - 2007-02-15 11:29:18
|
Revision: 955 http://svn.sourceforge.net/phpfreechat/?rev=955&view=rev Author: kerphi Date: 2007-02-15 03:29:18 -0800 (Thu, 15 Feb 2007) Log Message: ----------- Optimizations : - pfcI18N::GetAcceptedLanguage function was very slow - pfcGlobaConfig::pfcGlobalConfig has some useless code which was repeted at each call Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/src/pfci18n.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-02-15 11:14:53 UTC (rev 954) +++ trunk/src/pfcglobalconfig.class.php 2007-02-15 11:29:18 UTC (rev 955) @@ -129,47 +129,43 @@ var $debugurl = ""; var $debug = false; var $debugxajax = false; - + // private parameters - var $_sys_proxies = array("lock", "checktimeout", "checknickchange", "auth", "noflood", "censor", "log"); - var $_proxies = array(); // will contains proxies to execute on each command (filled in the init step) + var $_sys_proxies = array("lock", "checktimeout", "checknickchange", "auth", "noflood", "censor", "log"); + var $_proxies = array(); // will contains proxies to execute on each command (filled in the init step) var $_dyn_params = array("nick","isadmin","islocked","admins","frozen_channels", "channels", "privmsg", "nickmeta","baseurl"); var $_params_type = array(); function pfcGlobalConfig( $params = array() ) - { - // first of all, save our current state in order to be able to check for variable types later - $this->_saveParamsTypes(); - + { // setup the local for translated messages pfcI18N::Init(isset($params["language"]) ? $params["language"] : ""); - + // check the serverid is really defined if (!isset($params["serverid"])) $this->errors[] = _pfc("'%s' parameter is mandatory by default use '%s' value", "serverid", "md5(__FILE__)"); $this->serverid = $params["serverid"]; - // _getCacheFile needs data_private_path + // setup data_private_path because _getCacheFile needs it if (!isset($params["data_private_path"])) $this->data_private_path = dirname(__FILE__)."/../data/private"; else $this->data_private_path = $params["data_private_path"]; - if (!isset($params["data_public_path"])) - $this->data_public_path = dirname(__FILE__)."/../data/public"; - else - $this->data_public_path = $params["data_public_path"]; - /* - // delete the cache if no proxy.php file is found - if (!file_exists($this->_getProxyFile())) - @unlink($this->_getCacheFile()); - */ - + // check if a cached configuration allready exists // don't load parameters if the cache exists $cachefile = $this->_getCacheFile(); if (!file_exists($cachefile)) { + // first of all, save our current state in order to be able to check for variable types later + $this->_saveParamsTypes(); + + if (!isset($params["data_public_path"])) + $this->data_public_path = dirname(__FILE__)."/../data/public"; + else + $this->data_public_path = $params["data_public_path"]; + // load users container or keep default one if (isset($params["container_type"])) $this->container_type = $params["container_type"]; @@ -212,7 +208,7 @@ // load dynamic parameter even if the config exists in the cache foreach ( $this->_dyn_params as $dp ) if (isset($params[$dp])) - $this->$dp = $params[$dp]; + $this->$dp = $params[$dp]; // 'channels' is now a dynamic parameter, just check if I need to initialize it or not if (is_array($this->channels) && @@ -498,7 +494,7 @@ // load version number from file $this->version = trim(file_get_contents(dirname(__FILE__)."/../version")); - + $this->is_init = (count($this->errors) == 0); } @@ -586,7 +582,7 @@ foreach($pfc_configvar as $key => $val) { // the dynamics parameters must not be cached - if (!in_array($key,$this->_dyn_params)) + if (!isset($this->_dyn_params[$key])) $this->$key = $val; } Modified: trunk/src/pfci18n.class.php =================================================================== --- trunk/src/pfci18n.class.php 2007-02-15 11:14:53 UTC (rev 954) +++ trunk/src/pfci18n.class.php 2007-02-15 11:29:18 UTC (rev 955) @@ -97,37 +97,7 @@ */ function GetAcceptedLanguage($type="main") { - if ($type=="admin"){ - if (isset($GLOBALS["accepted_admin_languages"])) - return $GLOBALS["accepted_admin_languages"]; // restore the cached languages list - $GLOBALS["accepted_admin_languages"] = array(); - $dir_handle = opendir(dirname(__FILE__)."/../i18n"); - while (false !== ($file = readdir($dir_handle))) - { - // skip . and .. generic files - // skip also .svn directory - if ($file == "." || $file == ".." || strpos($file,".")===0) continue; - if (file_exists(dirname(__FILE__)."/../i18n/".$file."/admin.php")) - $GLOBALS["accepted_admin_languages"][] = $file; - } - closedir($dir_handle); - return $GLOBALS["accepted_admin_languages"]; - } - else{ - if (isset($GLOBALS["accepted_languages"])) - return $GLOBALS["accepted_languages"]; // restore the cached languages list - $GLOBALS["accepted_languages"] = array(); - $dir_handle = opendir(dirname(__FILE__)."/../i18n"); - while (false !== ($file = readdir($dir_handle))) - { - // skip . and .. generic files - // skip also .svn directory - if ($file == "." || $file == ".." || strpos($file,".")===0) continue; - $GLOBALS["accepted_languages"][] = $file; - } - closedir($dir_handle); - return $GLOBALS["accepted_languages"]; - } + return /*<GetAcceptedLanguage>*/array('ar_LB','bg_BG','de_DE-formal','el_GR','eo','fr_FR','hy_AM','it_IT','ko_KR','nl_NL', 'pt_BR','ru_RU','sv_SE','uk_RO','zh_CN','ba_BA','bn_BD','de_DE-informal','en_US','es_ES','hu_HU','id_ID','ja_JP','nb_NO','pl_PL','pt_PT','sr_CS','tr_TR','uk_UA','zh_TW');/*</GetAcceptedLanguage>*/ } /** @@ -135,6 +105,24 @@ */ function UpdateMessageRessources() { + // first of all, update the GetAcceptedLanguage list + $i18n_basepath = dirname(__FILE__).'/../i18n'; + $i18n_accepted_lang = array(); + $dh = opendir($i18n_basepath); + while (false !== ($file = readdir($dh))) + { + // skip . and .. generic files, skip also .svn directory + if ($file == "." || $file == ".." || strpos($file,".")===0) continue; + if (file_exists($i18n_basepath.'/'.$file.'/main.php')) $i18n_accepted_lang[] = $file; + } + closedir($dh); + $i18n_accepted_lang_str = "array('" . implode("','", $i18n_accepted_lang) . "');"; + $data = file_get_contents(__FILE__); + $data = preg_replace("/\/\*<GetAcceptedLanguage>\*\/(.*)\/\*<\/GetAcceptedLanguage>\*\//", + "/*<GetAcceptedLanguage>*/$i18n_accepted_lang_str/*</GetAcceptedLanguage>*/", + $data); + + // Now scan the source code in order to find "_pfc" patterns $files = array(); $files = array_merge($files, glob(dirname(__FILE__)."/*.php")); $files = array_merge($files, glob(dirname(__FILE__)."/commands/*.php")); @@ -142,7 +130,6 @@ $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/*.php")); - $res = array(); foreach ( $files as $src_filename ) { @@ -170,7 +157,7 @@ } $dst_filenames = array(); - foreach(pfcI18N::GetAcceptedLanguage() as $lg) + foreach($i18n_accepted_lang as $lg) $dst_filenames[] = dirname(__FILE__)."/../i18n/".$lg."/main.php"; foreach( $dst_filenames as $dst_filename ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |