Chatbox

By bcammobcammo

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…

Jakob A said:

nice

Jakob A said:

Wow

Dr_Blackpeace said:

nice

Dc_Yerko said:

Muy bueno

FerretsDoOK said:

Cool! Thanks for making this :).

knafflad said:

hello!

1A-1 supervisor said:

Me siento impresionado

Fedorian said:

cool

Fedorian said:

dfsagfd

Casanova_DTT said:

Woah,is cool

Adrian SCP said:

ss

Solomon Edwards said:

eeeeeee

Solomon Edwards said:

133aaa

1A-1 supervisor said:

Alb esto sirve

1A-1 supervisor said:

Alb esto sirve

slav_cat said:

testadasdasda

AE_03-hua said:

hello world:)

Srduck said:

Pato

1590320cvd said:

fucking kids in my basement

Dr Vulpes said:

hii

Dr Vulpes said:

heyo

Gabrieltmm said:

Primeira mensagem

aforestfullofstars said:

yeet?

Phantasiae said:

Phantasiae was here~

b6mb said:

sup

VitalInf0 said:

hey does anyone know how to make a page on a wikidot look like a computer terminal?

VitalInf0 said:

hey does anyone know how to make a page on a wikidot look like a computer terminal?

Mr Shaggy said:

Hey

LCTYoung said:

Woooo

Dr Azarel said:

iuv

Credit

Original idea by leigerleiger.


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: +11+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License