[Phpfreechat-svn] SF.net SVN: phpfreechat: [497] trunk/demo
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-05-18 08:16:16
|
Revision: 497 Author: kerphi Date: 2006-05-18 01:15:57 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=497&view=rev Log Message: ----------- Add a demo which shows how to customize the nicknames automatic colors. Modified Paths: -------------- branches/0.x/demo/index.php trunk/demo/index.php Added Paths: ----------- branches/0.x/demo/demo43_change_the_nicknames_colors/ branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/ branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/templates/ branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php branches/0.x/demo/demo43_change_the_nicknames_colors.php trunk/demo/demo43_change_the_nicknames_colors/ trunk/demo/demo43_change_the_nicknames_colors/mytheme/ trunk/demo/demo43_change_the_nicknames_colors/mytheme/templates/ trunk/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php trunk/demo/demo43_change_the_nicknames_colors.php Added: branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php =================================================================== --- branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php (rev 0) +++ branches/0.x/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php 2006-05-18 08:15:57 UTC (rev 497) @@ -0,0 +1,9 @@ +pfcClient.prototype.reloadColorList = function() +{ + this.colorlist = Array( 'green', + 'blue', + 'red', + '#567', + '#C33B3B' + ); +} \ No newline at end of file Added: branches/0.x/demo/demo43_change_the_nicknames_colors.php =================================================================== --- branches/0.x/demo/demo43_change_the_nicknames_colors.php (rev 0) +++ branches/0.x/demo/demo43_change_the_nicknames_colors.php 2006-05-18 08:15:57 UTC (rev 497) @@ -0,0 +1,46 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["nick"] = "guest".rand(1,10); // setup the intitial nickname +$params["title"] = "A chat with a customized nickname color list"; +$params["themepath"] = dirname(__FILE__)."/demo43_change_the_nicknames_colors"; +$params["theme"] = "mytheme"; +$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>"; +?> + +<?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); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> \ No newline at end of file Modified: branches/0.x/demo/index.php =================================================================== --- branches/0.x/demo/index.php 2006-05-18 08:11:11 UTC (rev 496) +++ branches/0.x/demo/index.php 2006-05-18 08:15:57 UTC (rev 497) @@ -28,7 +28,7 @@ <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></li> - + <li><a href="demo43_change_the_nicknames_colors.php">demo43 - demo which show how to change the nicknames automatic colors</a></li> </ul> Added: trunk/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php =================================================================== --- trunk/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php (rev 0) +++ trunk/demo/demo43_change_the_nicknames_colors/mytheme/templates/pfcclient-custo.js.tpl.php 2006-05-18 08:15:57 UTC (rev 497) @@ -0,0 +1,9 @@ +pfcClient.prototype.reloadColorList = function() +{ + this.colorlist = Array( 'green', + 'blue', + 'red', + '#567', + '#C33B3B' + ); +} \ No newline at end of file Added: trunk/demo/demo43_change_the_nicknames_colors.php =================================================================== --- trunk/demo/demo43_change_the_nicknames_colors.php (rev 0) +++ trunk/demo/demo43_change_the_nicknames_colors.php 2006-05-18 08:15:57 UTC (rev 497) @@ -0,0 +1,46 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["nick"] = "guest".rand(1,10); // setup the intitial nickname +$params["title"] = "A chat with a customized nickname color list"; +$params["themepath"] = dirname(__FILE__)."/demo43_change_the_nicknames_colors"; +$params["theme"] = "mytheme"; +$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>"; +?> + +<?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); + echo htmlentities($content); + echo "</pre>"; +?> + + </body> +</html> \ No newline at end of file Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2006-05-18 08:11:11 UTC (rev 496) +++ trunk/demo/index.php 2006-05-18 08:15:57 UTC (rev 497) @@ -1,51 +1,51 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> - <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <title>phpFreeChat Demos</title> - <link rel="stylesheet" title="classic" type="text/css" href="../style/generic.css"> - <link rel="stylesheet" title="classic" type="text/css" href="../style/header.css"> - <link rel="stylesheet" title="classic" type="text/css" href="../style/footer.css"> - <link rel="stylesheet" title="classic" type="text/css" href="../style/menu.css"> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>phpFreeChat Demos</title> + <link rel="stylesheet" title="classic" type="text/css" href="../style/generic.css"> + <link rel="stylesheet" title="classic" type="text/css" href="../style/header.css"> + <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"> </head> - <body> - -<div class="header"> - <h1>phpFreeChat - Demos</h1> - <img alt="logo bulle" src="../style/bulle.png" class="logo2"> -</div> - -<div class="menu"> + <body> + +<div class="header"> + <h1>phpFreeChat - Demos</h1> + <img alt="logo bulle" src="../style/bulle.png" class="logo2"> +</div> + +<div class="menu"> <ul> - <li class="sub title">General</li> - <li> - <ul class="sub"> - <li class="item"> - <a href="../index.php">PFC Index</a> - </li> - </ul> - </li> - <li class="sub title">Demos</li> - <li> - <ul class="sub"> - <li class="item"> - <a href="#Miscellaneous">Miscellaneous</a> - </li> - <li class="item"> - <a href="#Themes">Themes</a> - </li> - <li class="item"> - <a href="#Translations">Translations</a> - </li> - </ul> - </li> - </ul> - <p class="partner"> - <a href="http://www.phpfreechat.net"><img alt="logo big" src="../style/logo_88x31.gif"></a> - </p> -</div> - + <li class="sub title">General</li> + <li> + <ul class="sub"> + <li class="item"> + <a href="../index.php">PFC Index</a> + </li> + </ul> + </li> + <li class="sub title">Demos</li> + <li> + <ul class="sub"> + <li class="item"> + <a href="#Miscellaneous">Miscellaneous</a> + </li> + <li class="item"> + <a href="#Themes">Themes</a> + </li> + <li class="item"> + <a href="#Translations">Translations</a> + </li> + </ul> + </li> + </ul> + <p class="partner"> + <a href="http://www.phpfreechat.net"><img alt="logo big" src="../style/logo_88x31.gif"></a> + </p> +</div> + <div class="content"> <h2>Miscellaneous</h2> @@ -69,7 +69,7 @@ <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></li> - + <li><a href="demo43_change_the_nicknames_colors.php">demo43 - demo which show how to change the nicknames automatic colors</a></li> </ul> @@ -109,18 +109,18 @@ <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> </ul> - -</div> - -<div class="footer"> - <div class="valid"> - <a href="http://validator.w3.org/check?uri=referer"> - <img alt="Valid XHTML 1.0!" src="../style/valid-xhtml.png"> - </a> - <a href="http://jigsaw.w3.org/css-validator/check/referer"> - <img alt="Valid CSS!" src="../style/valid-css.png"> - </a> - </div> - <p>\xA92006 phpFreeChat</p> - </div> + +</div> + +<div class="footer"> + <div class="valid"> + <a href="http://validator.w3.org/check?uri=referer"> + <img alt="Valid XHTML 1.0!" src="../style/valid-xhtml.png"> + </a> + <a href="http://jigsaw.w3.org/css-validator/check/referer"> + <img alt="Valid CSS!" src="../style/valid-css.png"> + </a> + </div> + <p>\xA92006 phpFreeChat</p> + </div> </body></html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |