Chatbox

By bcammo bcammo

Description

This include allows you to install a simple chatbox on your site for quick, character-limited communications.

Attributes

The snippet uses the following attributes, both of which are optional.

Attribute Allowed values Default value Description
category any category chatbox The category in which you would like messages to be saved.
limit any integer 15 The number of recent messages to show.

Code

You can add the chatbox to your site with the following code:

[[include :snippets:chatbox attributes...]]

For example, the following code will install the chatbox to save messages in the chat category and will show the 20 latest messages.
[[include :snippets:chatbox |category=chat |limit=20]]

Messages will be saved in the category you specify (chatbox by default). It's a good idea to set this category to auto-numbered to avoid any conflicts.

For advanced users, you can customise the appearance of the chatbox with a CSS module or in your site's theme - available classes are chatbox (the container), message (the message content) and new-page-box (the input field).

In action

See the chatbox below for a working example. Feel free to leave a message…

call_me_thaumiel said:

Hello!

call_me_thaumiel said:

hello

ciryciry said:

l

(user deleted) said:

Yahey there! ^^

BlueSSun said:

aaa

BlueSSun said:

BlueSSun

Manganian said:

hi

Sparkmaker12 said:

dd

Sparkmaker12 said:

c

notadino said:

mmm

sugarandferrum said:

ww

Soldie Zak said:

hi

Kataclysmix said:

I'm here :P

Kataclysmix said:

Hello!

Malinovyy said:

Oh wow this works

Malinovyy said:

h

U52 said:

wassup.

Flynn The Primagen said:

ud

ReverseSheep said:

yo

DoctorIGP said:

j

PRR628 said:

What is going on here???

(user deleted) said:

hello!

(user deleted) said:

ABC

Noah Redden said:

Hello

Noah Redden said:

Hello

holaMEMZ said:

COOOOL

25-A said:

Test Wow

Phoebe Meridith said:

Hollor there!

Phoebe Meridith said:

Hello!

kietvnm2 said:

a

Credit

Original idea by leiger leiger .


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by bcammo

Google +1 Button - 19 Mar 2012 19:40
Tweet Button - 16 Feb 2012 01:49


Rate this solution

If you think this solution is useful — rate it up!

rating: +13
A small improvement
Timothy Foster Timothy Foster 11 Jul 2011 19:59

I made a small improvement to this so that it could update automatically and therefore show new posts. It isn't as sophisticated as James's system which updates at the time of a new post, but it is sufficient for a mini CSI, and least in my opinion. I only didn't change this up in case other people were using it.

The updated chatbox is here.


Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me

by Timothy Foster Timothy Foster , 11 Jul 2011 19:59
page revision: 6, last edited: 26 Mar 2012 11:07
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /