config["base_path"]."assets/snippets/"; include_once($snipPath . "/phpfreechat/src/phpfreechat.class.php"); // You can configure PHP Free Chat by setting variables below. See the PHP Free Chat // documentation for options. $params = array(); $params["title"] = "Chat Room"; $params["refresh_delay"] = 2000; // 2000ms = 2s $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params["isadmin"] = true; // just for debug ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $chat = new phpFreeChat( $params ); // register chat javascript and css $modx->regClientStartupScript($chat->printJavascript()); $modx->regClientCSS($chat->printStyle()); return $chat->printChat(); ?>