...

Install

This guide will help you install firefly on your site.
Place this line of javascript code right before your closing </body> tag:
<script language="javascript" src="http://static.onfirefly.com/ff.js"></script>
It's best to put the above code in a footer so that firefly is available on every page.

To ban people or moderate messages, you need to set up your website at the admin area
That's all you need for installing firefly. What follows are ways to have your users open firefly (with bars, switches, text links, or custom).




Bar

The best to to engage your users is with the firefly bar, a tiny bar that stays in the bottom right corner of your webpage. It updates in real time with the number of people on your site and the number of people talking.

To use the bar, use the code below.
<script language="javascript" src="http://static.onfirefly.com/bar.js"></script>





Switches

This switch is great to put directly below content on your page. It allows people to discuss what they just read or watched. It updates in real time with the number of people on your site and the number of people talking. When switched on, it opens firefly.

(screenshot below)

To use this switch, use the code below.
<script language="javascript" src="http://static.onfirefly.com/switch.js"></script>


Same as above, but horizonal. (screenshot below)

To use this switch, use the code below.
<script language="javascript" src="http://static.onfirefly.com/hswitch.js"></script>





Text Link

Here is a simple text link that opens firefly: Open firefly
Use the code below for a text link.
<a href="javascript:void(0)" onClick="FIREFLY.open_firefly(); return false;">Open firefly</a>



Roll your own

By giving certain divs the proper ID, you can skin your own version of how to open firefly (like the "View Demo" at the top of the page).
FIREFLY.open_firefly() - javascript call. Opens firefly. Look at the text link above for an example.


fireflyPeopleOn: Updates with the number of people currently on your site.
<div id="fireflyPeopleOn">...</div>
fireflyInFirefly: Updates with the number of people currently in firefly chatting.
<div id="fireflyInFirefly">...</div>
fireflyLink: Updates with the connection status. (changes to connected. or disconnected.)
<div id="fireflyLink">Loading...</div>



In Flash

You can also get the numbers in flash by defining the following callbacks (Please refer to Flash help for help with ExternalInterface)

FIREFLYstats: - Called when the numbers update.
function FIREFLYstats(num_inFirefly, num_connected) { /* do stuff */ } ExternalInterface.addCallback("FIREFLYstats", this, FIREFLYstats);
FIREFLYswitchOff: - Called when firefly is closed.
function FIREFLYswitchOff() { /* do stuff */ } ExternalInterface.addCallback("FIREFLYswitchOff", this, FIREFLYswitchOff);
Note: Flash is a fussy thing. Make sure you have AllowScriptAccess = always in your embed code and System.security.allowDomain("*"); and import flash.external.ExternalInterface; in your flash code.