Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [1162] trunk/src/pfcglobalconfig.class.php (Page 2)
Status: Beta
Brought to you by:
kerphi
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-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-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: <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: <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-11-26 13:08:08
|
Revision: 1222 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1222&view=rev Author: kerphi Date: 2007-11-26 05:08:10 -0800 (Mon, 26 Nov 2007) Log Message: ----------- Add the dyn_params parameter. It makes possible to disable cache for a list of parameters. Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2007-11-26 09:49:06 UTC (rev 1221) +++ trunk/src/pfcglobalconfig.class.php 2007-11-26 13:08:10 UTC (rev 1222) @@ -598,6 +598,17 @@ */ var $get_ip_from_xforwardedfor = false; + /** + * <p>Most of the chat parameters are stored in a internal cache for performances issues. + * It means that for all the clients the chat will have the same parameters. However sometime you need + * to customize some parameters for each clients. + * For example: the 'language' parameter could depends on the chatter profil so it could interesting to + * ignore the cache for this parameter. + * The 'dyn_params' contains the parameters that need to be dynamic (not stored in the cache). + * (Default value: array())</p> + */ + var $dyn_params = array(); + // ------------------ // private parameters // ------------------ @@ -695,6 +706,8 @@ } // load dynamic parameter even if the config exists in the cache + if (isset($params['dyn_params']) && is_array($params['dyn_params'])) + $this->_dyn_params = array_merge($this->_dyn_params,$params['dyn_params']); foreach ( $this->_dyn_params as $dp ) if (isset($params[$dp])) $this->$dp = $params[$dp]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-05-04 06:47:17
|
Revision: 1239 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1239&view=rev Author: kerphi Date: 2008-05-03 23:47:21 -0700 (Sat, 03 May 2008) Log Message: ----------- Change the default timeout value to a higher value than all the possible refresh_delay steps : 35 secondes Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2008-03-27 17:53:21 UTC (rev 1238) +++ trunk/src/pfcglobalconfig.class.php 2008-05-04 06:47:21 UTC (rev 1239) @@ -183,9 +183,9 @@ * <p>This is the time of inactivity to wait before considering 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. - * (Default value: 20000 it means 20000 ms or 20 seconds)</p> + * (Default value: 35000 it means 35000 ms or 35 seconds)</p> */ - var $timeout = 20000; + var $timeout = 35000; /** * When this parameter is true, all the chatters will be redirected This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |