Sunday, November 25, 2012

Chat | Shout Boxes on Message Board

The example code above will create a chatbox that is 160px wide by 200px high. The limit of 20 is the number of posts to show inside the chatbox. The final option is the "refresh" - this can be used to set the chatbox to automatically refresh every X seconds. Only the chatbox will refresh, the page you are on will remain the same. If you do not want the chatbox to automatically refresh, then either set it to 0 or leave the refresh option out completely. The value in red is the number of seconds between automatic refreshes.

Customizing the Chatbox

The chatbox uses your board's default (main page) skin, so to change how the chatbox looks you need to add css to the skin set as the Community Default.
To change the background colour and the text colour of the posts, copy the following example

Custom CSS

#widgets_chatbox td { background: #000000; color: #FFFFFF; }
To alternate the background colours for odd and even posts, use the following example instead

Custom CSS

#widgets_chatbox .odd td { background: #000000; color: #FFFFFF; }
#widgets_chatbox .even td { background: #FFFFFF; color: #000000; }
Alternatively you can make your chatbox transparent so it fits in with any skin. To make the chatbox transparent, copy the following example

Custom CSS

#widgets_chatbox, #widgets_chatbox table, 
#widgets_chatbox tr, #widgets_chatbox td { background: transparent; }

Moderating the Chatbox

The board owner and administrators can delete posts from the chatbox by scrolling to the bottom of the chatbox window and clicking the link.