LDU Plugin converted to Seditio by madclassstudio on the Neocrome forums
Minor modifications to make last chat message appear at the top not the bottom of the list, and to display the posters Username with each chat by PureLoneWolf of www.wolflan.com.

Copy chat_io.php to the root of your site
Copy the the contents of the plugins folder to the plugins folder of your site

Tags:  Add this to index.tpl

<a href="plug.php?e=chat">Click here to join the chat</a>
<br>
<!-- BEGIN: CHAT_ROW -->
  {CHAT_ROW_USER}
  <br>
  <b>{CHAT_ROW_DATE}</b> : {CHAT_ROW_TEXT}
  <hr>
<!-- END: CHAT_ROW -->
  {CHAT_INDEX_MAIN}
   <br>
  {CHAT_INDEX_TPICS}


*****************************************
Create the SQL tables using the query below:

CREATE TABLE sed_chat (
  chat_id int(11) NOT NULL auto_increment,
  chat_date int(11) NOT NULL default '0',
  chat_userid int(11) default NULL,
  chat_text text NOT NULL,
  PRIMARY KEY (chat_id)
);

CREATE TABLE sed_chat_online (
  chat_online_userid int(11) NOT NULL default '0',
  chat_online_lastseen int(11) NOT NULL default '0',
  chat_online_status tinyint(2) unsigned NOT NULL default '0',
  PRIMARY KEY (chat_online_userid)
);

CREATE TABLE sed_chat_stats (
  stat_name varchar(32) NOT NULL default '',
  stat_value int(11) NOT NULL default '0',
  PRIMARY KEY  (stat_name),
  KEY stat_name (stat_name)
);


************************************************

To set the order of the chat back to last post at the bottom :-

**Edit chat.index.php
Find line 35 and replace ASC with DESC

**Edit inc/chat.inc.php
Find line 101 and replace ASC with DESC
Find line 107 and replace ASC with DESC

The above: thanks to madclassstudio for supplying the info to change order