fantasma wrote:

when active it, my index, not show.

Got any link to show ? kinda hard to say what's wrong without wink

EDIT: noticed a bug: when you're not logged in the chat wont display anything. Corrected first file according to that

ChatLite extension for PunBB 1.3
This extension adds an ajax based chat to your forum index. Only registered members can post messages on it.


ChatLite 0.5.1


Installation:
Download the zip and extract it in your PunBB's extensions folder, then access administration and launch install.

Upgrade:
Replace content of ek_chatlite folder (in extensions) with the one of the last version's zip, then launch upgrade in administration.
/!\ do not replace ek_chatlite/data/chat.dat if you want to keep chat's messages.
/!\ when updating from 0.3.3 or lower version you MUST replace ek_chatlite/data/chat.dat, all chat messages will be lost.


Features:

  • Purely javascript based, will not work at all without it activated (but no dirty html parts will be shown in this case).

  • CSS style that will fit default theme (see HowTo below to make your own)

  • Languages support (see HowTo below).

  • Timestamps in front of messages, with date if not posted the same day.

  • Logs a maximum of 50 messages.

  • Decent server load, doesn't start entire forum script to refresh chat content, only to write a new message.

  • Refresh occurs every 2.5s and will slow down if no new messages are received until intervals reach 60s. Resets when a message is received.

Requirements:

  • PHP 5.2.1 (or greater)

  • PunBB 1.3 (or greater)

  • Prototype 1.6.0.3 (included)

  • Apache server (recommended)


Notes:
I'm not open to any feature suggestion at the moment (no time) but I welcome any code improvement.
Will correct bug or security flaw.

Licensed under CC by 3.0.


HowTo...
...translate
Copy ek_chatlite/media/js/lang/English.js and name it according to the language you want. Then open it in a text editor and replace the sentences on right by the translated ones.
If your text contains single quotes ( ' ) or backslashes ( \ ) you must add an additional backslash before ( \' or \\ ).
Feel free to send me your work at nk.punbb at eikylon.net (include your name and website/email for credits).

...make your own css style:
Just place a file in ek_chatlite/media/css with the same name as your forum's theme (i.e. theme.css).

...tweak message display:
open ek_chatlite/media/js/chat.js and look for:
'#{a}[#{d}#{h}:#{m}] <strong>&lt;#{name}&gt;</strong> #{msg}<br />'
This is the message template, #{xyz} values are filled when reading messages, you can modify it as you want.
#{a} is the deletion button, #{d} is the day, rest is self explanatory.

Additionally you can change day display in lang file. Using "date" as value will display the date (i.e. 11/12) anything else will be used as string (i.e. today).



Old versions:
ChatLite 0.5.0
ChatLite 0.4.0
ChatLite 0.3.3
ChatLite 0.3.2
ChatLite 0.3.1
ChatLite 0.3.0