[Phpfreechat-svn] SF.net SVN: phpfreechat: [831] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-10-16 17:44:35
|
Revision: 831 http://svn.sourceforge.net/phpfreechat/?rev=831&view=rev Author: kerphi Date: 2006-10-16 10:25:46 -0700 (Mon, 16 Oct 2006) Log Message: ----------- [en] New zilveer theme. I added a new CSS class to the default pfcclient.js which make possible to style odd and even messages : pfc_oddmsg and pfc_evenmsg (thanks to zilveer) [40min] [fr] Nouveau theme zilveer. J'ai ?\195?\169galment ajout?\195?\169 deux nouvelles classes CSS rendant possible le stylage des messages paires et impaires : pfc_oddmsg et pfc_evenmsg (merci ?\195?\160 zilveer) [40min] Modified Paths: -------------- trunk/demo/index.php trunk/src/client/pfcclient.js Added Paths: ----------- trunk/demo/demo51_zilveer_theme.php trunk/themes/zilveer/ trunk/themes/zilveer/images/ trunk/themes/zilveer/images/channels_content_bg.png trunk/themes/zilveer/images/newmsg.png trunk/themes/zilveer/images/oldmsg.png trunk/themes/zilveer/images/pfc_message1.png trunk/themes/zilveer/images/pfc_message2.png trunk/themes/zilveer/images/pfc_online.png trunk/themes/zilveer/images/pfc_send.png trunk/themes/zilveer/images/pfc_words.png trunk/themes/zilveer/images/tab_off.png trunk/themes/zilveer/images/tab_on.png trunk/themes/zilveer/images/tab_remove.gif trunk/themes/zilveer/images/user-me.gif trunk/themes/zilveer/images/user.gif trunk/themes/zilveer/info.php trunk/themes/zilveer/readme.txt trunk/themes/zilveer/style.css Added: trunk/demo/demo51_zilveer_theme.php =================================================================== --- trunk/demo/demo51_zilveer_theme.php (rev 0) +++ trunk/demo/demo51_zilveer_theme.php 2006-10-16 17:25:46 UTC (rev 831) @@ -0,0 +1,38 @@ +<?php + +require_once dirname(__FILE__)."/../src/phpfreechat.class.php"; + +$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat +$params["title"] = "A chat with a customized theme (zilveer theme)"; +$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname +$params["theme"] = "zilveer"; +$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> \ No newline at end of file Modified: trunk/demo/index.php =================================================================== --- trunk/demo/index.php 2006-10-16 15:17:57 UTC (rev 830) +++ trunk/demo/index.php 2006-10-16 17:25:46 UTC (rev 831) @@ -88,6 +88,7 @@ <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> </ul> <h2 id="demo-translations">Translations</h2> Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-16 15:17:57 UTC (rev 830) +++ trunk/src/client/pfcclient.js 2006-10-16 17:25:46 UTC (rev 831) @@ -759,6 +759,7 @@ // format and post message var line = ''; line += '<div id="pfc_msg'+ 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'; Added: trunk/themes/zilveer/images/channels_content_bg.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/channels_content_bg.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/newmsg.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/newmsg.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/oldmsg.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/oldmsg.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/pfc_message1.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/pfc_message1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/pfc_message2.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/pfc_message2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/pfc_online.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/pfc_online.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/pfc_send.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/pfc_send.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/pfc_words.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/pfc_words.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/tab_off.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/tab_off.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/tab_on.png =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/tab_on.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/tab_remove.gif =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/tab_remove.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/user-me.gif =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/user-me.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/images/user.gif =================================================================== (Binary files differ) Property changes on: trunk/themes/zilveer/images/user.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/themes/zilveer/info.php =================================================================== --- trunk/themes/zilveer/info.php (rev 0) +++ trunk/themes/zilveer/info.php 2006-10-16 17:25:46 UTC (rev 831) @@ -0,0 +1,6 @@ +<?php +$aka = ""zilveer; +$author = "Name: Isa Acar"; +$date = "10th Oct-2006"; +$mail = "zi...@gm..."; +?> \ No newline at end of file Added: trunk/themes/zilveer/readme.txt =================================================================== --- trunk/themes/zilveer/readme.txt (rev 0) +++ trunk/themes/zilveer/readme.txt 2006-10-16 17:25:46 UTC (rev 831) @@ -0,0 +1,44 @@ +Hi, + +the only changes I have made is that I have added this line in file pfcclient.js. +------------------ +line += (id % 2 == 0) ? '<div class=pfc_message1>' : '<div class=pfc_message2>'; + +--------------------- + +it is in the foor-loop in function "handleComingRequest: function( cmds )" at line 738. + +mine is looking like this: +----------------- + + handleComingRequest: function( cmds ) + { + var msg_html = $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 = ''; + + //CSS-zilveer + + line += (id % 2 == 0) ? '<div class=pfc_message1>' : '<div class=pfc_message2>'; +------------ +i will also include this file. + + +/regards, Isa Acar (zilveer), send me a mail if you have any questions: zi...@gm... Added: trunk/themes/zilveer/style.css =================================================================== --- trunk/themes/zilveer/style.css (rev 0) +++ trunk/themes/zilveer/style.css 2006-10-16 17:25:46 UTC (rev 831) @@ -0,0 +1,380 @@ +div#pfc_container * { + border: 0px; + margin: 0px; + padding: 0px; + +} + +div#pfc_container { + border: 1px solid #555; + color: #000; + padding: 10px; + min-height: 20px; + background-color: #FFF; + background-image: url("proxy.php?p=default/images/background.gif"); + background-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("proxy.php?p=zilveer/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("proxy.php?p=zilveer/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("proxy.php?p=zilveer/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("proxy.php?p=zilveer/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("proxy.php?p=zilveer/images/pfc_message1.png"); +} +.pfc_evenmsg { + background-color: #ccc; + color: #000; + background-image: url("proxy.php?p=zilveer/images/pfc_message2.png"); +} + +div.pfc_message { + background-image: url("proxy.php?p=zilveer/images/newmsg.png"); + background-position: right; + background-repeat: no-repeat; +} + +div.pfc_oldmsg { + background-image: url("proxy.php?p=zilveer/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; +} + +input#pfc_words { + border: 0px; + background-color: #FAFAFA; + width: 520px; + padding: 4px 5px 0px 5px; /*top right bottom left*/ + font-size: 12px; + height: 20Px; + vertical-align: bottom; + background-image: url("proxy.php?p=zilveer/images/pfc_words.png"); + 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("proxy.php?p=zilveer/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; +} + +p#pfc_handle { + display: inline; + cursor: pointer; + border: 1px solid #555; + padding: 2px 10px 2px 10px; + color: black; + margin-bottom: 5px; + font-weight: bold; + background-color: #EEE; + font-size: 70%; /* these two line fix a display problem in IE6 : */ + vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ + +} + +a#pfc_logo { + position: absolute; + right: 0px; + top: 0px; +} + +div.pfc_btn { + display: inline; + cursor: pointer; +} +div.pfc_btn img { + /* doesn't work */ + /* border: 1px solid #393;*/ /* same as container color */ +} +div.pfc_btn img:hover { + /* doesn't work */ + /* border: 1px solid #000;*/ +} + +div#pfc_bbcode_container * { + margin-right: 2px; +} + +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. |