Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [909] trunk (Page 3)
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-12-21 06:35:11
|
Revision: 909 http://svn.sourceforge.net/phpfreechat/?rev=909&view=rev Author: kerphi Date: 2006-12-20 22:35:09 -0800 (Wed, 20 Dec 2006) Log Message: ----------- optimizations on interface loading (work in progress) Modified Paths: -------------- trunk/debug/console.php trunk/index.php trunk/src/commands/asknick.class.php trunk/src/commands/banlist.class.php trunk/src/commands/clear.class.php trunk/src/commands/connect.class.php trunk/src/commands/debug.class.php trunk/src/commands/error.class.php trunk/src/commands/getnewmsg.class.php trunk/src/commands/help.class.php trunk/src/commands/identify.class.php trunk/src/commands/join.class.php trunk/src/commands/leave.class.php trunk/src/commands/nick.class.php trunk/src/commands/privmsg.class.php trunk/src/commands/quit.class.php trunk/src/commands/rehash.class.php trunk/src/commands/send.class.php trunk/src/commands/unban.class.php trunk/src/commands/update.class.php trunk/src/commands/version.class.php trunk/src/commands/who.class.php trunk/src/commands/who2.class.php trunk/src/commands/whois.class.php trunk/src/pfccommand.class.php trunk/src/pfcglobalconfig.class.php trunk/src/phpfreechat.class.php trunk/src/proxies/auth.class.php trunk/src/proxies/checknickchange.class.php trunk/src/proxies/noflood.class.php trunk/themes/default/style.css Added Paths: ----------- trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php Removed Paths: ------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js trunk/src/client/pfcresource.js trunk/src/client/proxy.php.tpl Modified: trunk/debug/console.php =================================================================== --- trunk/debug/console.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/debug/console.php 2006-12-21 06:35:09 UTC (rev 909) @@ -19,7 +19,7 @@ unlink($filename); $xml_reponse->addAppend("debug".$section, "innerHTML", $html); } - $xml_reponse->addScript("window.setTimeout('phpfreechat_getnewlog(\'".$chatid."\',\'".$section."\')', 1000);"); + $xml_reponse->script("window.setTimeout('phpfreechat_getnewlog(\'".$chatid."\',\'".$section."\')', 1000);"); return $xml_reponse->getXML(); } $xajax = new xajax("", "phpfreechat_"); Modified: trunk/index.php =================================================================== --- trunk/index.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/index.php 2006-12-21 06:35:09 UTC (rev 909) @@ -6,6 +6,7 @@ $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params["isadmin"] = true; // just for debug ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["debug"] = true; $chat = new phpFreeChat( $params ); ?> @@ -19,8 +20,6 @@ <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> - <?php $chat->printJavascript(); ?> - <?php $chat->printStyle(); ?> </head> <body> Deleted: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/src/client/chat.js.tpl.php 2006-12-21 06:35:09 UTC (rev 909) @@ -1,174 +0,0 @@ -<?php -require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); -$json = new Services_JSON(); -?> -<?php $nick = $u->nick != "" ? $json->encode($u->nick) : $json->encode($c->nick); ?> - -var pfc_nickname = <?php echo ($GLOBALS["output_encoding"]=="UTF-8" ? $nick : iconv("UTF-8", $GLOBALS["output_encoding"],$nick)); ?>; -var pfc_nickid = <?php echo $json->encode($u->nickid); ?>; -var pfc_version = <?php echo $json->encode($version); ?>; -var pfc_clientid = <?php echo $json->encode(md5(uniqid(rand(), true))); ?>; -var pfc_title = <?php echo $json->encode($title); ?>; -var pfc_refresh_delay = <?php echo $json->encode($refresh_delay); ?>; -var pfc_max_refresh_delay = <?php echo $json->encode($max_refresh_delay); ?>; -var pfc_start_minimized = <?php echo $json->encode($start_minimized); ?>; -var pfc_nickmarker = <?php echo $json->encode($nickmarker); ?>; -var pfc_clock = <?php echo $json->encode($clock); ?>; -var pfc_startwithsound = <?php echo $json->encode($startwithsound); ?>; -var pfc_showsmileys = <?php echo $json->encode($showsmileys); ?>; -var pfc_showwhosonline = <?php echo $json->encode($showwhosonline); ?>; -var pfc_focus_on_connect = <?php echo $json->encode($focus_on_connect); ?>; -var pfc_max_text_len = <?php echo $json->encode($max_text_len); ?>; -var pfc_max_displayed_lines = <?php echo $json->encode($max_displayed_lines); ?>; -var pfc_quit_on_closedwindow = <?php echo $json->encode($quit_on_closedwindow); ?>; -var pfc_debug = <?php echo $json->encode($debug); ?>; -var pfc_btn_sh_smileys = <?php echo $json->encode($btn_sh_smileys); ?>; -var pfc_btn_sh_whosonline = <?php echo $json->encode($btn_sh_whosonline); ?>; -var pfc_displaytabimage = <?php echo $json->encode($displaytabimage); ?>; -var pfc_displaytabclosebutton = <?php echo $json->encode($displaytabclosebutton); ?>; -var pfc_connect_at_startup = <?php echo $json->encode($connect_at_startup); ?>; -var pfc_notify_window = <?php echo $json->encode($notify_window); ?>; -var pfc_defaultchan = <?php echo $json->encode($c->channels); ?>; -var pfc_userchan = <?php $list = array(); foreach($u->channels as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>; -var pfc_defaultprivmsg = <?php echo $json->encode($c->privmsg); ?>; -var pfc_userprivmsg = <?php $list = array(); foreach($u->privmsg as $item) {$list[] = $item["name"];} echo $json->encode($list); ?>; -var pfc_openlinknewwindow = <?php echo $json->encode($openlinknewwindow); ?>; -var pfc_bbcode_color_list = <?php $list = array(); foreach($bbcode_colorlist as $v) {$list[] = substr($v,1);} echo $json->encode($list); ?>; -var pfc_nickname_color_list = <?php echo $json->encode($nickname_colorlist); ?>; -var pfc_proxy_url = '<?php echo $data_public_url."/".$serverid."/proxy.php"; ?>'; - - -// create our client which will do all the work on the client side ! -var pfc = new pfcClient(); -<?php - -$labels_to_load = -array( "Do you really want to leave this room ?", // _pfc - "Hide nickname marker", // _pfc - "Show nickname marker", // _pfc - "Hide dates and hours", // _pfc - "Show dates and hours", // _pfc - "Disconnect", // _pfc - "Connect", // _pfc - "Magnify", // _pfc - "Cut down", // _pfc - "Hide smiley box", // _pfc - "Show smiley box", // _pfc - "Hide online users box", // _pfc - "Show online users box", // _pfc - "Please enter your nickname", // _pfc - "Private message", // _pfc - "Close this tab", // _pfc - "Enter your message here", // _pfc - "Enter your nickname here", // _pfc - "Bold", // _pfc - "Italics", // _pfc - "Underline", // _pfc - "Delete", // _pfc - "Mail", // _pfc - "Color", // _pfc - "PHP FREE CHAT [powered by phpFreeChat-%s]", // _pfc - "Enter the text to format", // _pfc - "Configuration has been rehashed", // _pfc - "A problem occurs during rehash", // _pfc - "Choosen nickname is allready used", // _pfc - "phpfreechat current version is %s", // _pfc - "Maximum number of joined channels has been reached", // _pfc - "Maximum number of private chat has been reached", // _pfc - "Click here to send your message", // _pfc - "Send", // _pfc - "You are not allowed to speak to yourself", // _pfc - "Close", // _pfc - "Choosen nickname is not allowed", // _pfc - "Enable sound notifications", // _pfc - "Disable sound notifications", // _pfc - ); -foreach($labels_to_load as $l) -{ - echo "pfc.res.setLabel(".$json->encode($l).",".$json->encode(_pfc2($l)).");\n"; -} - -$fileurl_to_load = -array( 'images/ch.gif', - 'images/pv.gif', - 'images/tab_remove.gif', - 'images/ch-active.gif', - 'images/pv-active.gif', - 'images/user.gif', - 'images/user-me.gif', - 'images/color-on.gif', - 'images/color-off.gif', - 'images/clock-on.gif', - 'images/clock-off.gif', - 'images/logout.gif', - 'images/login.gif', - 'images/maximize.gif', - 'images/minimize.gif', - 'images/smiley-on.gif', - 'images/smiley-off.gif', - 'images/online-on.gif', - 'images/online-off.gif', - 'images/bt_strong.gif', - 'images/bt_em.gif', - 'images/bt_ins.gif', - 'images/bt_del.gif', - 'images/bt_mail.gif', - 'images/bt_color.gif', - 'images/color_transparent.gif', - 'images/close-whoisbox.gif', - 'images/openpv.gif', - 'images/user-admin.gif', - 'images/sound-on.gif', - 'images/sound-off.gif', - 'sound.swf', - ); - -foreach($fileurl_to_load as $f) -{ - echo "pfc.res.setFileUrl(".$json->encode($f).",pfc_proxy_url+'".$c->getFileUrlByProxy($f,false)."');\n"; -} - -foreach($smileys as $s_file => $s_str) { - for($j = 0; $j<count($s_str) ; $j++) { - echo "pfc.res.setSmiley(".$json->encode($s_str[$j]).",pfc_proxy_url+'".$c->getFileUrlByProxy($s_file,false)."');\n"; - } -} - -?> -pfc.gui.buildChat(); -pfc.connectListener(); -pfc.refreshGUI(); -if (pfc_connect_at_startup) pfc.connect_disconnect(); - -<?php if ($debugxajax) { ?> -xajax.DebugMessage = function(text) -{ - var s = new String(text); - text = s.escapeHTML(); - rx = new RegExp('<','g'); - text = text.replace(rx, '\n<'); - $('pfc_debugxajax').innerHTML += '\n---------------\n' + text; -} -<?php } ?> - -<?php if ($debug) { ?> -var pfc_debug_color = true; -function trace(text) { - var s = new String(text); - text = s.escapeHTML(); - rx = new RegExp('<','g'); - text = text.replace(rx, '\n<'); - var color = ''; - if (pfc_debug_color) - { - color = '#BBB'; - pfc_debug_color = false; - } - else - { - color = '#DDD'; - pfc_debug_color = true; - } - $('pfc_debug').innerHTML = '<p style="margin:0;border-bottom:1px solid #555;background-color:'+color+'">' + text + '</p>' + $('pfc_debug').innerHTML ; -} -<?php } ?> Deleted: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-12-21 06:34:20 UTC (rev 908) +++ trunk/src/client/pfcclient.js 2006-12-21 06:35:09 UTC (rev 909) @@ -1,1736 +0,0 @@ -var is_ie = navigator.appName.match("Explorer"); -var is_khtml = navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML"); -var is_ff = navigator.appName.match("Netscape"); - -/** - * This class is the client part of phpFreeChat - * (depends on prototype library) - * @author Stephane Gully - */ -var pfcClient = Class.create(); - -//defining the rest of the class implmentation -pfcClient.prototype = { - - initialize: function() - { - // load the graphical user interface builder - this.gui = new pfcGui(); - // load the resources manager (labels and urls) - this.res = new pfcResource(); - - this.nickname = pfc_nickname; - this.nickid = pfc_nickid; - this.usermeta = $H(); - this.chanmeta = $H(); - this.nickwhoisbox = $H(); - - // this array contains all the sent command - // used the up and down key to navigate in the history - // (doesn't work on IE6) - this.cmdhistory = Array(); - this.cmdhistoryid = -1; - this.cmdhistoryissearching = false; - - /* - this.channels = Array(); - this.channelids = Array(); - */ - this.privmsgs = Array(); - this.privmsgids = Array(); - - this.timeout = null; - this.refresh_delay = pfc_refresh_delay; - this.max_refresh_delay = pfc_max_refresh_delay; - this.last_refresh_time = 0; - /* unique client id for each windows used to identify a open window - * this id is passed every time the JS communicate with server - * (2 clients can use the same session: then only the nickname is shared) */ - this.clientid = pfc_clientid; - - this.isconnected = false; - this.nicklist = $H(); - this.nickcolor = Array(); - this.colorlist = Array(); - - this.blinktmp = Array(); - this.blinkloop = Array(); - this.blinktimeout = Array(); - }, - - connectListener: function() - { - this.el_words = $('pfc_words'); - this.el_handle = $('pfc_handle'); - this.el_container = $('pfc_container'); -// this.el_online = $('pfc_online'); - this.el_errors = $('pfc_errors'); - - this.detectactivity = new DetectActivity(this.el_container); - // restore the window title when user come back to the active zone - if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow.bindAsEventListener(this.gui); - - /* the events callbacks */ - this.el_words.onkeypress = this.callbackWords_OnKeypress.bindAsEventListener(this); -// don't use this line because when doing completeNick the "return false" doesn't work (focus is lost) -// Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); - Event.observe(this.el_words, 'keydown', this.callbackWords_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_words, 'focus', this.callbackWords_OnFocus.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'keydown', this.callbackHandle_OnKeydown.bindAsEventListener(this), false); - Event.observe(this.el_handle, 'change', this.callbackHandle_OnChange.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mousemove', this.callbackContainer_OnMousemove.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mousedown', this.callbackContainer_OnMousedown.bindAsEventListener(this), false); - Event.observe(this.el_container, 'mouseup', this.callbackContainer_OnMouseup.bindAsEventListener(this), false); - Event.observe(document.body, 'unload', this.callback_OnUnload.bindAsEventListener(this), false); - }, - - refreshGUI: function() - { - this.minmax_status = pfc_start_minimized; - var cookie = getCookie('pfc_minmax_status'); - if (cookie != null) - this.minmax_status = (cookie == 'true'); - - cookie = getCookie('pfc_nickmarker'); - this.nickmarker = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.nickmarker = pfc_nickmarker; - - cookie = getCookie('pfc_clock'); - this.clock = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.clock = pfc_clock; - - cookie = getCookie('pfc_showsmileys'); - this.showsmileys = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showsmileys = pfc_showsmileys; - - cookie = getCookie('pfc_showwhosonline'); - this.showwhosonline = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.showwhosonline = pfc_showwhosonline; - - // '' means no forced color, let CSS choose the text color - this.current_text_color = ''; - cookie = getCookie('pfc_current_text_color'); - if (cookie != null) - this.switch_text_color(cookie); - - cookie = getCookie('pfc_issoundenable'); - this.issoundenable = (cookie == 'true'); - if (cookie == '' || cookie == null) - this.issoundenable = pfc_startwithsound; - - this.refresh_loginlogout(); - this.refresh_minimize_maximize(); - this.refresh_Smileys(); - this.refresh_sound(); - this.refresh_nickmarker(); - }, - - /** - * Show a popup dialog to ask user to choose a nickname - */ - askNick: function(nickname) - { - // ask to choose a nickname - if (nickname == '') nickname = this.nickname; - var newnick = prompt(this.res.getLabel('Please enter your nickname'), nickname); - if (newnick) - this.sendRequest('/nick "'+newnick+'"'); - }, - - /** - * Reacte to the server response - */ - handleResponse: function(cmd, resp, param) - { - if (pfc_debug) - if (cmd != "update") trace('handleResponse: '+cmd + "-"+resp+"-"+param); - if (cmd == "connect") - { - //alert(cmd + "-"+resp+"-"+param); - if (resp == "ok") - { - if (this.nickname == '') - // ask to choose a nickname - this.askNick(this.nickname); - else - { - this.sendRequest('/nick "'+this.nickname+'"'); - } - - // give focus the the input text box if wanted - if (pfc_focus_on_connect) this.el_words.focus(); - - this.isconnected = true; - - // start the polling system - this.updateChat(true); - } - else - this.isconnected = false; - this.refresh_loginlogout(); - } - else if (cmd == "quit") - { - if (resp =="ok") - { - // stop updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - } - else if (cmd == "join" || cmd == "join2") - { - if (resp =="ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "ch"); - if (cmd != "join2") this.gui.setTabById(tabid); - this.refresh_Smileys(); - this.refresh_WhosOnline(); - } - else if (resp == "max_channels") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of joined channels has been reached') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "leave") - { - //alert(cmd + "-"+resp+"-"+param); - if (resp =="ok") - { - // remove the channel - var tabid = param; - this.gui.removeTabById(tabid); - - // synchronize the channel client arrays - /* - var index = -1; - index = this.channelids.indexOf(tabid); - this.channelids = this.channelids.without(tabid); - this.channels = this.channels.without(this.channels[index]); - */ - - // synchronize the privmsg client arrays - index = -1; - index = indexOf(this.privmsgids, tabid); - this.privmsgids = without(this.privmsgids, tabid); - this.privmsgs = without(this.privmsgs, this.privmsgs[index]); - - } - } - else if (cmd == "privmsg" || cmd == "privmsg2") - { - if (resp == "ok") - { - // create the new channel - var tabid = param[0]; - var name = param[1]; - this.gui.createTab(name, tabid, "pv"); - if (cmd != "privmsg2") this.gui.setTabById(tabid); - - this.privmsgs.push(name); - this.privmsgids.push(tabid); - - } - else if (resp == "max_privmsg") - { - this.displayMsg( cmd, this.res.getLabel('Maximum number of private chat has been reached') ); - } - else if (resp == "unknown") - { - // speak to unknown user - } - else if (resp == "speak_to_myself") - { - this.displayMsg( cmd, this.res.getLabel('You are not allowed to speak to yourself') ); - } - else - alert(cmd + "-"+resp+"-"+param); - } - else if (cmd == "nick") - { - if (resp == "connected" || resp == "notchanged") - { - cmd = ''; - - // join the default channels comming from the parameter list - for (var i=0; i<pfc_defaultchan.length; i++) - { - if (i<pfc_defaultchan.length-1) - cmd = '/join2'; - else - cmd = '/join'; - cmd += ' "'+pfc_defaultchan[i]+'"'; - this.sendRequest(cmd); - } - // now join channels comming from sessions - for (var i=0; i<pfc_userchan.length; i++) - { - if (i<pfc_userchan.length-1) - cmd = '/join2'; - else - cmd = '/join'; - cmd += ' "'+pfc_userchan[i]+'"'; - this.sendRequest(cmd); - } - - // join the default privmsg comming from the parameter list - for (var i=0; i<pfc_defaultprivmsg.length; i++) - { - if (i<pfc_defaultprivmsg.length-1) - cmd = '/privmsg2'; - else - cmd = '/privmsg'; - cmd += ' "'+pfc_defaultprivmsg[i]+'"'; - this.sendRequest(cmd); - } - // now join privmsg comming from the sessions - for (var i=0; i<pfc_userprivmsg.length; i++) - { - this.sendRequest('/privmsg "'+pfc_userprivmsg[i]+'"'); - } - } - - if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") - { - this.el_handle.innerHTML = param; - this.nickname = param; - this.usermeta[this.nickid]['nick'] = param; - this.updateNickBox(this.nickid); - - // clear the possible error box generated by the bellow displayMsg(...) function - this.clearError(Array(this.el_words)); - } - else if (resp == "isused") - { - this.setError(this.res.getLabel('Choosen nickname is allready used'), Array()); - this.askNick(param); - } - else if (resp == "notallowed") - { - // when frozen_nick is true and the nickname is allready used, server will return - // the 'notallowed' status. It will display a message and stop chat update. - // if the chat update is not stopped, this will loop forever - // as long as the forced nickname is not changed - - // display a message - this.setError(this.res.getLabel('Choosen nickname is not allowed'), Array()); - // then stop chat updates - this.updateChat(false); - this.isconnected = false; - this.refresh_loginlogout(); - } - - } - else if (cmd == "update") - { - this.canupdatenexttime = true; - // if the first ever refresh request never makes it back then the chat will keep - // trying to refresh as usual - // this only helps if we temporarily lose connection in the middle of an established - // chat session - this.last_refresh_time = new Date().getTime(); - } - else if (cmd == "version") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('phpfreechat current version is %s',param) ); - } - } - else if (cmd == "help") - { - if (resp == "ok") - { - this.displayMsg( cmd, param); - } - } - else if (cmd == "rehash") - { - if (resp == "ok") - { - this.displayMsg( cmd, this.res.getLabel('Configuration has been rehashed') ); - } - else if (resp == "ko") - { - this.displayMsg( cmd, this.res.getLabel('A problem occurs during rehash') ); - } - } - else if (cmd == "banlist") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "unban") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "auth") - { - if (resp == "ban") - { - alert(param); - } - if (resp == "frozen") - { - alert(param); - } - else if (resp == "nick") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "debug") - { - if (resp == "ok" || resp == "ko") - { - this.displayMsg( cmd, param ); - } - } - else if (cmd == "clear") - { - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - container.innerHTML = ""; - } - else if (cmd == "identify") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "checknickchange") - { - this.displayMsg( cmd, param ); - } - else if (cmd == "whois" || cmd == "whois2") - { - var nickid = param['nickid']; - if (resp == "ok") - { - this.usermeta[nickid] = $H(param); - this.updateNickBox(nickid); - this.updateNickWhoisBox(nickid); - } - if (cmd == "whois") - { - // display the whois info - var um = this.getAllUserMeta(nickid); - var um_keys = um.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = um[k]; - if (v && - // these parameter are used internaly (don't display it) - k != 'nickid' && - k != 'floodtime' && - k != 'flood_nbmsg' && - k != 'flood_nbchar') - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "who" || cmd == "who2") - { - var chan = param['chan']; - var chanid = param['chanid']; - var meta = $H(param['meta']); - if (resp == "ok") - { - this.chanmeta[chanid] = meta; - - // send /whois commands for unknown users - for (var i=0; i<meta['users']['nickid'].length; i++) - { - var nickid = meta['users']['nickid'][i]; - var nick = meta['users']['nick'][i]; - var um = this.getAllUserMeta(nickid); - if (!um) this.sendRequest('/whois2 "'+nick+'"'); - } - - // update the nick list display on the current channel - this.updateNickListBox(chanid); - } - if (cmd == "who") - { - // display the whois info - var cm = this.getAllChanMeta(chanid); - var cm_keys = cm.keys(); - var msg = ''; - for (var i=0; i<cm_keys.length; i++) - { - var k = cm_keys[i]; - var v = cm[k]; - if (k != 'users') - { - msg = msg + '<strong>' + k + '</strong>: ' + v + '<br/>'; - } - } - this.displayMsg( cmd, msg ); - } - } - else if (cmd == "getnewmsg") - { - if (resp == "ok") - { - this.handleComingRequest(param); - } - } - else - alert(cmd + "-"+resp+"-"+param); - }, - - getAllUserMeta: function(nickid) - { - if (nickid && this.usermeta[nickid]) - return this.usermeta[nickid]; - else - return null; - }, - - getUserMeta: function(nickid, key) - { - if (nickid && key && this.usermeta[nickid] && this.usermeta[nickid][key]) - return this.usermeta[nickid][key]; - else - return ''; - }, - - getAllChanMeta: function(chanid) - { - if (chanid && this.chanmeta[chanid]) - return this.chanmeta[chanid]; - else - return null; - }, - - getChanMeta: function(chanid, key) - { - if (chanid && key && this.chanmeta[chanid] && this.chanmeta[chanid][key]) - return this.chanmeta[chanid][key]; - else - return ''; - }, - - doSendMessage: function() - { - var w = this.el_words; - var wval = w.value; - - // append the string to the history - this.cmdhistory.push(wval); - this.cmdhistoryid = this.cmdhistory.length; - this.cmdhistoryissearching = false; - - // send the string to the server - re = new RegExp("^(\/[a-zA-Z0-9]+)( (.*)|)"); - if (wval.match(re)) - { - // a user command - cmd = wval.replace(re, '$1'); - param = wval.replace(re, '$3'); - this.sendRequest(cmd +' '+ param.substr(0, pfc_max_text_len + 2*this.clientid.length)); - } - else - { - // a classic 'send' command - - // empty messages with only spaces - rx = new RegExp('^[ ]*$','g'); - wval = wval.replace(rx,''); - - // truncate the text length - wval = wval.substr(0,pfc_max_text_len); - - // colorize the text with current_text_color - if (this.current_text_color != '' && wval.length != '') - wval = '[color=#' + this.current_text_color + '] ' + wval + ' [/color]'; - - this.sendRequest('/send '+ wval); - } - w.value = ''; - return false; - }, - - /** - * Try to complete a nickname like on IRC when pressing the TAB key - * @todo: improve the algorithme, it should take into account the cursor position - */ - completeNick: function() - { - var w = this.el_words; - var nick_src = w.value.substring(w.value.lastIndexOf(' ')+1,w.value.length); - if (nick_src != '') - { - var tabid = this.gui.getTabId(); - var n_list = this.chanmeta[tabid]['users']['nick']; - for (var i=0; i<n_list.length; i++) - { - var nick = n_list[i]; - if (nick.indexOf(nick_src) == 0) - w.value = w.value.replace(nick_src, nick); - } - } - }, - - /** - * Handle the pressed keys - * see also callbackWords_OnKeydown - */ - callbackWords_OnKeypress: function(evt) - { - var code = (evt.which) ? evt.which : evt.keyCode; - if (code == Event.KEY_TAB) /* tab key */ - { - /* FF & Konqueror workaround : ignore TAB key here */ - /* do the nickname completion work like on IRC */ - this.completeNick(); - return false; /* do not leave the tab key default behavior */ - } - else if (code == Event.KEY_RETURN) /* enter key */ - { - return this.doSendMessage(); - } - else if (code == 33 && false) // page up key - { - // write the last command in the history - if (this.cmdhistory.length>0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid-1; - if (this.cmdhistoryid<0) this.cmdhistoryid = this.cmdhistory.length-1; - w.value = this.cmdhistory[this.cmdhistoryid]; - } - } - else if (code == 34 && false) // page down key - { - // write the next command in the history - if (this.cmdhistory.length>0) - { - var w = this.el_words; - if (this.cmdhistoryissearching == false && w.value != "") - this.cmdhistory.push(w.value); - this.cmdhistoryissearching = true; - this.cmdhistoryid = this.cmdhistoryid+1; - if (this.cmdhistoryid>=this.cmdhistory.length) this.cmdhistoryid = 0; - w.value = this.cmdhistory[this.cmdhistoryid]; - } - } - else - { - /* allow other keys */ - return true; - } - }, - /** - * Handle the pressed keys - * see also callbackWords_OnKeypress - */ - callbackWords_OnKeydown: function(evt) - { - if (!this.isconnected) return false; - this.clearError(Array(this.el_words)); - var code = (evt.which) ? evt.which : evt.keyCode - if (code == 9) /* tab key */ - { - /* IE workaround : ignore TAB key here */ - /* do the nickname completion work like on IRC */ - this.completeNick(); - return false; /* do not leave the tab key default behavior */ - } - else - { - return true; - } - }, - callbackWords_OnFocus: function(evt) - { - // if (this.el_handle && this.el_handle.value == '' && !this.minmax_status) - // this.el_handle.focus(); - }, - callbackHandle_OnKeydown: function(evt) - { - }, - callbackHandle_OnChange: function(evt) - { - }, - callback_OnUnload: function(evt) - { - /* don't disconnect users when they reload the window - * this event doesn't only occurs when the page is closed but also when the page is reloaded */ - if (pfc_quit_on_closedwindow) - { - if (!this.isconnected) return false; - this.sendRequest('/quit'); - } - }, - - callbackContainer_OnMousemove: function(evt) - { - this.isdraging = true; - }, - callbackContainer_OnMousedown: function(evt) - { - if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) - this.isdraging = false; - }, - callbackContainer_OnMouseup: function(evt) - { - if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) - if (!this.isdraging) - if (this.el_words && !this.minmax_status) - this.el_words.focus(); - }, - - /** - * hide error area and stop blinking fields - */ - clearError: function(ids) - { - this.el_errors.style.display = 'none'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'stop'); - }, - - /** - * show error area and assign to it an error message and start the blinking of given fields - */ - setError: function(str, ids) - { - this.el_errors.innerHTML = str; - this.el_errors.style.display = 'block'; - for (var i=0; i<ids.length; i++) - this.blink(ids[i].id, 'start'); - }, - - /** - * blink routines used by Error functions - */ - blink: function(id, action) - { - clearTimeout(this.blinktimeout[id]); - if ($(id) == null) return; - if (action == 'start') - { - this.blinktmp[id] = $(id).style.backgroundColor; - clearTimeout(this.blinktimeout[id]); - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - if (action == 'stop') - { - $(id).style.backgroundColor = this.blinktmp[id]; - } - if (action == 'loop') - { - if (this.blinkloop[id] == 1) - { - $(id).style.backgroundColor = '#FFDFC0'; - this.blinkloop[id] = 2; - } - else - { - $(id).style.backgroundColor = '#FFFFFF'; - this.blinkloop[id] = 1; - } - this.blinktimeout[id] = setTimeout('pfc.blink(\'' + id + '\',\'loop\')', 500); - } - }, - - displayMsg: function( cmd, msg ) - { - this.setError(msg, Array()); - - // @todo find a better crossbrowser way to display messages -/* - // get the current selected tab container - var tabid = this.gui.getTabId(); - var container = this.gui.getChatContentFromTabId(tabid); - - // to fix IE6 display bug - // http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 - div = document.createElement('div'); - // div.style.padding = "2px 5px 2px 5px"; // this will clear the screen in IE6 - div.innerHTML = '<div class="pfc_info pfc_info_'+cmd+'" style="margin:5px">'+msg+'</div>'; - - // finaly append this to the message list - container.appendChild(div); - this.gui.scrollDown(tabid, div); -*/ - }, - - handleComingRequest: function( cmds ) - { - var msg_html = $H(); - var max_msgid = $H(); - - //alert(cmds.inspect()); - - // var html = ''; - for(var mid = 0; mid < cmds.length ; mid++) - { - var id = cmds[mid][0]; - var date = cmds[mid][1]; - var time = cmds[mid][2]; - var sender = cmds[mid][3]; - var recipientid = cmds[mid][4]; - var cmd = cmds[mid][5]; - var param = cmds[mid][6]; - var fromtoday = cmds[mid][7]; - var oldmsg = cmds[mid][8]; - - // format and post message - var line = ''; - line += '<div id="pfc_msg_'+recipientid+'_'+id+'" class="pfc_cmd_'+ cmd +' pfc_message'; - line += (id % 2 == 0) ? ' pfc_evenmsg' : ' pfc_oddmsg'; - if (oldmsg == 1) line += ' pfc_oldmsg'; - line += '">'; - line += '<span class="pfc_date'; - if (fromtoday == 1) line += ' pfc_invisible'; - line += '">'+ date +'</span> '; - line += '<span class="pfc_heure">'+ time +'</span> '; - if (cmd == 'send') - { - line += ' <span class="pfc_nick">'; - line += '‹'; - line += '<span '; - line += 'onclick="pfc.insert_text(\'' + sender.replace("'", '\\\'') + ', \',\'\',false)" '; - line += 'class="pfc_nickmarker pfc_nick_'+ hex_md5(_to_utf8(sender)) +'">'; - line += sender; - line += '</span>'; - line += '›'; - line += '</span> '; - } - if (cmd == 'notice' || cmd == 'me') - line += '<span class="pfc_words">* '+ this.parseMessage(param) +'</span> '; - else - line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> '; - line += '</div>'; - - if (oldmsg == 0) - if (cmd == 'send' || cmd == 'me') - { - // notify the hidden tab a message has been received - // don't notify anything if this is old messages - var tabid = recipientid; - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); - // notify the window (change the title) - if (!this.detectactivity.isActive() && pfc_notify_window) - this.gui.notifyWindow(); - } - - if (msg_html[recipientid] == null) - msg_html[recipientid] = line; - else - msg_html[recipientid] += line; - - // remember the max message id in order to clean old lines - if (!max_msgid[recipientid]) max_msgid[recipientid] = 0; - if (max_msgid[recipientid] < id) max_msgid[recipientid] = id; - } - - // loop on all recipients and post messages - var keys = msg_html.keys(); - for( var i=0; i<keys.length; i++) - { - var recipientid = keys[i]; - var tabid = recipientid; - - // create the tab if it doesn't exists yet - var recipientdiv = this.gui.getChatContentFromTabId(tabid); - - // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('div'); - m.innerHTML = msg_html[recipientid]; - this.colorizeNicks(m); - this.refresh_clock(m); - // finaly append this to the message list - recipientdiv.appendChild(m); - this.gui.scrollDown(tabid, m); - - // delete the old messages from the client (save some memory) - var limit_msgid = max_msgid[recipientid] - pfc_max_displayed_lines; - var elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - while (elt) - { - // delete this element to save browser memory - if (is_ff) - elt.innerHTML = ''; - else - // this code don't work in FF, why ? don't know .. - elt.parentElement.removeChild(elt); - limit_msgid--; - elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); - } - } - - }, - - /** - * Call the ajax request function - * Will query the server - */ - sendRequest: function(cmd) - { - if (pfc_debug) - if (cmd != "/update") trace('sendRequest: '+cmd); - var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); - var recipientid = this.gui.getTabId(); - cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); - return eval('pfc_handleRequest(cmd);'); - }, - - /** - * update function to poll the server each 'refresh_delay' time - */ - updateChat: function(start) - { - clearTimeout(this.timeout); - if (start) - { - var res = true; - if (this.canupdatenexttime || (new Date().getTime() - this.last_refresh_time) > this.max_refresh_delay) - { - res = this.sendRequest('/update'); - this.canupdatenexttime = false; // don't update since the 'ok' response is received - } - // adjust the refresh_delay if the connection was lost - if (res == false) { - this.refresh_delay = this.refresh_delay * 2; - if(this.refresh_delay > this.max_refresh_delay) - { - this.refresh_delay = this.max_refresh_delay; - } - } - // setup the next update - this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); - } - }, - - /** - * insert a smiley - */ - insertSmiley: function(s) - { - this.el_words.value += s; - this.el_words.focus(); - }, - - updateNickBox: function(nickid) - { - // @todo optimize this function because it is called lot of times so it could cause CPU consuming on client side - var chanids = this.chanmeta.keys(); - for(var i = 0; chanids.length > i; i++) - { - this.updateNickListBox(chanids[i]); - } - }, - - /** - * fill the nickname list with connected nicknames - */ - updateNickListBox: function(chanid) - { - var nickidlst = this.chanmeta[chanid]['users']['nickid']; - var nickdiv = this.gui.getOnlineContentFromTabId(chanid).firstChild; - var ul = document.createElement('ul'); - ul.setAttribute('class', 'pfc_nicklist'); - ul.setAttribute('className', 'pfc_nicklist'); // IE6 - for (var i=0; i<nickidlst.length; i++) - { - var nickid = nickidlst[i]; - var li = this.buildNickItem(nickid); - li.setAttribute('class', 'pfc_nickitem_'+nickid); - li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE6 - ul.appendChild(li); - } - var fc = nickdiv.firstChild; - if (fc) - nickdiv.replaceChild(ul,fc); - else - nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); - }, - - getNickWhoisBox: function(nickid) - { - if (!this.nickwhoisbox[nickid]) - this.updateNickWhoisBox(nickid); - return this.nickwhoisbox[nickid]; - }, - - updateNickWhoisBox: function(nickid) - { - var div = document.createElement('div'); - div.setAttribute('class', 'pfc_nickwhois'); - div.setAttribute('className', 'pfc_nickwhois'); // for IE6 - - var ul = document.createElement('ul'); - div.appendChild(ul); - - // add the close button - var li = document.createElement('li'); - li.setAttribute('class', 'pfc_nickwhois_close'); - li.setAttribute('className', 'pfc_nickwhois_close'); // for IE6 - ul.appendChild(li); - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_parent = div; - a.onclick = function(evt){ - this.pfc_parent.style.display = 'none'; - return false; - } - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/close-whoisbox.gif')); - img.alt = document.createTextNode(this.res.getLabel('Close')); - a.appendChild(img); - li.appendChild(a); - - // add the privmsg link (do not add it if this button is yourself) - if (pfc.getUserMeta(nickid,'nick') != this.nickname) - { - var li = document.createElement('li'); - li.setAttribute('class', 'pfc_nickwhois_pv'); - li.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6 - ul.appendChild(li); - var a = document.createElement('a'); - a.setAttribute('href', ''); - a.pfc_nickid = nickid; - a.pfc_parent = div; - a.onclick = function(evt){ - var nick = pfc.getUserMeta(this.pfc_nickid,'nick'); - pfc.sendRequest('/privmsg "'+nick+'"'); - this.pfc_parent.style.display = 'none'; - return false; - } - var img = document.createElement('img'); - img.setAttribute('src', this.res.getFileUrl('images/openpv.gif')); - img.alt = document.createTextNode(this.res.getLabel('Private message')); - a.appendChild(img); - a.appendChild(document.createTextNode(this.res.getLabel('Private message'))); - li.appendChild(a); - } - - - // add the whois information table - var table = document.createElement('table'); -// table.setAttribute('cellspacing',0); -// table.setAttribute('cellpadding',0); -// table.setAttribute('border',0); - var tbody = document.createElement('tbody'); - table.appendChild(tbody); - var um = this.getAllUserMeta(nickid); - var um_keys = um.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = um[k]; - if (v && k != 'nickid' - && k != 'isadmin' // useless because of the gold shield icon - && k != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - ) - { - var tr = document.createElement('tr'); - var td1 = document.createElement('td'); - td1.setAttribute('class', 'pfc_nickwhois_c1'); - td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6 - var td2 = document.createElement('td'); - td2.setAttribute('class', 'pfc_nickwhois_c2'); - td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6 - td1.appendChild(document.createTextNode(k)); - td2.appendChild(document.createTextNode(v)); - tr.appendChild(td1); - tr.appendChild(td2); - tbody.appendChild(tr); - } - } - div.appendChild(table); - - this.nickwhoisbox[nickid] = div; - }, - - buildNickItem: function(nickid) - { - var nick = this.getUserMeta(nickid, 'nick'); - var isadmin = this.getUserMeta(nickid, 'isadmin'); - if (isadmin == '') isadmin = false; - - var li = document.createElement('li'); - li.style.borderBottom = '1px solid #AAA'; - - var a = document.createElement('a'); - a.setAttribute('href','#'); - a.pfc_nick = nick; - a.pfc_nickid = nickid; - a.onclick = function(evt){ - var d = pfc.getNickWhoisBox(this.pfc_nickid); - document.body.appendChild(d); - d.style.display = 'block'; - d.style.zIndex = '400'; - d.style.position = 'absolute'; - d.style.left = (mousePosX(evt)-5)+'px'; - d.style.top = (mousePosY(evt)-5)+'px'; - return false; - } - li.appendChild(a); - - - var img = document.createElement('img'); - if (isadmin) - img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); - else - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.style.marginRight = '5px'; - img.setAttribute('class', 'pfc_nickbutton'); - img.setAttribute('className', 'pfc_nickbutton'); // for IE6 - a.appendChild(img); - - // nobr is not xhtml valid but it's a workeround - // for IE which doesn't support 'white-space: pre' css rule - var nobr = document.createElement('nobr'); - var span = document.createElement('span'); - span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); - span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE6 - span.appendChild(document.createTextNode(nick)); - nobr.appendChild(span); - a.appendChild(nobr); - - return li; - }, - - /** - * clear the nickname list - */ - clearNickList: function() - { - /* - var nickdiv = this.el_online; - var fc = nickdiv.firstChild; - if (fc) nickdiv.removeChild(fc); - */ - }, - - - /** - * clear the message list history - */ - clearMessages: function() - { - //var msgdiv = $('pfc_chat'); - //msgdiv.innerHTML = ''; - }, - - /** - * parse the message - */ - parseMessage: function(msg) - { - var rx = null; - - // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\~\\/\\?\\=\\&\\-\\_\\#:;%]*)([^\\"]|$)','ig'); - var ttt = msg.split(rx_url); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - var offset = (ttt[i].length - 7) / 2; - var delta = (ttt[i].length - 7 - 60); - var range1 = 7+offset-delta; - var range2 = 7+offset+delta; - if (ttt[i].match(rx_url)) - { - msg = msg + '<a href="' + ttt[i] + '"'; - if (pfc_openlinknewwindow) - msg = msg + ' onclick="window.open(this.href,\'_blank\');return false;"'; - msg = msg + '>' + (delta>0 ? ttt[i].substring(7,range1)+ ' ... ' + ttt[i].substring(range2,ttt[i].length) : ttt[i]) + '</a>'; - } - else - { - msg = msg + ttt[i]; - } - } - } - else - { - // fallback for IE6/Konqueror which do not support split with regexp - replace = '$1<a href="$2"'; - if (pfc_openlinknewwindow) - replace = replace + ' onclick="window.open(this.href,\'_blank\');return false;"'; - replace = replace + '>$2</a>$3'; - msg = msg.replace(rx_url, replace); - } - - // replace double spaces by entity - rx = new RegExp(' ','g'); - msg = msg.replace(rx, ' '); - - // try to parse bbcode - rx = new RegExp('\\[b\\](.+?)\\[\/b\\]','ig'); - msg = msg.replace(rx, '<span style="font-weight: bold">$1</span>'); - rx = new RegExp('\\[i\\](.+?)\\[\/i\\]','ig'); - msg = msg.replace(rx, '<span style="font-style: italic">$1</span>'); - rx = new RegExp('\\[u\\](.+?)\\[\/u\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: underline">$1</span>'); - rx = new RegExp('\\[s\\](.+?)\\[\/s\\]','ig'); - msg = msg.replace(rx, '<span style="text-decoration: line-through">$1</span>'); - // rx = new RegExp('\\[pre\\](.+?)\\[\/pre\\]','ig'); - // msg = msg.replace(rx, '<pre>$1</pre>'); - rx = new RegExp('\\[email\\]([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$1</a>'); - rx = new RegExp('\\[email=([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\](.+?)\\[\/email\\]','ig'); - msg = msg.replace(rx, '<a href="mailto: $1">$2</a>'); - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - // parse bbcode colors twice because the current_text_color is a bbcolor - // so it's possible to have a bbcode color imbrication - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); - msg = msg.replace(rx, '<span style="color: $1">$2</span>'); - - // try to parse smileys - var smileys = this.res.getSmileyHash(); - var sl = smileys.keys(); - for(var i = 0; i < sl.length; i++) - { - rx = new RegExp(RegExp.escape(sl[i]),'g'); - msg = msg.replace(rx, '<img src="'+ smileys[sl[i]] +'" alt="' + sl[i] + '" title="' + sl[i] + '" />'); - } - - // try to parse nickname for highlighting - rx = new RegExp('(^|[ :,;])'+RegExp.escape(this.nickname)+'([ :,;]|$)','gi'); - msg = msg.replace(rx, '$1<strong>'+ this.nickname +'</strong>$2'); - - - // this piece of code is replaced by the word-wrap CSS3 rule. - /* - // don't allow to post words bigger than 65 caracteres - // doesn't work with crappy IE and Konqueror ! - rx = new RegExp('([^ \\:\\<\\>\\/\\&\\;]{60})','ig'); - var ttt = msg.split(rx); - if (ttt.length > 1 && - !navigator.appName.match("Explorer|Konqueror") && - !navigator.appVersion.match("KHTML")) - { - msg = ''; - for( var i = 0; i<ttt.length; i++) - { - msg = msg + ttt[i] + ' '; - } - } - */ - return msg; - }, - - /** - * apply nicknames color to the root childs - */ - colorizeNicks: function(root) - { - if (this.nickmarker) - { - var nicklist = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; i < nicklist.length; i++) - { - var cur_nick = nicklist[i].innerHTML; - var cur_color = this.getAndAssignNickColor(cur_nick); - nicklist[i].style.color = cur_color; - } - } - }, - - /** - * Initialize the color array used to colirize the nicknames - */ - reloadColorList: function() - { - this.colorlist = $A(pfc_nickname_color_list); - }, - - - /** - * get the corresponding nickname color - */ - getAndAssignNickColor: function(nick) - { - /* check the nickname is colorized or not */ - var allready_colorized = false; - var nc = ''; - for(var j = 0; j < this.nickcolor.length; j++) - { - if (this.nickcolor[j][0] == nick) - { - allready_colorized = true; - nc = this.nickcolor[j][1]; - } - } - if (!allready_colorized) - { - /* reload the color stack if it's empty */ - if (this.colorlist.length == 0) this.reloadColorList(); - /* take the next color from the list and colorize this nickname */ - var cid = Math.round(Math.random()*(this.colorlist.length-1)); - nc = this.colorlist[cid]; - this.colorlist.splice(cid,1); - this.nickcolor.push(new Array(nick, nc)); - } - - return nc; - }, - - - /** - * Colorize with 'color' all the nicknames found as a 'root' child - */ - applyNickColor: function(root, nick, color) - { - - var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ hex_md5(_to_utf8(nick)), ''); - for(var i = 0; nicktochange.length > i; i++) - nicktochange[i].style.color = color; - - }, - - /** - * Returns a list of elements which have a clsName class - */ - getElementsByClassName: function( root, clsName, clsIgnore ) - { - var i, matches = new Array(); - var els = root.getElementsByTagName('*'); - var rx1 = new RegExp('.*'+clsName+'.*'); - var rx2 = new RegExp('.*'+clsIgnore+'.*'); - for(i=0; i<els.length; i++) { - if(els.item(i).className.match(rx1) && - (clsIgnore == '' || !els.item(i).className.match(rx2)) ) { - matches.push(els.item(i)); - } - } - return matches; - }, - - showClass: function(root, clsName, clsIgnore, show) - { - var elts = this.getElementsByClassName(root, clsName, clsIgnore); - for(var i = 0; elts.length > i; i++) - if (show) - elts[i].style.display = 'inline'; - else - elts[i].style.display = 'none'; - }, - - - /** - * Nickname marker show/hide - */ - nickmarker_swap: function() - { - if (this.nickmarker) { - this.nickmarker = false; - } else { - this.nickmarker = true; - } - this.refresh_nickmarker() - setCookie('pfc_nickmarker', this.nickmarker); - }, - refresh_nickmarker: function(root) - { - var nickmarker_icon = $('pfc_nickmarker'); - if (!root) root = $('pfc_channels_content'); - if (this.nickmarker) - { - nickmarker_icon.src = this.res.getFileUrl('images/color-on.gif'); - nickmarker_icon.alt = this.res.getLabel("Hide nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - this.colorizeNicks(root); - } - else - { - nickmarker_icon.src = this.res.getFileUrl('images/color-off.gif'); - nickmarker_icon.alt = this.res.getLabel("Show nickname marker"); - nickmarker_icon.title = nickmarker_icon.alt; - var elts = this.getElementsByClassName(root, 'pfc_nickmarker', ''); - for(var i = 0; elts.length > i; i++) - { - // this is not supported in konqueror =>>> elts[i].removeAttribute('style'); - elts[i].style.color = ''; - } - } - }, - - - /** - * Date/Hour show/hide - */ - clock_swap: function() - { - if (this.clock) { - this.clock = false; - } else { - this.clock = true; - } - this.refresh_clock(); - setCookie('pfc_clock', this.clock); - }, - refresh_clock: function( root ) - { - var clock_icon = $('pfc_clock'); - if (!root) root = $('pfc_channels_content'); - if (this.clock) - { - clock_icon.src = this.res.getFileUrl('images/clock-on.gif'); - clock_icon.alt = this.res.getLabel('Hide dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', true); - this.showClass(root, 'pfc_heure', 'pfc_invisible', true); - } - else - { - clock_icon.src = this.res.getFileUrl('images/clock-off.gif'); - clock_icon.alt = this.res.getLabel('Show dates and hours'); - clock_icon.title = clock_icon.alt; - this.showClass(root, 'pfc_date', 'pfc_invisible', false); - this.showClass(root, 'pfc_heure', 'pfc_invisible', false); - } - // browser automaticaly scroll up misteriously when showing the dates - // $('pfc_chat').scrollTop += 30; - }, - - /** - * Sound button - */ - sound_swap: function() - { - if (this.issoundenable) { - this.issoundenable = false; - } else { - this.issoundenable = true; - } - this.refresh_sound(); - setCookie('pfc_issoundenable', this.issoundenable); - }, - refresh_sound: function( root ) - { - var snd_icon = $('pfc_sound'); - if (this.issoundenable) - { - snd_icon.src = this.res.getFileUrl('images/sound-on.gif'); - snd_icon.alt = this.res.getLabel('Disable sound notifications'); - snd_icon.title = snd_icon.alt; - } - else - { - snd_icon.src = this.res.getFileUrl('images/sound-off.gif'); - snd_icon.alt = this.res.getLabel('Enable sound notifications'); - snd_icon.title = snd_icon.alt; - } - }, - - /** - * Connect/disconnect button - */ - connect_disconnect: function() - { - if (this.isconnected) - this.sendRequest('/quit'); - else - this.sendRequest('/connect'); - }, - refresh_loginlogout: function() - { - var loginlogout_icon = $('pfc_loginlogout'); - if (this.isconnected) - { - loginlogout_icon.src = this.res.getFileUrl('images/logout.gif'); - loginlogout_icon.alt = this.res.getLabel('Disconnect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - else - { - this.clearMessages(); - this.clearNickList(); - loginlogout_icon.src = this.res.getFileUrl('images/login.gif'); - loginlogout_icon.alt = this.res.getLabel('Connect'); - loginlogout_icon.title = loginlogout_icon.alt; - } - }, - - - - /** - * Minimize/Maximized the chat zone - */ - swap_minimize_maximize: function() - { - if (this.minmax_status) { - this.minmax_status = false; - } else { - this.minmax_status = true; - } - setCookie('pfc_minmax_status', this.minmax_status); - this.refresh_minimize_maximize(); - }, - refresh_minimize_maximize: function() - { - var content = $('pfc_content_expandable'); - var btn = $('pfc_minmax'); - if (this.minmax_status) - { - btn.src = this.res.getFileUrl('images/maximize.gif'); - btn.alt = this.res.getLabel('Magnify'); - btn.title = btn.alt; - content.style.display = 'none'; - } - else - { - btn.src = this.res.getFileUrl('images/minimize.gif'); - btn.alt = this.res.getLabel('Cut down'); - btn.title = btn.alt; - content.style.display = 'block'; - } - }, - - /** - * BBcode ToolBar - */ - insert_text: function(open, close, promptifselempty) - { - var msgfield = $('pfc_words'); - - // IE support - if (document.selection && document.selection.createRange) - { - msgfield.focus(); - sel = document.selection.createRange(); - var text = sel.text; - if (text == "" && promptifselempty) - text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - if (text.length > 0 || !promptifselempty) - { - sel.text = open + text + close; - // @todo move the cursor just after the BBCODE, this doesn't work when the text to enclose is selected, IE6 keeps the whole selection active after the operation. - msgfield.focus(); - } - } - - // Moz support - else if (msgfield.selectionStart || msgfield.selectionStart == '0') - { - var startPos = msgfield.selectionStart; - var endPos = msgfield.selectionEnd; - - var text = msgfield.value.substring(startPos, endPos); - var extralength = 0; - if (startPos == endPos && promptifselempty) - { - text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - extralength = text.length; - } - if (text.length > 0 || !promptifselempty) - { - msgfield.value = msgfield.value.substring(0, startPos) + open + text + close + msgfield.value.substring(endPos, msgfield.value.length); - msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + extralength + close.length; - msgfield.focus(); - } - } - - // Fallback support for other browsers - else - { - var text = prompt(this.res.getLabel('Enter the text to format'),''); - if (text == null) text = ""; - if (text.length > 0 || !promptifselempty) - { - msgfield.value += open + text + close; - msgfield.focus(); - } - } - return; - }, - - /** - * Minimize/Maximize none/inline - */ - minimize_maximize: function(idname, type) - { - var element = $(idname); - if(element.style) - { - if(element.sty... [truncated message content] |
From: <ke...@us...> - 2006-12-29 11:57:58
|
Revision: 910 http://svn.sourceforge.net/phpfreechat/?rev=910&view=rev Author: kerphi Date: 2006-12-29 03:57:52 -0800 (Fri, 29 Dec 2006) Log Message: ----------- fix the loadBBCodeColorList function Modified Paths: -------------- trunk/data/public/js/pfcgui.js trunk/src/phpfreechat.class.php Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2006-12-21 06:35:09 UTC (rev 909) +++ trunk/data/public/js/pfcgui.js 2006-12-29 11:57:52 UTC (rev 910) @@ -418,6 +418,27 @@ } }, + loadBBCodeColorList: function() + { + // color list + var clist = $('pfc_colorlist'); + var clist_v = pfc_bbcode_color_list; + for (var i=0 ; i<clist_v.length ; i++) + { + var bbc = clist_v[i]; + var elt = document.createElement('img'); + elt.bbc = bbc; + elt.setAttribute('class', 'pfc_color'); + elt.setAttribute('className', 'pfc_color'); // for IE6 + elt.setAttribute('id', 'pfc_color_'+bbc); + elt.style.backgroundColor = '#'+bbc; + elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif')); + elt.setAttribute('alt', bbc); + elt.onclick = function(){ pfc.switch_text_color(this.bbc); } + clist.appendChild(elt); + } + }, + buildChat: function() { var container = $('pfc_container'); @@ -714,6 +735,5 @@ var soundcontainerbox = document.createElement('div'); soundcontainerbox.setAttribute('id', 'pfc_sound_container'); container.appendChild(soundcontainerbox); - } - + } }; Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-12-21 06:35:09 UTC (rev 909) +++ trunk/src/phpfreechat.class.php 2006-12-29 11:57:52 UTC (rev 910) @@ -393,7 +393,7 @@ } - function loadStyles($theme = 'default', &$xml_reponse = null) + function loadStyles($theme = 'default', &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -440,7 +440,7 @@ return $xml_reponse; } - function loadScripts($theme = 'default', &$xml_reponse = null) + function loadScripts($theme, &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -556,7 +556,7 @@ } - function loadInterface($theme = 'default', &$xml_reponse = null) + function loadInterface($theme = 'default', &$xml_reponse) { if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); @@ -581,9 +581,9 @@ return $xml_reponse; } - function loadChat($theme = 'default', &$xml_reponse = null) + function loadChat($theme = 'default') { - if ($xml_reponse == null) $xml_reponse = new xajaxResponse(); + $xml_reponse = new xajaxResponse(); $this->loadInterface($theme,$xml_reponse); $this->loadStyles($theme,$xml_reponse); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 19:21:26
|
Revision: 915 http://svn.sourceforge.net/phpfreechat/?rev=915&view=rev Author: kerphi Date: 2007-01-04 11:21:26 -0800 (Thu, 04 Jan 2007) Log Message: ----------- improve the error handling process Modified Paths: -------------- trunk/themes/default/chat.js.tpl.php Added Paths: ----------- trunk/data/public/js/compat.js Added: trunk/data/public/js/compat.js =================================================================== --- trunk/data/public/js/compat.js (rev 0) +++ trunk/data/public/js/compat.js 2007-01-04 19:21:26 UTC (rev 915) @@ -0,0 +1,89 @@ + // Cookie handling + var Cookie = + { + read: function (name) + { + var arrCookies = document.cookie.split ('; '); + for (var i=0; i<arrCookies.length; i++) + { + var arrCookie = arrCookies[i].split ('='); + + if (arrCookie[0] == name) + { + return decodeURIComponent (arrCookie[1]); + } + } + return false; + }, + + write: function (name, value, expires, path) + { + if (expires) + { + var date = new Date (); + date.setTime (date.getTime () + (((((expires * 24) * 60) * 60) * 1000))); + expires = '; expires=' + date.toGMTString (); + } + else expires = ''; + + if (!path) path = '/'; + + document.cookie = name+'='+encodeURIComponent (value)+expires+'; path='+path; + }, + + remove: function (name) + { + this.write (name, '', -1); + } + } + + // Detects if can set a cookie in the browser + function browserSupportsCookies() + { + Cookie.write('cookiesEnabled', 1); + var boolCookiesEnabled = Cookie.read('cookiesEnabled'); + Cookie.remove('cookiesEnabled'); + if (boolCookiesEnabled != 1) + { + return false; + } + return true; + } + + // Detects if the browser supports Ajax + function browserSupportsAjax() + { + if (typeof XMLHttpRequest == "undefined" && typeof ActiveXObject == "undefined" && window.createRequest == "undefined") + { + return false; + } + return true + } + + // Detects if the browser can use ActiveX if necessary + function ActiveXEnabledOrUnnecessary () + { + if (typeof ActiveXObject != "undefined") + { + var xhr = null; + try{ + xhr=new ActiveXObject("Msxml2.XMLHTTP"); + }catch (e){ + try{ + xhr=new ActiveXObject("Microsoft.XMLHTTP"); + }catch (e2){ + try{ + xhr=new ActiveXObject("Msxml2.XMLHTTP.4.0"); + }catch (e3){ + xhr=null; + } + } + } + if (xhr == null) + { + return false + } + } + + return true; + } \ No newline at end of file Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-01-04 17:58:02 UTC (rev 914) +++ trunk/themes/default/chat.js.tpl.php 2007-01-04 19:21:26 UTC (rev 915) @@ -40,8 +40,8 @@ var pfc_nickname_color_list = <?php echo $json->encode($nickname_colorlist); ?>; var pfc_proxy_url = '<?php echo $data_public_url."/".$serverid."/proxy.php"; ?>'; var pfc_theme = <?php echo $json->encode($theme); ?>; +var pfc_isready = false; - var xajaxConfig = { requestURI: "<?php echo $c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""); ?>", debug: false, @@ -58,7 +58,7 @@ window.onload = function () { pfc = new pfcClient(); - pfc_loadChat(pfc_theme); + if (pfc_isready) pfc_loadChat(pfc_theme); } <?php if ($debugxajax) { ?> @@ -99,6 +99,7 @@ <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/xajax.js"></script> +<script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/compat.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/md5.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/cookie.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/image_preloader.js"></script> @@ -115,35 +116,43 @@ <div id="pfc_container"> + <div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0;margin:0;text-align:center;"> + <p style="padding:0 0 10px 0;margin:0;text-align:center;"> <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" alt="" style="float:left;margin:0;"/> Chat loading ...<br style="margin:0"/>Please wait -</p> - <img src="http://img332.imageshack.us/img332/1756/helpiv1.gif" -alt="help" -style="position:absolute;bottom:2px;right:2px;margin:0;padding:0;cursor:help" -onmouseover="document.getElementById('pfc_notloading').style.display='block';" -/> + </p> </div> -<div id="pfc_notloading" style="width:270px;background-color:#FFF;border:1px solid #000;text-align:center;display:none;margin:5px auto 0 auto"> +<div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> + +<noscript> +<p><?php echo _pfc("JavaScript appears to be either disabled or unsupported by your browser. This web application requires JavaScript to work properly. Please enable JavaScript in your browser settings, or upgrade to a browser with JavaScript support and try again."); ?></p> +</noscript> <p> -<?php echo _pfc("Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"); ?> <a href="http://www.phpfreechat.net/forum/">www.phpfreechat.net/forum</a> -<a href="http://www.phpfreechat.net"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +<script type="text/javascript"> +if (!browserSupportsCookies()) + document.write('<?php echo _pfc("Cookies appear to be either disabled or unsupported by your browser. This web application requires Cookies to function properly. Please enable Cookies in your browser settings or upgrade to a browser with Cookie support and try again."); ?>'); +else if (!browserSupportsAjax()) + document.write('<?php echo _pfc("Your browser does not appear to support Ajax technology. This web application requires Ajax to function properly. Please upgrade to a browser with Ajax support and try again."); ?>'); +else if (!ActiveXEnabledOrUnnecessary()) + document.write('<?php echo _pfc("ActiveX appears to be disabled in your browser. This web application requires Ajax technology to function properly. In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>'); +else +{ + $('pfc_notloading').style.display = 'none'; + pfc_isready = true; +} +</script> </p> + +<a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> + </div> </div> - -<?php /* ?> -<p><?php echo _pfc("Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"); ?> <a href="http://www.phpfreechat.net/forum/">www.phpfreechat.net/forum</a></p> -<a href="http://www.phpfreechat.net"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> -<?php */ ?> - </div> <?php if ($debug) { ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 12:58:00
|
Revision: 916 http://svn.sourceforge.net/phpfreechat/?rev=916&view=rev Author: kerphi Date: 2007-01-05 04:57:52 -0800 (Fri, 05 Jan 2007) Log Message: ----------- code cleaning (themes styles) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php trunk/themes/default/style.css Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcclient.js 2007-01-05 12:57:52 UTC (rev 916) @@ -858,7 +858,7 @@ var recipientdiv = this.gui.getChatContentFromTabId(tabid); // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('span'); + var m = document.createElement('div'); // do not setup a inline element (ex: span) because the element height will be wrong on FF2 -> scrollDown(..) will be broken m.innerHTML = msg_html[recipientid]; this.colorizeNicks(m); this.refresh_clock(m); @@ -950,7 +950,7 @@ updateNickListBox: function(chanid) { var nickidlst = this.chanmeta[chanid]['users']['nickid']; - var nickdiv = this.gui.getOnlineContentFromTabId(chanid).firstChild; + var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); ul.setAttribute('class', 'pfc_nicklist'); ul.setAttribute('className', 'pfc_nicklist'); // IE6 @@ -1077,7 +1077,6 @@ if (isadmin == '') isadmin = false; var li = document.createElement('li'); - li.style.borderBottom = '1px solid #AAA'; var a = document.createElement('a'); a.setAttribute('href','#'); Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcgui.js 2007-01-05 12:57:52 UTC (rev 916) @@ -47,7 +47,6 @@ // the next line seems to help with IE6 scroll on the first load // http://sourceforge.net/tracker/index.php?func=detail&aid=1568264&group_id=158880&atid=809601 var dudVar = content.scrollTop; - content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; }, @@ -158,11 +157,6 @@ // I set the border style here because seting it in the CSS is not taken in account // oc.style.borderLeft = "1px solid #555"; oc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) - - // Create a dummy div to add padding - var div = document.createElement('div'); - div.style.padding = "5px"; - oc.appendChild(div); this.onlinecontent[tabid] = oc; return oc; Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -10,16 +10,21 @@ <div id="pfc_input_container"> - <table style="margin:0; padding:0; border-collapse:collapse;"> + <table style="margin:0;padding:0;border-collapse:collapse;"> <tbody> <tr> <td class="pfc_td1"> + <p id="pfc_handle" + title="<?php echo _pfc("Enter your nickname here"); ?>" + onclick="pfc.askNick('')"><?php echo $u->nick; ?></p> + </td> + <td class="pfc_td2"> <input type="text" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len; ?>"/> </td> - <td class="pfc_td2"> + <td class="pfc_td3"> <input type="button" id="pfc_send" value="<?php echo _pfc("Send"); ?>" @@ -39,12 +44,6 @@ title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> - <p id="pfc_handle" - title="<?php echo _pfc("Enter your nickname here"); ?>" - onclick="pfc.askNick('')"> - <?php echo $u->nick; ?> - </p> - <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" alt="" title="" Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.js.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -116,45 +116,39 @@ <div id="pfc_container"> - <div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0 0 10px 0;margin:0;text-align:center;"> + <p style="padding:0;margin:0;text-align:center;"> <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" alt="" style="float:left;margin:0;"/> - Chat loading ...<br style="margin:0"/>Please wait + <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?> </p> </div> <div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> - <noscript> -<p><?php echo _pfc("JavaScript appears to be either disabled or unsupported by your browser. This web application requires JavaScript to work properly. Please enable JavaScript in your browser settings, or upgrade to a browser with JavaScript support and try again."); ?></p> +<p><?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","JavaScript"); ?> <?php echo _pfc("This web application requires %s to work properly.","JavaScript"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","JavaScript","JavaScript"); ?></p> </noscript> -<p> -<script type="text/javascript"> +<p><script type="text/javascript"> + // <![CDATA[ if (!browserSupportsCookies()) - document.write('<?php echo _pfc("Cookies appear to be either disabled or unsupported by your browser. This web application requires Cookies to function properly. Please enable Cookies in your browser settings or upgrade to a browser with Cookie support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Cookies"); ?> <?php echo _pfc("This web application requires %s to work properly.","Cookies"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","Cookies","Cookies"); ?>'); else if (!browserSupportsAjax()) - document.write('<?php echo _pfc("Your browser does not appear to support Ajax technology. This web application requires Ajax to function properly. Please upgrade to a browser with Ajax support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Ajax"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("Please upgrade to a browser with %s support and try again.","Ajax"); ?>'); else if (!ActiveXEnabledOrUnnecessary()) - document.write('<?php echo _pfc("ActiveX appears to be disabled in your browser. This web application requires Ajax technology to function properly. In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","ActiveX"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>'); else { $('pfc_notloading').style.display = 'none'; pfc_isready = true; } -</script> -</p> - + // ]]> +</script></p> <a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +</div> <!-- pfc_notloading --> -</div> +</div> <!-- pfc_container --> -</div> - -</div> - <?php if ($debug) { ?> <div id="pfc_debug"></div> <?php } ?> Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/style.css 2007-01-05 12:57:52 UTC (rev 916) @@ -61,7 +61,7 @@ } ul#pfc_channels_list li img { margin: 0; padding: 0; - vertical-align: middle; + vertical-align: bottom; } ul#pfc_channels_list li div { margin: 0; padding: 0; @@ -72,12 +72,13 @@ border-left: 1px solid #555; border-bottom: 1px solid #555; background-color: #DDD; + vertical-align: bottom; } ul#pfc_channels_list li.selected div { background-color: #FFF; border-bottom: 1px solid #FFF; color: #000; - font-weight: bold; + font-weight: bold; } ul#pfc_channels_list li > div:hover { background-color: #FFF; @@ -115,6 +116,9 @@ overflow: auto; word-wrap: break-word; } +div.pfc_chat div { + margin: 0; padding: 0; border: none; +} div.pfc_online { margin: 0; padding: 0; @@ -134,22 +138,30 @@ background-repeat: repeat-y; } div.pfc_online ul { - margin: 0; padding: 0; + margin: 4px; padding: 0; list-style-type: none; - margin-left: 8px; - margin-right: 8px; -} -div.pfc_online li { - margin: 0; padding: 0; - font-weight: bold; font-size: 90%; - /* bottom borders are drawn by the javascript routines */ + font-weight: bold; } -ul.pfc_nicklist li img { +ul.pfc_nicklist li { + margin: 0 0 5px 0; padding: 0; + border-bottom: 1px solid #AAA; +} +ul.pfc_nicklist img { + vertical-align: middle; /* fix icon position problem in IE6 */ +} +ul.pfc_nicklist a { + text-decoration: none; +} +ul.pfc_nicklist nobr span { margin: 0; padding: 0; + display: inline; + text-decoration: none; } + + h2#pfc_title { margin:0; padding:0; border: none; font-size: 110%; @@ -200,12 +212,13 @@ div#pfc_input_container input { margin: 0; padding: 0; } -div#pfc_input_container td.pfc_td1 { +div#pfc_input_container td.pfc_td2 { padding-right: 5px; width: 100%; } input#pfc_words { + margin: 0; padding: 0; border: #555 solid 1px; background-color: #FAFAFA; width: 100%; @@ -217,16 +230,15 @@ } input#pfc_send { + margin: 0; padding: 0; display: block; padding: 2px; - margin-left: 5px; border: 1px solid #555; background-color: #CCC; font-size: 10px; - height: 21px; vertical-align: bottom; font-size: 0.7em; - height: 1.8em; + height: 1.9em; cursor: pointer; } @@ -239,14 +251,13 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - border: 1px solid #555; - padding: 2px 10px 2px 10px; + margin-right: 5px; color: black; - margin-bottom: 5px; font-weight: bold; - background-color: #EEE; + /*background-color: #EEE;*/ font-size: 70%; /* these two line fix a display problem in IE6 : */ - vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ + vertical-align: top; + white-space: pre; } a#pfc_logo { @@ -263,18 +274,11 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - margin-right: 5px; } div.pfc_btn img { - margin: 0; padding: 0; - vertical-align: middle; - /* doesn't work */ - /* border: 1px solid #393;*/ /* same as container color */ + margin: 0; padding: 0; border: none; + vertical-align: middle; } -div.pfc_btn img:hover { - /* doesn't work */ - /* border: 1px solid #000;*/ -} div#pfc_bbcode_container { margin: 4px 0 4px 0; padding: 0; @@ -373,11 +377,6 @@ text-decoration: none; } -ul.pfc_nicklist span.pfc_nickmarker { -} -ul.pfc_nicklist a { - text-decoration: none; -} img.pfc_nickbutton { cursor: pointer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-05 13:46:57
|
Revision: 919 http://svn.sourceforge.net/phpfreechat/?rev=919&view=rev Author: kerphi Date: 2007-01-05 05:46:55 -0800 (Fri, 05 Jan 2007) Log Message: ----------- [en] Add the "display_pfc_logo" parameter which should be used only for commercial licenses (see the license page for explainations). [0h20] [fr] Ajout du param?\195?\168tre "display_pfc_logo" qui doit ?\195?\170tre utilis?\195?\169 seulement pour les utilisations commerciales (cf la page licence) [0h20] Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/themes/default/chat.html.tpl.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-01-05 13:34:37 UTC (rev 918) +++ trunk/src/pfcglobalconfig.class.php 2007-01-05 13:46:55 UTC (rev 919) @@ -86,6 +86,10 @@ var $startwithsound = true; // start with sound enabled var $openlinknewwindow = true; // used to open the links in a new window var $notify_window = true; // true : appends a prefix to the window title with the number of new posted messages + + // Be sure that you are conform to the license page before setting this to false ! + // http://www.phpfreechat.net/license.en.html + var $display_pfc_logo = true; var $displaytabimage = true; var $displaytabclosebutton = true; Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-05 13:34:37 UTC (rev 918) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 13:46:55 UTC (rev 919) @@ -37,12 +37,14 @@ <div id="pfc_cmd_container"> +<?php if ($display_pfc_logo) { ?> <a href="http://www.phpfreechat.net" id="pfc_logo"<?php if($openlinknewwindow) echo ' onclick="window.open(this.href,\'_blank\');return false;"'; ?>> <img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> +<?php } ?> <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-06 12:45:51
|
Revision: 926 http://svn.sourceforge.net/phpfreechat/?rev=926&view=rev Author: kerphi Date: 2007-01-06 04:45:49 -0800 (Sat, 06 Jan 2007) Log Message: ----------- [en] Add the Korean translation (ko_KR) (thanks to Kim Taeho - http://zxcv.mireene.com/zb5/) [0h20] [fr] Ajoute la tranduction Cor?\195?\169enne (ko_KR) (merci ?\195?\160 Kim Taeho - http://zxcv.mireene.com/zb5/) [0h20] Modified Paths: -------------- trunk/demo/index.php Added Paths: ----------- trunk/demo/demo57_in_korean.php trunk/i18n/ko_KR/ trunk/i18n/ko_KR/main.php Added: trunk/demo/demo57_in_korean.php =================================================================== --- trunk/demo/demo57_in_korean.php (rev 0) +++ trunk/demo/demo57_in_korean.php 2007-01-06 12:45:49 UTC (rev 926) @@ -0,0 +1,36 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["language"] = "ko_KR"; +$chat = new phpFreeChat( $params ); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>phpFreeChat demo</title> + + <?php $chat->printJavascript(); ?> + <?php $chat->printStyle(); ?> + + </head> + + <body> + <?php $chat->printChat(); ?> + +<?php + // print the current file + echo "<h2>The source code</h2>"; + $filename = __FILE__; + echo "<p><code>".$filename."</code></p>"; + echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; + $content = file_get_contents($filename); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-01-06 12:28:46 UTC (rev 925) +++ trunk/demo/index.php 2007-01-06 12:45:49 UTC (rev 926) @@ -122,6 +122,7 @@ <li><a href="demo53_in_armenian.php">demo53 - the Armenian translation of the chat</a></li> <li><a href="demo54_in_esperanto.php">demo54 - the Esperanto translation of the chat</a></li> <li><a href="demo56_in_romanian.php">demo56 - the Romanian translation of the chat</a></li> + <li><a href="demo57_in_korean.php">demo57 - the Korean translation of the chat</a></li> </ul> </div> Added: trunk/i18n/ko_KR/main.php =================================================================== --- trunk/i18n/ko_KR/main.php (rev 0) +++ trunk/i18n/ko_KR/main.php 2007-01-06 12:45:49 UTC (rev 926) @@ -0,0 +1,309 @@ +<?php +/** + * i18n/ko_KR/main.php + * + * Copyright © 2006 Stephane Gully <ste...@gm...> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * Korean translation of the messages.. + * + * @author Kim Taeho (ta...@gm...) + */ + +// line 45 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["My Chat"] = "내 채팅방"; + +// line 201 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s 를 찾을 수 없습니다, %s 라이브러리가 로드되지 않았습니다."; + +// line 355 in phpfreechat.class.php +$GLOBALS["i18n"]["Please enter your nickname"] = "사용할 닉네임을 입력하세요"; + +// line 565 in phpfreechat.class.php +$GLOBALS["i18n"]["Text cannot be empty"] = "빈칸을 입력하실 순 없습니다."; + +// line 392 in phpfreechat.class.php +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s 님께서 %s로 닉을 바꾸셨습니다."; + +// line 398 in phpfreechat.class.php +$GLOBALS["i18n"]["%s is connected"] = "%s 님 반갑습니다. 즐거운 시간 되세요."; + +// line 452 in phpfreechat.class.php +$GLOBALS["i18n"]["%s quit"] = "%s 님께서 나가셨습니다."; + +// line 468 in phpfreechat.class.php +$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s 님의 연결이 끊겼습니다 (타임아웃)"; + +// line 262 in phpfreechat.class.php +$GLOBALS["i18n"]["Unknown command [%s]"] = "존재하지 않는 명령입니다. [%s]"; + +// line 149 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s 는 존재하지 않습니다 : %s"; + +// line 180 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["You need %s"] = "%s 가 필요합니다."; + +// line 241 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s 를 찾을 수 없습니다, %s 라이브러리가 로드되지 않았습니다."; + +// line 280 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s doesn't exist"] = "%s 는 존재하지 않습니다."; + +// line 433 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s directory must be specified"] = "%s 디렉토리는 선택되어야만 합니다."; + +// line 439 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s must be a directory"] = "%s 는 디렉토리 이어야만 합니다."; + +// line 446 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s can't be created"] = "%s 는 생성될 수 없습니다."; + +// line 451 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not writeable"] = "%s 에 기록할 수 없습니다."; + +// line 496 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not readable"] = "%s 를 읽을수 없습니다."; + +// line 469 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a file"] = "%s 는 파일이 아닙니다."; + +// line 491 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["%s is not a directory"] = "%s 는 디렉토리가 아닙니다."; + +// line 23 in chat.html.tpl.php +$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]"; + +// line 296 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide nickname marker"] = "닉네임에 색상 사용하지 않기"; + +// line 304 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show nickname marker"] = "닉네임에 색상 사용하기"; + +// line 389 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Disconnect"] = "연결 해제"; + +// line 395 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Connect"] = "연결"; + +// line 427 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Magnify"] = "확대"; + +// line 434 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Cut down"] = "자르기"; + +// line 345 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Hide dates and hours"] = "날짜와 시간 숨기기"; + +// line 353 in javascript1.js.tpl.php +$GLOBALS["i18n"]["Show dates and hours"] = "날짜와 시간 표시하기"; + +// line 21 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your message here"] = "여기에 대화를 입력하세요"; + +// line 24 in chat.html.tpl.php +$GLOBALS["i18n"]["Enter your nickname here"] = "여기에 별명을 입력하세요"; + +// line 93 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "오류 : '%s'는 정의되지 않거나 사용할 수 없는 피라메터 입니다, 이 피라메터를 없애거나 수정하세요.."; + +// line 86 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide smiley box"] = "이모티콘 숨기기"; + +// line 87 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show smiley box"] = "이모티콘 보이기"; + +// line 88 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Hide online users box"] = "현재 접속자 숨기기"; + +// line 89 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Show online users box"] = "현재 접속자 보이기"; + +// line 33 in chat.html.tpl.php +$GLOBALS["i18n"]["Bold"] = "굵게"; + +// line 34 in chat.html.tpl.php +$GLOBALS["i18n"]["Italics"] = "이탤릭"; + +// line 35 in chat.html.tpl.php +$GLOBALS["i18n"]["Underline"] = "밑줄"; + +// line 36 in chat.html.tpl.php +$GLOBALS["i18n"]["Delete"] = "취소선"; + +// line 37 in chat.html.tpl.php +$GLOBALS["i18n"]["Pre"] = "Pre"; + +// line 38 in chat.html.tpl.php +$GLOBALS["i18n"]["Mail"] = "메일주소"; + +// line 39 in chat.html.tpl.php +$GLOBALS["i18n"]["Color"] = "색상"; + +// line 48 in phpfreechattemplate.class.php +$GLOBALS["i18n"]["%s template could not be found"] = "%s 템플릿을 찾을 수 없습니다."; + +// line 512 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' 를 찾을 수 없습니다. 테마의 위치인 '%s' 를 찾아보시고 지정한 테마가 '%s' 가 맞는지 확인하세요"; + +// line 75 in pfccommand.class.php +$GLOBALS["i18n"]["%s must be implemented"] = "%s 는 권한이 있어야만 합니다."; + + +// line 343 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "'%s' 피라메터는 필수적으로 요구됩니다. '%s' 값을 사용하기 위해..."; + +// line 378 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "'%s' 피라메터는 양수 이어야 합니다."; + +// line 386 in phpfreechatconfig.class.php +$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "'%s' 피라메터는 유효하지 않습니다. 사용가능한 목록 : '%s'"; + +// line 185 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["My room"] = "내 방"; + +// line 109 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Private message"] = "개인 메세지"; + +// line 110 in pfcclient.js.tpl.php +$GLOBALS["i18n"]["Close this tab"] = "이 탭 닫기"; + +// line 225 in pfcgui.js.tpl.php +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "이 채널을 떠나길 원하십니까?"; + +// line 19 in unban.class.php +$GLOBALS["i18n"]["Missing parameter"] = "피라미터를 찾을수 없습니다."; + +// line 38 in ban.class.php +$GLOBALS["i18n"]["banished from %s by %s"] = "%s 로 부터 강퇴되었습니다. %s에 의해.."; + +// line 23 in banlist.class.php +$GLOBALS["i18n"]["The banished user's id list is:"] = "접근 금지자 목록:"; + +// line 32 in banlist.class.php +$GLOBALS["i18n"]["Empty"] = "비어있음"; + +// line 34 in banlist.class.php +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' 명령은 {id}로 식별되는 사용자를 추방한걸 취소합니다."; + +// line 35 in banlist.class.php +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' 명령은 이 채널에 있는 모든 사용자를 추방한걸 취소합니다."; + +// line 24 in update.class.php +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s 님께서 나갔습니다. (타임아웃)"; + +// line 46 in join.class.php +$GLOBALS["i18n"]["%s joins %s"] = "%s 님께서 %s 에 들어오셨습니다."; + +// line 31 in kick.class.php +$GLOBALS["i18n"]["kicked from %s by %s"] = "%s 로 부터 퇴장 되었습니다. %s에 의해"; + +// line 38 in send.class.php +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "메시지를 보낼 수 없습니다, %s 님은 오프라인 상태 입니다."; + +// line 27 in unban.class.php +$GLOBALS["i18n"]["Nobody has been unbanished"] = "아무도 추방 취소되지 않았습니다."; + +// line 42 in unban.class.php +$GLOBALS["i18n"]["%s has been unbanished"] = "%s 님의 추방을 취소했습니다."; + +// line 49 in unban.class.php +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s 님은 추방이 취소 되어 있습니다."; + +// line 47 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "'%s'명령을 실행할 권한이 없습니다."; + +// line 67 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "%s 에 참여할수 없습니다(강퇴)"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "닉을 바꿀 권한이 없습니다."; + +// line 76 in auth.class.php +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "%s 에 참여할 수 없습니다(제한된 채널)"; + +// line 56 in noflood.class.php +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "도배 하지 마세요..."; + +// line 169 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Error: '%s' 는 개인 피라메터 입니다. 수정하실 수 없습니다."; + +// line 253 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "'%s' 피라메터는 어레이로 처리되어야 합니다."; + +// line 265 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "'%s' 피라메터는 부울값으로 있어야 합니다."; + +// line 271 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "'%s' 피라메터는 글자이어야 합니다."; + +// line 395 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' 에 쓸 수 있어야 합니다."; + +// line 425 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "'%s' 디렉토리가 존재하지 않습니다."; + +// line 544 in pfcglobalconfig.class.php +$GLOBALS["i18n"]["Please correct these errors"] = "위 오류를 수정해 주시기 바랍니다."; + +// line 21 in pfcinfo.class.php +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "오류 : 저장된 설정이 존재하지 않습니다."; + +// line 190 in phpfreechat.class.php +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "오류 : 채팅이 로드될 수 없습니다! 두가지 가능성: 브라우저에서 자바스크립트를 지원하지 않거나, 서버의 폴더 권한을 잘 설정하지 못했을 수 있습니다. - 포럼의 누군가에게 묻는것에 대해 망설이지 마십시오."; + +// line 31 in help.class.php +$GLOBALS["i18n"]["Here is the command list:"] = "명령어 목록:"; + +// line 63 in identify.class.php +$GLOBALS["i18n"]["Succesfully identified"] = "성공적으로 인증됨"; + +// line 68 in identify.class.php +$GLOBALS["i18n"]["Identification failure"] = "인증 실패"; + +// line 25 in send.class.php +$GLOBALS["i18n"]["Your must be connected to send a message"] = "메세지를 보내려면 연결해야 합니다."; + +// line 87 in chat.js.tpl.php +$GLOBALS["i18n"]["Click here to send your message"] = "여기를 눌러 메세지를 보내세요"; + +// line 80 in chat.js.tpl.php +$GLOBALS["i18n"]["Enter the text to format"] = "형식화 할 글자를 넣으세요.."; + +// line 81 in chat.js.tpl.php +$GLOBALS["i18n"]["Configuration has been rehashed"] = "재설정"; + +// line 82 in chat.js.tpl.php +$GLOBALS["i18n"]["A problem occurs during rehash"] = "재설정중 문제가 생겼습니다."; + +// line 83 in chat.js.tpl.php +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "이미 사용중인 별명입니다."; + +// line 84 in chat.js.tpl.php +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "phpfreechat 의 현재 버전은 %s 입니다."; + +// line 85 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "최대 방 인원에 도달하였습니다."; + +// line 86 in chat.js.tpl.php +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "최대 개인채팅수에 도달하였습니다."; + +// line 88 in chat.js.tpl.php +$GLOBALS["i18n"]["Send"] = "입력"; + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-21 11:26:09
|
Revision: 932 http://svn.sourceforge.net/phpfreechat/?rev=932&view=rev Author: kerphi Date: 2007-01-21 03:26:08 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Spanish translation update (thanks to mayunia) [0h20] Modified Paths: -------------- trunk/demo/index.php trunk/i18n/es_ES/main.php Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2007-01-18 20:35:28 UTC (rev 931) +++ trunk/demo/index.php 2007-01-21 11:26:08 UTC (rev 932) @@ -55,74 +55,74 @@ <h2 id="demo-misc">Miscellaneous</h2> <ul> - <li><a href="demo1_simple.php">demo1 - demo with default parameters</a></li> - <li><a href="demo2_simple_with_params.php">demo2 - demo with few parameters</a></li> - <li><a href="demo3_client.php">demo3 - demo with separate client/server files</a></li> - <li><a href="demo4_simulate_slow_server.php">demo4 - demo which simulate slow server responses</a></li> - <li><a href="demo5_customized_style.php">demo5 - demo with a customized style (theme)</a></li> + <li><a href="demo1_simple.php">demo1 - with default parameters</a></li> + <li><a href="demo2_simple_with_params.php">demo2 - with few customized parameters</a></li> + <li><a href="demo3_client.php">demo3 - with separated client/server files</a></li> + <li><a href="demo4_simulate_slow_server.php">demo4 - simulates slow server responses</a></li> + <li><a href="demo5_customized_style.php">demo5 - with a customized style (theme)</a></li> <li><a href="demo8_with_a_iso-8859-1_encoded_page.php">demo8 - a chat with a ISO-8859-1 encoded page</a></li> <li><a href="demo9_with_a_utf8_encoded_nickname.php">demo9 - a chat with a UTF-8 encoded nickname (none latin)</a></li> <li><a href="demo15_multiple_channel.php">demo15 - a chat with multiple/dynamic channels</a></li> <li><a href="demo21_with_hardcoded_urls.php">demo21 - with hardcoded url: data_public_url, client_script_url ... (interesting for strange server configuration)</a></li> <li><a href="demo27_customized_command.php">demo27 - a customized command (/roll)</a></li> - <li><a href="demo34_add_a_link_on_nicknames.php">demo34 - Shows how to add a link on the nicknames list</a></li> + <li><a href="demo34_add_a_link_on_nicknames.php">demo34 - shows how to add a link on the nicknames list</a></li> - <li><a href="demo31_show_who_is_online-chat.php">demo31 - demo which show how to get the connected users list (chat script)</a></li> - <li><a href="demo31_show_who_is_online-whoisonline.php">demo31 - demo which show how to get the connected users list (whoisonline script)</a></li> - <li><a href="demo32_show_last_messages-chat.php">demo32 - demo which show how to get the last posted messages (chat script)</a></li> - <li><a href="demo32_show_last_messages-showlastmsg.php">demo32 - demo which show how to get the last posted messages (showlastmsg script)</a></li> - <li><a href="demo35_shared_memory.php">demo35 - demo which show how to use the shared memory container</a> (not yet working)</li> - <li><a href="demo43_change_the_nicknames_colors.php">demo43 - demo which show how to change the nicknames automatic colors</a></li> - <li><a href="demo50_customized_usermetadata.php">demo50 - demo which shows how to use user metadata : add avatar (images) to each connected users</a></li> - <li><a href="demo55_mysql_container.php">demo55 - demo which show how to use the mysql container</a></li> + <li><a href="demo31_show_who_is_online-chat.php">demo31 - shows how to get the connected users list (chat script)</a></li> + <li><a href="demo31_show_who_is_online-whoisonline.php">demo31 - shows how to get the connected users list (whoisonline script)</a></li> + <li><a href="demo32_show_last_messages-chat.php">demo32 - shows how to get the last posted messages (chat script)</a></li> + <li><a href="demo32_show_last_messages-showlastmsg.php">demo32 - shows how to get the last posted messages (showlastmsg script)</a></li> +<!-- <li><a href="demo35_shared_memory.php">demo35 - shows how to use the shared memory container</a> (not yet working)</li>--> + <li><a href="demo43_change_the_nicknames_colors.php">demo43 - shows how to change the nicknames automatic colors</a></li> + <li><a href="demo50_customized_usermetadata.php">demo50 - shows how to use user metadata : add avatar (images) to each connected users</a></li> + <li><a href="demo55_mysql_container.php">demo55 - shows how to use the mysql container</a></li> </ul> <h2 id="demo-themes">Themes</h2> <ul> - <li><a href="demo12_phoenity_smiley_theme.php">demo12 - A chat with a customized smiley theme (phoenity theme)</a></li> - <li><a href="demo17_cerutti_smiley_theme.php">demo17 - A chat with a customized smiley theme (cerutti theme)</a></li> - <li><a href="demo18_phpbb2_smiley_theme.php">demo18 - A chat with a customized smiley theme (phpbb2 theme)</a></li> - <li><a href="demo28_blune_theme.php">demo28 - use a customized theme (blune theme)</a></li> - <li><a href="demo28_mini_blune_theme.php">demo28 - use a customized theme (blune theme) - mini</a></li> - <li><a href="demo44_green_theme.php">demo44 - use a customized theme (green)</a></li> - <li><a href="demo49_msn_smiley_theme.php">demo49 - A chat with a customized smiley theme (msn theme)</a></li> - <li><a href="demo51_zilveer_theme.php">demo51 - A chat with a customized theme (zilveer theme)</a></li> + <li><a href="demo12_phoenity_smiley_theme.php">demo12 - customized smiley theme: phoenity</a></li> + <li><a href="demo17_cerutti_smiley_theme.php">demo17 - customized smiley theme: cerutti</a></li> + <li><a href="demo18_phpbb2_smiley_theme.php">demo18 - customized smiley theme: phpbb2</a></li> + <li><a href="demo28_blune_theme.php">demo28 - customized theme: blune</a></li> + <li><a href="demo28_mini_blune_theme.php">demo28 - customized theme: blune mini</a></li> + <li><a href="demo44_green_theme.php">demo44 - customized theme: green</a></li> + <li><a href="demo49_msn_smiley_theme.php">demo49 - customized smiley theme: msn</a></li> + <li><a href="demo51_zilveer_theme.php">demo51 - customized theme: zilveer</a></li> </ul> <h2 id="demo-translations">Translations</h2> <ul> <li><a href="demo6_in_french.php">demo6 - french translation of the chat</a></li> <li><a href="demo7_in_english.php">demo7 - english translation of the chat</a></li> - <li><a href="demo10_in_chinese.php">demo10 - the chinese translation of the chat</a></li> - <li><a href="demo13_in_german_informal_language.php">demo13 - the german (informal) translation of the chat</a></li> - <li><a href="demo14_in_german_formal_language.php">demo14 - the german (formal) translation of the chat</a></li> - <li><a href="demo16_in_arabic.php">demo16 - the arabic translation of the chat</a></li> - <li><a href="demo19_in_japanese.php">demo19 - the japanese translation of the chat</a></li> - <li><a href="demo20_in_brazilian_portuguese.php">demo20 - the portuguese from brazil translation of the chat</a></li> - <li><a href="demo22_in_serbian_croatian.php">demo22 - the serbian croatian translation of the chat</a></li> - <li><a href="demo23_in_italian.php">demo23 - the italian translation of the chat</a></li> - <li><a href="demo24_in_spanish.php">demo24 - the spanish translation of the chat</a></li> - <li><a href="demo25_in_indonesian.php">demo25 - the indonesian translation of the chat</a></li> - <li><a href="demo26_in_swedish.php">demo26 - the swedish translation of the chat</a></li> - <li><a href="demo29_in_russian.php">demo29 - the russian translation of the chat</a></li> - <li><a href="demo33_in_portuguese_from_portugal.php">demo33 - the portuguese from portugal translation of the chat</a></li> - <li><a href="demo36_in_ukrainian.php">demo36 - the ukrainian translation of the chat</a></li> - <li><a href="demo37_in_dutch_from_netherlands.php">demo37 - the dutch from netherlands translation of the chat</a></li> - <li><a href="demo38_in_norwegian_bokmal.php">demo38 - the norwegian bokmal translation of the chat</a></li> - <li><a href="demo39_in_bosnian.php">demo39 - the bosnian translation of the chat</a></li> - <li><a href="demo40_in_turkish.php">demo40 - the turkish translation of the chat</a></li> - <li><a href="demo41_in_greek.php">demo41 - the greek translation of the chat</a></li> - <li><a href="demo42_in_chinese_from_taiwan.php">demo42 - the Chinese from taiwan (traditional Chinese) translation of the chat</a></li> - <li><a href="demo45_in_bulgarian.php">demo45 - the Bulgarian translation of the chat</a></li> - <li><a href="demo46_in_hungarian.php">demo46 - the Hungarian translation of the chat</a></li> - <li><a href="demo47_in_polish.php">demo47 - the Polish translation of the chat</a></li> - <li><a href="demo52_in_bangla.php">demo52 - the Bangla translation of the chat</a></li> - <li><a href="demo53_in_armenian.php">demo53 - the Armenian translation of the chat</a></li> - <li><a href="demo54_in_esperanto.php">demo54 - the Esperanto translation of the chat</a></li> - <li><a href="demo56_in_romanian.php">demo56 - the Romanian translation of the chat</a></li> - <li><a href="demo57_in_korean.php">demo57 - the Korean translation of the chat</a></li> + <li><a href="demo10_in_chinese.php">demo10 - chinese translation of the chat</a></li> + <li><a href="demo13_in_german_informal_language.php">demo13 - german (informal) translation of the chat</a></li> + <li><a href="demo14_in_german_formal_language.php">demo14 - german (formal) translation of the chat</a></li> + <li><a href="demo16_in_arabic.php">demo16 - arabic translation of the chat</a></li> + <li><a href="demo19_in_japanese.php">demo19 - japanese translation of the chat</a></li> + <li><a href="demo20_in_brazilian_portuguese.php">demo20 - portuguese from brazil translation of the chat</a></li> + <li><a href="demo22_in_serbian_croatian.php">demo22 - serbian croatian translation of the chat</a></li> + <li><a href="demo23_in_italian.php">demo23 - italian translation of the chat</a></li> + <li><a href="demo24_in_spanish.php">demo24 - spanish translation of the chat</a></li> + <li><a href="demo25_in_indonesian.php">demo25 - indonesian translation of the chat</a></li> + <li><a href="demo26_in_swedish.php">demo26 - swedish translation of the chat</a></li> + <li><a href="demo29_in_russian.php">demo29 - russian translation of the chat</a></li> + <li><a href="demo33_in_portuguese_from_portugal.php">demo33 - portuguese from portugal translation of the chat</a></li> + <li><a href="demo36_in_ukrainian.php">demo36 - ukrainian translation of the chat</a></li> + <li><a href="demo37_in_dutch_from_netherlands.php">demo37 - dutch from netherlands translation of the chat</a></li> + <li><a href="demo38_in_norwegian_bokmal.php">demo38 - norwegian bokmal translation of the chat</a></li> + <li><a href="demo39_in_bosnian.php">demo39 - bosnian translation of the chat</a></li> + <li><a href="demo40_in_turkish.php">demo40 - turkish translation of the chat</a></li> + <li><a href="demo41_in_greek.php">demo41 - greek translation of the chat</a></li> + <li><a href="demo42_in_chinese_from_taiwan.php">demo42 - Chinese from taiwan (traditional Chinese) translation of the chat</a></li> + <li><a href="demo45_in_bulgarian.php">demo45 - Bulgarian translation of the chat</a></li> + <li><a href="demo46_in_hungarian.php">demo46 - Hungarian translation of the chat</a></li> + <li><a href="demo47_in_polish.php">demo47 - Polish translation of the chat</a></li> + <li><a href="demo52_in_bangla.php">demo52 - Bangla translation of the chat</a></li> + <li><a href="demo53_in_armenian.php">demo53 - Armenian translation of the chat</a></li> + <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> </ul> </div> Modified: trunk/i18n/es_ES/main.php =================================================================== --- trunk/i18n/es_ES/main.php 2007-01-18 20:35:28 UTC (rev 931) +++ trunk/i18n/es_ES/main.php 2007-01-21 11:26:08 UTC (rev 932) @@ -25,22 +25,23 @@ * * @author Stephane Gully <ste...@gm...> * @translated by Jose Juan Calvo <jos...@gm...> + * @translated by Álvaro Ortega <may...@gm...> */ // line 45 in phpfreechatconfig.class.php $GLOBALS["i18n"]["My Chat"] = "Mi chat"; // line 201 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s no encontrada, la libreria %s no se ha encontrado."; +$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s no encontrada, la librería %s no se ha encontrado."; // line 355 in phpfreechat.class.php $GLOBALS["i18n"]["Please enter your nickname"] = "Por favor introduce tu nickname"; // line 565 in phpfreechat.class.php -$GLOBALS["i18n"]["Text cannot be empty"] = "El texto no puede estar vacio"; +$GLOBALS["i18n"]["Text cannot be empty"] = "El texto no puede estar vacío"; // line 392 in phpfreechat.class.php -$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s ha cambiado su nickname a %s"; +$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s cambia su nickname a %s"; // line 398 in phpfreechat.class.php $GLOBALS["i18n"]["%s is connected"] = "%s está conectado"; @@ -58,10 +59,10 @@ $GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s no existe: %s"; // line 180 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["You need %s"] = "Tu necesitas %s"; +$GLOBALS["i18n"]["You need %s"] = "Necesitas %s"; // line 241 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s no encontrada, la libreria %s no se ha encontrado"; +$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s no existe, la librería %s no puede ser encontrada"; // line 280 in phpfreechatconfig.class.php $GLOBALS["i18n"]["%s doesn't exist"] = "%s no existe"; @@ -115,24 +116,24 @@ $GLOBALS["i18n"]["Show dates and hours"] = "Mostrar fechas y horas"; // line 21 in chat.html.tpl.php -$GLOBALS["i18n"]["Enter your message here"] = "Introduzca aquí su mensaje"; +$GLOBALS["i18n"]["Enter your message here"] = "Ingrese su mensaje aquí"; // line 24 in chat.html.tpl.php -$GLOBALS["i18n"]["Enter your nickname here"] = "Introduzca aquí su nickname"; +$GLOBALS["i18n"]["Enter your nickname here"] = "Ingrese su nickname aquí"; // line 93 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: parámetro no definido u obsoleto '%s', por favor corríjalo o elimine este parámetro"; +$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: '%s' parámetro no definido u obsoleto, por favor corríjalo o elimine este parámetro"; // line 48 in phpfreechattemplate.class.php -$GLOBALS["i18n"]["%s template could not be found"] = "No se ha encontrado la plantilla %s"; +$GLOBALS["i18n"]["%s template could not be found"] = "No se ha encontrado la planilla %s"; -$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: no se ha encontrado '%s', por favor verifica que son correctos el directorio del tema (themepath) '%s' y el tema '%s' "; +$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: '%s' no se ha encontrado, por favor verifica que son correctos el directorio del tema (themepath) '%s' y el tema '%s' "; // line 33 in chat.html.tpl.php $GLOBALS["i18n"]["Bold"] = "Negrita"; // line 34 in chat.html.tpl.php -$GLOBALS["i18n"]["Italics"] = "Itálica"; +$GLOBALS["i18n"]["Italics"] = "Cursiva"; // line 35 in chat.html.tpl.php $GLOBALS["i18n"]["Underline"] = "Subrayado"; @@ -144,16 +145,16 @@ $GLOBALS["i18n"]["Pre"] = "Pre"; // line 38 in chat.html.tpl.php -$GLOBALS["i18n"]["Mail"] = "Correo electrónico"; +$GLOBALS["i18n"]["Mail"] = "E-mail"; // line 39 in chat.html.tpl.php $GLOBALS["i18n"]["Color"] = "Color"; // line 86 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Hide smiley box"] = "Ocultar emoticones"; +$GLOBALS["i18n"]["Hide smiley box"] = "Ocultar cuadro de iconos gestuales"; // line 87 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Show smiley box"] = "Mostrar emoticones"; +$GLOBALS["i18n"]["Show smiley box"] = "Mostrar iconos gestuales"; // line 88 in pfcclient.js.tpl.php $GLOBALS["i18n"]["Hide online users box"] = "Ocultar usuarios en línea"; @@ -165,7 +166,7 @@ $GLOBALS["i18n"]["%s must be implemented"] = "%s se debe implementar"; // line 343 in phpfreechatconfig.class.php -$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "El parametro '%s' es obligatorio, por defecto usa el valor '%s'"; +$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "El parámetro '%s' es obligatorio, por defecto se usa el valor '%s'"; // line 378 in phpfreechatconfig.class.php $GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "El parametro '%s' deber ser un número positivo"; @@ -174,195 +175,195 @@ $GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "El parametro '%s' no es válido. Los valores posibles son : '%s'"; // line 186 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["My room"] = ""; +$GLOBALS["i18n"]["My room"] = "Mi sala"; // line 19 in unban.class.php -$GLOBALS["i18n"]["Missing parameter"] = ""; +$GLOBALS["i18n"]["Missing parameter"] = "Parámetro perdido"; // line 38 in ban.class.php -$GLOBALS["i18n"]["banished from %s by %s"] = ""; +$GLOBALS["i18n"]["banished from %s by %s"] = "Hechado de %s por %s"; // line 23 in banlist.class.php -$GLOBALS["i18n"]["The banished user's id list is:"] = ""; +$GLOBALS["i18n"]["The banished user's id list is:"] = "La lista id de usuarios Hechados:"; // line 32 in banlist.class.php -$GLOBALS["i18n"]["Empty"] = ""; +$GLOBALS["i18n"]["Empty"] = "Vacío"; // line 34 in banlist.class.php -$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = ""; +$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "'/unban {id}' volvera a admitir al usuaio identificado por {id}"; // line 35 in banlist.class.php -$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = ""; +$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' volvera a admitir a todos los usuarios en este canal (channel)"; // line 24 in update.class.php -$GLOBALS["i18n"]["%s quit (timeout)"] = ""; +$GLOBALS["i18n"]["%s quit (timeout)"] = "%s desconectado (timeout)"; // line 46 in join.class.php -$GLOBALS["i18n"]["%s joins %s"] = ""; +$GLOBALS["i18n"]["%s joins %s"] = "%s se une a %s"; // line 31 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s"] = "Pateado de %s por %s"; // line 38 in send.class.php -$GLOBALS["i18n"]["Can't send the message, %s is offline"] = ""; +$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "No se puede enviar el mensaje, %s esta desconectado"; // line 27 in unban.class.php -$GLOBALS["i18n"]["Nobody has been unbanished"] = ""; +$GLOBALS["i18n"]["Nobody has been unbanished"] = "Nadie ha sido admitido"; // line 42 in unban.class.php -$GLOBALS["i18n"]["%s has been unbanished"] = ""; +$GLOBALS["i18n"]["%s has been unbanished"] = "%s se ha vuelto a admitir"; // line 49 in unban.class.php -$GLOBALS["i18n"]["%s users have been unbanished"] = ""; +$GLOBALS["i18n"]["%s users have been unbanished"] = "%s usuarios fueron admitidos"; // line 47 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = ""; +$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "No puedes ejecutar el comando '%s'"; // line 66 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because you are banished"] = ""; +$GLOBALS["i18n"]["Can't join %s because you are banished"] = "No puedes entrar %s porque estas prohibido"; // line 76 in auth.class.php -$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = ""; +$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "No puedes entrar %s porque la lista de canales esta restringida"; // line 89 in auth.class.php -$GLOBALS["i18n"]["You are not allowed to change your nickname"] = ""; +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "No tienes permitido cambiar tu nick name"; // line 56 in noflood.class.php -$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = ""; +$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "Por favor no ingreses tantos mensajes en tan poco tiempo, el flood no será tolerado"; // line 109 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Private message"] = ""; +$GLOBALS["i18n"]["Private message"] = "Mensaje privado"; // line 110 in pfcclient.js.tpl.php -$GLOBALS["i18n"]["Close this tab"] = ""; +$GLOBALS["i18n"]["Close this tab"] = "Cerrar esta pestaña"; // line 199 in pfcgui.js.tpl.php -$GLOBALS["i18n"]["Do you really want to leave this room ?"] = ""; +$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "¿ En verdad deseas dejar esta sala ?"; // line 169 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = ""; +$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "Error: '%s' es un parámetro privado, no esta permitido cambiarlo"; // line 253 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be an array"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be an array"] = "El parámetro '%s' debe ser un vector (array)"; // line 265 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "El parámetro '%s' debe ser un booleano"; // line 271 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = ""; +$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "El parámetro '%s' debe ser una cadena de caracteres"; // line 395 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' must be writable"] = ""; +$GLOBALS["i18n"]["'%s' must be writable"] = "'%s' debe ser escribible"; // line 425 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["'%s' directory doesn't exist"] = ""; +$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "El directorio '%s' no existe"; // line 544 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["Please correct these errors"] = ""; +$GLOBALS["i18n"]["Please correct these errors"] = "Por favor corrija ese error"; // line 21 in pfcinfo.class.php -$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = ""; +$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Error: el archivo config no existe"; // line 190 in phpfreechat.class.php -$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = ""; +$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "Error: ¡ El chat no pudo ser cargado !, hay 2 posibilidades: tu navegador no soporta JavaScript o no configuraste correctamente los directorios del servidor – no dudes en pedir ayuda al foro (en ingles)"; // line 31 in help.class.php -$GLOBALS["i18n"]["Here is the command list:"] = ""; +$GLOBALS["i18n"]["Here is the command list:"] = "Aquí esta la lista de comandos"; // line 63 in identify.class.php -$GLOBALS["i18n"]["Succesfully identified"] = ""; +$GLOBALS["i18n"]["Succesfully identified"] = "Identificado exitosamente"; // line 68 in identify.class.php -$GLOBALS["i18n"]["Identification failure"] = ""; +$GLOBALS["i18n"]["Identification failure"] = "Identificación fallada"; // line 25 in send.class.php -$GLOBALS["i18n"]["Your must be connected to send a message"] = ""; +$GLOBALS["i18n"]["Your must be connected to send a message"] = "Debes estar conectado para enviar un mensaje"; // line 87 in chat.js.tpl.php -$GLOBALS["i18n"]["Click here to send your message"] = ""; +$GLOBALS["i18n"]["Click here to send your message"] = "Haz click aquí para enviar el mensaje"; // line 80 in chat.js.tpl.php -$GLOBALS["i18n"]["Enter the text to format"] = ""; +$GLOBALS["i18n"]["Enter the text to format"] = "Ingresa el texto que será formateado"; // line 81 in chat.js.tpl.php -$GLOBALS["i18n"]["Configuration has been rehashed"] = ""; +$GLOBALS["i18n"]["Configuration has been rehashed"] = "La configuración ha sido hecha"; // line 82 in chat.js.tpl.php -$GLOBALS["i18n"]["A problem occurs during rehash"] = ""; +$GLOBALS["i18n"]["A problem occurs during rehash"] = "Ocurrió un problema durante el proceso"; // line 83 in chat.js.tpl.php -$GLOBALS["i18n"]["Choosen nickname is allready used"] = ""; +$GLOBALS["i18n"]["Choosen nickname is allready used"] = "El nickname elegido ya esta siendo usado"; // line 84 in chat.js.tpl.php -$GLOBALS["i18n"]["phpfreechat current version is %s"] = ""; +$GLOBALS["i18n"]["phpfreechat current version is %s"] = "la actual versión de phpfreechat es %s"; // line 85 in chat.js.tpl.php -$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = ""; +$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Se ha alcanzado el numero máximo de canales"; // line 86 in chat.js.tpl.php -$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = ""; +$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Se ha alcanzado el numero máximo de privados"; // line 88 in chat.js.tpl.php -$GLOBALS["i18n"]["Send"] = ""; +$GLOBALS["i18n"]["Send"] = "Enviar"; // line 86 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: connect error"] = ""; +$GLOBALS["i18n"]["Mysql container: connect error"] = "Contenedor MySQL: error de conexión"; // line 101 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create database error '%s'"] = "Contenedor MySQL: '%s' error en la creación de la base de datos"; // line 112 in mysql.class.php -$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = ""; +$GLOBALS["i18n"]["Mysql container: create table error '%s'"] = "Contenedor MySQL: '%s' error en la creación de tabla(s)"; // line 80 in chat.js.tpl.php -$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = ""; +$GLOBALS["i18n"]["You are not allowed to speak to yourself"] = "No esta permitido hablarse a si mismo"; // line 82 in chat.js.tpl.php -$GLOBALS["i18n"]["Choosen nickname is not allowed"] = ""; +$GLOBALS["i18n"]["Choosen nickname is not allowed"] = "No esta permitido elegir nickname"; // line 83 in chat.js.tpl.php -$GLOBALS["i18n"]["Enable sound notifications"] = ""; +$GLOBALS["i18n"]["Enable sound notifications"] = "Notificaciones de sonido habilitadas"; // line 84 in chat.js.tpl.php -$GLOBALS["i18n"]["Disable sound notifications"] = ""; +$GLOBALS["i18n"]["Disable sound notifications"] = "notificaciones de sonido deshabilitadas"; // line 23 in kick.class.php -$GLOBALS["i18n"]["no reason"] = ""; +$GLOBALS["i18n"]["no reason"] = "Sin motivos"; // line 24 in banlist.class.php -$GLOBALS["i18n"]["The banished user list is:"] = ""; +$GLOBALS["i18n"]["The banished user list is:"] = "La lista de usuarios prohibidos"; // line 39 in banlist.class.php -$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = ""; +$GLOBALS["i18n"]["'/unban {nickname}' will unban the user identified by {nickname}"] = "/unban {nickname}' prohibira al usuario identificado por {nickname}"; // line 43 in kick.class.php -$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = ""; +$GLOBALS["i18n"]["kicked from %s by %s - reason: %s"] = "Peteado de %s por %s - motivo %s"; // line 20 in quit.class.php -$GLOBALS["i18n"]["%s quit (%s)"] = ""; +$GLOBALS["i18n"]["%s quit (%s)"] = "%s desconectado (%s)"; // line 124 in chat.js.tpl.php -$GLOBALS["i18n"]["Chat loading ..."] = ""; +$GLOBALS["i18n"]["Chat loading ..."] = "Chat cargando..."; // line 124 in chat.js.tpl.php -$GLOBALS["i18n"]["Please wait"] = ""; +$GLOBALS["i18n"]["Please wait"] = "Por favor espere"; // line 139 in chat.js.tpl.php -$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = ""; +$GLOBALS["i18n"]["%s appears to be either disabled or unsupported by your browser."] = "%s parece estar deshabilitado o no soportado por tu navegador"; // line 139 in chat.js.tpl.php -$GLOBALS["i18n"]["This web application requires %s to work properly."] = ""; +$GLOBALS["i18n"]["This web application requires %s to work properly."] = "Esta aplicacion requiere %s para trabajar correctamente"; // line 135 in chat.js.tpl.php -$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = ""; +$GLOBALS["i18n"]["Please enable %s in your browser settings, or upgrade to a browser with %s support and try again."] = "Por favor habilita %s en la configuración tu navegador, o vuelve a intentarlo con un navagador que soporte %s"; // line 137 in chat.js.tpl.php -$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] = ""; +$GLOBALS["i18n"]["Please upgrade to a browser with %s support and try again."] ="Por favor vuelve a intentarlo con un navagador que soporte %s"; // line 139 in chat.js.tpl.php -$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = ""; +$GLOBALS["i18n"]["In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."] = "En las versiones anterior de 7.0 del Internet Explorer, ponen en ejecución a Ajax usando ActiveX. Por favor activa el ActiveX en los ajustes de la seguridad del navegador o cambia a un navegador que soporte Ajax e intentar otra vez."; // line 359 in pfcglobalconfig.class.php -$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = ""; +$GLOBALS["i18n"]["%s doesn't exist, data_public_path cannot be installed"] = "No existe %s, data_public_path no puede ser instalado"; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-21 22:09:56
|
Revision: 933 http://svn.sourceforge.net/phpfreechat/?rev=933&view=rev Author: kerphi Date: 2007-01-21 14:09:53 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Bug fix: IE6 crash on old WinXP version [5h00] Modified Paths: -------------- trunk/data/public/js/createstylerule.js trunk/src/phpfreechat.class.php Modified: trunk/data/public/js/createstylerule.js =================================================================== --- trunk/data/public/js/createstylerule.js 2007-01-21 11:26:08 UTC (rev 932) +++ trunk/data/public/js/createstylerule.js 2007-01-21 22:09:53 UTC (rev 933) @@ -1,27 +1,35 @@ // from http://www.bobbyvandersluis.com/articles/dynamicCSS.php -function createStyleRule(selector, declaration) { +var pfcCSS = Class.create(); +pfcCSS.prototype = { + initialize: function() + { if (!document.getElementsByTagName || !(document.createElement || document.createElementNS)) return; var agt = navigator.userAgent.toLowerCase(); - var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); - var is_iewin = (is_ie && (agt.indexOf("win") != -1)); - var is_iemac = (is_ie && (agt.indexOf("mac") != -1)); - if (is_iemac) return; // script doesn't work properly in IE/Mac + this.is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); + this.is_iewin = (is_ie && (agt.indexOf("win") != -1)); + this.is_iemac = (is_ie && (agt.indexOf("mac") != -1)); + if (this.is_iemac) return; // script doesn't work properly in IE/Mac + var head = document.getElementsByTagName("head")[0]; - var style = (typeof document.createElementNS != "undefined") ? + this.style = (typeof document.createElementNS != "undefined") ? document.createElementNS("http://www.w3.org/1999/xhtml", "style") : document.createElement("style"); - if (!is_iewin) { - var styleRule = document.createTextNode(selector + " {" + declaration + "}"); - style.appendChild(styleRule); // bugs in IE/Win + this.style.setAttribute("type", "text/css"); + this.style.setAttribute("media", "screen"); + head.appendChild(this.style); + + this.lastStyle = document.styleSheets[document.styleSheets.length - 1]; + }, + + applyRule: function(selector, declaration) + { + if (!this.is_iewin) { + var styleRule = document.createTextNode(selector + " {" + declaration + "}"); + this.style.appendChild(styleRule); // bugs in IE/Win } - style.setAttribute("type", "text/css"); - style.setAttribute("media", "screen"); - head.appendChild(style); - if (is_iewin && document.styleSheets && document.styleSheets.length > 0) { - var lastStyle = document.styleSheets[document.styleSheets.length - 1]; - if (typeof lastStyle.addRule == "object") { - lastStyle.addRule(selector, declaration); - } + if (this.is_iewin && document.styleSheets && document.styleSheets.length > 0) { + this.lastStyle.addRule(selector, declaration); } + } } \ No newline at end of file Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-01-21 11:26:08 UTC (rev 932) +++ trunk/src/phpfreechat.class.php 2007-01-21 22:09:53 UTC (rev 933) @@ -420,7 +420,8 @@ } $t->setTemplate($c->getFilePathFromTheme('style.css')); $css_code .= $t->getOutput(); - + + $css->parse($css_code); foreach($css->css as $k => $v) { @@ -428,13 +429,11 @@ { $rules = ''; foreach($v2 as $k3 => $v3) - { $rules .= $k3.':'.$v3.';'; - } - $js .= "c['".$k2."']='".$rules."';\n"; + $js .= "c['".$k2."']='".str_replace("\n", "", $rules)."';\n"; } - } - $js .= "var k = c.keys(); c.each(function (a,b) { createStyleRule(a[0],a[1]); });"; + } + $js .= "var pfccss = new pfcCSS(); var k = c.keys(); c.each(function (a) { pfccss.applyRule(a[0],a[1]); });"; $xml_reponse->script($js); return $xml_reponse; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-31 17:38:36
|
Revision: 942 http://svn.sourceforge.net/phpfreechat/?rev=942&view=rev Author: kerphi Date: 2007-01-31 09:37:29 -0800 (Wed, 31 Jan 2007) Log Message: ----------- fix problem with update process client side + add a new ping label Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/commands/update.class.php trunk/themes/default/chat.html.tpl.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-31 09:17:33 UTC (rev 941) +++ trunk/data/public/js/pfcclient.js 2007-01-31 17:37:29 UTC (rev 942) @@ -895,7 +895,7 @@ var rx = new RegExp('(^\/[^ ]+) *(.*)','ig'); if (!recipientid) recipientid = this.gui.getTabId(); cmd = cmd.replace(rx, '$1 '+this.clientid+' '+(recipientid==''?'0':recipientid)+' $2'); - return eval('pfc_handleRequest(cmd);'); + return pfc_handleRequest(cmd); //eval('pfc_handleRequest(cmd);'); }, /** @@ -906,20 +906,24 @@ 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 || (new Date().getTime() - this.last_refresh_time) > this.max_refresh_delay) + if (this.canupdatenexttime) { + // the connection is ok res = this.sendRequest('/update'); - this.canupdatenexttime = false; // don't update since the 'ok' response is received + this.canupdatenexttime = false; // don't update if the last 'ok' response is not yet received } - // adjust the refresh_delay if the connection was lost - if (res == false) { - this.refresh_delay = this.refresh_delay * 2; - if(this.refresh_delay > this.max_refresh_delay) - { - this.refresh_delay = this.max_refresh_delay; - } - } + else if ((new Date().getTime() - this.last_refresh_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(); + } // setup the next update this.timeout = setTimeout('pfc.updateChat(true)', this.refresh_delay); } Modified: trunk/src/commands/update.class.php =================================================================== --- trunk/src/commands/update.class.php 2007-01-31 09:17:33 UTC (rev 941) +++ trunk/src/commands/update.class.php 2007-01-31 17:37:29 UTC (rev 942) @@ -69,8 +69,7 @@ $cmd->run($xml_reponse, $cmdp); } - // do not send ok response to save bandwidth - // $xml_reponse->script("pfc.handleResponse('update', 'ok', '');"); + $xml_reponse->script("pfc.handleResponse('update', 'ok', '');"); } else $xml_reponse->script("pfc.handleResponse('update', 'ko', '');"); Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-31 09:17:33 UTC (rev 941) +++ trunk/themes/default/chat.html.tpl.php 2007-01-31 17:37:29 UTC (rev 942) @@ -36,7 +36,8 @@ </table> <div id="pfc_cmd_container"> - + <span id="pfc_ping"></span> + <?php if ($display_pfc_logo) { ?> <a href="http://www.phpfreechat.net" id="pfc_logo"<?php if($openlinknewwindow) echo ' onclick="window.open(this.href,\'_blank\');return false;"'; ?>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-06 21:59:26
|
Revision: 943 http://svn.sourceforge.net/phpfreechat/?rev=943&view=rev Author: kerphi Date: 2007-02-06 13:59:17 -0800 (Tue, 06 Feb 2007) Log Message: ----------- adjust the "ping" label near the logo Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/themes/default/chat.html.tpl.php trunk/themes/default/style.css Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-31 17:37:29 UTC (rev 942) +++ trunk/data/public/js/pfcclient.js 2007-02-06 21:59:17 UTC (rev 943) @@ -42,7 +42,7 @@ this.timeout = null; this.refresh_delay = pfc_refresh_delay; this.max_refresh_delay = pfc_max_refresh_delay; - this.last_refresh_time = 0; + this.last_refresh_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) */ Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-31 17:37:29 UTC (rev 942) +++ trunk/themes/default/chat.html.tpl.php 2007-02-06 21:59:17 UTC (rev 943) @@ -35,9 +35,7 @@ </tbody> </table> - <div id="pfc_cmd_container"> - <span id="pfc_ping"></span> - + <div id="pfc_cmd_container"> <?php if ($display_pfc_logo) { ?> <a href="http://www.phpfreechat.net" id="pfc_logo"<?php if($openlinknewwindow) echo ' onclick="window.open(this.href,\'_blank\');return false;"'; ?>> @@ -46,6 +44,7 @@ title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> <?php } ?> + <span id="pfc_ping" title="<?php echo _pfc("Ping"); ?>"></span> <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-01-31 17:37:29 UTC (rev 942) +++ trunk/themes/default/style.css 2007-02-06 21:59:17 UTC (rev 943) @@ -264,6 +264,11 @@ margin: 0; padding: 0; float: right; } +#pfc_ping { + margin: 0 5px 0 0; padding: 0; + float:right; + font-size: 80%; +} a#pfc_logo img { margin: 0; padding: 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-08 17:48:20
|
Revision: 945 http://svn.sourceforge.net/phpfreechat/?rev=945&view=rev Author: kerphi Date: 2007-02-08 09:48:08 -0800 (Thu, 08 Feb 2007) Log Message: ----------- rename style.css to style.css.php Modified Paths: -------------- trunk/src/phpfreechat.class.php Added Paths: ----------- trunk/themes/blune/style.css.php trunk/themes/default/style.css.php trunk/themes/green/style.css.php trunk/themes/zilveer/style.css.php Removed Paths: ------------- trunk/themes/blune/style.css trunk/themes/default/style.css trunk/themes/green/style.css trunk/themes/zilveer/style.css Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-07 16:43:01 UTC (rev 944) +++ trunk/src/phpfreechat.class.php 2007-02-08 17:48:08 UTC (rev 945) @@ -109,29 +109,6 @@ $output = ''; - - /* - if ($c->isDefaultFile("style.css")) - $output .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$c->getFileUrlByProxy("style.css")."\" />\n"; - else - { - // user has a customized stylesheet - // first of all include the default stylesheet - // then the user stylesheet - $defaultstyle = $c->themepath_default."/default/style.css"; - $output .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$c->data_public_url."/".$c->getId()."/proxy.php?p=default/style.css\" />\n"; - $output .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$c->getFileUrlByProxy("style.css")."\" />\n"; - } - - // since php can't be embeded into the css themes files, special styles parameter must be setup here - if ($c->height != "") - { - $output .= "<style type=\"text/css\">"; - $output .= "div#pfc_channels_content { height: ".$c->height."; }"; - $output .= "</style>\n"; - } - */ - if($return) return $output; else @@ -403,7 +380,7 @@ $js = '';//file_get_contents(dirname(__FILE__).'/client/createstylerule.js'); $js .= 'var c = $H();'; - $path = $c->getFilePathFromTheme('style.css'); + $path = $c->getFilePathFromTheme('style.css.php'); require_once dirname(__FILE__).'/../lib/csstidy-1.2/class.csstidy.php'; $css = new csstidy(); $css->set_cfg('preserve_css',false); @@ -413,12 +390,12 @@ $t = new pfcTemplate(); $t->assignObject($u,"u"); $t->assignObject($c,"c"); - if (!$c->isDefaultFile('style.css')) + if (!$c->isDefaultFile('style.css.php')) { - $t->setTemplate($c->themepath_default.'/default/style.css'); + $t->setTemplate($c->themepath_default.'/default/style.css.php'); $css_code .= $t->getOutput(); } - $t->setTemplate($c->getFilePathFromTheme('style.css')); + $t->setTemplate($c->getFilePathFromTheme('style.css.php')); $css_code .= $t->getOutput(); Deleted: trunk/themes/blune/style.css =================================================================== --- trunk/themes/blune/style.css 2007-02-07 16:43:01 UTC (rev 944) +++ trunk/themes/blune/style.css 2007-02-08 17:48:08 UTC (rev 945) @@ -1,54 +0,0 @@ - -div#pfc_container { - color: #2A4064; - background-color: #BEC5D0; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); - background-repeat: repeat-y; -} - -div.pfc_chat { - background-color:#CED4DF; -} - -div.pfc_message { - background-color:#CED4DF; -} - -div.pfc_oldmsg { - /*background-image: none; - background-color:#DCDEE4;*/ -} - -span.pfc_nick { - color:#2A4064; -} - -div#pfc_errors { - display: none; - margin-top: 5px; - padding: 2px; - height: 18px; - border: #555 solid 1px; - color: #EC4A1F; - background-color: #BEC5D0; - font-style: italic; - font-weight: bold; -} - -ul#pfc_channels_list li div { - background-color: #bec5d0; - border-bottom: 1px solid #bec5d0; -} -ul#pfc_channels_list li.selected div { - background-color: #CED4DF; - border-bottom: 1px solid #CED4DF; - color: #000; - font-weight: bold; -} -ul#pfc_channels_list li div:hover { - background-color: #CED4DF; - border-bottom: 1px solid #CED4DF; -} -ul#pfc_channels_list li.selected div:hover { - background-color: #CED4DF; -} Copied: trunk/themes/blune/style.css.php (from rev 943, trunk/themes/blune/style.css) =================================================================== --- trunk/themes/blune/style.css.php (rev 0) +++ trunk/themes/blune/style.css.php 2007-02-08 17:48:08 UTC (rev 945) @@ -0,0 +1,54 @@ + +div#pfc_container { + color: #2A4064; + background-color: #BEC5D0; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); + background-repeat: repeat-y; +} + +div.pfc_chat { + background-color:#CED4DF; +} + +div.pfc_message { + background-color:#CED4DF; +} + +div.pfc_oldmsg { + /*background-image: none; + background-color:#DCDEE4;*/ +} + +span.pfc_nick { + color:#2A4064; +} + +div#pfc_errors { + display: none; + margin-top: 5px; + padding: 2px; + height: 18px; + border: #555 solid 1px; + color: #EC4A1F; + background-color: #BEC5D0; + font-style: italic; + font-weight: bold; +} + +ul#pfc_channels_list li div { + background-color: #bec5d0; + border-bottom: 1px solid #bec5d0; +} +ul#pfc_channels_list li.selected div { + background-color: #CED4DF; + border-bottom: 1px solid #CED4DF; + color: #000; + font-weight: bold; +} +ul#pfc_channels_list li div:hover { + background-color: #CED4DF; + border-bottom: 1px solid #CED4DF; +} +ul#pfc_channels_list li.selected div:hover { + background-color: #CED4DF; +} Deleted: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-02-07 16:43:01 UTC (rev 944) +++ trunk/themes/default/style.css 2007-02-08 17:48:08 UTC (rev 945) @@ -1,398 +0,0 @@ -/* -will break display (margins, paddings) on IE6 -div#pfc_container * { - border: none; - margin: 0; - padding: 0; -} -*/ -div#pfc_container { - margin: 0; padding: 0; - border: 1px solid #555; - color: #000; - padding: 10px; - min-height: 20px; - background-color: #FFF; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/background.gif'); ?>"); - background-position: right; -/* background-repeat: repeat-xy;*/ - font-family: Verdana, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ -} - -div#pfc_container a img { border: 0px; } - -#pfc_minmax { - margin: 0; padding: 0; - cursor: pointer; -} -div#pfc_content_expandable { - margin: 0; padding: 0; - margin-top: 0.2em; -} - -div#pfc_channels_content { - margin: 0; padding: 0; - z-index: 20; - position: relative; - width: 100%; - border-right: 1px solid #555; - border-left: 1px solid #555; - border-bottom: 1px solid #555; - background-color: #FFF; - height: <?php echo ($c->height!=''?$c->height:'300px'); ?>; -} -div.pfc_content { - margin: 0; padding: 0; -} - -/* channels tabpanes */ -ul#pfc_channels_list { - margin: 0; padding: 0; - list-style-type: none; - display: block; - z-index: 50; - border-bottom: 1px solid #555; -/* margin-bottom: -5px;*/ -} -ul#pfc_channels_list li { - margin: 0; padding: 0; - display: inline; - margin-left: 5px; -} -ul#pfc_channels_list li img { - margin: 0; padding: 0; - vertical-align: bottom; -} -ul#pfc_channels_list li div { - margin: 0; padding: 0; - display: inline; - padding: 0 4px 0 4px; - border-top: 1px solid #555; - border-right: 1px solid #555; - border-left: 1px solid #555; - border-bottom: 1px solid #555; - background-color: #DDD; - vertical-align: bottom; -} -ul#pfc_channels_list li.selected div { - background-color: #FFF; - border-bottom: 1px solid #FFF; - color: #000; - font-weight: bold; -} -ul#pfc_channels_list li div:hover { - background-color: #FFF; -} -ul#pfc_channels_list li a { - margin: 0; padding: 0; - color: #000; - text-decoration: none; -} -ul#pfc_channels_list li a.pfc_tabtitle { - cursor: pointer; -} -ul#pfc_channels_list li a.pfc_tabtitle img { - padding-right: 4px; -} -ul#pfc_channels_list li a.pfc_tabclose { - margin-left: 4px; - cursor: pointer; -} -/* blinking stuff (tab notifications) */ -ul#pfc_channels_list li div.pfc_tabblink2 { - background-color: #FFF; -} - - -div.pfc_chat { - margin: 0; padding: 0; - z-index: 100; - position: absolute; - top: 0; - left: 0; - width: 80%; -/* WARNING: do not fix height in % because it will display blank screens on IE6 */ -/* height: 100%;*/ - overflow: auto; - word-wrap: break-word; -} -div.pfc_chat div { - margin: 0; padding: 0; border: none; -} - -div.pfc_online { - margin: 0; padding: 0; - position: absolute; - right: 0; - top: 0; - overflow: auto; - width: 20%; -/* WARNING: do not fix height in % because it will display blank screens on IE6 */ -/* height: 100%;*/ - color: #000; /* colors can be overriden by js nickname colorization */ - background-color: #FFF; - - /* borders are drawn by this image background */ - background-image: url("<?php echo $c->getFileUrlFromTheme('images/online-separator.gif'); ?>"); - background-position: left; - background-repeat: repeat-y; -} -div.pfc_online ul { - margin: 4px; padding: 0; - list-style-type: none; - font-size: 90%; - font-weight: bold; -} -ul.pfc_nicklist li { - margin: 0 0 5px 0; padding: 0; - border-bottom: 1px solid #AAA; -} -ul.pfc_nicklist img { - vertical-align: middle; /* fix icon position problem in IE6 */ -} -ul.pfc_nicklist a { - text-decoration: none; -} -ul.pfc_nicklist nobr span { - margin: 0; padding: 0; - display: inline; - text-decoration: none; -} - - - - -h2#pfc_title { - margin:0; padding:0; border: none; - font-size: 110%; -} - -img#pfc_minmax { - float: right; -} - -.pfc_invisible { - display: none; -} - -div.pfc_message { - margin: 0; padding: 0; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.gif'); ?>"); - background-position: right; - background-repeat: no-repeat; -} -div.pfc_message img { - margin: 0; padding: 0; - vertical-align: middle; -} -div.pfc_oldmsg { - background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.gif'); ?>"); - background-position: right; - background-repeat: no-repeat; -} - -span.pfc_heure { - color: #bebebe; - font-size: 70%; -} - -span.pfc_date { - color: #bebebe; - font-size: 70%; -} - -span.pfc_nick { - color: #fbac17; - font-weight: bold; -} - -div#pfc_input_container { - margin: 5px 0 0 0; padding: 0; -} -div#pfc_input_container input { - margin: 0; padding: 0; -} -div#pfc_input_container td.pfc_td2 { - padding-right: 5px; - width: 100%; -} - -input#pfc_words { - margin: 0; padding: 0; - border: #555 solid 1px; - background-color: #FAFAFA; - width: 100%; - font-size: 12px; - height: 20px; - vertical-align: bottom; - font-size: 1em; - height: 1.2em; -} - -input#pfc_send { - margin: 0; padding: 0; - display: block; - padding: 2px; - border: 1px solid #555; - background-color: #CCC; - font-size: 10px; - vertical-align: bottom; - font-size: 0.7em; - height: 1.9em; - cursor: pointer; -} - -div#pfc_cmd_container { - position: relative; - margin: 4px 0 0 0; padding: 0; -} - -p#pfc_handle { - margin: 0; padding: 0; - display: inline; - cursor: pointer; - margin-right: 5px; - color: black; - font-weight: bold; - /*background-color: #EEE;*/ - font-size: 70%; /* these two line fix a display problem in IE6 : */ - vertical-align: top; - white-space: pre; -} - -a#pfc_logo { - margin: 0; padding: 0; - float: right; -} -#pfc_ping { - margin: 0 5px 0 0; padding: 0; - float:right; - font-size: 80%; -} -a#pfc_logo img { - margin: 0; padding: 0; -} -div.pfc_btn { - margin: 0; padding: 0; - display: inline; - cursor: pointer; -} -div.pfc_btn img { - margin: 0; padding: 0; border: none; - vertical-align: middle; -} - -div#pfc_bbcode_container { - margin: 4px 0 4px 0; padding: 0; -} - -div#pfc_errors { - margin: 0 0 4px 0; padding: 5px; - display: none; - border: 1px solid #555; - color: #EC4B0F; - background-color: #FFBB77; - font-style: italic; - font-family: monospace; - font-size: 90%; -} - -/* commands */ -.pfc_cmd_msg { - color: black; -} -.pfc_cmd_me { - font-style: italic; - color: black; -} -.pfc_cmd_notice { - font-style: italic; - color: #888; -} - -/* commands info */ -.pfc_info { - color: #888; - - /* to fix IE6 display bug */ - /* http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 */ - font-family: sans-serif; /* do NOT setup monospace font or it will not work in IE6 */ - - font-style: italic; - background-color: #EEE; - font-size: 80%; -} - -div#pfc_colorlist { - margin:0; padding:0; - display: none; -} -img.pfc_color { - margin: 1px;padding: 1px; - cursor: pointer; - vertical-align: middle; -} - -.pfc_nickmarker { - white-space: pre; -} - -div#pfc_smileys { - margin: 0; padding: 0; - display: none; /* will be shown by javascript routines */ - background-color: #FFF; - border: 1px solid #555; - padding: 4px; -} -div#pfc_smileys img { - margin: 0; padding: 0; - margin-right: 2px; - cursor: pointer; - vertical-align: middle; -} - -div.pfc_nickwhois * { padding: 0; margin: 0; } -div.pfc_nickwhois a img { border: none; } -div.pfc_nickwhois { - border: 1px solid #444; - background-color: #FFF; - font-size: 75%; -} -div.pfc_nickwhois ul { - list-style-type: none; - background-color: #EEE; - border-bottom: 1px solid #444; -} -div.pfc_nickwhois li { - display: inline; - margin-right: 4px; - padding: 2px; -} -td.pfc_nickwhois_c1 { - font-weight: bold; -} -li.pfc_nickwhois_pv { - padding-left: 2px; - border-left: 1px solid #444; -} -li.pfc_nickwhois_pv a { - text-decoration: none; -} - - -img.pfc_nickbutton { - cursor: pointer; -} - -div#pfc_debug { - font-size: 11px; -} -div#pfc_sound_container { - position: absolute; - top: 0; - left: 0; - visibility:hidden; /* this box is hidden because it contains a flash sound media (sound.swf)*/ - width: 0; - height: 0; -} - Copied: trunk/themes/default/style.css.php (from rev 943, trunk/themes/default/style.css) =================================================================== --- trunk/themes/default/style.css.php (rev 0) +++ trunk/themes/default/style.css.php 2007-02-08 17:48:08 UTC (rev 945) @@ -0,0 +1,398 @@ +/* +will break display (margins, paddings) on IE6 +div#pfc_container * { + border: none; + margin: 0; + padding: 0; +} +*/ +div#pfc_container { + margin: 0; padding: 0; + border: 1px solid #555; + color: #000; + padding: 10px; + min-height: 20px; + background-color: #FFF; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/background.gif'); ?>"); + background-position: right; +/* background-repeat: repeat-xy;*/ + font-family: Verdana, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ +} + +div#pfc_container a img { border: 0px; } + +#pfc_minmax { + margin: 0; padding: 0; + cursor: pointer; +} +div#pfc_content_expandable { + margin: 0; padding: 0; + margin-top: 0.2em; +} + +div#pfc_channels_content { + margin: 0; padding: 0; + z-index: 20; + position: relative; + width: 100%; + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #FFF; + height: <?php echo ($c->height!=''?$c->height:'300px'); ?>; +} +div.pfc_content { + margin: 0; padding: 0; +} + +/* channels tabpanes */ +ul#pfc_channels_list { + margin: 0; padding: 0; + list-style-type: none; + display: block; + z-index: 50; + border-bottom: 1px solid #555; +/* margin-bottom: -5px;*/ +} +ul#pfc_channels_list li { + margin: 0; padding: 0; + display: inline; + margin-left: 5px; +} +ul#pfc_channels_list li img { + margin: 0; padding: 0; + vertical-align: bottom; +} +ul#pfc_channels_list li div { + margin: 0; padding: 0; + display: inline; + padding: 0 4px 0 4px; + border-top: 1px solid #555; + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #DDD; + vertical-align: bottom; +} +ul#pfc_channels_list li.selected div { + background-color: #FFF; + border-bottom: 1px solid #FFF; + color: #000; + font-weight: bold; +} +ul#pfc_channels_list li div:hover { + background-color: #FFF; +} +ul#pfc_channels_list li a { + margin: 0; padding: 0; + color: #000; + text-decoration: none; +} +ul#pfc_channels_list li a.pfc_tabtitle { + cursor: pointer; +} +ul#pfc_channels_list li a.pfc_tabtitle img { + padding-right: 4px; +} +ul#pfc_channels_list li a.pfc_tabclose { + margin-left: 4px; + cursor: pointer; +} +/* blinking stuff (tab notifications) */ +ul#pfc_channels_list li div.pfc_tabblink2 { + background-color: #FFF; +} + + +div.pfc_chat { + margin: 0; padding: 0; + z-index: 100; + position: absolute; + top: 0; + left: 0; + width: 80%; +/* WARNING: do not fix height in % because it will display blank screens on IE6 */ +/* height: 100%;*/ + overflow: auto; + word-wrap: break-word; +} +div.pfc_chat div { + margin: 0; padding: 0; border: none; +} + +div.pfc_online { + margin: 0; padding: 0; + position: absolute; + right: 0; + top: 0; + overflow: auto; + width: 20%; +/* WARNING: do not fix height in % because it will display blank screens on IE6 */ +/* height: 100%;*/ + color: #000; /* colors can be overriden by js nickname colorization */ + background-color: #FFF; + + /* borders are drawn by this image background */ + background-image: url("<?php echo $c->getFileUrlFromTheme('images/online-separator.gif'); ?>"); + background-position: left; + background-repeat: repeat-y; +} +div.pfc_online ul { + margin: 4px; padding: 0; + list-style-type: none; + font-size: 90%; + font-weight: bold; +} +ul.pfc_nicklist li { + margin: 0 0 5px 0; padding: 0; + border-bottom: 1px solid #AAA; +} +ul.pfc_nicklist img { + vertical-align: middle; /* fix icon position problem in IE6 */ +} +ul.pfc_nicklist a { + text-decoration: none; +} +ul.pfc_nicklist nobr span { + margin: 0; padding: 0; + display: inline; + text-decoration: none; +} + + + + +h2#pfc_title { + margin:0; padding:0; border: none; + font-size: 110%; +} + +img#pfc_minmax { + float: right; +} + +.pfc_invisible { + display: none; +} + +div.pfc_message { + margin: 0; padding: 0; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.gif'); ?>"); + background-position: right; + background-repeat: no-repeat; +} +div.pfc_message img { + margin: 0; padding: 0; + vertical-align: middle; +} +div.pfc_oldmsg { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.gif'); ?>"); + background-position: right; + background-repeat: no-repeat; +} + +span.pfc_heure { + color: #bebebe; + font-size: 70%; +} + +span.pfc_date { + color: #bebebe; + font-size: 70%; +} + +span.pfc_nick { + color: #fbac17; + font-weight: bold; +} + +div#pfc_input_container { + margin: 5px 0 0 0; padding: 0; +} +div#pfc_input_container input { + margin: 0; padding: 0; +} +div#pfc_input_container td.pfc_td2 { + padding-right: 5px; + width: 100%; +} + +input#pfc_words { + margin: 0; padding: 0; + border: #555 solid 1px; + background-color: #FAFAFA; + width: 100%; + font-size: 12px; + height: 20px; + vertical-align: bottom; + font-size: 1em; + height: 1.2em; +} + +input#pfc_send { + margin: 0; padding: 0; + display: block; + padding: 2px; + border: 1px solid #555; + background-color: #CCC; + font-size: 10px; + vertical-align: bottom; + font-size: 0.7em; + height: 1.9em; + cursor: pointer; +} + +div#pfc_cmd_container { + position: relative; + margin: 4px 0 0 0; padding: 0; +} + +p#pfc_handle { + margin: 0; padding: 0; + display: inline; + cursor: pointer; + margin-right: 5px; + color: black; + font-weight: bold; + /*background-color: #EEE;*/ + font-size: 70%; /* these two line fix a display problem in IE6 : */ + vertical-align: top; + white-space: pre; +} + +a#pfc_logo { + margin: 0; padding: 0; + float: right; +} +#pfc_ping { + margin: 0 5px 0 0; padding: 0; + float:right; + font-size: 80%; +} +a#pfc_logo img { + margin: 0; padding: 0; +} +div.pfc_btn { + margin: 0; padding: 0; + display: inline; + cursor: pointer; +} +div.pfc_btn img { + margin: 0; padding: 0; border: none; + vertical-align: middle; +} + +div#pfc_bbcode_container { + margin: 4px 0 4px 0; padding: 0; +} + +div#pfc_errors { + margin: 0 0 4px 0; padding: 5px; + display: none; + border: 1px solid #555; + color: #EC4B0F; + background-color: #FFBB77; + font-style: italic; + font-family: monospace; + font-size: 90%; +} + +/* commands */ +.pfc_cmd_msg { + color: black; +} +.pfc_cmd_me { + font-style: italic; + color: black; +} +.pfc_cmd_notice { + font-style: italic; + color: #888; +} + +/* commands info */ +.pfc_info { + color: #888; + + /* to fix IE6 display bug */ + /* http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 */ + font-family: sans-serif; /* do NOT setup monospace font or it will not work in IE6 */ + + font-style: italic; + background-color: #EEE; + font-size: 80%; +} + +div#pfc_colorlist { + margin:0; padding:0; + display: none; +} +img.pfc_color { + margin: 1px;padding: 1px; + cursor: pointer; + vertical-align: middle; +} + +.pfc_nickmarker { + white-space: pre; +} + +div#pfc_smileys { + margin: 0; padding: 0; + display: none; /* will be shown by javascript routines */ + background-color: #FFF; + border: 1px solid #555; + padding: 4px; +} +div#pfc_smileys img { + margin: 0; padding: 0; + margin-right: 2px; + cursor: pointer; + vertical-align: middle; +} + +div.pfc_nickwhois * { padding: 0; margin: 0; } +div.pfc_nickwhois a img { border: none; } +div.pfc_nickwhois { + border: 1px solid #444; + background-color: #FFF; + font-size: 75%; +} +div.pfc_nickwhois ul { + list-style-type: none; + background-color: #EEE; + border-bottom: 1px solid #444; +} +div.pfc_nickwhois li { + display: inline; + margin-right: 4px; + padding: 2px; +} +td.pfc_nickwhois_c1 { + font-weight: bold; +} +li.pfc_nickwhois_pv { + padding-left: 2px; + border-left: 1px solid #444; +} +li.pfc_nickwhois_pv a { + text-decoration: none; +} + + +img.pfc_nickbutton { + cursor: pointer; +} + +div#pfc_debug { + font-size: 11px; +} +div#pfc_sound_container { + position: absolute; + top: 0; + left: 0; + visibility:hidden; /* this box is hidden because it contains a flash sound media (sound.swf)*/ + width: 0; + height: 0; +} + Deleted: trunk/themes/green/style.css =================================================================== --- trunk/themes/green/style.css 2007-02-07 16:43:01 UTC (rev 944) +++ trunk/themes/green/style.css 2007-02-08 17:48:08 UTC (rev 945) @@ -1,85 +0,0 @@ -div#pfc_container { - border: 1px solid #555; - color: #338822; - background-color: #d9edd8; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); - background-position: right; - background-repeat: repeat-y; -} - -div#pfc_channels_content { - border-right: 1px solid #555; - border-left: 1px solid #555; - border-bottom: 1px solid #555; - background-color: #e0edde; -} - -/* channels tabpanes */ -ul#pfc_channels_list { - border-bottom: 1px solid #555; -} -ul#pfc_channels_list li div { - border-top: 1px solid #555; - border-right: 1px solid #555; - border-left: 1px solid #555; - border-bottom: 1px solid #555; - background-color: #7dc073; -} -ul#pfc_channels_list li.selected div { - background-color: #e0edde; - border-bottom: 1px solid #e0edde; - color: #000; -} -ul#pfc_channels_list li div:hover { - background-color: #e0edde; -} -ul#pfc_channels_list li a { - color: #000; -} - -div.pfc_smileys { - border: 1px solid #000; - background-color: #EEE; -} - -h2#pfc_title { - font-size: 110%; -} - -div.pfc_oldmsg { -} - -span.pfc_heure { - color: #bebebe; -} -span.pfc_date { - color: #bebebe; -} - -span.pfc_nick { - color: #fbac17; -} - -/* commands */ -.pfc_cmd_msg { - color: black; -} -.pfc_cmd_me { - font-style: italic; - color: black; -} -.pfc_cmd_notice { - font-style: italic; - color: #888; -} -pre.pfc_cmd_rehash -{ - color: #888; - font-style: italic; -} - -pre.pfc_cmd_help -{ - color: #888; - font-style: italic; -} \ No newline at end of file Copied: trunk/themes/green/style.css.php (from rev 943, trunk/themes/green/style.css) =================================================================== --- trunk/themes/green/style.css.php (rev 0) +++ trunk/themes/green/style.css.php 2007-02-08 17:48:08 UTC (rev 945) @@ -0,0 +1,85 @@ +div#pfc_container { + border: 1px solid #555; + color: #338822; + background-color: #d9edd8; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/shade.gif'); ?>"); + background-position: right; + background-repeat: repeat-y; +} + +div#pfc_channels_content { + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #e0edde; +} + +/* channels tabpanes */ +ul#pfc_channels_list { + border-bottom: 1px solid #555; +} +ul#pfc_channels_list li div { + border-top: 1px solid #555; + border-right: 1px solid #555; + border-left: 1px solid #555; + border-bottom: 1px solid #555; + background-color: #7dc073; +} +ul#pfc_channels_list li.selected div { + background-color: #e0edde; + border-bottom: 1px solid #e0edde; + color: #000; +} +ul#pfc_channels_list li div:hover { + background-color: #e0edde; +} +ul#pfc_channels_list li a { + color: #000; +} + +div.pfc_smileys { + border: 1px solid #000; + background-color: #EEE; +} + +h2#pfc_title { + font-size: 110%; +} + +div.pfc_oldmsg { +} + +span.pfc_heure { + color: #bebebe; +} +span.pfc_date { + color: #bebebe; +} + +span.pfc_nick { + color: #fbac17; +} + +/* commands */ +.pfc_cmd_msg { + color: black; +} +.pfc_cmd_me { + font-style: italic; + color: black; +} +.pfc_cmd_notice { + font-style: italic; + color: #888; +} +pre.pfc_cmd_rehash +{ + color: #888; + font-style: italic; +} + +pre.pfc_cmd_help +{ + color: #888; + font-style: italic; +} \ No newline at end of file Deleted: trunk/themes/zilveer/style.css =================================================================== --- trunk/themes/zilveer/style.css 2007-02-07 16:43:01 UTC (rev 944) +++ trunk/themes/zilveer/style.css 2007-02-08 17:48:08 UTC (rev 945) @@ -1,357 +0,0 @@ -div#pfc_container { - border: 1px solid #555; - color: #000; - padding: 10px; - min-height: 20px; - background-color: #FFF; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/background.gif'); ?>"); - background-position: right; -/* background-repeat: repeat-xy;*/ - font: 12px Trebuchet MS, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ - width: 640px; -} - -#pfc_minmax { - cursor: pointer; -} -/*bg of smilies and buttons*/ -div#pfc_content_expandable { - margin-top: 0.2em; - -} - -/*bg of the chat-messages*/ -div#pfc_channels_content { - z-index: 20; - position: relative; - - border-right: 2px solid #555; - border-left: 1px solid #555; - border-bottom: 2px solid #555; - background-color: #FFF; - margin-top: 5px; - - background-image: url("<?php echo $c->getFileUrlFromTheme('images/channels_content_bg.png'); ?>"); - width: 640px; -} -div.pfc_content { - -} - -/* channels tab-panes */ -ul#pfc_channels_list { - list-style-type: none; - display: block; - z-index: 50; - border-bottom: 1px solid #555; - margin-bottom: -5px; -} -ul#pfc_channels_list li { - display: inline; - margin-left: 5px; -} -/*tab-channel OFF*/ -ul#pfc_channels_list li div { - display: inline; - padding: 0 4px 0 4px; - border: 1px solid #555; - background-color: #DDD; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_off.png'); ?>"); - font-size: 11px; - font-weight: bold; - -/*these 2 lines below is to make the tabs looks the same in IE and FF */ - padding-bottom: 6px; - line-height: 26px; -} -/*tab-channel ON*/ -ul#pfc_channels_list li.selected div { - background-color: #FFF; - color: #000; - font-weight: bold; - font-size: 11px; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_on.png'); ?>"); - -/*these 2 lines below is to make the tabs looks the same in IE and FF */ - PADDING-BOTTOM: 6px; - line-height: 26px; -} -ul#pfc_channels_list li > div:hover { - background-color: #FFF; -} -/*tab-channel text*/ -ul#pfc_channels_list li a { - color: #333 ; - text-decoration: none; -} -ul#pfc_channels_list li a.pfc_tabtitle { - cursor: pointer; -} -ul#pfc_channels_list li a.pfc_tabtitle img { - padding-right: 4px; -} -ul#pfc_channels_list li a.pfc_tabclose { - margin-left: 4px; - cursor: pointer; -} - -/*where should the newmsg- and oldmsg pictures be placed? decide it here*/ -div.pfc_chat { - z-index: 100; - position: absolute; - top: 0px; - left: 3px; - right: 0px; - bottom: 3px; - width: 467px; -/* WARNING: do not fix height in % because it will display blank screens on IE6 */ -/* height: 100%;*/ - overflow: auto; -} - -/*usernames-onlinelist*/ -div.pfc_online { - position: absolute; - right: 0px; - top: 0px; - padding: 0px; - overflow: auto; - width: 171px; - border-bottom: 1px solid #555; -/* WARNING: do not fix height in % because it will display blank screens on IE6 */ -/* height: 100%;*/ - color: #000; /* colors can be overriden by js nickname colorization */ - background-color: #FFF; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_online.png'); ?>"); - background-position: left; - background-repeat: repeat-y; - /* borders are drawn by the javascript routines */ -} -div.pfc_online ul { - list-style-type: none; - margin: 0px; - padding: 0px; - margin-left: 8px; - margin-right: 8px; -} -div.pfc_online li { - font-weight: bold; - font-size: 12px; - cursor: pointer; - /* bottom borders are drawn by the javascript routines */ -} - -h2#pfc_title { - font-size: 110%; -} - -img#pfc_minmax { - float: right; -} - -.pfc_invisible { - display: none; -} - -.pfc_oddmsg { - background-color: #fff; - color: #000; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message1.png'); ?>"); -} -.pfc_evenmsg { - background-color: #ccc; - color: #000; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message2.png'); ?>"); -} - -div.pfc_message { - background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.png'); ?>"); - background-position: right; - background-repeat: no-repeat; -} - -div.pfc_oldmsg { - background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.png'); ?>"); - background-position: right; - background-repeat: no-repeat; -} - -span.pfc_heure, span.pfc_date { - color: #333; - font-size: 90%; -} - -span.pfc_nick { - color: #fbac17; - font-weight: bold; - cursor:pointer; -} - -div#pfc_input_container { - margin-top: 5px; - font-size: 12px; -} -p#pfc_handle { display: none; } - -div#pfc_input_container td.pfc_td2 { - background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_words.png'); ?>"); - background-repeat: no-repeat; - padding-left: 5px; -} - -input#pfc_words { - border: 0px; - background-color: #FAFAFA; - width: 520px; - font-size: 12px; - height: 20px; - vertical-align: bottom; - font: 12px Trebuchet MS; -} - -input#pfc_send { - display: block; - margin-left: 5px; - padding-top: 2px; - width: 100px; - border: 0px; - background-color: #ccc; - font: 12px Trebuchet MS; - color: #333; - height: 24px; - cursor: pointer; - background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_send.png'); ?>"); - cursor: pointer; -} - - - -div#pfc_cmd_container { - position: relative; - margin-top: 5px; - margin-bottom: 5px; - width: 100%; -} -div#pfc_cmd_container * { - margin-right: 2px; -} - - - -a#pfc_logo { - position: absolute; - right: 0px; - top: 0px; -} - -div.pfc_btn { - display: inline; - cursor: pointer; -} - -div#pfc_bbcode_container * { - margin-right: 2px; -} - -div#pfc_errors { - display: none; - padding: 5px; - border: 1px solid #555; - color: #EC4B0F; - background-color: #FFBB77; - font-style: italic; - font-family: monospace; - font-size: 90%; -} - -/* commands */ -.pfc_cmd_msg { - color: black; -} -.pfc_cmd_me { - font-style: italic; - color: black; -} -/*notice messages, login,logout,timed out etc..*/ -.pfc_cmd_notice { - font-style: italic; - color: #333; -} - -/* commands info */ -.pfc_info { - color: #fefefe; - - /* to fix IE6 display bug */ - /* http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 */ - font-family: sans-serif; /* do NOT setup monospace font or it will not work in IE6 */ - font-style: italic; - background-color: #EEE; - font-size: 80%; -} - - -div#pfc_colorlist { - display: none; -} -img.pfc_color { - padding: 1px; - cursor: pointer; -} - -.pfc_nickmarker { - white-space: pre; - -} - -div#pfc_smileys { - display: none; /* will be shown by javascript routines */ - background-color: #FFF; - border: 1px solid #555; - padding: 4px; - margin-top: 4px; -} -div#pfc_smileys * { - margin-right: 2px; -} - -div#pfc_smileys img { - cursor: pointer; -} - - - -div.pfc_nickwhois * { padding: 0; margin: 0; } -div.pfc_nickwhois a img { border: none; } -div.pfc_nickwhois { - border: 1px solid #444; - background-color: #FFF; - font-size: 75%; -} -div.pfc_nickwhois ul { - list-style-type: none; - background-color: #EEE; - border-bottom: 1px solid #444; -} -div.pfc_nickwhois li { - display: inline; - margin-right: 4px; - padding: 2px; -} -td.pfc_nickwhois_c1 { - font-weight: bold; -} -li.pfc_nickwhois_pv { - padding-left: 2px; - border-left: 1px solid #444; -} -li.pfc_nickwhois_pv a { - text-decoration: none; -} - -ul.pfc_nicklist span.pfc_nickmarker { -} - -img.pfc_nickbutton { - cursor: pointer; -} \ No newline at end of file Copied: trunk/themes/zilveer/style.css.php (from rev 943, trunk/themes/zilveer/style.css) =================================================================== --- trunk/themes/zilveer/style.css.php (rev 0) +++ trunk/themes/zilveer/style.css.php 2007-02-08 17:48:08 UTC (rev 945) @@ -0,0 +1,357 @@ +div#pfc_container { + border: 1px solid #555; + color: #000; + padding: 10px; + min-height: 20px; + background-color: #FFF; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/background.gif'); ?>"); + background-position: right; +/* background-repeat: repeat-xy;*/ + font: 12px Trebuchet MS, Sans-Serif; /* without this rule, the tabs are not correctly display on FF */ + width: 640px; +} + +#pfc_minmax { + cursor: pointer; +} +/*bg of smilies and buttons*/ +div#pfc_content_expandable { + margin-top: 0.2em; + +} + +/*bg of the chat-messages*/ +div#pfc_channels_content { + z-index: 20; + position: relative; + + border-right: 2px solid #555; + border-left: 1px solid #555; + border-bottom: 2px solid #555; + background-color: #FFF; + margin-top: 5px; + + background-image: url("<?php echo $c->getFileUrlFromTheme('images/channels_content_bg.png'); ?>"); + width: 640px; +} +div.pfc_content { + +} + +/* channels tab-panes */ +ul#pfc_channels_list { + list-style-type: none; + display: block; + z-index: 50; + border-bottom: 1px solid #555; + margin-bottom: -5px; +} +ul#pfc_channels_list li { + display: inline; + margin-left: 5px; +} +/*tab-channel OFF*/ +ul#pfc_channels_list li div { + display: inline; + padding: 0 4px 0 4px; + border: 1px solid #555; + background-color: #DDD; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_off.png'); ?>"); + font-size: 11px; + font-weight: bold; + +/*these 2 lines below is to make the tabs looks the same in IE and FF */ + padding-bottom: 6px; + line-height: 26px; +} +/*tab-channel ON*/ +ul#pfc_channels_list li.selected div { + background-color: #FFF; + color: #000; + font-weight: bold; + font-size: 11px; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/tab_on.png'); ?>"); + +/*these 2 lines below is to make the tabs looks the same in IE and FF */ + PADDING-BOTTOM: 6px; + line-height: 26px; +} +ul#pfc_channels_list li > div:hover { + background-color: #FFF; +} +/*tab-channel text*/ +ul#pfc_channels_list li a { + color: #333 ; + text-decoration: none; +} +ul#pfc_channels_list li a.pfc_tabtitle { + cursor: pointer; +} +ul#pfc_channels_list li a.pfc_tabtitle img { + padding-right: 4px; +} +ul#pfc_channels_list li a.pfc_tabclose { + margin-left: 4px; + cursor: pointer; +} + +/*where should the newmsg- and oldmsg pictures be placed? decide it here*/ +div.pfc_chat { + z-index: 100; + position: absolute; + top: 0px; + left: 3px; + right: 0px; + bottom: 3px; + width: 467px; +/* WARNING: do not fix height in % because it will display blank screens on IE6 */ +/* height: 100%;*/ + overflow: auto; +} + +/*usernames-onlinelist*/ +div.pfc_online { + position: absolute; + right: 0px; + top: 0px; + padding: 0px; + overflow: auto; + width: 171px; + border-bottom: 1px solid #555; +/* WARNING: do not fix height in % because it will display blank screens on IE6 */ +/* height: 100%;*/ + color: #000; /* colors can be overriden by js nickname colorization */ + background-color: #FFF; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_online.png'); ?>"); + background-position: left; + background-repeat: repeat-y; + /* borders are drawn by the javascript routines */ +} +div.pfc_online ul { + list-style-type: none; + margin: 0px; + padding: 0px; + margin-left: 8px; + margin-right: 8px; +} +div.pfc_online li { + font-weight: bold; + font-size: 12px; + cursor: pointer; + /* bottom borders are drawn by the javascript routines */ +} + +h2#pfc_title { + font-size: 110%; +} + +img#pfc_minmax { + float: right; +} + +.pfc_invisible { + display: none; +} + +.pfc_oddmsg { + background-color: #fff; + color: #000; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message1.png'); ?>"); +} +.pfc_evenmsg { + background-color: #ccc; + color: #000; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_message2.png'); ?>"); +} + +div.pfc_message { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/newmsg.png'); ?>"); + background-position: right; + background-repeat: no-repeat; +} + +div.pfc_oldmsg { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/oldmsg.png'); ?>"); + background-position: right; + background-repeat: no-repeat; +} + +span.pfc_heure, span.pfc_date { + color: #333; + font-size: 90%; +} + +span.pfc_nick { + color: #fbac17; + font-weight: bold; + cursor:pointer; +} + +div#pfc_input_container { + margin-top: 5px; + font-size: 12px; +} +p#pfc_handle { display: none; } + +div#pfc_input_container td.pfc_td2 { + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_words.png'); ?>"); + background-repeat: no-repeat; + padding-left: 5px; +} + +input#pfc_words { + border: 0px; + background-color: #FAFAFA; + width: 520px; + font-size: 12px; + height: 20px; + vertical-align: bottom; + font: 12px Trebuchet MS; +} + +input#pfc_send { + display: block; + margin-left: 5px; + padding-top: 2px; + width: 100px; + border: 0px; + background-color: #ccc; + font: 12px Trebuchet MS; + color: #333; + height: 24px; + cursor: pointer; + background-image: url("<?php echo $c->getFileUrlFromTheme('images/pfc_send.png'); ?>"); + cursor: pointer; +} + + + +div#pfc_cmd_container { + position: relative; + margin-top: 5px; + margin-bottom: 5px; + width: 100%; +} +div#pfc_cmd_container * { + margin-right: 2px; +} + + + +a#pfc_logo { + position: absolute; + right: 0px; + top: 0px; +} + +div.pfc_btn { + display: inline; + cursor: pointer; +} + +div#pfc_bbcode_container * { + margin-right: 2px; +} + +div#pfc_errors { + display: none; + padding: 5px; + border: 1px solid #555; + color: #EC4B0F; + background-color: #FFBB77; + font-style: italic; + font-family: monospace; + font-size: 90%; +} + +/* commands */ +.pfc_cmd_msg { + color: black; +} +.pfc_cmd_me { + font-style: italic; + color: black; +} +/*notice messages, login,logout,timed out etc..*/ +.pfc_cmd_notice { + font-style: italic; + color: #333; +} + +/* commands info */ +.pfc_info { + color: #fefefe; + + /* to fix IE6 display bug */ + /* http://sourceforge.net/tracker/index.php?func=detail&aid=1545403&group_id=158880&atid=809601 */ + font-family: sans-serif; /* do NOT setup monospace font or it will not work in IE6 */ + font-style: italic; + background-color: #EEE; + font-size: 80%; +} + + +div#pfc_colorlist { + display: none; +} +img.pfc_color { + padding: 1px; + cursor: pointer; +} + +.pfc_nickmarker { + white-space: pre; + +} + +div#pfc_smileys { + display: none; /* will be shown by javascript routines */ + background-color: #FFF; + border: 1px solid #555; + padding: 4px; + margin-top: 4px; +} +div#pfc_smileys * { + margin-right: 2px; +} + +div#pfc_smileys img { + cursor: pointer; +} + + + +div.pfc_nickwhois * { padding: 0; margin: 0; } +div.pfc_nickwhois a img { border: none; } +div.pfc_nickwhois { + border: 1px solid #444; + background-color: #FFF; + font-size: 75%; +} +div.pfc_nickwhois ul { + list-style-type: none; + background-color: #EEE; + border-bottom: 1px solid #444; +} +div.pfc_nickwhois li { + display: inline; + margin-right: 4px; + padding: 2px; +} +td.pfc_nickwhois_c1 { + font-weight: bold; +} +li.pfc_nickwhois_pv { + padding-left: 2px; + border-left: 1px solid #444; +} +li.pfc_nickwhois_pv a { + text-decoration: none; +} + +ul.pfc_nicklist span.pfc_nickmarker { +} + +img.pfc_nickbutton { + cursor: pointer; +} \ 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: <gpi...@us...> - 2007-08-29 16:19:28
|
Revision: 1161 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1161&view=rev Author: gpinzone Date: 2007-08-29 09:19:29 -0700 (Wed, 29 Aug 2007) Log Message: ----------- Deleted bad files. Removed Paths: ------------- trunk/README.txt trunk/conf/ trunk/dav/ trunk/db/ trunk/format trunk/hooks/ trunk/locks/ Deleted: trunk/README.txt =================================================================== --- trunk/README.txt 2007-08-29 16:16:46 UTC (rev 1160) +++ trunk/README.txt 2007-08-29 16:19:29 UTC (rev 1161) @@ -1,5 +0,0 @@ -This is a Subversion repository; use the 'svnadmin' tool to examine -it. Do not add, delete, or modify files here unless you know how -to avoid corrupting the repository. - -Visit http://subversion.tigris.org/ for more information. Deleted: trunk/format =================================================================== --- trunk/format 2007-08-29 16:16:46 UTC (rev 1160) +++ trunk/format 2007-08-29 16:19:29 UTC (rev 1161) @@ -1 +0,0 @@ -5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-09 10:21:26
|
Revision: 946 http://svn.sourceforge.net/phpfreechat/?rev=946&view=rev Author: kerphi Date: 2007-02-09 02:21:22 -0800 (Fri, 09 Feb 2007) Log Message: ----------- Small bug fixes : http://www.phpfreechat.net/forum/viewtopic.php?id=1202 Modified Paths: -------------- trunk/data/public/js/pfcgui.js trunk/src/commands/ban.class.php trunk/src/commands/kick.class.php trunk/src/containers/mysql.class.php Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-02-08 17:48:08 UTC (rev 945) +++ trunk/data/public/js/pfcgui.js 2007-02-09 10:21:22 UTC (rev 946) @@ -409,6 +409,7 @@ img.s_symbol = s_symbol.unescapeHTML(); img.onclick = function(){ pfc.insertSmiley(this.s_symbol); } container.appendChild(img); + container.appendChild(document.createTextNode(' ')); // so smileys will wrap fine if lot of smiles in theme. } }, Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2007-02-08 17:48:08 UTC (rev 945) +++ trunk/src/commands/ban.class.php 2007-02-09 10:21:22 UTC (rev 946) @@ -18,7 +18,7 @@ $c =& $this->c; $u =& $this->u; - $nick = isset($params[0]) ? trim($params[0]) : ''; + $nick = isset($params[0]) ? $params[0] : ''; $reason = isset($params[1]) ? $params[1] : ''; if ($reason == '') $reason = _pfc("no reason"); $channame = $u->channels[$recipientid]["name"]; Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2007-02-08 17:48:08 UTC (rev 945) +++ trunk/src/commands/kick.class.php 2007-02-09 10:21:22 UTC (rev 946) @@ -18,7 +18,7 @@ $c =& $this->c; $u =& $this->u; - $nick = isset($params[0]) ? trim($params[0]) : ''; + $nick = isset($params[0]) ? $params[0] : ''; $reason = isset($params[1]) ? $params[1] : ''; if ($reason == '') $reason = _pfc("no reason"); Modified: trunk/src/containers/mysql.class.php =================================================================== --- trunk/src/containers/mysql.class.php 2007-02-08 17:48:08 UTC (rev 945) +++ trunk/src/containers/mysql.class.php 2007-02-09 10:21:22 UTC (rev 946) @@ -38,6 +38,16 @@ * $params["container_cfg_mysql_table"] = "phpfreechat"; * $params["container_cfg_mysql_username"] = "root"; * $params["container_cfg_mysql_password"] = ""; + * + * Advanced parameters are : + * $params["container_cfg_mysql_fieldtype_server"] = 'varchar(32)'; + * $params["container_cfg_mysql_fieldtype_group"] = 'varchar(64)'; + * $params["container_cfg_mysql_fieldtype_subgroup"] = 'varchar(64)'; + * $params["container_cfg_mysql_fieldtype_leaf"] = 'varchar(64)'; + * $params["container_cfg_mysql_fieldtype_leafvalue"] = 'text'; + * $params["container_cfg_mysql_fieldtype_timestamp"] = 'int(11)'; + * $params["container_cfg_mysql_engine"] = 'InnoDB'; + * * * @author Stephane Gully <ste...@gm...> * @author HenkBB @@ -47,14 +57,15 @@ var $_db = null; var $_sql_create_table = " CREATE TABLE IF NOT EXISTS `%table%` ( - `server` varchar(256) NOT NULL default '', - `group` varchar(256) NOT NULL default '', - `subgroup` varchar(256) NOT NULL default '', - `leaf` varchar(256) NOT NULL default '', - `leafvalue` varchar(1024) NOT NULL, - `timestamp` int(11) NOT NULL default 0, - PRIMARY KEY (`server`,`group`,`subgroup`,`leaf`) -) ENGINE=MEMORY;"; + `server` %fieldtype_server% NOT NULL default '', + `group` %fieldtype_group% NOT NULL default '', + `subgroup` %fieldtype_subgroup% NOT NULL default '', + `leaf` %fieldtype_leaf% NOT NULL default '', + `leafvalue` %fieldtype_leafvalue% NOT NULL, + `timestamp` %fieldtype_timestamp% NOT NULL default 0, + PRIMARY KEY (`server`,`group`,`subgroup`,`leaf`), + INDEX (`server`,`group`,`subgroup`,`timestamp`) +) ENGINE=%engine%;"; function pfcContainer_Mysql(&$config) { @@ -71,6 +82,14 @@ $cfg["mysql_table"] = 'phpfreechat'; $cfg["mysql_username"] = 'root'; $cfg["mysql_password"] = ''; + // advanced parameters (don't touch if you don't know what your are doing) + $cfg["mysql_fieldtype_server"] = 'varchar(32)'; + $cfg["mysql_fieldtype_group"] = 'varchar(64)'; + $cfg["mysql_fieldtype_subgroup"] = 'varchar(64)'; + $cfg["mysql_fieldtype_leaf"] = 'varchar(128)'; + $cfg["mysql_fieldtype_leafvalue"] = 'text'; + $cfg["mysql_fieldtype_timestamp"] = 'int(11)'; + $cfg["mysql_engine"] = 'InnoDB'; return $cfg; } @@ -105,7 +124,15 @@ } // create the table if it doesn't exists - $query = str_replace('%table%',$c->container_cfg_mysql_table,$this->_sql_create_table); + $query = $this->_sql_create_table; + $query = str_replace('%engine%', $c->container_cfg_mysql_engine,$query); + $query = str_replace('%table%', $c->container_cfg_mysql_table,$query); + $query = str_replace('%fieldtype_server%', $c->container_cfg_mysql_fieldtype_server,$query); + $query = str_replace('%fieldtype_group%', $c->container_cfg_mysql_fieldtype_group,$query); + $query = str_replace('%fieldtype_subgroup%', $c->container_cfg_mysql_fieldtype_subgroup,$query); + $query = str_replace('%fieldtype_leaf%', $c->container_cfg_mysql_fieldtype_leaf,$query); + $query = str_replace('%fieldtype_leafvalue%', $c->container_cfg_mysql_fieldtype_leafvalue,$query); + $query = str_replace('%fieldtype_timestamp%', $c->container_cfg_mysql_fieldtype_timestamp,$query); $result = mysql_query($query, $db); if ($result === FALSE) { @@ -180,29 +207,33 @@ $server = $c->serverid; $db = $this->_connect(); - $sql_where=""; - $value="leafvalue"; + $sql_where = ""; + $sql_group_by = ""; + $value = "leafvalue"; if ($group != NULL) { - $sql_where.=" AND `group`='$group'"; - $value="subgroup"; + $sql_where .= " AND `group`='$group'"; + $value = "subgroup"; + $sql_group_by = "GROUP BY `$value`"; } if ($subgroup != NULL) { - $sql_where.=" AND `subgroup`='$subgroup'"; - $value="leaf"; + $sql_where .= " AND `subgroup`='$subgroup'"; + $value = "leaf"; + $sql_group_by = ""; } if ($leaf != NULL) { - $sql_where.=" AND `leaf`='$leaf'"; - $value="leafvalue"; + $sql_where .= " AND `leaf`='$leaf'"; + $value = "leafvalue"; + $sql_group_by = ""; } - $sql_select="SELECT `$value`, `timestamp` FROM ".$c->container_cfg_mysql_table." WHERE `server`='$server' $sql_where GROUP BY `$value` ORDER BY timestamp"; - + $sql_select="SELECT `$value`, `timestamp` FROM ".$c->container_cfg_mysql_table." WHERE `server`='$server' $sql_where $sql_group_by ORDER BY timestamp"; + if ($c->debug) file_put_contents("/tmp/debug.txt", "\ngetSQL(".$sql_select.")", FILE_APPEND); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-14 16:11:32
|
Revision: 948 http://svn.sourceforge.net/phpfreechat/?rev=948&view=rev Author: kerphi Date: 2007-02-14 08:11:18 -0800 (Wed, 14 Feb 2007) Log Message: ----------- disable debug mode on the index Modified Paths: -------------- trunk/index.php trunk/version Modified: trunk/index.php =================================================================== --- trunk/index.php 2007-02-09 11:16:59 UTC (rev 947) +++ trunk/index.php 2007-02-14 16:11:18 UTC (rev 948) @@ -6,7 +6,7 @@ $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params["isadmin"] = true; // just for debug ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -$params["debug"] = true; +//$params["debug"] = true; $chat = new phpFreeChat( $params ); ?> Modified: trunk/version =================================================================== --- trunk/version 2007-02-09 11:16:59 UTC (rev 947) +++ trunk/version 2007-02-14 16:11:18 UTC (rev 948) @@ -1 +1 @@ -1.0-beta9-pre \ No newline at end of file +1.0-beta9-pre2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-14 16:39:53
|
Revision: 949 http://svn.sourceforge.net/phpfreechat/?rev=949&view=rev Author: kerphi Date: 2007-02-14 08:39:45 -0800 (Wed, 14 Feb 2007) Log Message: ----------- [en] Display the "Chat loading ..." box earlier : http://www.phpfreechat.net/forum/viewtopic.php?id=1183 Modified Paths: -------------- trunk/src/phpfreechat.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-14 16:11:18 UTC (rev 948) +++ trunk/src/phpfreechat.class.php 2007-02-14 16:39:45 UTC (rev 949) @@ -552,6 +552,7 @@ pfcI18N::SwitchOutputEncoding(); + $xml_reponse->remove("pfc_loader"); // to hide the loading box $xml_reponse->assign("pfc_container", "innerHTML", $html); return $xml_reponse; Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-02-14 16:11:18 UTC (rev 948) +++ trunk/themes/default/chat.js.tpl.php 2007-02-14 16:39:45 UTC (rev 949) @@ -1,3 +1,14 @@ +<div id="pfc_loader"> + +<div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> + <p style="padding:0;margin:0;text-align:center;"> + <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" + alt="" + style="float:left;margin:0;"/> + <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?> + </p> +</div> + <script type="text/javascript"> // <![CDATA[ <?php @@ -97,7 +108,6 @@ // ]]> </script> - <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/xajax.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/compat.js"></script> <script type="text/javascript" src="<?php echo $c->data_public_url; ?>/js/md5.js"></script> @@ -114,17 +124,7 @@ <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> -<div id="pfc_container"> -<div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0;margin:0;text-align:center;"> - <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" - alt="" - style="float:left;margin:0;"/> - <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?> - </p> -</div> - <div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> <noscript> <p><?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","JavaScript"); ?> <?php echo _pfc("This web application requires %s to work properly.","JavaScript"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","JavaScript","JavaScript"); ?></p> @@ -147,8 +147,10 @@ <a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> </div> <!-- pfc_notloading --> -</div> <!-- pfc_container --> +</div> <!-- pfc_loader --> +<div id="pfc_container"><!-- Will contains chat.html.tpl.php --></div> + <?php if ($debug) { ?> <div id="pfc_debug"></div> <?php } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-15 10:35:44
|
Revision: 953 http://svn.sourceforge.net/phpfreechat/?rev=953&view=rev Author: kerphi Date: 2007-02-15 02:35:45 -0800 (Thu, 15 Feb 2007) Log Message: ----------- Optimisation : use the php5 json module if available Modified Paths: -------------- trunk/src/commands/getnewmsg.class.php trunk/src/commands/who.class.php trunk/src/commands/whois.class.php trunk/src/pfccommand.class.php trunk/src/phpfreechat.class.php trunk/themes/default/chat.js.tpl.php Added Paths: ----------- trunk/src/pfcjson.class.php Modified: trunk/src/commands/getnewmsg.class.php =================================================================== --- trunk/src/commands/getnewmsg.class.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/src/commands/getnewmsg.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -20,7 +20,6 @@ * Boston, MA 02110-1301 USA */ -require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); require_once(dirname(__FILE__)."/../pfccommand.class.php"); class pfcCommand_getnewmsg extends pfcCommand @@ -99,7 +98,8 @@ } if (count($js) != 0) { - $json = new Services_JSON(); + require_once dirname(__FILE__).'/../pfcjson.class.php'; + $json = new pfcJSON(); $js = $json->encode($js); $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', (".$js."));"); } Modified: trunk/src/commands/who.class.php =================================================================== --- trunk/src/commands/who.class.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/src/commands/who.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -62,9 +62,9 @@ $chanmeta['meta']['users']['nick'] = $users['nick']; $chanmeta['meta']['users']['nickid'] = $users['nickid']; - require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); - $json = new Services_JSON(); - $js = $json->encode($chanmeta); + require_once dirname(__FILE__).'/../pfcjson.class.php'; + $json = new pfcJSON(); + $js = $json->encode($chanmeta); return $js; } } Modified: trunk/src/commands/whois.class.php =================================================================== --- trunk/src/commands/whois.class.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/src/commands/whois.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -20,7 +20,6 @@ * Boston, MA 02110-1301 USA */ -require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); require_once(dirname(__FILE__)."/../pfccommand.class.php"); class pfcCommand_whois extends pfcCommand @@ -58,7 +57,8 @@ foreach($order as $o) $nickmeta_sorted[$o] = $usermeta[$o]; $usermeta = $nickmeta_sorted; - $json = new Services_JSON(); + require_once dirname(__FILE__).'/../pfcjson.class.php'; + $json = new pfcJSON(); $js = $json->encode($usermeta); $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', ".$js.");"); } Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/src/pfccommand.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -251,8 +251,8 @@ { if ($data != NULL) { - require_once(dirname(__FILE__)."/../lib/json/JSON.php"); - $json = new Services_JSON(); + require_once dirname(__FILE__).'/pfcjson.class.php'; + $json = new pfcJSON(); $js = $json->encode($data); $xml_reponse->script("trace('".$msg." -> ".$js."');"); } Added: trunk/src/pfcjson.class.php =================================================================== --- trunk/src/pfcjson.class.php (rev 0) +++ trunk/src/pfcjson.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -0,0 +1,53 @@ +<?php +/** + * pfcjson.class.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 + */ + +class pfcJSON +{ + var $json = null; + + function pfcJSON() + { + // if the php5-json module is not available, use a software json implementation + if (!function_exists('json_encode')) { + require_once(dirname(__FILE__)."/../lib/json/JSON.php"); + $this->json = new Services_JSON(); + } + } + + function encode($v) + { + if ($this->json) + return $this->json->encode($v); + else + return json_encode($v); + } + + function decode($v) + { + if ($this->json) + return $this->json->decode($v); + else + return json_decode($v); + } +} + +?> \ No newline at end of file Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/src/phpfreechat.class.php 2007-02-15 10:35:45 UTC (rev 953) @@ -423,10 +423,10 @@ $c =& pfcGlobalConfig::Instance(); $js = ''; - - require_once(dirname(__FILE__)."/../lib/json/JSON.php"); - $json = new Services_JSON(); + require_once dirname(__FILE__).'/pfcjson.class.php'; + $json = new pfcJSON(); + $labels_to_load = array( "Do you really want to leave this room ?", // _pfc "Hide nickname marker", // _pfc Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-02-15 08:40:35 UTC (rev 952) +++ trunk/themes/default/chat.js.tpl.php 2007-02-15 10:35:45 UTC (rev 953) @@ -12,8 +12,8 @@ <script type="text/javascript"> // <![CDATA[ <?php -require_once(dirname(__FILE__)."/../../lib/json/JSON.php"); -$json = new Services_JSON(); +require_once dirname(__FILE__).'/../../src/pfcjson.class.php'; +$json = new pfcJSON(); ?> <?php $nick = $u->nick != "" ? $json->encode($u->nick) : $json->encode($c->nick); ?> 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-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-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-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 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-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 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 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-28 17:58:05
|
Revision: 982 http://svn.sourceforge.net/phpfreechat/?rev=982&view=rev Author: kerphi Date: 2007-02-28 09:58:04 -0800 (Wed, 28 Feb 2007) Log Message: ----------- [en] Bug fix: QUERY_STRING should not be added when server_script_url setup in the parameter list [0h40] [fr] Bug fix : QUERY_STRING ne doit pas etre ajoute lorsque le parametre server_script_url est explicitement regle dans la liste des parametres [0h40] -- Cette ligne, et les suivantes ci-dessous, seront ignor?\195?\169es-- M demo/demo50_customized_usermetadata.php M demo/demo34_add_a_link_on_nicknames.php M demo/demo5_customized_style.php M demo/demo21_with_hardcoded_urls.php M demo/demo3_config.php M themes/default/chat.js.tpl.php M src/phpfreechat.class.php M src/pfcglobalconfig.class.php Modified Paths: -------------- trunk/demo/demo21_with_hardcoded_urls.php trunk/demo/demo34_add_a_link_on_nicknames.php trunk/demo/demo3_config.php trunk/demo/demo50_customized_usermetadata.php trunk/demo/demo5_customized_style.php trunk/src/pfcglobalconfig.class.php trunk/src/phpfreechat.class.php trunk/themes/default/chat.js.tpl.php Modified: trunk/demo/demo21_with_hardcoded_urls.php =================================================================== --- trunk/demo/demo21_with_hardcoded_urls.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/demo/demo21_with_hardcoded_urls.php 2007-02-28 17:58:04 UTC (rev 982) @@ -8,7 +8,6 @@ // setup urls $params["data_public_url"] = "../data/public"; -$params["client_script_url"] = "./demo21_with_hardcoded_urls.php"; $params["server_script_url"] = "./demo21_with_hardcoded_urls.php"; $params["theme_default_url"] = "../themes"; Modified: trunk/demo/demo34_add_a_link_on_nicknames.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/demo/demo34_add_a_link_on_nicknames.php 2007-02-28 17:58:04 UTC (rev 982) @@ -4,7 +4,7 @@ $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["title"] = "A chat with a customized nickname list"; -$params["themepath"] = dirname(__FILE__)."/demo34_add_a_link_on_nicknames"; +$params["theme_path"] = dirname(__FILE__)."/demo34_add_a_link_on_nicknames"; $params["theme"] = "mytheme"; $chat = new phpFreeChat( $params ); Modified: trunk/demo/demo3_config.php =================================================================== --- trunk/demo/demo3_config.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/demo/demo3_config.php 2007-02-28 17:58:04 UTC (rev 982) @@ -6,4 +6,4 @@ $params["nick"] = "guest"; $params["server_script_path"] = dirname(__FILE__)."/demo3_server.php"; -?> +?> \ No newline at end of file Modified: trunk/demo/demo50_customized_usermetadata.php =================================================================== --- trunk/demo/demo50_customized_usermetadata.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/demo/demo50_customized_usermetadata.php 2007-02-28 17:58:04 UTC (rev 982) @@ -6,7 +6,7 @@ $params["title"] = "A chat which shows how to use user metadata : add avatar (images) to each connected users"; $params["nick"] = "guest".rand(1,1000); $params["nickmeta"] = array("avatar" => "demo50_data/avatar".rand(1,10).".jpg"); -$params["themepath"] = dirname(__FILE__)."/demo50_data"; +$params["theme_path"] = dirname(__FILE__)."/demo50_data"; $params["theme"] = "mytheme"; $chat = new phpFreeChat( $params ); Modified: trunk/demo/demo5_customized_style.php =================================================================== --- trunk/demo/demo5_customized_style.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/demo/demo5_customized_style.php 2007-02-28 17:58:04 UTC (rev 982) @@ -8,7 +8,7 @@ // do not uses width parameter because of a display bug in IE6 //$params["width"] = "650px"; $params["max_msg"] = 21; -$params["themepath"] = dirname(__FILE__)."/demo5_customized_style_data"; +$params["theme_path"] = dirname(__FILE__)."/demo5_customized_style_data"; $params["theme"] = "mytheme"; $chat = new phpFreeChat( $params ); Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/src/pfcglobalconfig.class.php 2007-02-28 17:58:04 UTC (rev 982) @@ -102,10 +102,10 @@ var $nickname_colorlist = array('#CCCCCC','#000000','#3636B2','#2A8C2A','#C33B3B','#C73232','#80267F','#66361F','#D9A641','#3DCC3D','#1A5555','#2F8C74','#4545E6','#B037B0','#4C4C4C','#959595'); var $theme = "default"; - var $themepath = ""; - var $themepath_default = ""; - var $theme_url = ""; - var $theme_default_url = ""; + var $theme_path = ''; + var $theme_default_path = ''; + var $theme_url = ''; + var $theme_default_url = ''; var $baseurl = ""; @@ -114,7 +114,7 @@ var $container_type = "File"; var $client_script_path = ""; - var $client_script_url = ""; // default is calculated from 'client_script_path' + // var $client_script_url = ""; // default is calculated from 'client_script_path' var $server_script_path = ""; var $server_script_url = ""; // default is calculated from 'server_script_path' var $xajaxpath = ""; // default is dirname(__FILE__)."/../lib/xajax_0.2.3"; @@ -136,6 +136,7 @@ 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(); + var $_query_string = ''; function pfcGlobalConfig( $params = array() ) { @@ -165,12 +166,17 @@ $this->data_public_path = dirname(__FILE__)."/../data/public"; else $this->data_public_path = $params["data_public_path"]; + + // if the user didn't specify the server_script_url, then remember it and + // append QUERY_STRING to it + if (!isset($params['server_script_url'])) + $this->_query_string = isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '' ? + '?'.$_SERVER['QUERY_STRING'] : + ''; // load users container or keep default one if (isset($params["container_type"])) - $this->container_type = $params["container_type"]; - - + $this->container_type = $params["container_type"]; // load default container's config $ct =& pfcContainer::Instance($this->container_type, true); @@ -348,54 +354,60 @@ // $this->data_public_path."/xajax_js/xajax.js")); // $this->errors = array_merge($this->errors, @install_file($this->xajaxpath."/xajax_js/xajax_uncompressed.js", // $this->data_public_path."/xajax_js/xajax_uncompressed.js" )); + + + // --- // test client script // try to find the path into server configuration - if ($this->client_script_path == "") + if ($this->client_script_path == '') $this->client_script_path = getScriptFilename(); - $filetotest = $this->client_script_path; - // do not take into account the url parameters - if (preg_match("/(.*)\?(.*)/", $filetotest, $res)) - $filetotest = $res[1]; - if ( !file_exists($filetotest) ) - $this->errors[] = _pfc("%s doesn't exist", $filetotest); - if ($this->client_script_url == "") - $this->client_script_url = "./".basename($filetotest); + + if ($this->server_script_url == '' && $this->server_script_path == '') + { + $filetotest = $this->client_script_path; + // do not take into account the url parameters + if (preg_match("/(.*)\?(.*)/", $filetotest, $res)) + $filetotest = $res[1]; + if ( !file_exists($filetotest) ) + $this->errors[] = _pfc("%s doesn't exist", $filetotest); + $this->server_script_url = './'.basename($filetotest).$this->_query_string; + } + + //if ($this->client_script_url == "") + // $this->client_script_url = "./".basename($filetotest); // calculate datapublic url if ($this->data_public_url == "") $this->data_public_url = relativePath($this->client_script_path, $this->data_public_path); - + if ($this->server_script_path == '') + $this->server_script_path = $this->client_script_path; // --- - // test server script - if ($this->server_script_path == "") + // test server script + if ($this->server_script_url == '') { - $this->server_script_path = $this->client_script_path; - if ($this->server_script_url == "") - $this->server_script_url = $this->client_script_url; + $filetotest = $this->server_script_path; + // do not take into account the url parameters + if (preg_match("/(.*)\?(.*)/",$this->server_script_path, $res)) + $filetotest = $res[1]; + if ( !file_exists($filetotest) ) + $this->errors[] = _pfc("%s doesn't exist", $filetotest); + $this->server_script_url = relativePath($this->client_script_path, $this->server_script_path).'/'.basename($filetotest).$this->_query_string; } - $filetotest = $this->server_script_path; - // do not take into account the url parameters - if (preg_match("/(.*)\?(.*)/",$this->server_script_path, $res)) - $filetotest = $res[1]; - if ( !file_exists($filetotest) ) - $this->errors[] = _pfc("%s doesn't exist", $filetotest); - if ($this->server_script_url == "") - $this->server_script_url = relativePath($this->client_script_path, $this->server_script_path)."/".basename($filetotest); - - // check if the themepath parameter are correctly setup - if ($this->themepath_default == "" || !is_dir($this->themepath_default)) - $this->themepath_default = realpath(dirname(__FILE__)."/../themes"); - if ($this->themepath == "" || !is_dir($this->themepath)) - $this->themepath = $this->themepath_default; + + // check if the theme_path parameter are correctly setup + if ($this->theme_default_path == "" || !is_dir($this->theme_default_path)) + $this->theme_default_path = realpath(dirname(__FILE__)."/../themes"); + if ($this->theme_path == "" || !is_dir($this->theme_path)) + $this->theme_path = $this->theme_default_path; // calculate theme url if ($this->theme_default_url == '') - $this->theme_default_url = relativePath($this->client_script_path, $this->themepath_default); + $this->theme_default_url = relativePath($this->client_script_path, $this->theme_default_path); if ($this->theme_url == '') - $this->theme_url = relativePath($this->client_script_path, $this->themepath); + $this->theme_url = relativePath($this->client_script_path, $this->theme_path); // --- @@ -580,44 +592,47 @@ function isDefaultFile($file) { - $fexists1 = file_exists($this->themepath."/default/".$file); - $fexists2 = file_exists($this->themepath."/".$this->theme."/".$file); + $fexists1 = file_exists($this->theme_path."/default/".$file); + $fexists2 = file_exists($this->theme_path."/".$this->theme."/".$file); return ($this->theme == "default" ? $fexists1 : !$fexists2); } /* function getFileUrlByProxy($file, $addprefix = true) { - if (file_exists($this->themepath."/".$this->theme."/".$file)) + if (file_exists($this->theme_path."/".$this->theme."/".$file)) return ($addprefix ? $this->data_public_url."/".$this->getId()."/proxy.php" : "")."?p=".$this->theme."/".$file; else - if (file_exists($this->themepath_default."/default/".$file)) + if (file_exists($this->theme_default_path."/default/".$file)) return ($addprefix ? $this->data_public_url."/".$this->getId()."/proxy.php" : "")."?p=default/".$file; else - die(_pfc("Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct", $file, $this->themepath, $this->theme)); + die(_pfc("Error: '%s' could not be found, please check your theme_path '%s' and your theme '%s' are correct", $file, $this->theme_path, $this->theme)); } */ function getFilePathFromTheme($file) { - if (file_exists($this->themepath."/".$this->theme."/".$file)) - return $this->themepath."/".$this->theme."/".$file; + if (file_exists($this->theme_path."/".$this->theme."/".$file)) + return $this->theme_path."/".$this->theme."/".$file; else - if (file_exists($this->themepath_default."/default/".$file)) - return $this->themepath_default."/default/".$file; + if (file_exists($this->theme_default_path."/default/".$file)) + return $this->theme_default_path."/default/".$file; else - die(_pfc("Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct", $file, $this->themepath, $this->theme)); + { + $this->destroyCache(); + die(_pfc("Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct", $file, $this->theme_path, $this->theme)); + } } function getFileUrlFromTheme($file) { - if (file_exists($this->themepath.'/'.$this->theme.'/'.$file)) + if (file_exists($this->theme_path.'/'.$this->theme.'/'.$file)) return $this->theme_url.'/'.$this->theme.'/'.$file; else - if (file_exists($this->themepath_default.'/default/'.$file)) + if (file_exists($this->theme_default_path.'/default/'.$file)) return $this->theme_default_url.'/default/'.$file; else - return 'notfound'; + return 'notfound'; } Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/src/phpfreechat.class.php 2007-02-28 17:58:04 UTC (rev 982) @@ -393,7 +393,7 @@ $t->assignObject($c,"c"); if (!$c->isDefaultFile('style.css.php')) { - $t->setTemplate($c->themepath_default.'/default/style.css.php'); + $t->setTemplate($c->theme_default_path.'/default/style.css.php'); $css_code .= $t->getOutput(); } $t->setTemplate($c->getFilePathFromTheme('style.css.php')); Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-02-28 17:21:49 UTC (rev 981) +++ trunk/themes/default/chat.js.tpl.php 2007-02-28 17:58:04 UTC (rev 982) @@ -53,7 +53,7 @@ var pfc_isready = false; var xajaxConfig = { - requestURI: "<?php echo $c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""); ?>", + requestURI: "<?php echo $c->server_script_url; ?>", debug: false, statusMessages: false, waitCursor: false, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |