Yet another catbox client for e2?!

Yet another catbox client for e2. Allow me to explain. Problems should be solved by those who see them, but maybe not everybody sees the same problems as I do.

Right, what problem do you see?

The problems are multiple. But they all stem from the fact that the e2 chatterbox has a very un-chat-like behaviour (apart from the always landing on its feet part). Basically, each time you want to send a message or get the new messages, you have to press talk, which forces a page reload. This is bad because

  • page reloads take time,
  • page reloads are heavy on the server,
  • you can't vote and chatterbox at the same time,
  • you can't chatterbox from a user search,
  • you can't chatterbox from your scratchpad
  • and in fact, chatterboxing while reading can severely interrupt your reading flow.

Well duh! that's why we have a number of catbox clients already.

True. But my main beef with them is that you have to actually go to them; whether it be a standalone client which you have to launch or chatterlight or even message inbox which you have to navigate to, they are in unique "geographical" location. My typical interaction with the catbox is that I'm reading some node or other, realise I want to say something and say it. I don't want to have to load a special page/tab/program which I then go to when I want to contribute, I want something that is ubiquitous.

Basically, we have this chatterbox nodelet in every single e2 page (unless you've disabled it), so let's put it to some good use and turn it into a client which doesn't force a page reload.

So what does your client do?

It is a javascript program which emulates the chatterbox behaviour. So your chatterbox nodelet is exactly as always except that when you press talk, it doesn't force a page reload but sends and fetches catbox and private message stuff silently from the server. This solves all of the problems mentioned above.

Please note that there is no auto-reload feature. The only way to fetch new messages is to press talk or reload the page.

So how exactly do I get this thing to work and get a better idea of what it does.

First, go to joker's chat and press "talk". You should see a little turning circle thing instead of the talk button; this is an indication that the messages are being fetched from the server; when the load is complete you'll be able to "talk" again. You can try sending a message (be it private or public) if you like. It's basically the same as usual, but quicker.

If you would like this behaviour to happen in the catbox for any everything page, follow these steps this is the (hopefully) technophobe version; feel free to skip to the end if you're comfortable:

  1. You need to have your notelet nodelet activated. Go to Nodelet Settings to do this. In case you didn't know, the notelet is a private and personal nodelet in which you can put anything you like. Including scripts.
  2. Once your notelet is activated, it should be in the right hand column of your browser, somewhere among the other nodelets. Press the (edit) link which is at the bottom right of the notelet. This will take you to a page from which you can modify the contents of the notelet.
  3. Add the following line to the contents of your notelet and press submit (or whatever other silly name the submit box currently has):
    <script src="http://tirno.com/everything/a1.js"></script>
  4. You should now be able to send public and private messages from the catbox without forcing page-reloads.

This works in firefox and internet explorer; I have had reports of it not working in safari and will fix it as soon as I can hijack a mac.

Some of the behaviour is a bit un-catbox-like; what are the differences?

Extra features:

  • It shows the past 10 minutes instead of the past 5.
  • Hardlinks beginning with http:// and www point directly to the external website.
  • At the moment there is no linebreaking code in the chatterbox, so if people post links for example, your nodelet can get very wide. The catbox enhancer does have linebreaking - and this linebreaking doesn't mess up html character entities like the catbox did a few months back.

In some ways, the catbox enhancer differs from normal chatterbox behaviour. If ever you miss something, just reloading the page will bring it back in line with what you're used to. Here are some of the misbehaviours:

  • Only works when you are outside.
  • Doesn't work with chatteroff now it does. feb 20th, 2006
  • When you delete private messages, it doesn't fetch older messages - you'll need to reload the page for that.
  • Messages from groups aren't presented in exactly the same way.
  • It doesn't tell you to how many people you sent a private message.
  • It doesn't know about a number of your personal settings, such as: showing whether a user is an editor/admin; showing the last seen time in private messages; showing the date of a private message; etc.
  • It doesn't (and isn't supposed to) reload any other nodelets, such as other users and new writeups.
  • There are still some outstanding issues with accented charaters. (Update: feb 18 2007. Accented characters work. Characters that are not in the roman alphabet still don't. Not quite sure why.)
  • When you receive new private messages it doesn't update the (you have 1047 messages total).
  • For the private messages, the catbox enhancer assumes that the bottom message of your chatterbox is the latest message that was sent to you. If this is not the case, you may be in for some annoyance. (But it probably is the case, so all is fine.)

Could you incorporate such and such a feature?

Very possibly I could. Message me and I'll tell you what I think. At the moment, it's pretty-much feature complete as far as I'm concerned, which is why I'm releasing it. Have fun, take care.

We're supposed to be noding, not catboxing!!!!

We are?! Oh, right. I only coded this so that I could catbox and scratchpad at the same time, honest.

I'm not sure whether my catbox enhancer is working

To see whether it's working or not, there are two tests. The first is that, when you press talk, the talk button is replaced by a little turny animation for a few seconds.

If you feel compelled to do a test by sending a message, send something like this: [www.google.com|test]. Normally, the catbox will direct you towards a findings page when you click on that link. The catbox enhancer modifies the link and takes you straight to google.

Log in or registerto write something here or to contact authors.