Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat:[1250] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2008-09-11 12:47:02
|
Revision: 1250 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1250&view=rev Author: kerphi Date: 2008-09-11 12:47:11 +0000 (Thu, 11 Sep 2008) Log Message: ----------- XSS security hole fix in the '/me' command. (thanks to Philipp Blaim for the report) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/src/commands/me.class.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2008-08-01 07:17:10 UTC (rev 1249) +++ trunk/data/public/js/pfcclient.js 2008-09-11 12:47:11 UTC (rev 1250) @@ -967,7 +967,7 @@ line += '</span> '; } if (cmd == 'notice' || cmd == 'me') - line += '<span class="pfc_words">* '+ this.parseMessage(param) +'</span> '; + line += '<span class="pfc_words">* '+ sender.escapeHTML() + ' ' + this.parseMessage(param) +'</span> '; else line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> '; line += '</div>'; Modified: trunk/src/commands/me.class.php =================================================================== --- trunk/src/commands/me.class.php 2008-08-01 07:17:10 UTC (rev 1249) +++ trunk/src/commands/me.class.php 2008-09-11 12:47:11 UTC (rev 1250) @@ -30,7 +30,7 @@ } $msg = phpFreeChat::PreFilterMsg($param); - $ct->write($recipient, "*me*", $this->name, $u->getNickname()." ".$msg); + $ct->write($recipient, $sender, $this->name, $msg); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2009-03-11 08:07:27
|
Revision: 1259 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1259&view=rev Author: kerphi Date: 2009-03-11 08:07:19 +0000 (Wed, 11 Mar 2009) Log Message: ----------- Improve interface ergonomics of the demo Modified Paths: -------------- trunk/demo/index.php trunk/index.php trunk/style/footer.css trunk/style/header.css trunk/style/menu.css Added Paths: ----------- trunk/style/logo.gif Removed Paths: ------------- trunk/style/bulle.gif trunk/style/bulle.png Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2009-01-01 18:03:30 UTC (rev 1258) +++ trunk/demo/index.php 2009-03-11 08:07:19 UTC (rev 1259) @@ -12,8 +12,7 @@ <body> <div class="header"> - <h1>phpFreeChat - Demos</h1> - <img alt="logo bulle" src="../style/bulle.png" class="logo2" /> + <img alt="" src="../style/logo.gif" class="logo2" /> </div> <div class="menu"> @@ -22,7 +21,7 @@ <li> <ul class="sub"> <li class="item"> - <a href="../index.php">PFC Index</a> + <a href="../index.php">Index</a> </li> </ul> </li> @@ -42,14 +41,7 @@ </li> </ul> <p class="partner"> - <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="style/logo_88x31.gif" /></a><br/> - <a href="http://www.jeu-gratuit.net/">jeu-gratuit</a><br/> - <a href="http://jeux-flash.jeu-gratuit.net/">jeux-flash</a><br/> - <a href="http://www.pronofun.com/">pronofun</a><br/> - <a href="http://areno.jeu-gratuit.net/">areno</a><br/> - <a href="http://www.micropolia.com/">micropolia</a><br/> - <a href="http://www.zeitoun.net/">zeitoun</a><br/> - <a href="http://www.hotscripts.com/?RID=N452772">hotscripts</a><br/> + <a href="http://www.phpfreechat.net"><img alt="phpfreechat" src="../style/logo_88x31.gif" /></a><br/> </p> </div> @@ -138,5 +130,16 @@ </ul> </div> + +<div class="footer"> + <span class="partners">phpFreeChat partners:</span> + <a href="http://www.jeu-gratuit.net">jeux gratuits</a> | + <a href="http://jeux-flash.jeu-gratuit.net">jeux flash</a> | + <a href="http://www.pronofun.com">pronofun</a> | + <a href="http://areno.jeu-gratuit.net">areno</a> | + <a href="http://www.micropolia.com">micropolia</a> | + <a href="http://www.zeitoun.net">zeitoun</a> | + <a href="http://federation.jeu-gratuit.net">federation</a> +</div> </body></html> Modified: trunk/index.php =================================================================== --- trunk/index.php 2009-01-01 18:03:30 UTC (rev 1258) +++ trunk/index.php 2009-03-11 08:07:19 UTC (rev 1259) @@ -4,9 +4,10 @@ $params = array(); $params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname -$params["isadmin"] = true; // do not use it on production servers ;) +$params['firstisadmin'] = true; +//$params["isadmin"] = true; // do not use it on production servers ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -//$params["debug"] = true; +$params["debug"] = true; $chat = new phpFreeChat( $params ); ?> @@ -24,8 +25,7 @@ <body> <div class="header"> - <h1>phpFreeChat - Sources Index</h1> - <img alt="logo bulle" src="style/bulle.gif" class="logo2" /> + <img alt="phpFreeChat" src="style/logo.gif" class="logo2" /> </div> <div class="menu"> @@ -52,56 +52,28 @@ <li> <ul> <li class="item"> - <a href="http://www.phpfreechat.net/overview">Overview [en]</a> + <a href="http://www.phpfreechat.net/overview">Overview</a> </li> <li class="item"> - <a href="http://www.phpfreechat.net/fr/overview">Overview [fr]</a> + <a href="http://www.phpfreechat.net/quickstart">Quickstart</a> </li> <li class="item"> - <a href="http://www.phpfreechat.net/es/overview">Overview [es]</a> + <a href="http://www.phpfreechat.net/parameters">Parameters list</a> </li> <li class="item"> - <a href="http://www.phpfreechat.net/zh/overview">Overview [zh]</a> + <a href="http://www.phpfreechat.net/faq">FAQ</a> </li> <li class="item"> - <a href="http://www.phpfreechat.net/ar/overview">Overview [ar]</a> + <a href="http://www.phpfreechat.net/advanced-configuration">Advanced configuration</a> </li> <li class="item"> - <a href="http://www.phpfreechat.net/quickstart">Quickstart [en]</a> + <a href="http://www.phpfreechat.net/customize">Customize</a> </li> - <li class="item"> - <a href="http://www.phpfreechat.net/fr/quickstart">En avant ! [fr]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/parameters">Parameters list [en]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/faq">FAQ [en]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/fr/faq">FAQ [fr]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/advanced-configuration">Advanced configuration [en]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/fr/advanced-configuration">Configuration avancée [fr]</a> - </li> - <li class="item"> - <a href="http://www.phpfreechat.net/customize">Customize [en]</a> - </li> </ul> </li> </ul> <p class="partner"> <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="style/logo_88x31.gif" /></a><br/> - <a href="http://www.jeu-gratuit.net/">jeu-gratuit</a><br/> - <a href="http://jeux-flash.jeu-gratuit.net/">jeux-flash</a><br/> - <a href="http://www.pronofun.com/">pronofun</a><br/> - <a href="http://areno.jeu-gratuit.net/">areno</a><br/> - <a href="http://www.micropolia.com/">micropolia</a><br/> - <a href="http://www.zeitoun.net/">zeitoun</a><br/> - <a href="http://www.hotscripts.com/?RID=N452772">hotscripts</a><br/> </p> </div> @@ -112,4 +84,15 @@ <?php } ?> </div> +<div class="footer"> + <span class="partners">phpFreeChat partners:</span> + <a href="http://www.jeu-gratuit.net">jeux gratuits</a> | + <a href="http://jeux-flash.jeu-gratuit.net">jeux flash</a> | + <a href="http://www.pronofun.com">pronofun</a> | + <a href="http://areno.jeu-gratuit.net">areno</a> | + <a href="http://www.micropolia.com">micropolia</a> | + <a href="http://www.zeitoun.net">zeitoun</a> | + <a href="http://federation.jeu-gratuit.net">federation</a> +</div> + </body></html> Deleted: trunk/style/bulle.gif =================================================================== (Binary files differ) Deleted: trunk/style/bulle.png =================================================================== (Binary files differ) Modified: trunk/style/footer.css =================================================================== --- trunk/style/footer.css 2009-01-01 18:03:30 UTC (rev 1258) +++ trunk/style/footer.css 2009-03-11 08:07:19 UTC (rev 1259) @@ -6,7 +6,7 @@ color: #FFF; border-top: 1px #acd233 solid; border-bottom: 1px #acd233 solid; - font-size: 80%; + font-size: 8px; clear: both; padding-left: 12em; } @@ -19,3 +19,11 @@ left: 5px; float: left; } +div.footer a { + color: #FFF; + font-weight: normal; +} +div.footer span.partners { + text-decoration: underline; + margin-right: 10px; +} Modified: trunk/style/header.css =================================================================== --- trunk/style/header.css 2009-01-01 18:03:30 UTC (rev 1258) +++ trunk/style/header.css 2009-03-11 08:07:19 UTC (rev 1259) @@ -2,9 +2,9 @@ div.header { position: relative; display: block; - background-color: #99cc33; - border-bottom: 1px #acd233 solid; - height: 45px; + background-color: #7ebf36; +/* border-bottom: 1px #acd233 solid;*/ + height: 76px; } div.header h1 { color: #FFF; @@ -13,7 +13,7 @@ div.header .logo2 { position: absolute; bottom: 0; - right: 0; + left: 0; } div.header .flags { position: absolute; Added: trunk/style/logo.gif =================================================================== (Binary files differ) Property changes on: trunk/style/logo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/style/menu.css =================================================================== --- trunk/style/menu.css 2009-01-01 18:03:30 UTC (rev 1258) +++ trunk/style/menu.css 2009-03-11 08:07:19 UTC (rev 1259) @@ -1,7 +1,7 @@ /* --- MENU --- */ div.menu { position: absolute; - top: 55px; + top: 85px; left: 0.5em; /* float: left; margin-top: 0.5em; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2009-04-25 11:09:35
|
Revision: 1261 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1261&view=rev Author: kerphi Date: 2009-04-25 11:09:31 +0000 (Sat, 25 Apr 2009) Log Message: ----------- Makes more flexible "whoisbox" customization (example: add an avatar) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/demo/demo50_data/mytheme/customize.js.php Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2009-03-11 09:19:41 UTC (rev 1260) +++ trunk/data/public/js/pfcclient.js 2009-04-25 11:09:31 UTC (rev 1261) @@ -1283,7 +1283,28 @@ this.updateNickWhoisBox(nickid); return this.nickwhoisbox.get(nickid); }, - + + updateNickWhoisBox_ignored_field: function(k) + { + return ( k == 'nickid' || + k == 'nick' || // useless because it is displayed in the box title + k == 'isadmin' || // useless because of the gold shield icon + k == 'floodtime' || + k == 'flood_nbmsg' || + k == 'flood_nbchar' + ); + }, + + updateNickWhoisBox_append_html: function(nickid, div) + { + // this methode can be overloaded to append customized data to the whoisbox + }, + + updateNickWhoisBox_prepend_html: function(nickid, div) + { + // this methode can be overloaded to prepend customized data to the whoisbox + }, + updateNickWhoisBox: function(nickid) { var className = (! is_ie) ? 'class' : 'className'; @@ -1308,6 +1329,8 @@ img.alt = this.res.getLabel('Close'); p.appendChild(img); p.appendChild(document.createTextNode(usermeta.get('nick'))); // append the nickname text in the title + + this.updateNickWhoisBox_prepend_html(nickid,div); // add the whois information table var table = document.createElement('table'); @@ -1319,13 +1342,7 @@ { var k = um_keys[i]; var v = usermeta.get(k); - if (v && k != 'nickid' - && k != 'nick' // useless because it is displayed in the box title - && k != 'isadmin' // useless because of the gold shield icon - && k != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - ) + if (v && !this.updateNickWhoisBox_ignored_field(k)) { var tr = document.createElement('tr'); if (pfc_nickmeta_key_to_hide.indexOf(k) != -1) @@ -1351,7 +1368,9 @@ } } div.appendChild(table); - + + this.updateNickWhoisBox_append_html(nickid,div); + // add the privmsg link (do not add it if the nick is yours) if (pfc.getUserMeta(nickid,'nick') != this.nickname) { Modified: trunk/demo/demo50_data/mytheme/customize.js.php =================================================================== --- trunk/demo/demo50_data/mytheme/customize.js.php 2009-03-11 09:19:41 UTC (rev 1260) +++ trunk/demo/demo50_data/mytheme/customize.js.php 2009-04-25 11:09:31 UTC (rev 1261) @@ -1,62 +1,19 @@ -pfcClient.prototype.updateNickWhoisBox = function(nickid) +pfcClient.prototype.updateNickWhoisBox_ignored_field = function(k) { + return ( k == 'nickid' || + k == 'nick' || // useless because it is displayed in the box title + k == 'isadmin' || // useless because of the gold shield icon + k == 'floodtime' || + k == 'flood_nbmsg' || + k == 'flood_nbchar' || + k == 'avatar' + ); +} + +pfcClient.prototype.updateNickWhoisBox_append_html = function(nickid, div) +{ var className = (! is_ie) ? 'class' : 'className'; - - var usermeta = this.getAllUserMeta(nickid); - - var div = document.createElement('div'); - div.setAttribute(className, 'pfc_nickwhois'); - - var p = document.createElement('p'); - p.setAttribute(className, 'pfc_nickwhois_header'); - div.appendChild(p); - - // add the close button - var img = document.createElement('img'); - img.setAttribute(className, 'pfc_nickwhois_close'); - img.pfc_parent = div; - img.onclick = function(evt){ - this.pfc_parent.style.display = 'none'; - return false; - } - img.setAttribute('src', this.res.getFileUrl('images/close-whoisbox.gif')); - img.alt = this.res.getLabel('Close'); - p.appendChild(img); - p.appendChild(document.createTextNode(usermeta['nick'])); // append the nickname text in the title - - // add the whois information table - var table = document.createElement('table'); - var tbody = document.createElement('tbody'); - table.appendChild(tbody); - var um_keys = usermeta.keys(); - var msg = ''; - for (var i=0; i<um_keys.length; i++) - { - var k = um_keys[i]; - var v = usermeta[k]; - if (v && k != 'nickid' - && k != 'nick' // useless because it is displayed in the box title - && k != 'isadmin' // useless because of the gold shield icon - && k != 'floodtime' - && k != 'flood_nbmsg' - && k != 'flood_nbchar' - && k != 'avatar' - ) - { - var tr = document.createElement('tr'); - var td1 = document.createElement('td'); - td1.setAttribute(className, 'pfc_nickwhois_c1'); - var td2 = document.createElement('td'); - td2.setAttribute(className, 'pfc_nickwhois_c2'); - td1.appendChild(document.createTextNode(k)); - td2.appendChild(document.createTextNode(v)); - tr.appendChild(td1); - tr.appendChild(td2); - tbody.appendChild(tr); - } - } - div.appendChild(table); - + // append the avatar image if (this.getUserMeta(nickid,'avatar')) { @@ -65,30 +22,4 @@ img.setAttribute(className, 'pfc_nickwhois_avatar'); div.appendChild(img); } - - // add the privmsg link (do not add it if this button is yourself) - if (pfc.getUserMeta(nickid,'nick') != this.nickname) - { - var p = document.createElement('p'); - p.setAttribute(className, 'pfc_nickwhois_pv'); - 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'))); - p.appendChild(a); - div.appendChild(p); - } - - this.nickwhoisbox[nickid] = div; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2009-04-26 13:10:18
|
Revision: 1263 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1263&view=rev Author: kerphi Date: 2009-04-26 13:10:07 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Isolate the kick/ban notices. Setup the flag 4 on the shownotice parameter to display only kick/ban notices. Modified Paths: -------------- trunk/index.php trunk/src/commands/ban.class.php trunk/src/commands/kick.class.php trunk/src/commands/leave.class.php trunk/src/commands/notice.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/index.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -5,9 +5,9 @@ $params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params['firstisadmin'] = true; -//$params["isadmin"] = true; // do not use it on production servers ;) +//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -$params["debug"] = true; +$params["debug"] = false; $chat = new phpFreeChat( $params ); ?> Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/ban.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -46,11 +46,11 @@ // notify all the channel $cmdp = $p; $cmdp["param"] = _pfc("%s banished from %s by %s", $nick, $channame, $sender); - $cmdp["flag"] = 1; + $cmdp["flag"] = 4; $cmd =& pfcCommand::Factory("notice"); $cmd->run($xml_reponse, $cmdp); - // kick the user (maybe in the future, it will be dissociate in a /kickban command) + // kick the user (maybe in the future, it will exists a /kickban command) $cmdp = $p; $cmdp["params"] = array(); $cmdp["params"][] = $nick; // nickname to kick Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/kick.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -44,6 +44,7 @@ $channame = $u->channels[$recipientid]["name"]; $cmdstr = 'leave'; $cmdp = array(); + $cmdp['flag'] = 4; $cmdp['params'][] = 'ch'; $cmdp['params'][] = $channame; // channel name $cmdp['params'][] = _pfc("kicked from %s by %s - reason: %s", $channame, $sender, $reason); // reason Modified: trunk/src/commands/leave.class.php =================================================================== --- trunk/src/commands/leave.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/leave.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -14,6 +14,7 @@ $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; + $flag = isset($p["flag"]) ? $p["flag"] : 2; $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); @@ -95,7 +96,7 @@ $cmdp = $p; $cmdp["recipient"] = $leave_recip; $cmdp["recipientid"] = $leave_id; - $cmdp["flag"] = 2; + $cmdp["flag"] = $flag; $cmdp["param"] = _pfc("%s quit",$u->getNickname()); if ($reason != "") $cmdp["param"] .= " (".$reason.")"; $cmd =& pfcCommand::Factory("notice"); Modified: trunk/src/commands/notice.class.php =================================================================== --- trunk/src/commands/notice.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/notice.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -11,7 +11,7 @@ $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $flag = isset($p["flag"]) ? $p["flag"] : 3; + $flag = isset($p["flag"]) ? $p["flag"] : 7; $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/pfcglobalconfig.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -330,10 +330,11 @@ * <p><ul><li>Setting this to 0 will show nothing.</li> * <li>Setting it to 1 will show nicknames changes.</li> * <li>Setting it to 2 will show connect/disconnect notifications.</li> - * <li>Setting it to 3 (1+2) will show nicknames and connect/disconnect notifications.</li></ul> - * (Default value: 3)</p> + * <li>Setting it to 4 will show kick/ban notifications.</li> + * <li>Setting it to 7 (1+2+4) will show all the notifications.</li></ul> + * (Default value: 7)</p> */ - var $shownotice = 3; + var $shownotice = 7; /** * <p>Setting it to false will disable nickname colorization. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2010-01-14 19:47:10
|
Revision: 1268 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1268&view=rev Author: kerphi Date: 2010-01-14 19:47:03 +0000 (Thu, 14 Jan 2010) Log Message: ----------- fixes few php warnings Modified Paths: -------------- trunk/demo/demo32_show_last_messages-chat.php trunk/demo/demo32_show_last_messages-config.php trunk/demo/demo34_add_a_link_on_nicknames.php trunk/demo/demo43_change_the_nicknames_colors.php trunk/demo/demo5_customized_style.php trunk/src/containers/file.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/demo/demo32_show_last_messages-chat.php =================================================================== --- trunk/demo/demo32_show_last_messages-chat.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo32_show_last_messages-chat.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -2,7 +2,7 @@ require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; require_once dirname(__FILE__)."/demo32_show_last_messages-config.php"; -$chat = new phpFreeChat($pfc_config); +$chat = new phpFreeChat($params); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Modified: trunk/demo/demo32_show_last_messages-config.php =================================================================== --- trunk/demo/demo32_show_last_messages-config.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo32_show_last_messages-config.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -1,10 +1,10 @@ <?php require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; +$params = array(); $params["title"] = "Show last posted messages channel"; $params["serverid"] = md5($params["title"]); // calculate a unique id for this chat $params["max_msg"] = 20; $params["channels"] = array("channel1"); -$pfc_config =& pfcGlobalConfig::Instance( $params ); ?> \ No newline at end of file Modified: trunk/demo/demo34_add_a_link_on_nicknames.php =================================================================== --- trunk/demo/demo34_add_a_link_on_nicknames.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo34_add_a_link_on_nicknames.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -33,7 +33,7 @@ ?> <?php - $filename = dirname(__FILE__)."/demo34_add_a_link_on_nicknames/mytheme/customize.js"; + $filename = dirname(__FILE__)."/demo34_add_a_link_on_nicknames/mytheme/customize.js.php"; echo "<p><code>".$filename."</code></p>"; echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; $content = file_get_contents($filename); Modified: trunk/demo/demo43_change_the_nicknames_colors.php =================================================================== --- trunk/demo/demo43_change_the_nicknames_colors.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo43_change_the_nicknames_colors.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -32,14 +32,5 @@ echo "</pre>"; ?> -<?php - $filename = dirname(__FILE__)."/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php"; - echo "<p><code>".$filename."</code></p>"; - echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; - $content = file_get_contents($filename); - highlight_string($content); - echo "</pre>"; -?> - </body> </html> \ No newline at end of file Modified: trunk/demo/demo5_customized_style.php =================================================================== --- trunk/demo/demo5_customized_style.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/demo/demo5_customized_style.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -41,7 +41,7 @@ ?> <?php - $filename = dirname(__FILE__)."/demo5_customized_style_data/mytheme/templates/style.css.tpl.php"; + $filename = dirname(__FILE__)."/demo5_customized_style_data/mytheme/style.css.php"; echo "<p><code>".$filename."</code></p>"; echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">"; $content = file_get_contents($filename); Modified: trunk/src/containers/file.class.php =================================================================== --- trunk/src/containers/file.class.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/src/containers/file.class.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -2,7 +2,7 @@ /** * file.class.php * - * Copyright \xA9 2006 Stephane Gully <ste...@gm...> + * 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 @@ -110,7 +110,7 @@ $leafexists = file_exists($leaffilename); if ($leafvalue == NULL) { - unlink($leaffilename); + @unlink($leaffilename); touch($leaffilename); } else Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2009-12-13 21:36:20 UTC (rev 1267) +++ trunk/src/pfcglobalconfig.class.php 2010-01-14 19:47:03 UTC (rev 1268) @@ -962,15 +962,15 @@ if (in_array('log',$this->proxies)) { // test the LOCK_EX feature because the log proxy needs to write in a file - $filename = $c->data_private_path.'/filemtime2.test'; + $filename = $this->data_private_path.'/filemtime2.test'; if (is_writable(dirname($filename))) { - $data1 = time(); - file_put_contents($filename, $data1, LOCK_EX); - $data2 = file_get_contents($filename); - if ($data1 != $data2) { - unset($this->proxies[array_search('log',$this->proxies)]); - } + $data1 = time(); + file_put_contents($filename, $data1, LOCK_EX); + $data2 = file_get_contents($filename); + if ($data1 != $data2) { + unset($this->proxies[array_search('log',$this->proxies)]); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |