Thoughts on live chat 
Filed under

frontend

 

More features and tweaks than I will remember

So I’ve been fanatically working on Hab.la recently.

Here are today’s set of updates:

Cool tricks for for Operators:

/follow - in a chat session will cause hab.la to tell you whenever that visitor changes pages.

/nofollow - disables following that user

/nick [nickname] - changes your nickname in a specific chat session

Nickname related fixes:

Visitors can assign themselves a nickname by typing /nick [nickname] in their chat window.

If using Adium or Meebo this nickname will appear on your buddylist. For other XMPP (Jabber) clients the buddy’s status message will read ‘nickname: http://url’.

It may be time to revisit my blog post about manually assigning a nickname to logged in users. As this feature will now benefit users of other instant messengers (i.e. Pidgin, iChat, OpenFire).

Other Fixes:

Hab.la will no longer notify the operator whenever a user changes pages. It will only notify the operator of page changes when the operator is actively chatting with the web-user. If you want to see a visitor’s path through your website use the /follow command.

Better caching on the backend to speed up each individual RPC call. I.e. Hab.la should be faster for all now!

Filed under  //   backend   frontend   javascript   nickname   updates  
Posted by Olark 

Comments [0]

What Hath God Wrought? New Javascript released and more.

Thomas Edison thought that everyone should answer the telephone with “Ahoy”, my Hab.la greeting of choice is “Yola”. I digress.

I just pushed a few new simple – but much requested features to production they include: welcome message support, automatically expanding the Hab.la window when a operator sends a message to a visitor, and a really cool method of supporting offline/online images. The last of these features could use a full tutorial.. I’ll put that on to the todo list :-)

Welcome Message
The welcome message is shown in the Hab.la window before chat is started.

<script type="text/javascript" src="http://static.hab.la/js/wc.js"></script>
<script type="text/javascript">
config = wc_config();
config.vars["welcome_msg"] = "Hi Traveler, You can use this window to chat with me as you browse my website :-).";
wc_init("___YOUR__ID____",config );
</script>

Automatically expanding the Hab.la window when a chat is received.
When enabled this feature will expand the hab.la window when an operator sends a message to a website visitor. (In normal operation, the hab.la window remains minimized unless the visitor clicks on it).

<script type="text/javascript" src="http://static.hab.la/js/wc.js"></script>
<script type="text/javascript">
config = wc_config();
config.vars["expandOnMessageReceived"] = 1;
wc_init("___YOUR__ID____",config );
</script>

Showing or Hiding Content based on Hab.la Availability.
We’ve made it really easy to show and hide content on your webpage based on whether hab.la is available or not. For example, when you are not available on hab.la you might want to show a contact form, when you are available, you might instruct your visitors to chat with you using hab.la. In addition you can use this same method to show or hide a “click here to chat with me” link or image.

Once you have the hab.la javascript installed on a page all you have to do is to create two HTML Divs, “habla_available_div”, “habla_unavailable_div”. (if you want a div to be shown when hab.la is loading create “habla_loading_div”).

<div id="habla_available_div"></div>
<div id="habla_unavailable_div"></div>
<!-- optional -->
<div id="habla_loading_div"></div>
<!-- /optional -->

Now, you can place content in these DIVs that will show based on your hab.la availability

Example 1: Showing and hiding some text based on availability

<div id="habla_available_div">Hey I am online on hab.la, see that little chat box in the lower right, you can click on it to talk to me instantly.</div>
<div id="habla_unavailable_div">I am not here like now, looks like you missed me.</div>
<!-- optional -->
<div id="habla_loading_div">Hab.la is starting up</div>
<!-- /optional -->

Example 2: Showing and hiding images based on availability

<div id="habla_available_div"><A href="javascript:habla_window.show()"\>"<img src="online_image.png"></a></div>
<div id="habla_unavailable_div"><A href="contact_us.html"\><img src="offline_image.png"></div>

That’s today’s list of features and improvements. Enjoy!

Filed under  //   frontend   hab.la   help   javascript   livehelp   tutorial   welcome  
Posted by Olark 

Comments [0]

Fancier Online/Offline images for all

A few months ago Roland made some really cool online/offline images for people on myspace and other sites that block javascript to use when hab.la enabling their website.

At the time we were rewriting a lot of the core JavaScript, so recently this took a back seat to core functionality.

Below you will find the HTML code necessary to add hab.la to your website (no javascript required), be sure you change the fields labeled SITE_CODE, to your site code found in the My Hab.la Page.

(Once installed on your site, clicking on the produced image will create a link to hab.la where your visitors will be able to chat with you.)

Online
Offline
<div>
<a href = "http://static.hab.la/js/html/url_handler.html?siteid=SITE_ID_HERE">
<img src="http://dyn.hab.la/online/image.cgi/SITE_ID_HERE/1.gif" border=0></a><br/>
<small>Powered By <a href="http://hab.la" target="_blank">Hab.la</a><small>
</div>

Online
Offline
<div>
<a href = "http://static.hab.la/js/html/url_handler.html?siteid=SITE_ID_HERE">
<img src="http://dyn.hab.la/online/image.cgi/SITE_ID_HERE/2.gif" border=0></a><br/>
<small>Powered By <a href="http://hab.la" target="_blank">Hab.la</a><small>
</div>

