phpfreechat-svn Mailing List for phpFreeChat (Page 5)
Status: Beta
Brought to you by:
kerphi
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
(2) |
Mar
|
Apr
(61) |
May
(56) |
Jun
(96) |
Jul
(23) |
Aug
(62) |
Sep
(76) |
Oct
(48) |
Nov
(28) |
Dec
(28) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(31) |
Feb
(40) |
Mar
(29) |
Apr
(11) |
May
(6) |
Jun
(18) |
Jul
(18) |
Aug
(108) |
Sep
(24) |
Oct
(6) |
Nov
(21) |
Dec
|
| 2008 |
Jan
|
Feb
(1) |
Mar
(16) |
Apr
|
May
(3) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(3) |
Dec
(2) |
| 2009 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gpi...@us...> - 2007-09-06 14:30:25
|
Revision: 1178
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1178&view=rev
Author: gpinzone
Date: 2007-09-06 07:30:28 -0700 (Thu, 06 Sep 2007)
Log Message:
-----------
Made variable and function names clearer.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/data/public/js/pfcresource.js
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-09-06 14:11:45 UTC (rev 1177)
+++ trunk/data/public/js/pfcclient.js 2007-09-06 14:30:28 UTC (rev 1178)
@@ -1460,7 +1460,7 @@
// try to parse smileys
var smileys = this.res.getSmileyHash();
- var sl = this.res.getSmileyKeys();
+ var sl = this.res.getSmileyKeysSorted();
for(var i = 0; i < sl.length; i++)
{
// We don't want to replace smiley strings inside of tags.
Modified: trunk/data/public/js/pfcresource.js
===================================================================
--- trunk/data/public/js/pfcresource.js 2007-09-06 14:11:45 UTC (rev 1177)
+++ trunk/data/public/js/pfcresource.js 2007-09-06 14:30:28 UTC (rev 1178)
@@ -12,7 +12,7 @@
this.fileurl = $H();
this.smileys = $H();
this.smileysreverse = $H();
- this.smileyskeys = new Array();
+ this.smileyskeyssorted = new Array();
},
setLabel: function(key, value)
@@ -49,9 +49,9 @@
{
this.smileys[key] = value;
this.smileysreverse[value] = key;
- this.smileyskeys.push(key);
+ this.smileyskeyssorted.push(key);
// Sort keys by longest to shortest. This prevents a smiley like :) from being used on >:)
- this.smileyskeys = this.smileyskeys.sort(function (a,b){return (b.unescapeHTML().length - a.unescapeHTML().length);})
+ this.smileyskeyssorted.sort(function (a,b){return (b.unescapeHTML().length - a.unescapeHTML().length);})
},
getSmiley: function(key)
{
@@ -68,9 +68,9 @@
{
return this.smileysreverse;
},
- getSmileyKeys: function()
+ getSmileyKeysSorted: function()
{
- return this.smileyskeys;
+ return this.smileyskeyssorted;
},
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-09-06 14:11:43
|
Revision: 1177
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1177&view=rev
Author: gpinzone
Date: 2007-09-06 07:11:45 -0700 (Thu, 06 Sep 2007)
Log Message:
-----------
Smiley key sorting caused performance problems on clients. Created new array for smiley keys and sort it during setSmiley() function calls.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/data/public/js/pfcresource.js
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-09-03 14:16:03 UTC (rev 1176)
+++ trunk/data/public/js/pfcclient.js 2007-09-06 14:11:45 UTC (rev 1177)
@@ -1460,8 +1460,7 @@
// try to parse smileys
var smileys = this.res.getSmileyHash();
- // Sort keys by longest to shortest. This prevents a smiley like :) from being used on >:)
- var sl = smileys.keys().sort(function (a,b){return (b.unescapeHTML().length - a.unescapeHTML().length);});
+ var sl = this.res.getSmileyKeys();
for(var i = 0; i < sl.length; i++)
{
// We don't want to replace smiley strings inside of tags.
Modified: trunk/data/public/js/pfcresource.js
===================================================================
--- trunk/data/public/js/pfcresource.js 2007-09-03 14:16:03 UTC (rev 1176)
+++ trunk/data/public/js/pfcresource.js 2007-09-06 14:11:45 UTC (rev 1177)
@@ -12,6 +12,7 @@
this.fileurl = $H();
this.smileys = $H();
this.smileysreverse = $H();
+ this.smileyskeys = new Array();
},
setLabel: function(key, value)
@@ -48,6 +49,9 @@
{
this.smileys[key] = value;
this.smileysreverse[value] = key;
+ this.smileyskeys.push(key);
+ // Sort keys by longest to shortest. This prevents a smiley like :) from being used on >:)
+ this.smileyskeys = this.smileyskeys.sort(function (a,b){return (b.unescapeHTML().length - a.unescapeHTML().length);})
},
getSmiley: function(key)
{
@@ -63,7 +67,11 @@
getSmileyReverseHash: function()
{
return this.smileysreverse;
- }
+ },
+ getSmileyKeys: function()
+ {
+ return this.smileyskeys;
+ },
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-09-04 13:57:17
|
Revision: 1146
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1146&view=rev
Author: gpinzone
Date: 2007-08-26 09:23:20 -0700 (Sun, 26 Aug 2007)
Log Message:
-----------
Added JavaScript to remove auto-linked entries from PHP, if desired. Currently never used. Restored double-space to " " JavaScript that was erroneously commented out.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/src/pfcurlprocessing.php
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-24 15:13:24 UTC (rev 1145)
+++ trunk/data/public/js/pfcclient.js 2007-08-26 16:23:20 UTC (rev 1146)
@@ -1424,11 +1424,21 @@
replace = replace + '>$2</a>$3';
msg = msg.replace(rx_url, replace);
}
-
+*/
+
+ // Remove auto-linked entries.
+ if ( false )
+ {
+ rx = new RegExp('<a href="mailto:(.*?)".*?>.*?<\/a>','ig');
+ msg = msg.replace(rx, '$1');
+ rx = new RegExp('<a href="(.*?)".*?>.*?<\/a>','ig');
+ msg = msg.replace(rx, '$1');
+ }
+
// 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>');
Modified: trunk/src/pfcurlprocessing.php
===================================================================
--- trunk/src/pfcurlprocessing.php 2007-08-24 15:13:24 UTC (rev 1145)
+++ trunk/src/pfcurlprocessing.php 2007-08-26 16:23:20 UTC (rev 1146)
@@ -62,8 +62,8 @@
*/
function pfc_undo_make_hyperlink($text)
{
- $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
- $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
+ $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\".*?>.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
+ $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\".*?>.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
return $text;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-09-03 14:16:10
|
Revision: 1176
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1176&view=rev
Author: gpinzone
Date: 2007-09-03 07:16:03 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Fixed spelling and grammar.
Modified Paths:
--------------
trunk/misc/generate-doc.inc.php
trunk/src/pfcglobalconfig.class.php
Modified: trunk/misc/generate-doc.inc.php
===================================================================
--- trunk/misc/generate-doc.inc.php 2007-09-02 18:07:59 UTC (rev 1175)
+++ trunk/misc/generate-doc.inc.php 2007-09-03 14:16:03 UTC (rev 1176)
@@ -2,7 +2,7 @@
/**
* This script is used to parse the parameter descriptions in pfcglobalconfig.class.php
- * So that the official doc is keept up to date.
+ * in order to keep the official documentation up to date.
*/
function pfc_generate_doc($f = NULL)
{
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-09-02 18:07:59 UTC (rev 1175)
+++ trunk/src/pfcglobalconfig.class.php 2007-09-03 14:16:03 UTC (rev 1176)
@@ -44,7 +44,7 @@
/**
* <p>Used to translate the chat text and messages. Accepted values are the <code>i18n/</code> sub directories names.
- * (by default this is the local server language)</p>
+ * (By default, this is the local server language.)</p>
*/
var $language = '';
@@ -53,7 +53,7 @@
* This is really useful when the Web page embedding the chat is not UTF-8 encoded.
* This parameter should be the same as the chat web page.
* Could be ISO-8859-1 or anything else but it must be supported by iconv php module.
- * ( UTF-8 by default )</p>
+ * (Default value: UTF-8)</p>
*/
var $output_encoding = 'UTF-8';
@@ -63,34 +63,34 @@
* <p>Warning : Nicknames must be encoded in UTF-8.
* For example, if you get nicks from a databases where they are ISO-8859-1 encoded,
* you must convert it: <code>$params["nick"] = iconv("ISO-8859-1", "UTF-8", $bdd_nickname);</code>
- * (of course, change the <code>$bdd_nickname</code> parameter for your needs)</p>
- * <p>("" value by default - means users must choose a nickname when s/he connects)</p>
+ * (Of course, change the <code>$bdd_nickname</code> parameter for your needs.)</p>
+ * <p>(Default value: "" - means users must choose a nickname when s/he connects.)</p>
*/
var $nick = "";
/**
* <p>This is the maximum nickname length, a longer nickname is forbidden.
- * ( 15 characters by default)</p>
+ * (Default value: 15)</p>
*/
var $max_nick_len = 15;
/**
* <p>Setting this to true will forbid the user to change his/her nickname later.
- * (false value by default)</p>
+ * (Default value: false)</p>
*/
var $frozen_nick = false;
/**
* <p>Contains some extra data (metadata) about the user that can be used to customize the display.
- * For example: the user's gender, age, real name ... can be setup in order to display it in the user's info box.
+ * For example: the user's gender, age, real name, etc. can be setup in order to display it in the user's info box.
* A example for gender is : <code>$params["nickmeta"] = array('gender'=>'f');</code>
- * (by default, the array is empty)</p>
+ * (Default value: empty array)</p>
*/
var $nickmeta = array();
/**
* <p>Can be used to set user metadata that is only visible to admins.
- * (by default, <code>array('ip')</code> means that the user's IP address is shown to admins only)</p>
+ * (Default value: <code>array('ip')</code> - means that the user's IP address is shown to admins only)</p>
*/
var $nickmeta_private = array('ip');
@@ -98,58 +98,59 @@
* <p>Set this parameter to true if you want to give admin rights to the connected user.
* Attention : if you don't use any external registration system, all your users will be admins.
* You have to test current user rights before setting this parameter to true.
- * (default value is false)</p>
+ * (Default value: false)</p>
*/
var $isadmin = false;
/**
* <p>This parameter contains a list of key/value that identify admin access.
* The keys are the nicknames and the values are the corresponding passwords.
- * (by default, the admin/nopassword account is available, don't forget to change it)</p>
+ * Note: The "isadmin" parameter does not depend on this variable.
+ * (Default value: No admin/password accounts are available. Don't forget to change it.)</p>
*/
var $admins = array("admin" => "");
/**
* <p>When this parameter is true, it gives admin rights to the first connected user on the server.
- * (default value is false)</p>
+ * (Default value: false)</p>
*/
var $firstisadmin = false;
/**
* <p>Used to change the chat title that is visible just above the messages list.
- * ("My Chat" by default)</p>
+ * (Default value: "My Chat")</p>
*/
var $title = '';
/**
* <p>Used to create default rooms (auto-joined at startup). It contains an array of rooms names.
- * (by default, only one room is created named "My room")</p>
+ * (Default value: one room is created named "My room")</p>
*/
var $channels = array();
/**
* <p>This parameter can be used to restrict channels to users.
* If the array is empty, it allows users to create their own channels.
- * (by default, it's empty)</p>
+ * (Default value: empty array)</p>
*/
var $frozen_channels = array();
/**
* <p>The maximum number of allowed channels for each user.
- * (10 by default)</p>
+ * (Default value: 10)</p>
*/
var $max_channels = 10;
/**
* <p>This array contains the nicknames list you want to initiate a private message at chat loading.
* Of course, the listed nicknames should be online or it will just be ignored.
- * (by default, the array is empty)</p>
+ * (Default value: empty array)</p>
*/
var $privmsg = array();
/**
* <p>This is the maximum number of private message allowed at the same time for one user.
- * (5 by default)</p>
+ * (Default value: 5)</p>
*/
var $max_privmsg = 5;
@@ -157,7 +158,7 @@
* <p>This is the time to wait between two refreshes.
* A refresh is an HTTP request which asks the server if there are new messages to display.
* If there are no new messages, then an empty HTTP response is returned.
- * ( 5000 by default, 5000ms = 5s)</p>
+ * (Default value: 5000 - 5,000ms = 5 seconds)</p>
*/
var $refresh_delay = 5000;
@@ -165,29 +166,29 @@
* <p>Indicate the maximum number of seconds to wait before the server response.
* If the latest refresh command is not received in this delay an other one will be created.
* This parameter is not implemented in the current version of phpfreechat.
- * (by default 60000ms, it means 60 seconds)</p>
+ * (Default value: 60000 - 60,000ms = 60 seconds)</p>
*/
- var $max_refresh_delay = 60000; // in mili-seconds (60 seconds)
+ var $max_refresh_delay = 60000;
/**
* <p>This is the time of inactivity to wait before a user is disconnected (in milliseconds).
* A user is inactive only if s/he closed his/her chat window.
* A user with an open chat window is not inactive because s/he sends each <code>refresh_delay</code> an HTTP request.
- * ( 20000 by default, 20000ms = 20s)</p>
+ * (Default value: 20000 - 20000ms = 20 seconds)</p>
*/
var $timeout = 20000;
/**
* When this parameter is true, all the chatters will be redirected
* to the url indicated by the <code>lockurl</code> parameter.
- * (false by default)</p>
+ * (Default value: false)</p>
*/
var $islocked = false;
/**
* This url is used when <code>islocked</code> parameter is true.
* The users will be redirected (http redirect) to this url.
- * (by default, it is http://www.phpfreechat.net)
+ * (Default value: http://www.phpfreechat.net)
*/
var $lockurl = 'http://www.phpfreechat.net';
@@ -196,7 +197,7 @@
* For example: append 'censor' to the list to disable words censoring.
* The list of system proxies can be found in src/proxies/.
* Attention: 'checktimeout' and 'checknickchange' proxies should not be disabled or the chat will not work anymore.
- * (by default no proxy will be skiped)</p>
+ * (Default value: empty array - no proxies will be skipped)</p>
*/
var $skip_proxies = array();
@@ -204,14 +205,14 @@
* <p>This array contains the proxies that will be handled just before to process a command
* and just after the system proxies.
* You can use this array to execute your own proxy.
- * (by default empty array)</p>
+ * (Default value: empty array)</p>
*/
var $post_proxies = array();
/**
* <p>This array ocntains the proxies that will be handled just before system proxies.
* You can use this array to execute your own proxy.
- * (by default empty array)</p>
+ * (Default value: empty array)</p>
*/
var $pre_proxies = array();
@@ -230,7 +231,7 @@
/**
* <p>A custom proxies path. Used to easily plugin your own proxy to the chat without modifying the code.
- * (by default empty path)</p>
+ * (Default value: empty path)</p>
*/
var $proxies_path = '';
@@ -238,17 +239,17 @@
* <p>Contains the default proxies location.
* Do not change this parameter if you don't know what you are doing.
* If you try to add your own proxy, check the <code>proxies_path</code> parameter.
- * (by default <code>dirname(__FILE__).'/proxies'</code>)</p>
+ * (Default value: <code>dirname(__FILE__).'/proxies'</code>)</p>
*/
var $proxies_path_default = '';
/**
- * <p>This parameter indicate your own commands directory location.
+ * <p>This parameter indicates your own commands directory location.
* The chat uses commands to communicate between client and server.
* As an example, when a message is sent, the <code>/send your message</code> command is used,
- * when a nickname is changed the <code>/nick newnickname</code> command is used.
- * To create a new command you have to write it and indicate in this parameter where it is located.
- * (by default empty string, taht means no custom command path is used)</p>
+ * when a nickname is changed, the <code>/nick newnickname</code> command is used.
+ * To create a new command, you have to write it and indicate in this parameter where it is located.
+ * (Default value: empty string - means no custom command path is used)</p>
*/
var $cmd_path = '';
@@ -256,37 +257,37 @@
* <p>Contains the default command path used by the system.
* Do not change this parameter if you don't know what you are doing.
* If you try to add your own command, check the <code>cmd_path</code> parameter.
- * (by default <code>dirname(__FILE__).'/commands'</code>)</p>
+ * (Default value: <code>dirname(__FILE__).'/commands'</code>)</p>
*/
var $cmd_path_default = '';
/**
- * <p>This is the maximum message length. A longer message is forbidden.
- * (400 characters by default)</p>
+ * <p>This is the maximum message length in characters. A longer message is forbidden.
+ * (Default value: 400)</p>
*/
var $max_text_len = 400;
/**
- * <p>This is the number of messages keept in the history.
+ * <p>This is the number of messages kept in the history.
* This is what you see when you reload the chat.
* The number of messages s/he can see is defined by this parameter.
- * (20 lines by default)</p>
+ * (Default value: 20</p>
*/
var $max_msg = 20;
/**
- * <p>It is the maximum number of displayed lines in the window.
+ * <p>The maximum number of lines displayed in the window.
* Old lines will be deleted to save browser's memory on clients.
- * (by default 150 lines are keept)</p>
+ * Default value: 150)</p>
*/
var $max_displayed_lines = 150;
/**
* <p>Setting this to true will send a <code>/quit</code> command when the user closes his/her window.
- * (doesn't work on Firefox).
+ * (NOTE: Doesn't work on Firefox).
* This parameter isn't true by default because on IE and Konqueror/Safari,
* reloading the window (F5) will generate the same event as closing the window which can be annoying.
- * (false value by default)</p>
+ * (Default value: false)</p>
*/
var $quit_on_closedwindow = true;
@@ -294,26 +295,25 @@
* <p>Setting this to true will give the focus to the input text box when connecting to the chat.
* It can be useful not to touch the focus when integrating the chat into an existing website
* because when the focus is changed, the viewport follows the focus location.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $focus_on_connect = true;
/**
* <p>Setting this to false will oblige user to click on the connect button if s/he wants to chat.
- * (true value by default means when the chat web page is open,
- * a connection to the chat is automaticaly performed)</p>
+ * (Default value: true - a connection to the chat is automaticaly performed)</p>
*/
var $connect_at_startup = true;
/**
* <p>Setting it to true will start the chat minimized.
- * (false value by default)</p>
+ * (Default value: false)</p>
*/
var $start_minimized = false;
/**
* <p>Height of the chat area.
- * ("440px" by default)</p>
+ * (Default value: "440px")</p>
*/
var $height = "440px";
@@ -322,53 +322,52 @@
* <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>
- * (3 by default)</p>
+ * (Default value: 3)</p>
*/
var $shownotice = 3;
/**
* <p>Setting it to false will disable nickname colorization.
- * (true value by default)</p>
+ * (Default value: true)</p>
**/
var $nickmarker = true;
/**
* <p>Setting it to false will hide the date/hour column.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $clock = true;
/**
* <p>Setting it to false will start the chat without sound notifications.
- * (true by default)</p>
+ * (Default value: true)</p>
*/
var $startwithsound = true;
/**
- * <p>Setting it to true will add the <code>target="_blank"</code> into parsed links.
- * This attribute can be used to open the followed link in a new window.
- * (true value by default)</p>
+ * <p>Setting it to true will open all links in a new window.
+ * (Default value: true)</p>
*/
var $openlinknewwindow = true;
/**
- * <p>Seting it to false will disable the window title nofitifaction.
+ * <p>Setting it to false will disable the window title notification.
* When a message is received and this parameter is true, the window title is modified with <code>[n]</code>
* (n is the number of new posted messages).
- * (true by default)</p>
+ * (Default value: true)</p>
*/
var $notify_window = true;
/**
- * <p>Setting it to true will shortens long urls entered by users in the chat area.
- * (true by default)</p>
+ * <p>Setting it to true will shorten long URLs entered by users in the chat area.
+ * (Default value: true)</p>
*/
var $short_url = true;
/**
- * <p>Final width of the shortened url.
- * This parameter is taken into accound only when <code>short_url</code> is true.
- * (40 by default)</p>
+ * <p>Final width of the shortened URL in characters. (This includes the elipsis on shortened URLs.)
+ * This parameter is taken into account only when <code>short_url</code> is true.
+ * (Default value: 40)</p>
*/
var $short_url_width = 40;
@@ -376,49 +375,49 @@
* <p>Used to hide the phpfreechat linkback logo.
* Be sure that you are conform to the <a href="http://www.phpfreechat.net/license.en.html">license page</a>
* before setting this to false!
- * (true by default)</p>
+ * (Default value: true)</p>
*/
var $display_pfc_logo = true;
/**
* <p>Used to show/hide the images in the channels and pv tabs.
- * (true by default)</p>
+ * (Default value: true)</p>
*/
var $displaytabimage = true;
/**
* <p>Used to show/hide the close button in the channels tabs.
- * (true by default)</p>
+ * (Default value: true)</p>
*/
var $displaytabclosebutton = true;
/**
* <p>Used to show/hide online users list at startup.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $showwhosonline = true;
/**
* <p>Used to show/hide the smiley selector at startup.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $showsmileys = true;
/**
* <p>Used to show/hide the showwhosonline button.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $btn_sh_whosonline = true;
/**
* <p>Used to show/hide the showsmileys button.
- * (true value by default)</p>
+ * (Default value: true)</p>
*/
var $btn_sh_smileys = true;
/**
* <p>This is the list of colors that will appears into the bbcode palette.
- * (by default it contains a list of basic colors: '#FFFFFF', '#000000', ...)</p>
+ * (Default value: contains an array of basic colors: '#FFFFFF', '#000000', ...)</p>
*/
var $bbcode_colorlist = array('#FFFFFF',
'#000000',
@@ -439,7 +438,7 @@
/**
* <p>This is the list of colors that will be used to automaticaly and randomly colorize the nicknames in the chat.
- * (by default it contains a list of basic colors: '#CCCCCC','#000000')</p>
+ * (Default value: contains an array of basic colors: '#CCCCCC','#000000')</p>
*/
var $nickname_colorlist = array('#CCCCCC',
'#000000',
@@ -462,7 +461,7 @@
* <p>This parameter specifies which theme the chat will use.
* A theme is a package that makes it possible to completly change the chat appearance (CSS) and the chat dynamics (JS)
* You can find official themes in the <code>themes/</code> directory on your local phpfreechat distribution.
- * ('default' by default)</p>
+ * (Default value: 'default')</p>
*/
var $theme = 'default';
@@ -478,7 +477,7 @@
* It will be used by the browser to load theme resources : images, css, js.
* If this parameter is not indicated, the themes will be copied to <code>data_public_path/themes</code>
* and this parameter value will be set to <code>data_public_url/theme</code>.
- * (empty by default)</p>
+ * (Default value: '')</p>
*/
var $theme_url = '';
@@ -486,7 +485,7 @@
* <p>Indicate where the official pfc default theme is located.
* Do not change this parameter if you don't know what you are doing.
* If you try to add your own theme, check the <code>theme_path</code> parameter.
- * (<code>dirname(__FILE__).'/../themes'</code> by default)</p>
+ * (Default value: '' - empty string means <code>dirname(__FILE__).'/../themes'</code> is used automatically)</p>
*/
var $theme_default_path = '';
@@ -494,7 +493,7 @@
* <p>This url indicates the <code>theme_default_path</code> location.
* Do not change this parameter if you don't know what you are doing.
* If you try to add your own theme, check the <code>theme_path</code> parameter.
- * (by default the theme is copied into <code>data_public_path/themes</code>
+ * (Default value: the theme is copied into <code>data_public_path/themes</code>
* and this parameter will be set to <code>data_public_url/theme</code>)</p>
*/
var $theme_default_url = '';
@@ -502,30 +501,30 @@
/**
* <p>Used to specify the chat container (chat database).
* Accepted containers are : File and Mysql (maybe others in the future).
- * ("File" by default)</p>
+ * (Default value: 'File')</p>
*/
var $container_type = 'File';
/**
* <p>Used to specify the script that will handle asynchronous requests.
* Very useful when the chat (client) script is resource consuming (ex: forum or portal chat integration).
- * (by default this parameters is calculated automaticaly)</p>
+ * (Default value: '' - means this parameter is automatically calculated)</p>
*/
var $server_script_path = '';
/**
* <p>This url indicates the <code>server_script_path</code>.
- * It will be used to do AJAX requests from the browser. So this url should be a browsable public url.
- * This parameter is useful when using url rewriting because basic auto-calculation will certainly fail.
- * (by default this parameters is automaticaly calculated)</p>
+ * It will be used to do AJAX requests from the browser. Therefore, this URL should be a browsable public url.
+ * This parameter is useful when using URL rewriting because basic auto-calculation will fail.
+ * (Default value: '' - means this parameter is automatically calculated)</p>
*/
var $server_script_url = '';
/**
* <p>Used to specify the script path which first displays the chat.
- * This path will be used to calculate relatives paths for resources : javascript lib and images.
- * Useful when the php configuration is uncommon, this option can be used to force the automatic detection process.
- * (by default this parameters is auto-detected)</p>
+ * This path will be used to calculate relatives paths for resources: javascript lib and images.
+ * Useful when the php configuration is uncommon. This option can be used to force the automatic detection process.
+ * (Default value: '' - means this parameter is automatically calculated)</p>
*/
var $client_script_path = '';
@@ -533,54 +532,54 @@
* <p>Used to store private data like cache, logs and chat history.
* Tip: you can optimize your chat performances,
* see <a href="http://www.phpfreechat.net/faq.en.html#tmpfs">this FAQ entry</a>.
- * (<code>dirname(__FILE__)."/../data/private"</code> by default)</p>
+ * (Default value: '' - means <code>dirname(__FILE__)."/../data/private"</code> is used automatically)</p>
*/
var $data_private_path = '';
/**
* This path must be reachable by your web server.
* Javascript and every resources (theme) files will be stored here.
- * (dirname(__FILE__)."/../data/public" by default)
+ * (Default value: '' - means dirname(__FILE__)."/../data/public" is used automatically)
*/
var $data_public_path = '';
/**
- * This url should link to the <code>data_private_path</code> directory.
- * So that the clients browsers will be able to load needed javascript files and theme resources.
+ * This URL should link to the <code>data_private_path</code> directory so that
+ * the clients' browsers will be able to load needed javascript files and theme resources.
* It can be useful when url rewriting is done on the server.
- * (by default this parameters is calculated automaticaly from <code>data_private_path</code>)
+ * (Default value: '' - means this parameter is automatically calculated from <code>data_private_path</code>)
*/
var $data_public_url = '';
/**
- * <p>This is the prototype javascript library url.
+ * <p>This is the prototype javascript library URL.
* Use this parameter to use your external library.
- * (default is <code>data/js/prototype.js</code>)</p>
+ * (Default value: '' - means <code>data/js/prototype.js</code> is used automatically)</p>
*/
- var $prototypejs_url = '';
+ var $prototypejs_url = '';
/**
* <p>When debug is true, some traces will be shown on the chat clients
- * (default is false)</p>
+ * (Default value: false)</p>
*/
var $debug = false;
/**
* <p>Can be used to setup the chat time zone.
* It is the difference in seconds between chat clock and server clock.
- * (0 by default)</p>
+ * (Default value: 0)</p>
*/
var $time_offset = 0;
/**
* <p>How to display the dates in the chat.
- * (<code>'d/m/Y'</code> by default)</p>
+ * (Default value: <code>'d/m/Y'</code>)</p>
*/
var $date_format = 'd/m/Y';
/**
* <p>How to display the time in the chat
- * (<code>'H:i:s'</code> by default)</p>
+ * (Default value: <code>'H:i:s'</code>)</p>
*/
var $time_format = 'H:i:s';
@@ -589,7 +588,7 @@
* forwards client ip address in HTTP_X_FORWARDED_FOR http header.
* Some discutions about this parameter are available
* on <a href="http://www.phpfreechat.net/forum/viewtopic.php?id=1344">the forum</a>.
- * (default value is false)</p>
+ * (Default value: false)</p>
*/
var $get_ip_from_xforwardedfor = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-09-02 18:08:01
|
Revision: 1175
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1175&view=rev
Author: kerphi
Date: 2007-09-02 11:07:59 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
typo
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-09-02 18:04:59 UTC (rev 1174)
+++ trunk/src/pfcglobalconfig.class.php 2007-09-02 18:07:59 UTC (rev 1175)
@@ -532,7 +532,7 @@
/**
* <p>Used to store private data like cache, logs and chat history.
* Tip: you can optimize your chat performances,
- * see <a href="http://www.phpfreechat.net/faq.en.html#tmpfs>this FAQ entry</a>.
+ * see <a href="http://www.phpfreechat.net/faq.en.html#tmpfs">this FAQ entry</a>.
* (<code>dirname(__FILE__)."/../data/private"</code> by default)</p>
*/
var $data_private_path = '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-09-02 18:05:01
|
Revision: 1174
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1174&view=rev
Author: kerphi
Date: 2007-09-02 11:04:59 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
fix php notices
Modified Paths:
--------------
trunk/misc/generate-doc.inc.php
Modified: trunk/misc/generate-doc.inc.php
===================================================================
--- trunk/misc/generate-doc.inc.php 2007-09-02 10:51:01 UTC (rev 1173)
+++ trunk/misc/generate-doc.inc.php 2007-09-02 18:04:59 UTC (rev 1174)
@@ -13,6 +13,7 @@
$ct = stream_context_create($ct_params);
$data = file_get_contents($f, false, $ct);
+ $offset = 0;
if (preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset))
{
$offset_start = $matches[0][1];
@@ -42,6 +43,7 @@
$offset3 = $matches3[0][1];
// search for the parameter description
+ $offset2 = $offset;
$p['desc'] = '';
while($offset2 < $offset3)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-09-02 10:51:03
|
Revision: 1173
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1173&view=rev
Author: kerphi
Date: 2007-09-02 03:51:01 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
doc update
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-31 14:26:20 UTC (rev 1172)
+++ trunk/src/pfcglobalconfig.class.php 2007-09-02 10:51:01 UTC (rev 1173)
@@ -31,6 +31,10 @@
*/
class pfcGlobalConfig
{
+ // ------------------
+ // public parameters
+ // ------------------
+
/**
* <p>This is the only mandatory parameter used to identify the chat server.
* You can compare it to the server ip/host like on an IRC server.
@@ -39,6 +43,21 @@
var $serverid = '';
/**
+ * <p>Used to translate the chat text and messages. Accepted values are the <code>i18n/</code> sub directories names.
+ * (by default this is the local server language)</p>
+ */
+ var $language = '';
+
+ /**
+ * <p>Set a sepcific encoding for chat labels.
+ * This is really useful when the Web page embedding the chat is not UTF-8 encoded.
+ * This parameter should be the same as the chat web page.
+ * Could be ISO-8859-1 or anything else but it must be supported by iconv php module.
+ * ( UTF-8 by default )</p>
+ */
+ var $output_encoding = 'UTF-8';
+
+ /**
* <p>If you have already identified the user (forum, portal...) you can force the user's nickname with this parameter.
* Defining a nick will skip the "Please enter your nickname" popup.</p>
* <p>Warning : Nicknames must be encoded in UTF-8.
@@ -143,10 +162,18 @@
var $refresh_delay = 5000;
/**
- * <p>This is the time of inactivity to wait before a user can be disconnected (in milliseconds).
+ * <p>Indicate the maximum number of seconds to wait before the server response.
+ * If the latest refresh command is not received in this delay an other one will be created.
+ * This parameter is not implemented in the current version of phpfreechat.
+ * (by default 60000ms, it means 60 seconds)</p>
+ */
+ var $max_refresh_delay = 60000; // in mili-seconds (60 seconds)
+
+ /**
+ * <p>This is the time of inactivity to wait before a user is disconnected (in milliseconds).
* A user is inactive only if s/he closed his/her chat window.
* A user with an open chat window is not inactive because s/he sends each <code>refresh_delay</code> an HTTP request.
- * ( 20,000 by default, 20000ms = 20s)</p>
+ * ( 20000 by default, 20000ms = 20s)</p>
*/
var $timeout = 20000;
@@ -165,41 +192,79 @@
var $lockurl = 'http://www.phpfreechat.net';
/**
- * These proxies will be skiped. ex: append "censor" to the list to disable words censoring.
+ * <p>Contains the list of proxies to ingore.
+ * For example: append 'censor' to the list to disable words censoring.
+ * The list of system proxies can be found in src/proxies/.
+ * Attention: 'checktimeout' and 'checknickchange' proxies should not be disabled or the chat will not work anymore.
+ * (by default no proxy will be skiped)</p>
*/
- var $skip_proxies = array();
+ var $skip_proxies = array();
+
/**
- * These proxies will be handled just before to process commands and just after system proxies.
+ * <p>This array contains the proxies that will be handled just before to process a command
+ * and just after the system proxies.
+ * You can use this array to execute your own proxy.
+ * (by default empty array)</p>
*/
- var $post_proxies = array();
+ var $post_proxies = array();
+
/**
- * These proxies will be handled before system proxies (at begining)
+ * <p>This array ocntains the proxies that will be handled just before system proxies.
+ * You can use this array to execute your own proxy.
+ * (by default empty array)</p>
*/
- var $pre_proxies = array();
+ var $pre_proxies = array();
+
/**
- * Contains proxies to execute on each command (filled in the init step) this parameter cannot be overridden.
+ * <p>Contains the proxies configuration.
+ * TODO: explain the possible values for each proxies.</p>
*/
- var $proxies = array();
- var $proxies_cfg = array("auth" => array(),
- "noflood" => array("charlimit" => 450,
- "msglimit" => 10,
- "delay" => 5),
- "censor" => array("words" => array("fuck","sex","bitch"),
- "replaceby" => "*",
- "regex" => false),
- "log" => array("path" => ""));
- var $proxies_path = ""; // a custom proxies path
- var $proxies_path_default = ""; // dirname(__FILE__).'/proxies'
- var $cmd_path = ""; // a custom commands path
- var $cmd_path_default = ""; // dirname(__FILE__).'/commands'
+ var $proxies_cfg = array("auth" => array(),
+ "noflood" => array("charlimit" => 450,
+ "msglimit" => 10,
+ "delay" => 5),
+ "censor" => array("words" => array("fuck","sex","bitch"),
+ "replaceby" => "*",
+ "regex" => false),
+ "log" => array("path" => ""));
/**
+ * <p>A custom proxies path. Used to easily plugin your own proxy to the chat without modifying the code.
+ * (by default empty path)</p>
+ */
+ var $proxies_path = '';
+
+ /**
+ * <p>Contains the default proxies location.
+ * Do not change this parameter if you don't know what you are doing.
+ * If you try to add your own proxy, check the <code>proxies_path</code> parameter.
+ * (by default <code>dirname(__FILE__).'/proxies'</code>)</p>
+ */
+ var $proxies_path_default = '';
+
+ /**
+ * <p>This parameter indicate your own commands directory location.
+ * The chat uses commands to communicate between client and server.
+ * As an example, when a message is sent, the <code>/send your message</code> command is used,
+ * when a nickname is changed the <code>/nick newnickname</code> command is used.
+ * To create a new command you have to write it and indicate in this parameter where it is located.
+ * (by default empty string, taht means no custom command path is used)</p>
+ */
+ var $cmd_path = '';
+
+ /**
+ * <p>Contains the default command path used by the system.
+ * Do not change this parameter if you don't know what you are doing.
+ * If you try to add your own command, check the <code>cmd_path</code> parameter.
+ * (by default <code>dirname(__FILE__).'/commands'</code>)</p>
+ */
+ var $cmd_path_default = '';
+
+ /**
* <p>This is the maximum message length. A longer message is forbidden.
- * ( 400 characters by default)</p>
+ * (400 characters by default)</p>
*/
var $max_text_len = 400;
-
- var $max_refresh_delay = 60000; // in mili-seconds (60 seconds)
/**
* <p>This is the number of messages keept in the history.
@@ -207,10 +272,16 @@
* The number of messages s/he can see is defined by this parameter.
* (20 lines by default)</p>
*/
- var $max_msg = 20;
- var $max_displayed_lines = 150; // maximum number of displayed lines (old lines will be deleted to save browser's memory)
+ var $max_msg = 20;
/**
+ * <p>It is the maximum number of displayed lines in the window.
+ * Old lines will be deleted to save browser's memory on clients.
+ * (by default 150 lines are keept)</p>
+ */
+ var $max_displayed_lines = 150;
+
+ /**
* <p>Setting this to true will send a <code>/quit</code> command when the user closes his/her window.
* (doesn't work on Firefox).
* This parameter isn't true by default because on IE and Konqueror/Safari,
@@ -266,28 +337,59 @@
* (true value by default)</p>
*/
var $clock = true;
-
- var $startwithsound = true; // start with sound enabled
/**
+ * <p>Setting it to false will start the chat without sound notifications.
+ * (true by default)</p>
+ */
+ var $startwithsound = true;
+
+ /**
* <p>Setting it to true will add the <code>target="_blank"</code> into parsed links.
* This attribute can be used to open the followed link in a new window.
* (true value by default)</p>
*/
var $openlinknewwindow = true;
+
+ /**
+ * <p>Seting it to false will disable the window title nofitifaction.
+ * When a message is received and this parameter is true, the window title is modified with <code>[n]</code>
+ * (n is the number of new posted messages).
+ * (true by default)</p>
+ */
+ var $notify_window = true;
+
+ /**
+ * <p>Setting it to true will shortens long urls entered by users in the chat area.
+ * (true by default)</p>
+ */
+ var $short_url = true;
+
+ /**
+ * <p>Final width of the shortened url.
+ * This parameter is taken into accound only when <code>short_url</code> is true.
+ * (40 by default)</p>
+ */
+ var $short_url_width = 40;
- var $notify_window = true; // true : appends a prefix to the window title with the number of new posted messages
- var $short_url = true; // true : shortens long urls entered by users in the chat area
- var $short_url_width = 40; // final width of the shortened url
-
/**
- * Used to hide the phpfreechat linkback logo.
- * Be sure that you are conform to the license page before setting this to false!
- * http://www.phpfreechat.net/license.en.html
+ * <p>Used to hide the phpfreechat linkback logo.
+ * Be sure that you are conform to the <a href="http://www.phpfreechat.net/license.en.html">license page</a>
+ * before setting this to false!
+ * (true by default)</p>
*/
var $display_pfc_logo = true;
- var $displaytabimage = true;
+ /**
+ * <p>Used to show/hide the images in the channels and pv tabs.
+ * (true by default)</p>
+ */
+ var $displaytabimage = true;
+
+ /**
+ * <p>Used to show/hide the close button in the channels tabs.
+ * (true by default)</p>
+ */
var $displaytabclosebutton = true;
/**
@@ -313,38 +415,91 @@
* (true value by default)</p>
*/
var $btn_sh_smileys = true;
-
- var $bbcode_colorlist = array("#FFFFFF","#000000","#000055","#008000","#FF0000","#800000","#800080","#FF5500","#FFFF00","#00FF00","#008080","#00FFFF","#0000FF","#FF00FF","#7F7F7F","#D2D2D2");
- var $nickname_colorlist = array('#CCCCCC','#000000','#3636B2','#2A8C2A','#C33B3B','#C73232','#80267F','#66361F','#D9A641','#3DCC3D','#1A5555','#2F8C74','#4545E6','#B037B0','#4C4C4C','#959595');
/**
+ * <p>This is the list of colors that will appears into the bbcode palette.
+ * (by default it contains a list of basic colors: '#FFFFFF', '#000000', ...)</p>
+ */
+ var $bbcode_colorlist = array('#FFFFFF',
+ '#000000',
+ '#000055',
+ '#008000',
+ '#FF0000',
+ '#800000',
+ '#800080',
+ '#FF5500',
+ '#FFFF00',
+ '#00FF00',
+ '#008080',
+ '#00FFFF',
+ '#0000FF',
+ '#FF00FF',
+ '#7F7F7F',
+ '#D2D2D2');
+
+ /**
+ * <p>This is the list of colors that will be used to automaticaly and randomly colorize the nicknames in the chat.
+ * (by default it contains a list of basic colors: '#CCCCCC','#000000')</p>
+ */
+ var $nickname_colorlist = array('#CCCCCC',
+ '#000000',
+ '#3636B2',
+ '#2A8C2A',
+ '#C33B3B',
+ '#C73232',
+ '#80267F',
+ '#66361F',
+ '#D9A641',
+ '#3DCC3D',
+ '#1A5555',
+ '#2F8C74',
+ '#4545E6',
+ '#B037B0',
+ '#4C4C4C',
+ '#959595');
+
+ /**
* <p>This parameter specifies which theme the chat will use.
* A theme is a package that makes it possible to completly change the chat appearance (CSS) and the chat dynamics (JS)
* You can find official themes in the <code>themes/</code> directory on your local phpfreechat distribution.
* ('default' by default)</p>
*/
var $theme = 'default';
- var $theme_path = '';
- var $theme_default_path = '';
- var $theme_url = '';
- var $theme_default_url = '';
/**
- * <p>Used to translate the chat text and messages. Accepted values are the <code>i18n/</code> sub directories names.
- * (by default this is the local server language)</p>
+ * <p>Indicates where the themes are located.
+ * Use this parameter if you want to store your own theme in a special location.
+ * (by default the same as <code>theme_default_path</code>)</p>
*/
- var $language = '';
+ var $theme_path = '';
/**
- * <p>Set a sepcific encoding for chat labels.
- * This is really useful when the Web page embedding the chat is not UTF-8 encoded.
- * This parameter should be the same as the chat web page.
- * Could be ISO-8859-1 or anything else but it must be supported by iconv php module.
- * ( UTF-8 by default )</p>
+ * <p>This url indicates the <code>theme_path</code> location.
+ * It will be used by the browser to load theme resources : images, css, js.
+ * If this parameter is not indicated, the themes will be copied to <code>data_public_path/themes</code>
+ * and this parameter value will be set to <code>data_public_url/theme</code>.
+ * (empty by default)</p>
*/
- var $output_encoding = 'UTF-8';
+ var $theme_url = '';
/**
+ * <p>Indicate where the official pfc default theme is located.
+ * Do not change this parameter if you don't know what you are doing.
+ * If you try to add your own theme, check the <code>theme_path</code> parameter.
+ * (<code>dirname(__FILE__).'/../themes'</code> by default)</p>
+ */
+ var $theme_default_path = '';
+
+ /**
+ * <p>This url indicates the <code>theme_default_path</code> location.
+ * Do not change this parameter if you don't know what you are doing.
+ * If you try to add your own theme, check the <code>theme_path</code> parameter.
+ * (by default the theme is copied into <code>data_public_path/themes</code>
+ * and this parameter will be set to <code>data_public_url/theme</code>)</p>
+ */
+ var $theme_default_url = '';
+
+ /**
* <p>Used to specify the chat container (chat database).
* Accepted containers are : File and Mysql (maybe others in the future).
* ("File" by default)</p>
@@ -352,21 +507,27 @@
var $container_type = 'File';
/**
- * <p>Used to specify the script which will handle asynchronous requests.
+ * <p>Used to specify the script that will handle asynchronous requests.
* Very useful when the chat (client) script is resource consuming (ex: forum or portal chat integration).
- * <code>server_script_url</code> must point to the server script browsable url (useful when using url rewriting).
- * (by default these parameters are calculated automaticaly)</p>
+ * (by default this parameters is calculated automaticaly)</p>
*/
- var $server_script_path = '';
- var $server_script_url = '';
+ var $server_script_path = '';
+
+ /**
+ * <p>This url indicates the <code>server_script_path</code>.
+ * It will be used to do AJAX requests from the browser. So this url should be a browsable public url.
+ * This parameter is useful when using url rewriting because basic auto-calculation will certainly fail.
+ * (by default this parameters is automaticaly calculated)</p>
+ */
+ var $server_script_url = '';
/**
* <p>Used to specify the script path which first displays the chat.
* This path will be used to calculate relatives paths for resources : javascript lib and images.
* Useful when the php configuration is uncommon, this option can be used to force the automatic detection process.
- * (by default this parameters are auto-detected)</p>
+ * (by default this parameters is auto-detected)</p>
*/
- var $client_script_path = '';
+ var $client_script_path = '';
/**
* <p>Used to store private data like cache, logs and chat history.
@@ -381,7 +542,7 @@
* Javascript and every resources (theme) files will be stored here.
* (dirname(__FILE__)."/../data/public" by default)
*/
- var $data_public_path = "";
+ var $data_public_path = '';
/**
* This url should link to the <code>data_private_path</code> directory.
@@ -398,12 +559,6 @@
*/
var $prototypejs_url = '';
- var $smileys = array();
- var $errors = array();
- var $is_init = false; // used internaly to know if the chat config is initialized
- var $version = ""; // the phpfreechat version: taken from the 'version' file content
- var $debugurl = "";
-
/**
* <p>When debug is true, some traces will be shown on the chat clients
* (default is false)</p>
@@ -412,17 +567,22 @@
/**
* <p>Can be used to setup the chat time zone.
- * It is the difference in seconds between chat clock and server clock</p>
+ * It is the difference in seconds between chat clock and server clock.
+ * (0 by default)</p>
*/
var $time_offset = 0;
+
/**
- * <p>How to display the dates in the chat</p>
+ * <p>How to display the dates in the chat.
+ * (<code>'d/m/Y'</code> by default)</p>
*/
- var $date_format = "d/m/Y";
+ var $date_format = 'd/m/Y';
+
/**
- * <p>How to display the time in the chat</p>
+ * <p>How to display the time in the chat
+ * (<code>'H:i:s'</code> by default)</p>
*/
- var $time_format = "H:i:s";
+ var $time_format = 'H:i:s';
/**
* <p>This parameter is useful when your chat server is behind a reverse proxy that
@@ -432,8 +592,21 @@
* (default value is false)</p>
*/
var $get_ip_from_xforwardedfor = false;
+
+ // ------------------
+ // private parameters
+ // ------------------
+ /**
+ * Contains proxies to execute on each commands.
+ * Filled in the init step, this parameter cannot be overridden.
+ */
+ var $proxies = array();
+
+ var $smileys = array();
+ var $errors = array();
+ var $is_init = false; // used internaly to know if the chat config is initialized
+ var $version = ''; // the phpfreechat version: taken from the 'version' file content
- // private parameters
var $_sys_proxies = array("lock", "checktimeout", "checknickchange", "auth", "noflood", "censor", "log");
var $_dyn_params = array("nick","isadmin","islocked","admins","frozen_channels", "channels", "privmsg", "nickmeta","time_offset","date_format","time_format");
var $_params_type = array();
@@ -731,9 +904,6 @@
$ct_errors = $ct->init($this);
$this->errors = array_merge($this->errors, $ct_errors);
- // load debug url
- $this->debugurl = pfc_RelativePath($this->client_script_path, dirname(__FILE__)."/../debug");
-
// check the language is known
$lg_list = pfcI18N::GetAcceptedLanguage();
if ( $this->language != "" && !in_array($this->language, $lg_list) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-31 14:36:01
|
Revision: 1172
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1172&view=rev
Author: gpinzone
Date: 2007-08-31 07:26:20 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
Changed style to only use pointer when nick is not frozen.
Modified Paths:
--------------
trunk/themes/default/chat.html.tpl.php
trunk/themes/default/style.css.php
Modified: trunk/themes/default/chat.html.tpl.php
===================================================================
--- trunk/themes/default/chat.html.tpl.php 2007-08-31 14:06:55 UTC (rev 1171)
+++ trunk/themes/default/chat.html.tpl.php 2007-08-31 14:26:20 UTC (rev 1172)
@@ -17,7 +17,8 @@
<p id="pfc_handle"
<?php if (! $frozen_nick) {
echo ' title="' . _pfc("Enter your nickname here") . '"'
- . ' onclick="pfc.askNick(\'\')"';
+ . ' onclick="pfc.askNick(\'\')"'
+ . ' style="cursor: pointer"';
}
?>
><?php echo $u->nick; ?></p>
Modified: trunk/themes/default/style.css.php
===================================================================
--- trunk/themes/default/style.css.php 2007-08-31 14:06:55 UTC (rev 1171)
+++ trunk/themes/default/style.css.php 2007-08-31 14:26:20 UTC (rev 1172)
@@ -249,7 +249,6 @@
p#pfc_handle {
margin: 0; padding: 0;
display: inline;
- cursor: pointer;
margin-right: 5px;
color: black;
font-weight: bold;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-31 14:06:56
|
Revision: 1171
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1171&view=rev
Author: gpinzone
Date: 2007-08-31 07:06:55 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
Don't offer the option to change a user's nickname if frozen_nick is true.
Modified Paths:
--------------
trunk/themes/default/chat.html.tpl.php
Modified: trunk/themes/default/chat.html.tpl.php
===================================================================
--- trunk/themes/default/chat.html.tpl.php 2007-08-31 01:32:18 UTC (rev 1170)
+++ trunk/themes/default/chat.html.tpl.php 2007-08-31 14:06:55 UTC (rev 1171)
@@ -1,159 +1,163 @@
- <img id="pfc_minmax" onclick="pfc.swap_minimize_maximize()" src="<?php echo $c->getFileUrlFromTheme('images/'.($start_minimized?'maximize':'minimize').'.gif'); ?>" alt=""/>
- <h2 id="pfc_title"><?php echo $title; ?></h2>
-
- <div id="pfc_content_expandable">
-
- <div id="pfc_channels">
- <ul id="pfc_channels_list"></ul>
- <div id="pfc_channels_content"></div>
- </div>
-
- <div id="pfc_input_container">
-
- <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_td3">
- <input type="button"
- id="pfc_send"
- value="<?php echo _pfc("Send"); ?>"
- title="<?php echo _pfc("Click here to send your message"); ?>"
- onclick="pfc.doSendMessage()"/>
- </td>
- </tr>
- </tbody>
- </table>
-
- <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 } ?>
- <span id="pfc_ping" title="<?php echo _pfc("Ping"); ?>"></span>
-
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>"
- alt="" title=""
- id="pfc_loginlogout"
- onclick="pfc.connect_disconnect()" />
- </div>
-
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"
- alt="" title=""
- id="pfc_nickmarker"
- onclick="pfc.nickmarker_swap()" />
- </div>
-
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/clock-on.gif'); ?>"
- alt="" title=""
- id="pfc_clock"
- onclick="pfc.clock_swap()" />
- </div>
-
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/sound-on.gif'); ?>"
- alt="" title=""
- id="pfc_sound"
- onclick="pfc.sound_swap()" />
- </div>
-
- <?php if ($c->btn_sh_smileys) { ?>
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/smiley-on.gif'); ?>"
- alt="" title=""
- id="pfc_showHideSmileysbtn"
- onclick="pfc.showHideSmileys()" />
- </div>
- <?php } ?>
-
- <?php if ($c->btn_sh_whosonline) { ?>
- <div class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"
- alt="" title=""
- id="pfc_showHideWhosOnlineBtn"
- onclick="pfc.showHideWhosOnline()" />
- </div>
- <?php } ?>
-
- </div>
-
- <div id="pfc_bbcode_container">
- <div id="pfc_bt_strong_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_strong.gif'); ?>"
- id="pfc_bt_strong"
- alt="<?php echo _pfc("Bold"); ?>"
- title="<?php echo _pfc("Bold"); ?>"
- class="pfc_bt_strong"
- onclick="pfc.insert_text('[b]','[/b]',true)" />
- </div>
- <div id="pfc_bt_italics_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_em.gif'); ?>"
- id="pfc_bt_italics"
- alt="<?php echo _pfc("Italics"); ?>"
- title="<?php echo _pfc("Italics"); ?>"
- class="pfc_bt_italics"
- onclick="pfc.insert_text('[i]','[/i]',true)" />
- </div>
- <div id="pfc_bt_underline_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_ins.gif'); ?>"
- id="pfc_bt_underline"
- alt="<?php echo _pfc("Underline"); ?>"
- title="<?php echo _pfc("Underline"); ?>"
- class="pfc_bt_underline"
- onclick="pfc.insert_text('[u]','[/u]',true)" />
- </div>
- <div id="pfc_bt_delete_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_del.gif'); ?>"
- id="pfc_bt_delete"
- alt="<?php echo _pfc("Delete"); ?>"
- title="<?php echo _pfc("Delete"); ?>"
- class="pfc_bt_delete"
- onclick="pfc.insert_text('[s]','[/s]',true)" />
- </div>
-<!--
- <div id="pfc_bt_mail_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_mail.gif'); ?>"
- id="pfc_bt_mail"
- alt="<?php echo _pfc("Mail"); ?>"
- title="<?php echo _pfc("Mail"); ?>"
- class="pfc_bt_mail"
- onclick="pfc.insert_text('[email]','[/email]',true)" />
- </div>
--->
- <div id="pfc_bt_color_btn" class="pfc_btn">
- <img src="<?php echo $c->getFileUrlFromTheme('images/bt_color.gif'); ?>"
- alt="<?php echo _pfc("Color"); ?>"
- title="<?php echo _pfc("Color"); ?>"
- id="pfc_bt_color"
- class="pfc_bt_color"
- onclick="pfc.minimize_maximize('pfc_colorlist','inline')" />
- </div>
- <div id="pfc_colorlist"></div>
- </div> <!-- pfc_bbcode_container -->
-
- </div>
-
- <div id="pfc_errors"></div>
-
- <div id="pfc_smileys"></div>
-
- </div>
-
- <div id="pfc_sound_container"></div>
+ <img id="pfc_minmax" onclick="pfc.swap_minimize_maximize()" src="<?php echo $c->getFileUrlFromTheme('images/'.($start_minimized?'maximize':'minimize').'.gif'); ?>" alt=""/>
+ <h2 id="pfc_title"><?php echo $title; ?></h2>
+
+ <div id="pfc_content_expandable">
+
+ <div id="pfc_channels">
+ <ul id="pfc_channels_list"></ul>
+ <div id="pfc_channels_content"></div>
+ </div>
+
+ <div id="pfc_input_container">
+
+ <table style="margin:0;padding:0;border-collapse:collapse;">
+ <tbody>
+ <tr>
+ <td class="pfc_td1">
+ <p id="pfc_handle"
+ <?php if (! $frozen_nick) {
+ echo ' title="' . _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_td3">
+ <input type="button"
+ id="pfc_send"
+ value="<?php echo _pfc("Send"); ?>"
+ title="<?php echo _pfc("Click here to send your message"); ?>"
+ onclick="pfc.doSendMessage()"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <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 } ?>
+ <span id="pfc_ping" title="<?php echo _pfc("Ping"); ?>"></span>
+
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>"
+ alt="" title=""
+ id="pfc_loginlogout"
+ onclick="pfc.connect_disconnect()" />
+ </div>
+
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"
+ alt="" title=""
+ id="pfc_nickmarker"
+ onclick="pfc.nickmarker_swap()" />
+ </div>
+
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/clock-on.gif'); ?>"
+ alt="" title=""
+ id="pfc_clock"
+ onclick="pfc.clock_swap()" />
+ </div>
+
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/sound-on.gif'); ?>"
+ alt="" title=""
+ id="pfc_sound"
+ onclick="pfc.sound_swap()" />
+ </div>
+
+ <?php if ($c->btn_sh_smileys) { ?>
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/smiley-on.gif'); ?>"
+ alt="" title=""
+ id="pfc_showHideSmileysbtn"
+ onclick="pfc.showHideSmileys()" />
+ </div>
+ <?php } ?>
+
+ <?php if ($c->btn_sh_whosonline) { ?>
+ <div class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"
+ alt="" title=""
+ id="pfc_showHideWhosOnlineBtn"
+ onclick="pfc.showHideWhosOnline()" />
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <div id="pfc_bbcode_container">
+ <div id="pfc_bt_strong_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_strong.gif'); ?>"
+ id="pfc_bt_strong"
+ alt="<?php echo _pfc("Bold"); ?>"
+ title="<?php echo _pfc("Bold"); ?>"
+ class="pfc_bt_strong"
+ onclick="pfc.insert_text('[b]','[/b]',true)" />
+ </div>
+ <div id="pfc_bt_italics_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_em.gif'); ?>"
+ id="pfc_bt_italics"
+ alt="<?php echo _pfc("Italics"); ?>"
+ title="<?php echo _pfc("Italics"); ?>"
+ class="pfc_bt_italics"
+ onclick="pfc.insert_text('[i]','[/i]',true)" />
+ </div>
+ <div id="pfc_bt_underline_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_ins.gif'); ?>"
+ id="pfc_bt_underline"
+ alt="<?php echo _pfc("Underline"); ?>"
+ title="<?php echo _pfc("Underline"); ?>"
+ class="pfc_bt_underline"
+ onclick="pfc.insert_text('[u]','[/u]',true)" />
+ </div>
+ <div id="pfc_bt_delete_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_del.gif'); ?>"
+ id="pfc_bt_delete"
+ alt="<?php echo _pfc("Delete"); ?>"
+ title="<?php echo _pfc("Delete"); ?>"
+ class="pfc_bt_delete"
+ onclick="pfc.insert_text('[s]','[/s]',true)" />
+ </div>
+<!--
+ <div id="pfc_bt_mail_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_mail.gif'); ?>"
+ id="pfc_bt_mail"
+ alt="<?php echo _pfc("Mail"); ?>"
+ title="<?php echo _pfc("Mail"); ?>"
+ class="pfc_bt_mail"
+ onclick="pfc.insert_text('[email]','[/email]',true)" />
+ </div>
+-->
+ <div id="pfc_bt_color_btn" class="pfc_btn">
+ <img src="<?php echo $c->getFileUrlFromTheme('images/bt_color.gif'); ?>"
+ alt="<?php echo _pfc("Color"); ?>"
+ title="<?php echo _pfc("Color"); ?>"
+ id="pfc_bt_color"
+ class="pfc_bt_color"
+ onclick="pfc.minimize_maximize('pfc_colorlist','inline')" />
+ </div>
+ <div id="pfc_colorlist"></div>
+ </div> <!-- pfc_bbcode_container -->
+
+ </div>
+
+ <div id="pfc_errors"></div>
+
+ <div id="pfc_smileys"></div>
+
+ </div>
+
+ <div id="pfc_sound_container"></div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-31 01:32:18
|
Revision: 1170
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1170&view=rev
Author: gpinzone
Date: 2007-08-30 18:32:18 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Much cleaner way of resolving class/className dependencies.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/data/public/js/pfcgui.js
trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
trunk/demo/demo50_data/mytheme/customize.js.php
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-30 19:17:03 UTC (rev 1169)
+++ trunk/data/public/js/pfcclient.js 2007-08-31 01:32:18 UTC (rev 1170)
@@ -1194,21 +1194,17 @@
*/
updateNickListBox: function(chanid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var nickidlst = this.getChanMeta(chanid,'users')['nickid'];
var nickdiv = this.gui.getOnlineContentFromTabId(chanid);
var ul = document.createElement('ul');
- if (! is_ie)
- ul.setAttribute('class', 'pfc_nicklist');
- else
- ul.setAttribute('className', 'pfc_nicklist'); // for IE
+ ul.setAttribute(className, 'pfc_nicklist');
for (var i=0; i<nickidlst.length; i++)
{
var nickid = nickidlst[i];
var li = this.buildNickItem(nickid);
- if (! is_ie)
- li.setAttribute('class', 'pfc_nickitem_'+nickid);
- else
- li.setAttribute('className', 'pfc_nickitem_'+nickid); // for IE
+ li.setAttribute(className, 'pfc_nickitem_'+nickid);
ul.appendChild(li);
}
var fc = nickdiv.firstChild;
@@ -1228,27 +1224,20 @@
updateNickWhoisBox: function(nickid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- if (! is_ie)
- div.setAttribute('class', 'pfc_nickwhois');
- else
- div.setAttribute('className', 'pfc_nickwhois'); // for IE
+ div.setAttribute(className, 'pfc_nickwhois');
var p = document.createElement('p');
- if (! is_ie)
- p.setAttribute('class', 'pfc_nickwhois_header');
- else
- p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
+ p.setAttribute(className, 'pfc_nickwhois_header');
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- if (! is_ie)
- img.setAttribute('class', 'pfc_nickwhois_close');
- else
- img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
+ img.setAttribute(className, 'pfc_nickwhois_close');
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -1279,15 +1268,9 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- if (! is_ie)
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- else
- td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
+ td1.setAttribute(className, 'pfc_nickwhois_c1');
var td2 = document.createElement('td');
- if (! is_ie)
- td2.setAttribute('class', 'pfc_nickwhois_c2');
- else
- td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
+ td2.setAttribute(className, 'pfc_nickwhois_c2');
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -1301,10 +1284,7 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- if (! is_ie)
- p.setAttribute('class', 'pfc_nickwhois_pv');
- else
- p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
+ p.setAttribute(className, 'pfc_nickwhois_pv');
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
@@ -1329,6 +1309,8 @@
buildNickItem: function(nickid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var nick = this.getUserMeta(nickid, 'nick');
var isadmin = this.getUserMeta(nickid, 'isadmin');
if (isadmin == '') isadmin = false;
@@ -1351,27 +1333,20 @@
}
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';
- if (! is_ie)
- img.setAttribute('class', 'pfc_nickbutton');
- else
- img.setAttribute('className', 'pfc_nickbutton'); // for IE
+ img.setAttribute(className, 'pfc_nickbutton');
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');
- if (! is_ie)
- span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
- else
- span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
+ span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid);
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/data/public/js/pfcgui.js
===================================================================
--- trunk/data/public/js/pfcgui.js 2007-08-30 19:17:03 UTC (rev 1169)
+++ trunk/data/public/js/pfcgui.js 2007-08-31 01:32:18 UTC (rev 1170)
@@ -65,6 +65,8 @@
setTabById: function(tabid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// first of all save the scroll pos of the visible tab
var content = this.getChatContentFromTabId(this.current_tab_id);
this.scrollpos[this.current_tab_id] = content.scrollTop;
@@ -81,10 +83,7 @@
if (this.tabids[i] == tabid)
{
// select the tab
- if (! is_ie)
- tabtitle.setAttribute('class', 'selected');
- else
- tabtitle.setAttribute('className', 'selected'); // for IE
+ tabtitle.setAttribute(className, 'selected');
//Element.addClassName(tabtitle, 'selected');
tab_to_show = tabcontent;
this.current_tab = this.tabs[i];
@@ -93,10 +92,7 @@
else
{
// unselect the tab
- if (! is_ie)
- tabtitle.setAttribute('class', '');
- else
- tabtitle.setAttribute('className', ''); // for IE
+ tabtitle.setAttribute(className, '');
//Element.removeClassName(tabtitle, 'selected');
tabcontent.style.display = 'none';
}
@@ -130,6 +126,8 @@
getChatContentFromTabId: function(tabid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// return the chat content if it exists
var cc = this.chatcontent[tabid];
if (cc) return cc;
@@ -137,10 +135,7 @@
// if the chat content doesn't exists yet, just create a cached one
cc = document.createElement('div');
cc.setAttribute('id', 'pfc_chat_'+tabid);
- if (! is_ie)
- cc.setAttribute('class', 'pfc_chat');
- else
- cc.setAttribute('className', 'pfc_chat'); // for IE
+ cc.setAttribute(className, 'pfc_chat');
// Element.addClassName(cc, 'pfc_chat');
cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page)
@@ -151,16 +146,15 @@
},
getOnlineContentFromTabId: function(tabid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// return the online content if it exists
var oc = this.onlinecontent[tabid];
if (oc) return oc;
oc = document.createElement('div');
oc.setAttribute('id', 'pfc_online_'+tabid);
- if (! is_ie)
- oc.setAttribute('class', 'pfc_online');
- else
- oc.setAttribute('className', 'pfc_online'); // for IE
+ oc.setAttribute(className, 'pfc_online');
//Element.addClassName(oc, 'pfc_online');
// I set the border style here because seting it in the CSS is not taken in account
// oc.style.borderLeft = "1px solid #555";
@@ -211,6 +205,8 @@
createTab: function(name, tabid, type)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// do not create empty tabs
if(name == '') return;
if(tabid == '') return;
@@ -234,10 +230,7 @@
li_title.appendChild(li_div);
var a1 = document.createElement('a');
- if (! is_ie)
- a1.setAttribute('class', 'pfc_tabtitle');
- else
- a1.setAttribute('className', 'pfc_tabtitle'); // for IE
+ a1.setAttribute(className, 'pfc_tabtitle');
a1.setAttribute('href', '#');
a1.pfc_tabid = tabid;
a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;}
@@ -273,10 +266,7 @@
}
a2.alt = pfc.res.getLabel('Close this tab');
a2.title = a2.alt;
- if (! is_ie)
- a2.setAttribute('class', 'pfc_tabclose');
- else
- a2.setAttribute('className', 'pfc_tabclose'); // for IE
+ a2.setAttribute(className, 'pfc_tabclose');
var img = document.createElement('img');
img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif'));
a2.appendChild(img);
@@ -286,10 +276,7 @@
var div_content = document.createElement('div');
div_content.setAttribute('id', 'pfc_channel_content'+tabid);
// Element.addClassName(div_content, 'pfc_content');
- if (! is_ie)
- div_content.setAttribute('class', 'pfc_content');
- else
- div_content.setAttribute('className', 'pfc_content'); // for IE
+ div_content.setAttribute(className, 'pfc_content');
div_content.style.display = 'none';
var div_chat = this.getChatContentFromTabId(tabid);
@@ -346,6 +333,8 @@
*/
notifyTab: function(tabid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// first of all be sure the tab highlighting is cleared
this.unnotifyTab(tabid);
@@ -368,17 +357,11 @@
{
if (div.blinkstat == true)
{
- if (! is_ie)
- div.setAttribute('class', 'pfc_tabblink1');
- else
- div.setAttribute('className', 'pfc_tabblink1'); // for IE
+ div.setAttribute(className, 'pfc_tabblink1');
}
else
{
- if (! is_ie)
- div.setAttribute('class', 'pfc_tabblink2');
- else
- div.setAttribute('className', 'pfc_tabblink2'); // for IE
+ div.setAttribute(className, 'pfc_tabblink2');
}
div.blinkstat = !div.blinkstat;
div.blinktimeout = setTimeout('pfc.gui.notifyTab(\''+tabid+'\');', 500);
@@ -390,6 +373,8 @@
*/
unnotifyTab: function(tabid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var tabpos = indexOf(this.tabids, tabid);
var tabtype = this.tabtypes[tabpos];
@@ -407,10 +392,7 @@
var div = $('pfc_tabdiv'+tabid);
if (div)
{
- if (! is_ie)
- div.removeAttribute('class');
- else
- div.removeAttribute('className'); // for IE
+ div.removeAttribute(className);
clearTimeout(div.blinktimeout);
}
},
@@ -444,6 +426,8 @@
loadBBCodeColorList: function()
{
+ var className = (! is_ie) ? 'class' : 'className';
+
// color list
var clist = $('pfc_colorlist');
var clist_v = pfc_bbcode_color_list;
@@ -452,10 +436,7 @@
var bbc = clist_v[i];
var elt = document.createElement('img');
elt.bbc = bbc;
- if (! is_ie)
- elt.setAttribute('class', 'pfc_color');
- else
- elt.setAttribute('className', 'pfc_color'); // for IE
+ elt.setAttribute(className, 'pfc_color');
elt.setAttribute('id', 'pfc_color_'+bbc);
elt.style.backgroundColor = '#'+bbc;
elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif'));
Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
+++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-31 01:32:18 UTC (rev 1170)
@@ -1,5 +1,7 @@
pfcClient.prototype.buildNickItem = function(nickid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var nick = this.getUserMeta(nickid, 'nick');
var isadmin = this.getUserMeta(nickid, 'isadmin');
if (isadmin == '') isadmin = false;
@@ -25,27 +27,20 @@
*/
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';
- if (! is_ie)
- img.setAttribute('class', 'pfc_nickbutton');
- else
- img.setAttribute('className', 'pfc_nickbutton'); // for IE
+ img.setAttribute(className, 'pfc_nickbutton');
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');
- if (! is_ie)
- span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
- else
- span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
+ span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid);
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/demo/demo50_data/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
+++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-31 01:32:18 UTC (rev 1170)
@@ -1,26 +1,19 @@
pfcClient.prototype.updateNickWhoisBox = function(nickid)
{
+ var className = (! is_ie) ? 'class' : 'className';
+
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- if (! is_ie)
- div.setAttribute('class', 'pfc_nickwhois');
- else
- div.setAttribute('className', 'pfc_nickwhois'); // for IE
+ div.setAttribute(className, 'pfc_nickwhois');
var p = document.createElement('p');
- if (! is_ie)
- p.setAttribute('class', 'pfc_nickwhois_header');
- else
- p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
+ p.setAttribute(className, 'pfc_nickwhois_header');
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- if (! is_ie)
- img.setAttribute('class', 'pfc_nickwhois_close');
- else
- img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
+ img.setAttribute(className, 'pfc_nickwhois_close');
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -52,15 +45,9 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- if (! is_ie)
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- else
- td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
+ td1.setAttribute(className, 'pfc_nickwhois_c1');
var td2 = document.createElement('td');
- if (! is_ie)
- td2.setAttribute('class', 'pfc_nickwhois_c2');
- else
- td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
+ td2.setAttribute(className, 'pfc_nickwhois_c2');
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -75,10 +62,7 @@
{
var img = document.createElement('img');
img.setAttribute('src',this.getUserMeta(nickid,'avatar'));
- if (! is_ie)
- img.setAttribute('class', 'pfc_nickwhois_avatar');
- else
- img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE
+ img.setAttribute(className, 'pfc_nickwhois_avatar');
div.appendChild(img);
}
@@ -86,10 +70,7 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- if (! is_ie)
- p.setAttribute('class', 'pfc_nickwhois_pv');
- else
- p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
+ p.setAttribute(className, 'pfc_nickwhois_pv');
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-30 19:17:27
|
Revision: 1169
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1169&view=rev
Author: gpinzone
Date: 2007-08-30 12:17:03 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Updated rest of files that use both class and className.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/data/public/js/pfcgui.js
trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
trunk/demo/demo50_data/mytheme/customize.js.php
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/data/public/js/pfcclient.js 2007-08-30 19:17:03 UTC (rev 1169)
@@ -1197,18 +1197,18 @@
var nickidlst = this.getChanMeta(chanid,'users')['nickid'];
var nickdiv = this.gui.getOnlineContentFromTabId(chanid);
var ul = document.createElement('ul');
- if (is_ie)
- ul.setAttribute('className', 'pfc_nicklist'); // IE
+ if (! is_ie)
+ ul.setAttribute('class', 'pfc_nicklist');
else
- ul.setAttribute('class', 'pfc_nicklist');
+ ul.setAttribute('className', 'pfc_nicklist'); // for IE
for (var i=0; i<nickidlst.length; i++)
{
var nickid = nickidlst[i];
var li = this.buildNickItem(nickid);
- if (is_ie)
- li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE
+ if (! is_ie)
+ li.setAttribute('class', 'pfc_nickitem_'+nickid);
else
- li.setAttribute('class', 'pfc_nickitem_'+nickid);
+ li.setAttribute('className', 'pfc_nickitem_'+nickid); // for IE
ul.appendChild(li);
}
var fc = nickdiv.firstChild;
@@ -1231,24 +1231,24 @@
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- if (is_ie)
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_nickwhois');
+ else
div.setAttribute('className', 'pfc_nickwhois'); // for IE
- else
- div.setAttribute('class', 'pfc_nickwhois');
var p = document.createElement('p');
- if (is_ie)
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_header');
+ else
p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
- else
- p.setAttribute('class', 'pfc_nickwhois_header');
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- if (is_ie)
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_close');
+ else
img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
- else
- img.setAttribute('class', 'pfc_nickwhois_close');
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -1279,15 +1279,15 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- if (is_ie)
+ if (! is_ie)
+ td1.setAttribute('class', 'pfc_nickwhois_c1');
+ else
td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
+ var td2 = document.createElement('td');
+ if (! is_ie)
+ td2.setAttribute('class', 'pfc_nickwhois_c2');
else
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- var td2 = document.createElement('td');
- if (is_ie)
td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
- else
- td2.setAttribute('class', 'pfc_nickwhois_c2');
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -1301,10 +1301,10 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- if (is_ie)
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_pv');
+ else
p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
- else
- p.setAttribute('class', 'pfc_nickwhois_pv');
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
@@ -1358,20 +1358,20 @@
else
img.setAttribute('src', this.res.getFileUrl('images/user.gif'));
img.style.marginRight = '5px';
- if (is_ie)
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickbutton');
+ else
img.setAttribute('className', 'pfc_nickbutton'); // for IE
- else
- img.setAttribute('class', 'pfc_nickbutton');
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');
- if (is_ie)
+ if (! is_ie)
+ span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
+ else
span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
- else
- span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/data/public/js/pfcgui.js
===================================================================
--- trunk/data/public/js/pfcgui.js 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/data/public/js/pfcgui.js 2007-08-30 19:17:03 UTC (rev 1169)
@@ -81,8 +81,10 @@
if (this.tabids[i] == tabid)
{
// select the tab
- tabtitle.setAttribute('class', 'selected');
- tabtitle.setAttribute('className', 'selected'); // for IE6
+ if (! is_ie)
+ tabtitle.setAttribute('class', 'selected');
+ else
+ tabtitle.setAttribute('className', 'selected'); // for IE
//Element.addClassName(tabtitle, 'selected');
tab_to_show = tabcontent;
this.current_tab = this.tabs[i];
@@ -91,8 +93,10 @@
else
{
// unselect the tab
- tabtitle.setAttribute('class', '');
- tabtitle.setAttribute('className', ''); // for IE6
+ if (! is_ie)
+ tabtitle.setAttribute('class', '');
+ else
+ tabtitle.setAttribute('className', ''); // for IE
//Element.removeClassName(tabtitle, 'selected');
tabcontent.style.display = 'none';
}
@@ -133,8 +137,10 @@
// if the chat content doesn't exists yet, just create a cached one
cc = document.createElement('div');
cc.setAttribute('id', 'pfc_chat_'+tabid);
- cc.setAttribute('class', 'pfc_chat');
- cc.setAttribute('className', 'pfc_chat'); // for IE6
+ if (! is_ie)
+ cc.setAttribute('class', 'pfc_chat');
+ else
+ cc.setAttribute('className', 'pfc_chat'); // for IE
// Element.addClassName(cc, 'pfc_chat');
cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page)
@@ -151,8 +157,10 @@
oc = document.createElement('div');
oc.setAttribute('id', 'pfc_online_'+tabid);
- oc.setAttribute('class', 'pfc_online');
- oc.setAttribute('className', 'pfc_online'); // for IE6
+ if (! is_ie)
+ oc.setAttribute('class', 'pfc_online');
+ else
+ oc.setAttribute('className', 'pfc_online'); // for IE
//Element.addClassName(oc, 'pfc_online');
// I set the border style here because seting it in the CSS is not taken in account
// oc.style.borderLeft = "1px solid #555";
@@ -226,8 +234,10 @@
li_title.appendChild(li_div);
var a1 = document.createElement('a');
- a1.setAttribute('class', 'pfc_tabtitle');
- a1.setAttribute('className', 'pfc_tabtitle'); // for IE6
+ if (! is_ie)
+ a1.setAttribute('class', 'pfc_tabtitle');
+ else
+ a1.setAttribute('className', 'pfc_tabtitle'); // for IE
a1.setAttribute('href', '#');
a1.pfc_tabid = tabid;
a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;}
@@ -263,8 +273,10 @@
}
a2.alt = pfc.res.getLabel('Close this tab');
a2.title = a2.alt;
- a2.setAttribute('class', 'pfc_tabclose');
- a2.setAttribute('className', 'pfc_tabclose'); // for IE6
+ if (! is_ie)
+ a2.setAttribute('class', 'pfc_tabclose');
+ else
+ a2.setAttribute('className', 'pfc_tabclose'); // for IE
var img = document.createElement('img');
img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif'));
a2.appendChild(img);
@@ -274,8 +286,10 @@
var div_content = document.createElement('div');
div_content.setAttribute('id', 'pfc_channel_content'+tabid);
// Element.addClassName(div_content, 'pfc_content');
- div_content.setAttribute('class', 'pfc_content');
- div_content.setAttribute('className', 'pfc_content'); // for IE6
+ if (! is_ie)
+ div_content.setAttribute('class', 'pfc_content');
+ else
+ div_content.setAttribute('className', 'pfc_content'); // for IE
div_content.style.display = 'none';
var div_chat = this.getChatContentFromTabId(tabid);
@@ -354,13 +368,17 @@
{
if (div.blinkstat == true)
{
- div.setAttribute('class', 'pfc_tabblink1');
- div.setAttribute('className', 'pfc_tabblink1'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_tabblink1');
+ else
+ div.setAttribute('className', 'pfc_tabblink1'); // for IE
}
else
{
- div.setAttribute('class', 'pfc_tabblink2');
- div.setAttribute('className', 'pfc_tabblink2'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_tabblink2');
+ else
+ div.setAttribute('className', 'pfc_tabblink2'); // for IE
}
div.blinkstat = !div.blinkstat;
div.blinktimeout = setTimeout('pfc.gui.notifyTab(\''+tabid+'\');', 500);
@@ -389,8 +407,10 @@
var div = $('pfc_tabdiv'+tabid);
if (div)
{
- div.removeAttribute('class');
- div.removeAttribute('className'); // for IE6
+ if (! is_ie)
+ div.removeAttribute('class');
+ else
+ div.removeAttribute('className'); // for IE
clearTimeout(div.blinktimeout);
}
},
@@ -432,8 +452,10 @@
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
+ if (! is_ie)
+ elt.setAttribute('class', 'pfc_color');
+ else
+ elt.setAttribute('className', 'pfc_color'); // for IE
elt.setAttribute('id', 'pfc_color_'+bbc);
elt.style.backgroundColor = '#'+bbc;
elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif'));
Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
@@ -32,16 +32,20 @@
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
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickbutton');
+ else
+ img.setAttribute('className', 'pfc_nickbutton'); // for IE
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
+ if (! is_ie)
+ span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
+ else
+ span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/demo/demo50_data/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
@@ -3,18 +3,24 @@
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- div.setAttribute('class', 'pfc_nickwhois');
- div.setAttribute('className', 'pfc_nickwhois'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_nickwhois');
+ else
+ div.setAttribute('className', 'pfc_nickwhois'); // for IE
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_header');
- p.setAttribute('className', 'pfc_nickwhois_header'); // for IE6
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_header');
+ else
+ p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- img.setAttribute('class', 'pfc_nickwhois_close');
- img.setAttribute('className', 'pfc_nickwhois_close'); // for IE6
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_close');
+ else
+ img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -46,11 +52,15 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6
+ if (! is_ie)
+ td1.setAttribute('class', 'pfc_nickwhois_c1');
+ else
+ td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
var td2 = document.createElement('td');
- td2.setAttribute('class', 'pfc_nickwhois_c2');
- td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6
+ if (! is_ie)
+ td2.setAttribute('class', 'pfc_nickwhois_c2');
+ else
+ td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -65,8 +75,10 @@
{
var img = document.createElement('img');
img.setAttribute('src',this.getUserMeta(nickid,'avatar'));
- img.setAttribute('class', 'pfc_nickwhois_avatar');
- img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE6
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_avatar');
+ else
+ img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE
div.appendChild(img);
}
@@ -74,8 +86,10 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_pv');
- p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_pv');
+ else
+ p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-30 16:40:38
|
Revision: 1168
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1168&view=rev
Author: gpinzone
Date: 2007-08-30 09:40:39 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Added logic to only set class once. Class value would show up twice for browsers that supported both class and className. Also, all versions of IE need className.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-30 12:06:57 UTC (rev 1167)
+++ trunk/data/public/js/pfcclient.js 2007-08-30 16:40:39 UTC (rev 1168)
@@ -1197,14 +1197,18 @@
var nickidlst = this.getChanMeta(chanid,'users')['nickid'];
var nickdiv = this.gui.getOnlineContentFromTabId(chanid);
var ul = document.createElement('ul');
- ul.setAttribute('class', 'pfc_nicklist');
- ul.setAttribute('className', 'pfc_nicklist'); // IE6
+ if (is_ie)
+ ul.setAttribute('className', 'pfc_nicklist'); // IE
+ else
+ ul.setAttribute('class', 'pfc_nicklist');
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
+ if (is_ie)
+ li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE
+ else
+ li.setAttribute('class', 'pfc_nickitem_'+nickid);
ul.appendChild(li);
}
var fc = nickdiv.firstChild;
@@ -1227,18 +1231,24 @@
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- div.setAttribute('class', 'pfc_nickwhois');
- div.setAttribute('className', 'pfc_nickwhois'); // for IE6
+ if (is_ie)
+ div.setAttribute('className', 'pfc_nickwhois'); // for IE
+ else
+ div.setAttribute('class', 'pfc_nickwhois');
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_header');
- p.setAttribute('className', 'pfc_nickwhois_header'); // for IE6
+ if (is_ie)
+ p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
+ else
+ p.setAttribute('class', 'pfc_nickwhois_header');
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- img.setAttribute('class', 'pfc_nickwhois_close');
- img.setAttribute('className', 'pfc_nickwhois_close'); // for IE6
+ if (is_ie)
+ img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
+ else
+ img.setAttribute('class', 'pfc_nickwhois_close');
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -1269,11 +1279,15 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6
+ if (is_ie)
+ td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
+ else
+ td1.setAttribute('class', 'pfc_nickwhois_c1');
var td2 = document.createElement('td');
- td2.setAttribute('class', 'pfc_nickwhois_c2');
- td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6
+ if (is_ie)
+ td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
+ else
+ td2.setAttribute('class', 'pfc_nickwhois_c2');
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -1287,8 +1301,10 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_pv');
- p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6
+ if (is_ie)
+ p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
+ else
+ p.setAttribute('class', 'pfc_nickwhois_pv');
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
@@ -1342,16 +1358,20 @@
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
+ if (is_ie)
+ img.setAttribute('className', 'pfc_nickbutton'); // for IE
+ else
+ img.setAttribute('class', 'pfc_nickbutton');
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
+ if (is_ie)
+ span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
+ else
+ span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-08-30 12:06:54
|
Revision: 1167
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1167&view=rev
Author: kerphi
Date: 2007-08-30 05:06:57 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
rename the file to a more explicite name
Added Paths:
-----------
trunk/misc/generate-doc.inc.php
Removed Paths:
-------------
trunk/misc/generate-doc-from-svn.php
Deleted: trunk/misc/generate-doc-from-svn.php
===================================================================
--- trunk/misc/generate-doc-from-svn.php 2007-08-30 12:05:55 UTC (rev 1166)
+++ trunk/misc/generate-doc-from-svn.php 2007-08-30 12:06:57 UTC (rev 1167)
@@ -1,80 +0,0 @@
-<?php
-
-/**
- * This script is used to parse the parameter descriptions in pfcglobalconfig.class.php
- * So that the official doc is keept up to date.
- */
-function pfc_generate_doc($f = NULL)
-{
- $f = ($f != NULL) ? $f : dirname(__FILE__).'/../src/pfcglobalconfig.class.php';
-
- $ct_params = array();
-// $ct_params['http'] = array( 'proxy' => 'tcp://proxyout.inist.fr:8080', 'request_fulluri' => true );
- $ct = stream_context_create($ct_params);
- $data = file_get_contents($f, false, $ct);
-
- if (preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset))
- {
- $offset_start = $matches[0][1];
- }
- if (preg_match('/function pfcGlobalConfig/', $data, $matches, PREG_OFFSET_CAPTURE, $offset))
- {
- $offset_end = $matches[0][1];
- }
-
- $offset = $offset_start;
- $plist = array();
- $continue = true;
- while ($offset < $offset_end)
- {
- $p = array();
-
- // search for the begining of the description
- if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
- $offset1 = $matches1[0][1];
- else
- $offset = $offset_end;
-
- // search for the end of the description
- if ($offset1 < $offset_end &&
- preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
- {
- $offset3 = $matches3[0][1];
-
- // search for the parameter description
- $p['desc'] = '';
- while($offset2 < $offset3)
- {
- if (preg_match('/\s+\*\s+(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
- {
- $offset2 = $matches2[1][1];
- if ($offset2 < $offset3)
- {
- $offset = $offset2;
- $p['desc'] .= ' '.$matches2[1][0];
- }
- }
- else
- break;
- }
- $p['desc'] = trim($p['desc']);
-
- // search for the parameter name/default value
- if (preg_match('/var\s+\$([a-z_]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
- {
- $offset = $matches4[1][1];
- $p['name'] = $matches4[1][0];
- $p['value'] = $matches4[2][0];
- }
- else
- $offset = $offset_end;
- }
- else
- $offset = $offset_end;
-
- if (count($p) > 0) $plist[] = $p;
- }
- return $plist;
-}
-
-?>
\ No newline at end of file
Copied: trunk/misc/generate-doc.inc.php (from rev 1166, trunk/misc/generate-doc-from-svn.php)
===================================================================
--- trunk/misc/generate-doc.inc.php (rev 0)
+++ trunk/misc/generate-doc.inc.php 2007-08-30 12:06:57 UTC (rev 1167)
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * This script is used to parse the parameter descriptions in pfcglobalconfig.class.php
+ * So that the official doc is keept up to date.
+ */
+function pfc_generate_doc($f = NULL)
+{
+ $f = ($f != NULL) ? $f : dirname(__FILE__).'/../src/pfcglobalconfig.class.php';
+
+ $ct_params = array();
+// $ct_params['http'] = array( 'proxy' => 'tcp://proxyout.inist.fr:8080', 'request_fulluri' => true );
+ $ct = stream_context_create($ct_params);
+ $data = file_get_contents($f, false, $ct);
+
+ if (preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset_start = $matches[0][1];
+ }
+ if (preg_match('/function pfcGlobalConfig/', $data, $matches, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset_end = $matches[0][1];
+ }
+
+ $offset = $offset_start;
+ $plist = array();
+ $continue = true;
+ while ($offset < $offset_end)
+ {
+ $p = array();
+
+ // search for the begining of the description
+ if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
+ $offset1 = $matches1[0][1];
+ else
+ $offset = $offset_end;
+
+ // search for the end of the description
+ if ($offset1 < $offset_end &&
+ preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset3 = $matches3[0][1];
+
+ // search for the parameter description
+ $p['desc'] = '';
+ while($offset2 < $offset3)
+ {
+ if (preg_match('/\s+\*\s+(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset2 = $matches2[1][1];
+ if ($offset2 < $offset3)
+ {
+ $offset = $offset2;
+ $p['desc'] .= ' '.$matches2[1][0];
+ }
+ }
+ else
+ break;
+ }
+ $p['desc'] = trim($p['desc']);
+
+ // search for the parameter name/default value
+ if (preg_match('/var\s+\$([a-z_]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset = $matches4[1][1];
+ $p['name'] = $matches4[1][0];
+ $p['value'] = $matches4[2][0];
+ }
+ else
+ $offset = $offset_end;
+ }
+ else
+ $offset = $offset_end;
+
+ if (count($p) > 0) $plist[] = $p;
+ }
+ return $plist;
+}
+
+?>
\ 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-08-30 12:05:57
|
Revision: 1166
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1166&view=rev
Author: kerphi
Date: 2007-08-30 05:05:55 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Finalize the doc generator php script
Modified Paths:
--------------
trunk/misc/generate-doc-from-svn.php
Modified: trunk/misc/generate-doc-from-svn.php
===================================================================
--- trunk/misc/generate-doc-from-svn.php 2007-08-30 12:05:23 UTC (rev 1165)
+++ trunk/misc/generate-doc-from-svn.php 2007-08-30 12:05:55 UTC (rev 1166)
@@ -1,36 +1,80 @@
<?php
-echo '<pre>';
-$f = 'https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk/src/pfcglobalconfig.class.php';
-$data = file_get_contents($f);
+/**
+ * This script is used to parse the parameter descriptions in pfcglobalconfig.class.php
+ * So that the official doc is keept up to date.
+ */
+function pfc_generate_doc($f = NULL)
+{
+ $f = ($f != NULL) ? $f : dirname(__FILE__).'/../src/pfcglobalconfig.class.php';
-$offset = 0;
-preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset);
-$offset = $matches[0][1];
+ $ct_params = array();
+// $ct_params['http'] = array( 'proxy' => 'tcp://proxyout.inist.fr:8080', 'request_fulluri' => true );
+ $ct = stream_context_create($ct_params);
+ $data = file_get_contents($f, false, $ct);
-if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
-{
- // debut de commentaire
- $offset1 = $matches1[0][1];
- print_r($matches);
+ if (preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset_start = $matches[0][1];
+ }
+ if (preg_match('/function pfcGlobalConfig/', $data, $matches, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset_end = $matches[0][1];
+ }
+
+ $offset = $offset_start;
+ $plist = array();
+ $continue = true;
+ while ($offset < $offset_end)
+ {
+ $p = array();
+
+ // search for the begining of the description
+ if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
+ $offset1 = $matches1[0][1];
+ else
+ $offset = $offset_end;
+
+ // search for the end of the description
+ if ($offset1 < $offset_end &&
+ preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset3 = $matches3[0][1];
+
+ // search for the parameter description
+ $p['desc'] = '';
+ while($offset2 < $offset3)
+ {
+ if (preg_match('/\s+\*\s+(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset2 = $matches2[1][1];
+ if ($offset2 < $offset3)
+ {
+ $offset = $offset2;
+ $p['desc'] .= ' '.$matches2[1][0];
+ }
+ }
+ else
+ break;
+ }
+ $p['desc'] = trim($p['desc']);
+
+ // search for the parameter name/default value
+ if (preg_match('/var\s+\$([a-z_]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
+ {
+ $offset = $matches4[1][1];
+ $p['name'] = $matches4[1][0];
+ $p['value'] = $matches4[2][0];
+ }
+ else
+ $offset = $offset_end;
+ }
+ else
+ $offset = $offset_end;
+
+ if (count($p) > 0) $plist[] = $p;
+ }
+ return $plist;
}
-if (preg_match('/\*\s(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
-{
- // dans le commentaire
- $offset2 = $matches2[1][1];
- print_r($matches);
-}
-if (preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
-{
- // fin de commentaire
- $offset3 = $matches3[0][1];
- print_r($matches);
-}
-if (preg_match('/var\s+\$([a-z]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
-{
- // analyse du parametre
- $offset4 = $matches4[1][1];
- print_r($matches);
-}
?>
\ 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-08-30 12:05:27
|
Revision: 1165
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1165&view=rev
Author: kerphi
Date: 2007-08-30 05:05:23 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Fix some documentation
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-30 00:10:30 UTC (rev 1164)
+++ trunk/src/pfcglobalconfig.class.php 2007-08-30 12:05:23 UTC (rev 1165)
@@ -411,23 +411,25 @@
var $debug = false;
/**
- * This is the user time zone
- * it is the difference in seconds between user clock and server clock
+ * <p>Can be used to setup the chat time zone.
+ * It is the difference in seconds between chat clock and server clock</p>
*/
var $time_offset = 0;
/**
- * How to display the dates in the chat
+ * <p>How to display the dates in the chat</p>
*/
var $date_format = "d/m/Y";
/**
- * How to display the time in the chat
+ * <p>How to display the time in the chat</p>
*/
var $time_format = "H:i:s";
/**
- * This parameter is useful when your chat server is behind a reverse proxy that
- * forward client ip address in HTTP_X_FORWARDED_FOR http header.
- * see : http://www.phpfreechat.net/forum/viewtopic.php?id=1344
+ * <p>This parameter is useful when your chat server is behind a reverse proxy that
+ * forwards client ip address in HTTP_X_FORWARDED_FOR http header.
+ * Some discutions about this parameter are available
+ * on <a href="http://www.phpfreechat.net/forum/viewtopic.php?id=1344">the forum</a>.
+ * (default value is false)</p>
*/
var $get_ip_from_xforwardedfor = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-30 00:10:31
|
Revision: 1164
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1164&view=rev
Author: gpinzone
Date: 2007-08-29 17:10:30 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Fixed some spelling/wording. TODO: $quit_on_closedwindow documentation conflicts with setting. $openlinknewwindow doesn't always use target=_blank; it mostly uses onclick="..."
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-29 20:02:51 UTC (rev 1163)
+++ trunk/src/pfcglobalconfig.class.php 2007-08-30 00:10:30 UTC (rev 1164)
@@ -45,13 +45,13 @@
* For example, if you get nicks from a databases where they are ISO-8859-1 encoded,
* you must convert it: <code>$params["nick"] = iconv("ISO-8859-1", "UTF-8", $bdd_nickname);</code>
* (of course, change the <code>$bdd_nickname</code> parameter for your needs)</p>
- * <p>("" value by default, means users must choose a nickname when s/he connects)</p>
+ * <p>("" value by default - means users must choose a nickname when s/he connects)</p>
*/
var $nick = "";
/**
* <p>This is the maximum nickname length, a longer nickname is forbidden.
- * ( 15 caracteres by default)</p>
+ * ( 15 characters by default)</p>
*/
var $max_nick_len = 15;
@@ -63,21 +63,21 @@
/**
* <p>Contains some extra data (metadata) about the user that can be used to customize the display.
- * For example: the user sexe, age, real name ... can be setup in order to display it in the user's info box.
- * A example for the sexe is : <code>array('sexe'=>'f')</code>
- * (by default the array is empty)</p>
+ * For example: the user's gender, age, real name ... can be setup in order to display it in the user's info box.
+ * A example for gender is : <code>$params["nickmeta"] = array('gender'=>'f');</code>
+ * (by default, the array is empty)</p>
*/
var $nickmeta = array();
/**
- * <p>I can be used to restrict metadata visibility only to admins.
- * (by default <code>array('ip')</code> means that the ip parameter can be only viewed by admins)</p>
+ * <p>Can be used to set user metadata that is only visible to admins.
+ * (by default, <code>array('ip')</code> means that the user's IP address is shown to admins only)</p>
*/
var $nickmeta_private = array('ip');
/**
* <p>Set this parameter to true if you want to give admin rights to the connected user.
- * Attention : if you don't use any external registration system all your users will be admins.
+ * Attention : if you don't use any external registration system, all your users will be admins.
* You have to test current user rights before setting this parameter to true.
* (default value is false)</p>
*/
@@ -86,7 +86,7 @@
/**
* <p>This parameter contains a list of key/value that identify admin access.
* The keys are the nicknames and the values are the corresponding passwords.
- * (by default the admin/nopassword account is available, don't forget to change it)</p>
+ * (by default, the admin/nopassword account is available, don't forget to change it)</p>
*/
var $admins = array("admin" => "");
@@ -104,19 +104,19 @@
/**
* <p>Used to create default rooms (auto-joined at startup). It contains an array of rooms names.
- * (by default only one room is created named "My room")</p>
+ * (by default, only one room is created named "My room")</p>
*/
var $channels = array();
/**
* <p>This parameter can be used to restrict channels to users.
- * If the array is empty, it allows users to create there own channels.
- * (by default it's empty)</p>
+ * If the array is empty, it allows users to create their own channels.
+ * (by default, it's empty)</p>
*/
var $frozen_channels = array();
/**
- * <p>Indicate the maximum number of allowed channels for each users.
+ * <p>The maximum number of allowed channels for each user.
* (10 by default)</p>
*/
var $max_channels = 10;
@@ -124,29 +124,29 @@
/**
* <p>This array contains the nicknames list you want to initiate a private message at chat loading.
* Of course, the listed nicknames should be online or it will just be ignored.
- * (by default the array is empty)</p>
+ * (by default, the array is empty)</p>
*/
var $privmsg = array();
/**
* <p>This is the maximum number of private message allowed at the same time for one user.
- * (by default its value is 5)</p>
+ * (5 by default)</p>
*/
var $max_privmsg = 5;
/**
* <p>This is the time to wait between two refreshes.
- * A refresh is a HTTP request which asks the server if there are new messages to display.
- * If there are no new messages, then a empty HTTP response is returned.
+ * A refresh is an HTTP request which asks the server if there are new messages to display.
+ * If there are no new messages, then an empty HTTP response is returned.
* ( 5000 by default, 5000ms = 5s)</p>
*/
var $refresh_delay = 5000;
/**
- * <p>This is the time of inactivity to wait before to considere to disconnecte user (in milliseconds).
- * A user is inactive only if he closed his chat windows.
- * A user with a open chat window is not inactive because he sends each <code>refresh_delay</code> a HTTP request.
- * ( 20000 by default, 20000ms = 20s)</p>
+ * <p>This is the time of inactivity to wait before a user can be disconnected (in milliseconds).
+ * A user is inactive only if s/he closed his/her chat window.
+ * A user with an open chat window is not inactive because s/he sends each <code>refresh_delay</code> an HTTP request.
+ * ( 20,000 by default, 20000ms = 20s)</p>
*/
var $timeout = 20000;
@@ -160,16 +160,16 @@
/**
* This url is used when <code>islocked</code> parameter is true.
* The users will be redirected (http redirect) to this url.
- * (by default it is http://www.phpfreechat.net)
+ * (by default, it is http://www.phpfreechat.net)
*/
var $lockurl = 'http://www.phpfreechat.net';
/**
- * These proxies will be skiped. ex: append "censor" to the list to disable words censoring
+ * These proxies will be skiped. ex: append "censor" to the list to disable words censoring.
*/
var $skip_proxies = array();
/**
- * These proxies will be handled just before to process commands and just after system proxies
+ * These proxies will be handled just before to process commands and just after system proxies.
*/
var $post_proxies = array();
/**
@@ -177,7 +177,7 @@
*/
var $pre_proxies = array();
/**
- * Will contains proxies to execute on each command (filled in the init step) this parameter could not be overridden
+ * Contains proxies to execute on each command (filled in the init step) this parameter cannot be overridden.
*/
var $proxies = array();
var $proxies_cfg = array("auth" => array(),
@@ -194,8 +194,8 @@
var $cmd_path_default = ""; // dirname(__FILE__).'/commands'
/**
- * <p>This is the maximum message length, a longer message is forbidden.
- * ( 250 characters by default)</p>
+ * <p>This is the maximum message length. A longer message is forbidden.
+ * ( 400 characters by default)</p>
*/
var $max_text_len = 400;
@@ -211,7 +211,7 @@
var $max_displayed_lines = 150; // maximum number of displayed lines (old lines will be deleted to save browser's memory)
/**
- * <p>Setting this to true will send a <code>/quit</code> command when the user close his window
+ * <p>Setting this to true will send a <code>/quit</code> command when the user closes his/her window.
* (doesn't work on Firefox).
* This parameter isn't true by default because on IE and Konqueror/Safari,
* reloading the window (F5) will generate the same event as closing the window which can be annoying.
@@ -221,7 +221,7 @@
/**
* <p>Setting this to true will give the focus to the input text box when connecting to the chat.
- * It can be usefull not touch the focus when integrating the chat into an existing website
+ * It can be useful not to touch the focus when integrating the chat into an existing website
* because when the focus is changed, the viewport follows the focus location.
* (true value by default)</p>
*/
@@ -229,7 +229,7 @@
/**
* <p>Setting this to false will oblige user to click on the connect button if s/he wants to chat.
- * (true value by default, means when the chat web page is open,
+ * (true value by default means when the chat web page is open,
* a connection to the chat is automaticaly performed)</p>
*/
var $connect_at_startup = true;
@@ -267,7 +267,7 @@
*/
var $clock = true;
- var $startwithsound = true; // start with sound enabled
+ var $startwithsound = true; // start with sound enabled
/**
* <p>Setting it to true will add the <code>target="_blank"</code> into parsed links.
@@ -282,7 +282,7 @@
/**
* Used to hide the phpfreechat linkback logo.
- * Be sure that you are conform to the license page before setting this to false !
+ * 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;
@@ -303,13 +303,13 @@
var $showsmileys = true;
/**
- * <p>Used to display or not the showwhosonline button.
+ * <p>Used to show/hide the showwhosonline button.
* (true value by default)</p>
*/
var $btn_sh_whosonline = true;
/**
- * <p>Used to display or not the showsmileys button.
+ * <p>Used to show/hide the showsmileys button.
* (true value by default)</p>
*/
var $btn_sh_smileys = true;
@@ -319,8 +319,8 @@
/**
* <p>This parameter specifies which theme the chat will use.
- * A theme is a package that make possible to completly change the chat appearance (CSS) and the chat dynamics (JS)
- * You can found official themes in the <code>themes/</code> directory on your local phpfreechat distribution.
+ * A theme is a package that makes it possible to completly change the chat appearance (CSS) and the chat dynamics (JS)
+ * You can find official themes in the <code>themes/</code> directory on your local phpfreechat distribution.
* ('default' by default)</p>
*/
var $theme = 'default';
@@ -336,32 +336,32 @@
var $language = '';
/**
- * <p>Useful to set a sepcific encoding for chat labels.
+ * <p>Set a sepcific encoding for chat labels.
* This is really useful when the Web page embedding the chat is not UTF-8 encoded.
* This parameter should be the same as the chat web page.
* Could be ISO-8859-1 or anything else but it must be supported by iconv php module.
- * (UTF-8 by default )</p>
+ * ( UTF-8 by default )</p>
*/
var $output_encoding = 'UTF-8';
/**
* <p>Used to specify the chat container (chat database).
- * Accepted containers are : File and Mysql (in the future maybe other).
+ * Accepted containers are : File and Mysql (maybe others in the future).
* ("File" by default)</p>
*/
var $container_type = 'File';
/**
- * <p>Used to specify the script which will handle asynchronous request.
+ * <p>Used to specify the script which will handle asynchronous requests.
* Very useful when the chat (client) script is resource consuming (ex: forum or portal chat integration).
- * <code>server_script_url</code> must point to the server script browable url (useful when using url rewriting).
+ * <code>server_script_url</code> must point to the server script browsable url (useful when using url rewriting).
* (by default these parameters are calculated automaticaly)</p>
*/
var $server_script_path = '';
var $server_script_url = '';
/**
- * <p>Used to specify the script path which firstly display the chat.
+ * <p>Used to specify the script path which first displays the chat.
* This path will be used to calculate relatives paths for resources : javascript lib and images.
* Useful when the php configuration is uncommon, this option can be used to force the automatic detection process.
* (by default this parameters are auto-detected)</p>
@@ -386,7 +386,7 @@
/**
* This url should link to the <code>data_private_path</code> directory.
* So that the clients browsers will be able to load needed javascript files and theme resources.
- * It can be usefull when url rewriting is done on the server.
+ * It can be useful when url rewriting is done on the server.
* (by default this parameters is calculated automaticaly from <code>data_private_path</code>)
*/
var $data_public_url = '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-08-29 20:02:48
|
Revision: 1163
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1163&view=rev
Author: kerphi
Date: 2007-08-29 13:02:51 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Add a script to generate parameters documentation from the latest commited pfcglobalconfig.class.php in the svn. (work in progress)
Added Paths:
-----------
trunk/misc/generate-doc-from-svn.php
Added: trunk/misc/generate-doc-from-svn.php
===================================================================
--- trunk/misc/generate-doc-from-svn.php (rev 0)
+++ trunk/misc/generate-doc-from-svn.php 2007-08-29 20:02:51 UTC (rev 1163)
@@ -0,0 +1,36 @@
+<?php
+echo '<pre>';
+
+$f = 'https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk/src/pfcglobalconfig.class.php';
+$data = file_get_contents($f);
+
+$offset = 0;
+preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset);
+$offset = $matches[0][1];
+
+if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
+{
+ // debut de commentaire
+ $offset1 = $matches1[0][1];
+ print_r($matches);
+}
+if (preg_match('/\*\s(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
+{
+ // dans le commentaire
+ $offset2 = $matches2[1][1];
+ print_r($matches);
+}
+if (preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
+{
+ // fin de commentaire
+ $offset3 = $matches3[0][1];
+ print_r($matches);
+}
+if (preg_match('/var\s+\$([a-z]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
+{
+ // analyse du parametre
+ $offset4 = $matches4[1][1];
+ print_r($matches);
+}
+
+?>
\ 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-08-29 19:34:23
|
Revision: 1162
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1162&view=rev
Author: kerphi
Date: 2007-08-29 12:34:23 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Documentation update
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-29 16:19:29 UTC (rev 1161)
+++ trunk/src/pfcglobalconfig.class.php 2007-08-29 19:34:23 UTC (rev 1162)
@@ -39,12 +39,6 @@
var $serverid = '';
/**
- * <p>Used to change the chat title that is visible just above the messages list.
- * ("My Chat" by default)</p>
- */
- var $title = '';
-
- /**
* <p>If you have already identified the user (forum, portal...) you can force the user's nickname with this parameter.
* Defining a nick will skip the "Please enter your nickname" popup.</p>
* <p>Warning : Nicknames must be encoded in UTF-8.
@@ -67,20 +61,78 @@
*/
var $frozen_nick = false;
- var $nickmeta = array(); // this is the nickname user's metadata, you can add : sexe, age, real name ... (ex: array('sexe'=>'f') )
- var $nickmeta_private = array('ip'); // this is the meta that only admins can see
+ /**
+ * <p>Contains some extra data (metadata) about the user that can be used to customize the display.
+ * For example: the user sexe, age, real name ... can be setup in order to display it in the user's info box.
+ * A example for the sexe is : <code>array('sexe'=>'f')</code>
+ * (by default the array is empty)</p>
+ */
+ var $nickmeta = array();
+ /**
+ * <p>I can be used to restrict metadata visibility only to admins.
+ * (by default <code>array('ip')</code> means that the ip parameter can be only viewed by admins)</p>
+ */
+ var $nickmeta_private = array('ip');
/**
+ * <p>Set this parameter to true if you want to give admin rights to the connected user.
+ * Attention : if you don't use any external registration system all your users will be admins.
+ * You have to test current user rights before setting this parameter to true.
+ * (default value is false)</p>
+ */
+ var $isadmin = false;
+
+ /**
+ * <p>This parameter contains a list of key/value that identify admin access.
+ * The keys are the nicknames and the values are the corresponding passwords.
+ * (by default the admin/nopassword account is available, don't forget to change it)</p>
+ */
+ var $admins = array("admin" => "");
+
+ /**
+ * <p>When this parameter is true, it gives admin rights to the first connected user on the server.
+ * (default value is false)</p>
+ */
+ var $firstisadmin = false;
+
+ /**
+ * <p>Used to change the chat title that is visible just above the messages list.
+ * ("My Chat" by default)</p>
+ */
+ var $title = '';
+
+ /**
* <p>Used to create default rooms (auto-joined at startup). It contains an array of rooms names.
* (by default only one room is created named "My room")</p>
*/
var $channels = array();
- var $frozen_channels = array(); // if empty, allows users to create there own channels
- var $max_channels = 10; // this the max number of allowed channels by users
- var $privmsg = array(); // the joined private chat when opening the chat (the nicknames must be online)
- var $max_privmsg = 5; // this the max number of allowed privmsg by users
+ /**
+ * <p>This parameter can be used to restrict channels to users.
+ * If the array is empty, it allows users to create there own channels.
+ * (by default it's empty)</p>
+ */
+ var $frozen_channels = array();
+
+ /**
+ * <p>Indicate the maximum number of allowed channels for each users.
+ * (10 by default)</p>
+ */
+ var $max_channels = 10;
+
+ /**
+ * <p>This array contains the nicknames list you want to initiate a private message at chat loading.
+ * Of course, the listed nicknames should be online or it will just be ignored.
+ * (by default the array is empty)</p>
+ */
+ var $privmsg = array();
+
+ /**
+ * <p>This is the maximum number of private message allowed at the same time for one user.
+ * (by default its value is 5)</p>
+ */
+ var $max_privmsg = 5;
/**
* <p>This is the time to wait between two refreshes.
@@ -98,15 +150,20 @@
*/
var $timeout = 20000;
+ /**
+ * When this parameter is true, all the chatters will be redirected
+ * to the url indicated by the <code>lockurl</code> parameter.
+ * (false by default)</p>
+ */
+ var $islocked = false;
- var $isadmin = false;
- var $admins = array("admin" => ""); // the key is the nickname, the value is the password
- var $firstisadmin = false; // give admin rights to the first connected user on the server
-
- var $islocked = false; // set this parameter to true to lock the chat for all users
- var $lockurl = "http://www.phpfreechat.net"; // this is the url where the users must be redirected when the chat is locked
+ /**
+ * This url is used when <code>islocked</code> parameter is true.
+ * The users will be redirected (http redirect) to this url.
+ * (by default it is http://www.phpfreechat.net)
+ */
+ var $lockurl = 'http://www.phpfreechat.net';
- // these parameters are static (cached)
/**
* These proxies will be skiped. ex: append "censor" to the list to disable words censoring
*/
@@ -142,9 +199,8 @@
*/
var $max_text_len = 400;
+ var $max_refresh_delay = 60000; // in mili-seconds (60 seconds)
- var $max_refresh_delay = 60000; // in mili-seconds (60 seconds)
-
/**
* <p>This is the number of messages keept in the history.
* This is what you see when you reload the chat.
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: <gpi...@us...> - 2007-08-29 16:16:44
|
Revision: 1160
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1160&view=rev
Author: gpinzone
Date: 2007-08-29 09:16:46 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Added female icons to phpfreechat.class.php. Fixed mistake from last commit.
Modified Paths:
--------------
trunk/src/phpfreechat.class.php
Modified: trunk/src/phpfreechat.class.php
===================================================================
--- trunk/src/phpfreechat.class.php 2007-08-29 14:59:02 UTC (rev 1159)
+++ trunk/src/phpfreechat.class.php 2007-08-29 16:16:46 UTC (rev 1160)
@@ -476,6 +476,8 @@
'images/pv-active.gif',
'images/user.gif',
'images/user-me.gif',
+ 'images/user_female.gif',
+ 'images/user_female-me.gif',
'images/color-on.gif',
'images/color-off.gif',
'images/clock-on.gif',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-29 14:59:31
|
Revision: 1159
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1159&view=rev
Author: gpinzone
Date: 2007-08-29 07:59:02 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Added Paths:
-----------
trunk/README.txt
trunk/conf/
trunk/conf/authz
trunk/conf/passwd
trunk/conf/svnserve.conf
trunk/dav/
trunk/db/
trunk/db/current
trunk/db/format
trunk/db/fs-type
trunk/db/revprops/
trunk/db/revprops/0
trunk/db/revs/
trunk/db/revs/0
trunk/db/transactions/
trunk/db/uuid
trunk/db/write-lock
trunk/format
trunk/hooks/
trunk/hooks/post-commit.tmpl
trunk/hooks/post-lock.tmpl
trunk/hooks/post-revprop-change.tmpl
trunk/hooks/post-unlock.tmpl
trunk/hooks/pre-commit.tmpl
trunk/hooks/pre-lock.tmpl
trunk/hooks/pre-revprop-change.tmpl
trunk/hooks/pre-unlock.tmpl
trunk/hooks/start-commit.tmpl
trunk/locks/
trunk/locks/db-logs.lock
trunk/locks/db.lock
Added: trunk/README.txt
===================================================================
--- trunk/README.txt (rev 0)
+++ trunk/README.txt 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,5 @@
+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.
Added: trunk/conf/authz
===================================================================
--- trunk/conf/authz (rev 0)
+++ trunk/conf/authz 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,21 @@
+### This file is an example authorization file for svnserve.
+### Its format is identical to that of mod_authz_svn authorization
+### files.
+### As shown below each section defines authorizations for the path and
+### (optional) repository specified by the section name.
+### The authorizations follow. An authorization line can refer to a
+### single user, to a group of users defined in a special [groups]
+### section, or to anyone using the '*' wildcard. Each definition can
+### grant read ('r') access, read-write ('rw') access, or no access
+### ('').
+
+[groups]
+# harry_and_sally = harry,sally
+
+# [/foo/bar]
+# harry = rw
+# * =
+
+# [repository:/baz/fuz]
+# @harry_and_sally = rw
+# * = r
Added: trunk/conf/passwd
===================================================================
--- trunk/conf/passwd (rev 0)
+++ trunk/conf/passwd 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,8 @@
+### This file is an example password file for svnserve.
+### Its format is similar to that of svnserve.conf. As shown in the
+### example below it contains one section labelled [users].
+### The name and password for each user follow, one account per line.
+
+[users]
+# harry = harryssecret
+# sally = sallyssecret
Added: trunk/conf/svnserve.conf
===================================================================
--- trunk/conf/svnserve.conf (rev 0)
+++ trunk/conf/svnserve.conf 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,30 @@
+### This file controls the configuration of the svnserve daemon, if you
+### use it to allow access to this repository. (If you only allow
+### access through http: and/or file: URLs, then this file is
+### irrelevant.)
+
+### Visit http://subversion.tigris.org/ for more information.
+
+[general]
+### These options control access to the repository for unauthenticated
+### and authenticated users. Valid values are "write", "read",
+### and "none". The sample settings below are the defaults.
+# anon-access = read
+# auth-access = write
+### The password-db option controls the location of the password
+### database file. Unless you specify a path starting with a /,
+### the file's location is relative to the conf directory.
+### Uncomment the line below to use the default password file.
+# password-db = passwd
+### The authz-db option controls the location of the authorization
+### rules for path-based access control. Unless you specify a path
+### starting with a /, the file's location is relative to the conf
+### directory. If you don't specify an authz-db, no path-based access
+### control is done.
+### Uncomment the line below to use the default authorization file.
+# authz-db = authz
+### This option specifies the authentication realm of the repository.
+### If two repositories have the same authentication realm, they should
+### have the same password database, and vice versa. The default realm
+### is repository's uuid.
+# realm = My First Repository
Added: trunk/db/current
===================================================================
--- trunk/db/current (rev 0)
+++ trunk/db/current 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1 @@
+0 1 1
Added: trunk/db/format
===================================================================
--- trunk/db/format (rev 0)
+++ trunk/db/format 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1 @@
+2
Added: trunk/db/fs-type
===================================================================
--- trunk/db/fs-type (rev 0)
+++ trunk/db/fs-type 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1 @@
+fsfs
Added: trunk/db/revprops/0
===================================================================
--- trunk/db/revprops/0 (rev 0)
+++ trunk/db/revprops/0 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,5 @@
+K 8
+svn:date
+V 27
+2007-08-29T14:57:24.984375Z
+END
Added: trunk/db/revs/0
===================================================================
--- trunk/db/revs/0 (rev 0)
+++ trunk/db/revs/0 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,11 @@
+PLAIN
+END
+ENDREP
+id: 0.0.r0/17
+type: dir
+count: 0
+text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
+cpath: /
+
+
+17 107
Added: trunk/db/uuid
===================================================================
--- trunk/db/uuid (rev 0)
+++ trunk/db/uuid 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1 @@
+31df5a85-8863-b941-952f-394f9b25e79b
Added: trunk/db/write-lock
===================================================================
Added: trunk/format
===================================================================
--- trunk/format (rev 0)
+++ trunk/format 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1 @@
+5
Added: trunk/hooks/post-commit.tmpl
===================================================================
--- trunk/hooks/post-commit.tmpl (rev 0)
+++ trunk/hooks/post-commit.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# POST-COMMIT HOOK
+#
+# The post-commit hook is invoked after a commit. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-commit' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the number of the revision just committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the commit has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-committed tree.
+#
+# On a Unix system, the normal procedure is to have 'post-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-commit.bat' or 'post-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+
+commit-email.pl "$REPOS" "$REV" com...@ex...
+log-commit.py --repository "$REPOS" --revision "$REV"
Added: trunk/hooks/post-lock.tmpl
===================================================================
--- trunk/hooks/post-lock.tmpl (rev 0)
+++ trunk/hooks/post-lock.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# POST-LOCK HOOK
+#
+# The post-lock hook is run after a path is locked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-lock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who created the lock)
+#
+# The paths that were just locked are passed to the hook via STDIN (as
+# of Subversion 1.2, only one path is passed per invocation, but the
+# plan is to pass all locked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been created and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-created lock.
+#
+# On a Unix system, the normal procedure is to have 'post-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-lock.bat' or 'post-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was created:
+mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf
Added: trunk/hooks/post-revprop-change.tmpl
===================================================================
--- trunk/hooks/post-revprop-change.tmpl (rev 0)
+++ trunk/hooks/post-revprop-change.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# POST-REVPROP-CHANGE HOOK
+#
+# The post-revprop-change hook is invoked after a revision property
+# has been added, modified or deleted. Subversion runs this hook by
+# invoking a program (script, executable, binary, etc.) named
+# 'post-revprop-change' (for which this file is a template), with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the revision that was tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property that was changed)
+# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the old property value is passed via STDIN.
+#
+# Because the propchange has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# new property value.
+#
+# On a Unix system, the normal procedure is to have 'post-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-revprop-change.bat' or 'post-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+propchange-email.pl "$REPOS" "$REV" "$USER" "$PROPNAME" wat...@ex...
Added: trunk/hooks/post-unlock.tmpl
===================================================================
--- trunk/hooks/post-unlock.tmpl (rev 0)
+++ trunk/hooks/post-unlock.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# POST-UNLOCK HOOK
+#
+# The post-unlock hook runs after a path is unlocked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-unlock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who destroyed the lock)
+#
+# The paths that were just unlocked are passed to the hook via STDIN
+# (as of Subversion 1.2, only one path is passed per invocation, but
+# the plan is to pass all unlocked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been destroyed and cannot be undone,
+# the exit code of the hook program is ignored.
+#
+# On a Unix system, the normal procedure is to have 'post-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-unlock.bat' or 'post-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was removed:
+mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf
Added: trunk/hooks/pre-commit.tmpl
===================================================================
--- trunk/hooks/pre-commit.tmpl (rev 0)
+++ trunk/hooks/pre-commit.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# PRE-COMMIT HOOK
+#
+# The pre-commit hook is invoked before a Subversion txn is
+# committed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-commit' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] TXN-NAME (the name of the txn about to be committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the txn is committed; but
+# if it exits with failure (non-zero), the txn is aborted, no commit
+# takes place, and STDERR is returned to the client. The hook
+# program can use the 'svnlook' utility to help it examine the txn.
+#
+# On a Unix system, the normal procedure is to have 'pre-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***
+# *** FOR REVISION PROPERTIES (like svn:log or svn:author). ***
+#
+# This is why we recommend using the read-only 'svnlook' utility.
+# In the future, Subversion may enforce the rule that pre-commit
+# hooks should not modify the versioned data in txns, or else come
+# up with a mechanism to make it safe to do so (by informing the
+# committing client of the changes). However, right now neither
+# mechanism is implemented, so hook writers just have to be careful.
+#
+# Note that 'pre-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-commit.bat' or 'pre-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+TXN="$2"
+
+# Make sure that the log message contains some text.
+SVNLOOK=/usr/local/bin/svnlook
+$SVNLOOK log -t "$TXN" "$REPOS" | \
+ grep "[a-zA-Z0-9]" > /dev/null || exit 1
+
+# Check that the author of this commit has the rights to perform
+# the commit on the files and directories being modified.
+commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
Added: trunk/hooks/pre-lock.tmpl
===================================================================
--- trunk/hooks/pre-lock.tmpl (rev 0)
+++ trunk/hooks/pre-lock.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# PRE-LOCK HOOK
+#
+# The pre-lock hook is invoked before an exclusive lock is
+# created. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-lock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be locked)
+# [3] USER (the user creating the lock)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is created; but
+# if it exits with failure (non-zero), the lock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-lock.bat' or 'pre-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock exists and is owned by a different person, don't allow it
+# to be stolen (e.g., with 'svn lock --force ...').
+
+# (Maybe this script could send email to the lock owner?)
+SVNLOOK=/usr/local/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" = "" ]; then
+ exit 0
+fi
+
+# If the person locking matches the lock's owner, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" = "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2
+exit 1
Added: trunk/hooks/pre-revprop-change.tmpl
===================================================================
--- trunk/hooks/pre-revprop-change.tmpl (rev 0)
+++ trunk/hooks/pre-revprop-change.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# PRE-REVPROP-CHANGE HOOK
+#
+# The pre-revprop-change hook is invoked before a revision property
+# is added, modified or deleted. Subversion runs this hook by invoking
+# a program (script, executable, binary, etc.) named 'pre-revprop-change'
+# (for which this file is a template), with the following ordered
+# arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REVISION (the revision being tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property being set on the revision)
+# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the new property value is passed via STDIN.
+#
+# If the hook program exits with success, the propchange happens; but
+# if it exits with failure (non-zero), the propchange doesn't happen.
+# The hook program can use the 'svnlook' utility to examine the
+# existing value of the revision property.
+#
+# WARNING: unlike other hooks, this hook MUST exist for revision
+# properties to be changed. If the hook does not exist, Subversion
+# will behave as if the hook were present, but failed. The reason
+# for this is that revision properties are UNVERSIONED, meaning that
+# a successful propchange is destructive; the old value is gone
+# forever. We recommend the hook back up the old value somewhere.
+#
+# On a Unix system, the normal procedure is to have 'pre-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
+
+echo "Changing revision properties other than svn:log is prohibited" >&2
+exit 1
Added: trunk/hooks/pre-unlock.tmpl
===================================================================
--- trunk/hooks/pre-unlock.tmpl (rev 0)
+++ trunk/hooks/pre-unlock.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# PRE-UNLOCK HOOK
+#
+# The pre-unlock hook is invoked before an exclusive lock is
+# destroyed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-unlock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be unlocked)
+# [3] USER (the user destroying the lock)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is destroyed; but
+# if it exits with failure (non-zero), the unlock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-unlock.bat' or 'pre-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock is owned by a different person, don't allow it be broken.
+# (Maybe this script could send email to the lock owner?)
+
+SVNLOOK=/usr/local/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, return success:
+if [ "$LOCK_OWNER" = "" ]; then
+ exit 0
+fi
+# If the person unlocking matches the lock's owner, return success:
+if [ "$LOCK_OWNER" = "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2
+exit 1
Added: trunk/hooks/start-commit.tmpl
===================================================================
--- trunk/hooks/start-commit.tmpl (rev 0)
+++ trunk/hooks/start-commit.tmpl 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# START-COMMIT HOOK
+#
+# The start-commit hook is invoked before a Subversion txn is created
+# in the process of doing a commit. Subversion runs this hook
+# by invoking a program (script, executable, binary, etc.) named
+# 'start-commit' (for which this file is a template)
+# with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the authenticated user attempting to commit)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the commit continues; but
+# if it exits with failure (non-zero), the commit is stopped before
+# a Subversion txn is created, and STDERR is returned to the client.
+#
+# On a Unix system, the normal procedure is to have 'start-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'start-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'start-commit.bat' or 'start-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+USER="$2"
+
+commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1
+special-auth-check.py --user "$USER" --auth-level 3 || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
Added: trunk/locks/db-logs.lock
===================================================================
--- trunk/locks/db-logs.lock (rev 0)
+++ trunk/locks/db-logs.lock 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
Added: trunk/locks/db.lock
===================================================================
--- trunk/locks/db.lock (rev 0)
+++ trunk/locks/db.lock 2007-08-29 14:59:02 UTC (rev 1159)
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gpi...@us...> - 2007-08-29 14:50:55
|
Revision: 1158
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1158&view=rev
Author: gpinzone
Date: 2007-08-29 07:50:55 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Icons for female users. Useful for mods where gender is tracked.
Added Paths:
-----------
trunk/themes/default/images/user_female-me.gif
trunk/themes/default/images/user_female.gif
Added: trunk/themes/default/images/user_female-me.gif
===================================================================
(Binary files differ)
Property changes on: trunk/themes/default/images/user_female-me.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/themes/default/images/user_female.gif
===================================================================
(Binary files differ)
Property changes on: trunk/themes/default/images/user_female.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-08-29 12:37:04
|
Revision: 1157
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1157&view=rev
Author: kerphi
Date: 2007-08-29 05:37:02 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Some doc updates
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-29 12:23:00 UTC (rev 1156)
+++ trunk/src/pfcglobalconfig.class.php 2007-08-29 12:37:02 UTC (rev 1157)
@@ -304,17 +304,41 @@
var $server_script_path = '';
var $server_script_url = '';
+ /**
+ * <p>Used to specify the script path which firstly display the chat.
+ * This path will be used to calculate relatives paths for resources : javascript lib and images.
+ * Useful when the php configuration is uncommon, this option can be used to force the automatic detection process.
+ * (by default this parameters are auto-detected)</p>
+ */
+ var $client_script_path = '';
-
- var $client_script_path = "";
- var $data_private_path = ""; // default is dirname(__FILE__)."/../data/private";
- var $data_public_path = ""; // default is dirname(__FILE__)."/../data/public";
- var $data_public_url = ""; // default is calculated from 'data_public_path' path
+ /**
+ * <p>Used to store private data like cache, logs and chat history.
+ * Tip: you can optimize your chat performances,
+ * see <a href="http://www.phpfreechat.net/faq.en.html#tmpfs>this FAQ entry</a>.
+ * (<code>dirname(__FILE__)."/../data/private"</code> by default)</p>
+ */
+ var $data_private_path = '';
/**
- * This is the prototype javascript library url.
+ * This path must be reachable by your web server.
+ * Javascript and every resources (theme) files will be stored here.
+ * (dirname(__FILE__)."/../data/public" by default)
+ */
+ var $data_public_path = "";
+
+ /**
+ * This url should link to the <code>data_private_path</code> directory.
+ * So that the clients browsers will be able to load needed javascript files and theme resources.
+ * It can be usefull when url rewriting is done on the server.
+ * (by default this parameters is calculated automaticaly from <code>data_private_path</code>)
+ */
+ var $data_public_url = '';
+
+ /**
+ * <p>This is the prototype javascript library url.
* Use this parameter to use your external library.
- * default is data/js/prototype.js
+ * (default is <code>data/js/prototype.js</code>)</p>
*/
var $prototypejs_url = '';
@@ -323,21 +347,26 @@
var $is_init = false; // used internaly to know if the chat config is initialized
var $version = ""; // the phpfreechat version: taken from the 'version' file content
var $debugurl = "";
- var $debug = false;
/**
+ * <p>When debug is true, some traces will be shown on the chat clients
+ * (default is false)</p>
+ */
+ var $debug = false;
+
+ /**
* This is the user time zone
* it is the difference in seconds between user clock and server clock
*/
- var $time_offset = 0;
+ var $time_offset = 0;
/**
* How to display the dates in the chat
*/
- var $date_format = "d/m/Y";
+ var $date_format = "d/m/Y";
/**
* How to display the time in the chat
*/
- var $time_format = "H:i:s";
+ var $time_format = "H:i:s";
/**
* This parameter is useful when your chat server is behind a reverse proxy that
@@ -345,7 +374,6 @@
* see : http://www.phpfreechat.net/forum/viewtopic.php?id=1344
*/
var $get_ip_from_xforwardedfor = false;
-
// private parameters
var $_sys_proxies = array("lock", "checktimeout", "checknickchange", "auth", "noflood", "censor", "log");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-08-29 12:23:02
|
Revision: 1156
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1156&view=rev
Author: kerphi
Date: 2007-08-29 05:23:00 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
remove pxlog calls
Modified Paths:
--------------
trunk/demo/demo27_customized_command.php
trunk/src/commands/me.class.php
trunk/src/commands/nick.class.php
trunk/src/commands/notice.class.php
trunk/src/commands/quit.class.php
trunk/src/commands/send.class.php
trunk/src/phpfreechat.class.php
trunk/src/proxies/checknickchange.class.php
Modified: trunk/demo/demo27_customized_command.php
===================================================================
--- trunk/demo/demo27_customized_command.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/demo/demo27_customized_command.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -35,7 +35,6 @@
$result = $dice->roll();
$ct->write($recipient, $nick, "send", $result);
}
- if ($c->debug) pxlog("Cmd_roll[".$c->sessionid."]: msg=".$result, "chat", $c->getId());
}
}
@@ -76,4 +75,4 @@
?>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/src/commands/me.class.php
===================================================================
--- trunk/src/commands/me.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/commands/me.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -31,9 +31,7 @@
$msg = phpFreeChat::PreFilterMsg($param);
$ct->write($recipient, "*me*", $this->name, $u->getNickname()." ".$msg);
-
- if ($c->debug) pxlog("/me ".$msg, "chat", $c->getId());
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/src/commands/nick.class.php
===================================================================
--- trunk/src/commands/nick.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/commands/nick.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -35,8 +35,6 @@
$newnickid = $ct->getNickId($newnick);
$oldnickid = $u->nickid;
- if ($c->debug) pxlog("/nick ".$newnick, "chat", $c->getId());
-
// new nickname is undefined (not used) and
// current nickname (oldnick) is mine and
// oldnick is different from new nick
@@ -84,8 +82,6 @@
$xml_reponse->script("pfc.handleResponse('nick', 'connected', '".addslashes($newnick)."');");
- if ($c->debug)
- pxlog("/nick ".$newnick." (first connection, oldnick=".$oldnick.")", "chat", $c->getId());
return true;
}
@@ -93,4 +89,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/src/commands/notice.class.php
===================================================================
--- trunk/src/commands/notice.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/commands/notice.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -32,7 +32,6 @@
return;
}
}
- if ($c->debug) pxlog("/notice ".$msg." (flag=".$flag.")", "chat", $c->getId());
}
}
Modified: trunk/src/commands/quit.class.php
===================================================================
--- trunk/src/commands/quit.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/commands/quit.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -50,9 +50,7 @@
*/
$xml_reponse->script("pfc.handleResponse('quit', 'ok', '');");
-
- if ($c->debug) pxlog("/quit (a user just quit -> nick=".$nick.")", "chat", $c->getId());
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/src/commands/send.class.php
===================================================================
--- trunk/src/commands/send.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/commands/send.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -52,8 +52,6 @@
if (count($errors) > 0)
{
// an error occured, just ignore the message and display errors
- foreach($errors as $e)
- if ($c->debug) pxlog("error /send, user can't send a message -> nick=".$nick." err=".$e, "chat", $c->getId());
$cmdp = $p;
$cmdp["param"] = $errors;
$cmd =& pfcCommand::Factory("error");
@@ -90,4 +88,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/src/phpfreechat.class.php
===================================================================
--- trunk/src/phpfreechat.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/phpfreechat.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -334,7 +334,9 @@
// if a content not empty is captured it is a php error in the code
$data = ob_get_contents();
if ($data != "")
- pxlog("HandleRequest: content=".$data, "chat", $c->getId());
+ {
+ // todo : display the $data somewhere to warn the user
+ }
ob_end_clean();
}
Modified: trunk/src/proxies/checknickchange.class.php
===================================================================
--- trunk/src/proxies/checknickchange.class.php 2007-08-29 12:22:44 UTC (rev 1155)
+++ trunk/src/proxies/checknickchange.class.php 2007-08-29 12:23:00 UTC (rev 1156)
@@ -68,8 +68,6 @@
$newnickid == $oldnickid)
{
$xml_reponse->script("pfc.handleResponse('".$this->name."', 'notchanged', '".addslashes($newnick)."');");
- if ($c->debug)
- pxlog("/nick ".$newnick." (user just reloded the page so let him keep his nickname without any warnings)", "chat", $c->getId());
return true;
}
@@ -82,8 +80,6 @@
$xml_reponse->script("pfc.handleResponse('nick', 'notallowed', '".addslashes($newnick)."');");
else
$xml_reponse->script("pfc.handleResponse('nick', 'isused', '".addslashes($newnick)."');");
- if ($c->debug)
- pxlog("/nick ".$newnick." (wanted nick is already in use -> wantednickid=".$newnickid.")", "chat", $c->getId());
return false;
}
}
@@ -127,4 +123,4 @@
}
}
-?>
\ 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-08-29 12:22:46
|
Revision: 1155
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1155&view=rev
Author: kerphi
Date: 2007-08-29 05:22:44 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Rename functions to prevent naming conflicts
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
trunk/src/pfctools.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-08-29 12:18:19 UTC (rev 1154)
+++ trunk/src/pfcglobalconfig.class.php 2007-08-29 12:22:44 UTC (rev 1155)
@@ -488,8 +488,6 @@
{
$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 )
@@ -564,9 +562,8 @@
// test client script
// try to find the path into server configuration
if ($this->client_script_path == '')
- $this->client_script_path = getScriptFilename();
+ $this->client_script_path = pfc_GetScriptFilename();
-
if ($this->server_script_url == '' && $this->server_script_path == '')
{
$filetotest = $this->client_script_path;
@@ -578,12 +575,9 @@
$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);
+ $this->data_public_url = pfc_RelativePath($this->client_script_path, $this->data_public_path);
if ($this->server_script_path == '')
$this->server_script_path = $this->client_script_path;
@@ -598,7 +592,7 @@
$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;
+ $this->server_script_url = pfc_RelativePath($this->client_script_path, $this->server_script_path).'/'.basename($filetotest).$this->_query_string;
}
// check if the theme_path parameter are correctly setup
@@ -648,14 +642,11 @@
// ---
// run specific container initialisation
$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);*/
$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");
+ $this->debugurl = pfc_RelativePath($this->client_script_path, dirname(__FILE__)."/../debug");
// check the language is known
$lg_list = pfcI18N::GetAcceptedLanguage();
@@ -740,15 +731,6 @@
return $this->serverid;
}
- /*
- function _getProxyFile($serverid = "", $data_public_path = "")
- {
- if ($serverid == "") $serverid = $this->getId();
- if ($data_public_path == "") $data_public_path = $this->data_public_path;
- return $data_public_path."/".$serverid."/proxy.php";
- }
- */
-
function _GetCacheFile($serverid = "", $data_private_path = "")
{
if ($serverid == '') $serverid = $this->getId();
@@ -838,7 +820,6 @@
$data .= '?>';
file_put_contents($cachefile, $data/*serialize(get_object_vars($this))*/);
- if ($this->debug) pxlog("pfcGlobalConfig::saveInCache()", "chatconfig", $this->getId());
}
function isDefaultFile($file)
@@ -848,19 +829,6 @@
return ($this->theme == "default" ? $fexists1 : !$fexists2);
}
- /*
- function getFileUrlByProxy($file, $addprefix = true)
- {
- 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->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 theme_path '%s' and your theme '%s' are correct", $file, $this->theme_path, $this->theme));
- }
- */
-
function getFilePathFromTheme($file)
{
if (file_exists($this->theme_path."/".$this->theme."/".$file))
@@ -896,4 +864,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/src/pfctools.php
===================================================================
--- trunk/src/pfctools.php 2007-08-29 12:18:19 UTC (rev 1154)
+++ trunk/src/pfctools.php 2007-08-29 12:22:44 UTC (rev 1155)
@@ -36,25 +36,49 @@
* Returns the absolute script filename
* takes care of php cgi configuration which do not support SCRIPT_FILENAME variable.
*/
-function getScriptFilename()
+function pfc_GetScriptFilename()
{
- $sf = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : ""; // check for a cgi configurations
- if ( $sf == "" ||
- !file_exists($sf))
- $sf = isset($_SERVER["SCRIPT_FILENAME"]) ? $_SERVER["SCRIPT_FILENAME"] : ""; // for 'normal' configurations
- if ( $sf == "" ||
- !file_exists($sf))
+ $sf = '';
+ if(function_exists('debug_backtrace'))
{
+ // browse the backtrace history and take the first unknown filename as the client script
+ foreach(debug_backtrace() as $db)
+ {
+ $f = $db['file'];
+ if (!preg_match('/phpfreechat.class.php/',$f) &&
+ !preg_match('/pfcglobalconfig.class.php/',$f) &&
+ !preg_match('/pfctools.class.php/',$f) &&
+ !preg_match('/pfcinfo.class.php/',$f)
+ )
+ {
+ $sf = $f;
+ break;
+ }
+ }
+ }
+ else if (isset($_SERVER['PATH_TRANSLATED']) &&
+ file_exists($_SERVER['SCRIPT_FILENAME'])) // check for a cgi configurations
+ {
+ $sf = $_SERVER['PATH_TRANSLATED'];
+ }
+ else if (isset($_SERVER['SCRIPT_FILENAME'])&&
+ file_exists($_SERVER['SCRIPT_FILENAME'])) // for non-cgi configurations
+ {
+ $sf = $_SERVER['SCRIPT_FILENAME'];
+ }
+ else
+ {
echo "<pre>";
- echo "<span style='color:red'>Error: GetScriptFilename function returns a wrong path. Please contact the pfc team (co...@ph...) and copy/paste this array to help debugging.</span>\n";
+ echo "<span style='color:red'>Error: pfc_GetScriptFilename function returns a wrong path. Please contact the pfc team (co...@ph...) and copy/paste these data to help debugging:</span>\n";
print_r($_SERVER);
+ print_r(debug_backtrace());
echo "</pre>";
exit;
}
return $sf;
}
-function relativePath($p1, $p2)
+function pfc_RelativePath($p1, $p2)
{
if (is_file($p1)) $p1 = dirname($p1);
if (is_file($p2)) $p2 = dirname($p2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|