Recently we’ve been launching a lot of small bug fixes. Fixes for some older versions of IE, slowing down the polling frequency for the average user and more. However, to keep the people who are really looking for more features happy I’ve added a really simple method of resizing the Hab.la window. (note, you cannot dynamically resize the window at will – YET), but you can make it bigger or smaller depending on your needs.
The code
<script type="text/javascript" src="http://static.hab.la/js/wc.js"></script>
<script type="text/javascript">
c = wc_config();
//c.setInline(1); // If you don't want it to float
c.setWidth(500);
c.vars["convo_height"] = 300; // make the conversation box bigger
wc_init("___YOUR__ID____",c );
</script>
I created a quick example of this at:
http://static.hab.la/test/bot.html#
Where you can use Hab.la to chat with a fun Chatterbot. (Sometimes it doesn’t respond, but that’s due to some bug in the chatterbot, that I don’t have time to fix right now)
Hab.la Inline
The previous example still uses the standard floating hab.la, if you’d like to place hab.la somewhere on a page, perhaps inside your existing layout you can use pretty much the same process, here’s the code for it:
<script type="text/javascript" src="http://static.hab.la/js/wc.js"></script>
<script type="text/javascript">
c = wc_config();
c.setInline(1);
c.setWidth(600);
c.vars["convo_height"] = 300;
c.vars["start_expanded"] = 1;
c.vars["enable_buttons"] = false;
wc_init("________CODE______",c );
</script>
<h1> HTML code above window </h1>
<div id="habla_window_div">
</div>
http://static.hab.la/test/bot_inline.html
See it in action.
Comments [0]