Online
Offline
<div>
<a href = "http://static.hab.la/js/html/url_handler.html?siteid=SITE_ID_HERE">
<img src="http://dyn.hab.la/online/image.cgi/SITE_ID_HERE/3.gif" border=0></a><br/>
<small>Powered By <a href="http://hab.la" target="_blank">Hab.la</a><small>
</div>

Online
Offline

Hidden when unavailable

<div>
<a href = "http://static.hab.la/js/html/url_handler.html?siteid=SITE_ID_HERE">
<img src="http://dyn.hab.la/online/image.cgi/SITE_ID_HERE/4.gif" border=0></a><br/>
<small>Powered By <a href="http://hab.la" target="_blank">Hab.la</a><small>
</div>

Online
Offline
<div>
<a href = "http://static.hab.la/js/html/url_handler.html?siteid=SITE_ID_HERE">
<img src="http://dyn.hab.la/online/image.cgi/SITE_ID_HERE/4.gif" border=0></a><br/>
<small>Powered By <a href="http://hab.la" target="_blank">Hab.la</a><small>
</div>

For information on how to use your own custom images, take a look at the below blog post.

http://hab.la/articles/2007/10/19/online-offline-image-the-simple-way

[We are still working on a clean method of performing the same tasks using just javascript – in that we just haven’t got around to it]

Filed under  //   away   frontend   hab.la   image   images   javascript   livehelp   myspace   no   offline   online  
Posted by Olark 

Comments [0]

Hab.la Color Customization Tool V 0.2

Ok, so the last version of my color customization tool was pretty much unusable. I have improved the old customization tool to make it compatible with IE6, while adding a few text fields so you can change the default text found in Hab.la. Now users who don’t like to look at code can change hab.la’s look and feel using a very simple customization interface.

Hab.la Customizer V 0.2

Filed under  //   customization   dynamic   feel   frontend   javascript   look   tool  
Posted by Olark 

Comments [0]

A fix to a weird error

Ok, this is hardly blog worthy, in that it is going to not be very interesting to most of our visitors. However, I tracked down a really weird Firefox bug, I haven’t figured out exactly why it was occurring, but here’s the error message I was receiving:

uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"
nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"
 location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]

That’s a pretty scary message. This problem was caused by a line that looked like:

setTimeout(this.wcsend.focus, 10)

My only theory is that somehow the function reference doesn’t like the fact that “this” is part of the function reference, even though it should just be some real place in memory, assuming javascript references work anything like c++. (Of course more likely, there’s a weird scope issue with the this. , I digress)

So the fix.

setTimeout(function() { habla_window.wcsend.focus(); }, 10)

Replace the function reference with a virtual function, and a full reference to the focus call. Hopefully, this will be somewhat useful to people who run into this problem in the future.

Of course, on the plus side, Firefox users should no longer see those ugly error messages (which might only show up in firebug) while using Hab.la :-)

Filed under  //   error   firebug   firefox   frontend   hab.la   javascript   mozilla   weird   wrappednative  
Posted by Olark 

Comments [0]

Is it really after 3am, Damn

Anyway, there was a lot of Hab.la progress today. Roland, Kevin, and I held a jam session and hammered out fixes for many of the small bugs, and even managed to implement a few new features as well.

First of all Hab.la should work with iChat3, and with Spark (from ignite).

Second of all, Hab.la will now remember whether the chat window was open or closed as you browse a site. End users can even close the window and have it go away entirely until they receive a message from a site op.

And last, but not least I wrote a really ugly, really quick and dirty Hab.la color customization tool. you can check it out at:

http://static.hab.la/test/bot_inline_color.html

This should help our less technically inclined users customize the colors of their hab.la window. without having to do extra work. I am really looking forward to the day where we support full fledged user templating – but my guess is it will be a while before that arrives.

Filed under  //   backend   experience   frontend   ichat3   javascript   spark   update   user  
Posted by Olark 

Comments [0]

Javascript API? A Pie in my Eye?

Anyway, as I was fixing some problems with how hab.la is not so smart about polling our servers. (It’s now smarter – with some potential for being MUCH smarter), I thought, you know what we need – we need some examples of the cool stuff you can do with the Hab.la API.

So rather than writing documentation, I decided to create a quick example of how you can resize, hide, show, and expand the hab.la window on your website using javascript.

I wrote up a full example at: http://static.hab.la/test/bot_resize.html

Though, you could also try playing with these buttons:

Width:

Height:

Filed under  //   frontend   habla   hide   javascript   js   livehelp   move   resize   show  
Posted by Olark 

Comments [0]

The names of your visitors could appear on your buddylist

So, we have only confirmed that this feature works with adium, pidgin, and meebo. (All libpurple based chat clients).

However, it has worked consistently for us. If you want to play with this feature visit your website and type: /nick nickname into the chat box, the name of the buddy representing you on your buddylist should change from webuser### to nickname.

We are close to adding an interface element to let user’s specify this option on their own.

Filed under  //   buddylist   frontend   interface   jabber   javascript   nickname   roster   ui  
Posted by Olark 

Comments [0]