定制 elefant/app-chat 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elefant/app-chat

Composer 安装命令:

composer require elefant/app-chat

包简介

Chat app for the Elefant CMS

README 文档

README

This is a simple member chat app for the Elefant CMS, powered by the Pusher realtime messaging service.

To install, drop the app into your Elefant apps folder and edit the file apps/chat/conf/config.php. Enter your APP ID, API Key and API Secret values from Pusher. You can now access the default chat at the URL /chat on your website. Please note that chats are members-only, so if you're not logged in you will be taken to the member login screen first.

Embedding the chat box

Chats can be embedded into any page via the Dynamic Objects menu in the WYSIWYG editor, or into any application via the following code:

<?php

echo $this->run ('chat/index', array ('channel' => 'channel-name'));

?>

Or in a view template:

{! chat/index?channel=channel-name !}

If no channel is specified, the channel name will be default. Channels can be used in your apps to create separate chat rooms for different groups of users.

Styling the chat box

The chat box can easily be styled through CSS, and some very basic CSS is included in /apps/chat/css/default.css. For reference, here is what the HTML of the chat box looks like:

<div id="chat">
	<div id="chat-box">
		<ul id="chat-list">
			<li class="chat-msg">
				<span class="chat-user">Johnny:</span>
				<span class="chat-text">Hello, world!</span>
			</li>
			<li class="chat-msg">
				<span class="chat-user">World:</span>
				<span class="chat-text">Hi Johnny!</span>
			</li>
		</ul>
	</div>

	<form id="chat-form" onsubmit="return chat.speak (this)">
		<input type="text" name="chat-input" id="chat-input" />
		<input type="submit" value="Send" id="chat-submit" />
	</form>
</div>

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固