当前位置: 首页>>代码示例>>PHP>>正文


PHP phpFreeChat::printChat方法代码示例

本文整理汇总了PHP中phpFreeChat::printChat方法的典型用法代码示例。如果您正苦于以下问题:PHP phpFreeChat::printChat方法的具体用法?PHP phpFreeChat::printChat怎么用?PHP phpFreeChat::printChat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpFreeChat的用法示例。


在下文中一共展示了phpFreeChat::printChat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 function index()
 {
     App::import('Vendor', 'phpFreeChat', array('file' => 'phpfreechat' . DS . 'src' . DS . 'phpfreechat.class.php'));
     Configure::write('debug', '0');
     $this->layout = '2col_layout';
     $this->Group->id = $this->ZTAuth->user('group_id');
     $group = $this->Group->read();
     $params["serverid"] = md5(__FILE__);
     $params["theme"] = "animated";
     $params["theme_url"] = 'vendors/phpfreechat/themes/';
     $params["data_public_url"] = 'vendors/phpfreechat/data/public';
     $params["theme"] = 'msn';
     $params["language"] = 'ru_RU';
     $params["display_pfc_logo"] = false;
     $params["title"] = 'Бумер чат';
     $params["nick"] = $this->ZTAuth->user('username');
     $params["isadmin"] = $this->isAuthorized($this->ZTAuth->user('username'), $this->name, 'admin');
     $params["nickmeta"] = array('Статус' => $group['Group']['user_status']);
     $params["nickmarker"] = false;
     $params["frozen_nick"] = true;
     //        $params["debug"] = true;
     //        $params["server_script_path"] = '../../vendors/phpfreechat/chat.php';
     $chat = new phpFreeChat($params);
     $this->set('chat', $chat->printChat(true));
 }
开发者ID:BGCX262,项目名称:ztrackerengine-svn-to-git,代码行数:25,代码来源:chat_controller.php

示例2: htmlentities

  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>phpFreeChat demo</title>

    <?php 
$chat->printJavascript();
?>
    <?php 
$chat->printStyle();
?>

  </head>

  <body>
    <?php 
$chat->printChat();
?>

<?php 
// print the current file
echo "<h2>The source code</h2>";
$filename = __FILE__;
echo "<p><code>" . $filename . "</code></p>";
echo "<pre style=\"margin: 0 50px 0 50px; padding: 10px; background-color: #DDD;\">";
$content = file_get_contents($filename);
echo htmlentities($content);
echo "</pre>";
?>

  </body>
</html>
开发者ID:codethics,项目名称:proteoerp,代码行数:31,代码来源:demo53_in_armenian.php

示例3: array

/// Author: Rafał "Endzio" Enden
/// modules/chat/index.php
defined('KioCMS') || exit;
$lang = include_lang('modules/chat');
$chat = get_config('chat');
$title[] = 'Chat';
$module['columns'] = 2;
//file_exists(root_dir.'modules/chat/data/private/cache/'.md5(__FILE__).'.php') ? unlink(root_dir.'modules/chat/data/private/cache/'.md5(__FILE__).'.php') : '';
require_once root_dir . 'modules/chat/src/phpfreechat.class.php';
$params = array();
$params["title"] = "Quick chat";
$params["isadmin"] = strtolower($user['username']) == 'test' ? true : false;
// do not use it on production servers ;)
$params["serverid"] = md5(__FILE__);
// calculate a unique id for this chat
$params["nick"] = defined('LOGGED') ? $user['username'] : 'guest' . rand();
// setup the intitial nickname
$params["debug"] = false;
$params["max_msg"] = 0;
$params["frozen_nick"] = true;
$params["theme_url"] = local_dir . "modules/chat/data/public/themes";
$params["theme_default_url"] = local_dir . "modules/chat/data/public/themes";
$params["server_script_url"] = local_url . "chat/";
// Must ending with slash (/)
$params["client_script_path"] = root_dir . 'modules/chat/index.php';
$params["data_public_url"] = local_dir . "modules/chat/data/public";
$params["prototypejs_url"] = local_dir . "modules/chat/data/public/js/prototype.js";
$pfc = new phpFreeChat($params);
echo '<div style="text-align: left;">';
$pfc->printChat();
echo '</div>';
开发者ID:rafalenden,项目名称:KioCMS,代码行数:31,代码来源:index.php

示例4: dirname

