GithubHelp home page GithubHelp logo

hhy5277 / hummingbird-3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alagu/hummingbird

0.0 1.0 0.0 330 KB

Hummingbird is a opensource embeddable chat system. One line embed in your website with adium/pidgin support

Home Page: alagu.github.com/hummingbird/

License: MIT License

HTML 0.16% CSS 1.09% JavaScript 87.65% Shell 0.03% Python 0.74% Erlang 10.33%

hummingbird-3's Introduction

Hummingbird

Tried building my own version of Olark. Jabber and Strophe.js helped me. ( Previously known as Opensource Olark )

Hummingbird

This can add popup on any window and admins can chat using Jabber clients (adium, etc). It doesn't have any auth mechanism built it, but it can be added easily using the auth.py file.

Warning: There is no ACL added here. But it is easy to add

Installation

Requirements

Works in Ubuntu 11.04+

Install eJabberd

  sudo apt-get install ejabberd
  git clone git://github.com/alagu/hummingbird.git
  cd hummingbird
  sudo -s
  cp server/setup/auth.py /etc/ejabberd/

Edit Ejabberd Config

  cd /etc/ejabberd
  vim ejabberd.cfg

Remove:

{auth_method, internal}.

Change:

 {acl, admin, {user, "alagu", "localhost"}}.

 {auth_method, external}.
 {extauth_program, "/etc/ejabberd/auth.py"}.
 {extauth_cache, 600}.
 {extauth_instances, 5}.

Also add hosts.

{hosts, ["localhost", "chat.alagu.net"]}

Add mod_http_bind module

{modules ,
 [
  ...
  {mod_http_bind,  []},
  ...
 ]
}

(Save and Quit vim)

Here is a sample ejabberd cfg which works for me: ejabberd.cfg

Create admin user in commandline:

  sudo ejabberdctl register alagu localhost mypassword

Create SRV Record

This is bit tricky. You have to configure your DNS to add SRV records. (Example http://library.linode.com/communications/xmpp/ejabberd/ubuntu-8.04-hardy#sph_xmpp-jabber-basics)

Try logging into the jabber server. Use pidgin/adium.

Any username(Say joe@localhost), any password should connect to your machine.

Here is my linode configuration:

Linode configuration

Single item entry: Entering an item

Test Jabber Installation

  apt-get install sendxmpp
  echo "someguy@localhost uselesspassword" > ~/.sendxmpprc
  chmod 600 ~/.sendxmpprc 
  echo "Testing goyaka chat" | sendxmpp [email protected]

Get the chat widget

Go to the (client folder)[https://github.com/alagu/hummingbird/tree/master/client].

Edit chat-client.js and configure (in client/static):

 var BOSH_SERVICE = 'http://olark.alagu.net:5280/http-bind';
 var JABBER_HOST  = 'olark.alagu.net';
 var ADMIN_USER   = '[email protected]';

Set them to right variables and build chat.js

bash compile.sh

This compiles all javascript files to single chat.js. Copy following files to your assets directory.

client/
  static/
    chat-0.1.css
    chat.js

Now, insert these two lines in your product html.

<link rel="stylesheet" type="text/css" href="<yourstaticpath>/chat-0.1.css">
<script src="<yourstaticpath>/chat.js" type="text/javascript"></script>

Try the DEMO.

Adium configuration

Once this is done, get your admin account logged in Adium. (Note: None of this is ACL protected) Username should be [email protected] and password could be anything.

Screenshot

ACL

The auth.py defines the acl for each account. You could tie up a sqlite/mysql db which holds the auth mechanism.

hummingbird-3's People

Contributors

alagu avatar

Watchers

 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.