Giter VIP home page Giter VIP logo

webim-for-thinkphp's Introduction

WebIM-for-ThinkPHP

WebIM Application for ThinkPHP3.1

Demo

  1. Webim目录上传WEB服务器根目录

  2. 访问http://localhost/Webim/Index/

Develop

  1. Webim目录上传ThinkPHP项目根目录下;

  2. 项目数据库导入Webim/Install.sql中的库表;

  3. 配置Webim/Conf/config.php

  4. 配置Webim/env.php的变量

  5. 实现Webim/ThinkPHP_Plugin.php的集成接口,与项目用户、群组、通知集成.

  6. 项目需要显示WebIM的页面,footer嵌入:

<script type="text/javascript" src="Webim/Index/boot"></script>

ThinkPHP_Plugin.php

ThinkPHP集成接口类, 参考示例代码,实现下述接口:

  1. user() 初始化WebIM当前的用户对象,一般从SESSION和数据库读取

  2. buddies($uid) 读取当前用户的在线好友列表

  3. buddiesByIds($uid, $ids) 根据ids列表读取好友列表

  4. rooms($uid) 读取当前用户所属的群组,以支持群聊

  5. roomsByIds($uid, $ids) 根据id列表读取群组列表

  6. members($room) 根据群组Id,读取群组成员信息

  7. notifications($uid) 读取当前用户的通知信息

  8. menu($uid) 读取当前用户的菜单

Lib/Action/IndexAction.class.php

WebIM API接口

Install.sql

webim_settings

用户设置表,保存用户界面个性化设置

webim_histories

历史消息表,保存聊天历史消息

webim_rooms

临时讨论组表

webim_members

临时讨论组成员表

webim_visitors

访客表

Author

http://nextalk.im

ery.lee at gmail.com

nextalk at qq.com

webim-for-thinkphp's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.