global $CONFIG;
require_once dirname(__FILE__) . "/src/phpfreechat.class.php";
$params = array();
$params['title'] = elgg_echo('Chat');
$params['nick'] = $_SESSION['user']->username;
// setup the intitial nickname
$params['isadmin'] = isadminloggedin();
$params['serverid'] = 'phpfreechat';
// calculate a unique id for this chat
$params['debug'] = false;
if (get_plugin_setting('container_type', 'chat') == 'Mysql') {
    $params['container_type'] = 'Mysql';
    $params['container_cfg_mysql_host'] = $CONFIG->dbhost;
    $params['container_cfg_mysql_port'] = 3306;
    $params['container_cfg_mysql_database'] = $CONFIG->dbname;
    $params['container_cfg_mysql_table'] = $CONFIG->dbprefix . "phpfreechat";
    $params['container_cfg_mysql_username'] = $CONFIG->dbuser;
    $params['container_cfg_mysql_password'] = $CONFIG->dbpass;
}
$params['theme'] = get_plugin_setting('theme', 'chat');
$params['frozen_nick'] = get_plugin_setting('strict_access', 'chat') == 1;
$params['channels'] = explode(',', get_plugin_setting('channels', 'chat'));
$chat = new phpFreeChat($params);
if (get_plugin_setting('use_popup', 'chat')) {
    include dirname(dirname(__FILE__)) . '/popup.inc.php';
} else {
    // Format Page
    $body = elgg_view_layout('one_column', $chat->printChat(true));
    // Draw it
    echo page_draw(elgg_echo('Chat'), $body);
}
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:index.php

示例5: render

 function render($mode, Doku_Renderer $renderer, $data)
 {
     global $conf, $USERINFO, $ID;
     if (auth_quickaclcheck($ID) >= AUTH_READ) {
         if ($mode == 'xhtml') {
             $renderer->info['cache'] = FALSE;
             ob_start();
             require_once DOKU_INC . 'lib/plugins/freechat/phpfreechat/src/phpfreechat.class.php';
             $params = array();
             $params['serverid'] = md5($conf['title']);
             if (isset($data['chatid']) && $data['chatid'] != '') {
                 $params['serverid'] = md5($data['chatid']);
             }
             $params['focus_on_connect'] = true;
             $params['language'] = $this->getConf('language');
             $params['theme'] = $this->getConf('template');
             $params['height'] = $this->getConf('height') . 'px';
             $params["title"] = $this->getConf('title');
             if (isset($data['rooms'])) {
                 $params["channels"] = explode(',', $data['rooms']);
             } else {
                 $params["channels"] = explode(',', $this->getConf('channels'));
             }
             $params['frozen_nick'] = $this->getConf('frozen_nick');
             $params['frozen_nick'] = !($params['frozen_nick'] == 'off' || $params['frozen_nick'] == 0);
             if (isset($data['locked'])) {
                 $params['frozen_channels'] = explode(',', $data['locked']);
             } else {
                 if ($this->getConf('frozen_channels') != '') {
                     $params['frozen_channels'] = explode(',', $this->getConf('frozen_channels'));
                 }
             }
             $params['isadmin'] = false;
             if ($this->getConf('admin_group') != '' && isset($USERINFO['grps'])) {
                 $temp = explode(',', $this->getConf('admin_group'));
                 foreach ($temp as $item) {
                     if (in_array(trim($item), $USERINFO['grps'])) {
                         $params['isadmin'] = true;
                     }
                 }
             }
             $params['startwithsound'] = false;
             $params['display_pfc_logo'] = true;
             $params['showsmileys'] = false;
             $params['nick'] = isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : "guest" . rand(1, 1000);
             if ($this->getConf('fullname')) {
                 if (isset($USERINFO['name']) && !empty($USERINFO['name'])) {
                     $params['nick'] = $USERINFO['name'];
                 }
             }
             //          $params['channels'] =  array('Generale');
             $params['data_public_path'] = DOKU_INC . 'data/cache/public';
             $params['data_public_url'] = DOKU_URL . 'data/cache/public';
             $params['data_public_path'] = DOKU_INC . 'lib/plugins/freechat/phpfreechat/data/public';
             $params['data_public_url'] = DOKU_URL . 'lib/plugins/freechat/phpfreechat/data/public';
             //        $params['data_public_path']   = DOKU_INC.'data/tmp';
             //        $params['data_public_url']    = DOKU_URL.'data/tmp';
             $params['data_private_path'] = DOKU_INC . 'data/cache/freechat/private';
             $params['server_script_path'] = DOKU_INC . 'lib/plugins/freechat/backend.php';
             $params['server_script_url'] = DOKU_URL . 'lib/plugins/freechat/backend.php';
             //        $params['debug']  = true;
             // store in session the parameters list for the backend script
             @session_start();
             $_SESSION['freechat_params_list'] = $params;
             $pfc = new phpFreeChat($params);
             $pfc->printChat();
             $content = ob_get_contents();
             ob_end_clean();
             $renderer->doc .= $content;
             /*
             echo "<pre>";
             print_r($params);
             echo "</pre>";
             */
             return true;
         }
     }
     return false;
 }
开发者ID:bzfwunde,项目名称:dokuwiki-freechat,代码行数:79,代码来源:syntax.php


注:本文中的phpFreeChat::printChat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。