Using psyced javascript export of room content

First you need the place that you want to be exported to be storic. Ask your PSYC room provider to enable this (#define HISTORY). Next you need to include the data file for your room:
<script src="http://psyced.org:33333/place/roomname?format=js"></script>
Your psyced probably has a different HTTP port, so use the appropriate http://your.server:44444/ prefix throughout our examples.

In case the roomname contains characters that make the array name illegal (e.g. "your-community") in javascript you need to pass the "name=validname" parameter.

<script src="http://psyced.org:33333/place/your-community?format=js&name=yc"></script>
You can control the amount of lines returned via the "amount=x" argument, where x is a natural number.
<script src="http://psyced.org:33333/place/roomname?format=js&amount=8"></script>
There is a ready-made piece of code by lynX for you. It places chat output into a table and will always be up to date with the javascript export output provided by the chat server. Hopefully we won't change the format anyway, so you could as well write your own javascript code. as you like. You should also want to provide your own stylesheet instead of the one used here to integrate the output into the design of your site. Example usage:

code/psyclog-usage.html:
<!--	the following lines belong into the html header, to be correct -
	but so far no browser minds these lines appearing anywhere in the
	document.

	first let's fetch the data from the room directly from the web
	port of the psyc server. it will be placed into an array. -->

<script src="http://psyced.org:33333/place/welcome?amount=7"></script>

<!--	then lets fetch our default code for displaying the data -->
<script src="http://www.psyc.eu/psyclog.js"></script>

<!--	we will also want to have it look good. here's where the reds and
	blacks are, so you will want to change this probably. -->
<link rel=stylesheet href="http://www.psyc.eu/psyclog.css">

<!--	and this is the code you can place anywhere within your
	webpage - open a table the way you want it and let psyclogView()
	output the data. here's an example for the "welcome" room. -->

<table width=444 valign=top cellpadding=3>
<script> psyclogView(document.welcome) </script>
</table>

<!--	optionally, a link to enter the chat itself.

[<a href="http://psyced.org:33333/PSYC/?room=welcome">ENTER THIS CHAT</a>]
 -->

This will then look like this:

Making your own javascript code

If this does not fit your needs, you will have to make your own javascript, which is not very difficult.
The format of the array that you get is simple. The length will be 4 * amount + 1, where the last element is special and contains a string with the list of people present in the room, see below.
All other elements are tuples of four, containing (timestamp, nick, action, text).
So if we want an output of what is being said in a room we use the following snippet:

code/psyclog-custom1.js:
<script><!--
if (document.roomname) {
	l = document.roomname.length-1
	for (i=0; i<l; i += 4) {
		document.writeln(document.roomname[i] + ' '
				 +document.roomname[i+1] + ' '
		                 +document.roomname[i+2] + ' '
		                 +document.roomname[i+3] + '<br>')
	}
} else {
	document.writeln("[sigh, cannot reach room service]")
}
//--></script>
<noscript>sorry, psycblog needs javascript enabled for content transport</noscript>

Reverse order (newest things will appear on the top):

code/psyclog-custom2.js:
<script><!--
if (document.roomname) {
	l = document.roomname.length-1
	for (i=l - 4; i>=0; i -= 4) {
		document.writeln(document.roomname[i] + ' '
				 +document.roomname[i+1] + ' '
		                 +document.roomname[i+2] + ' '
		                 +document.roomname[i+3] + '<br>')
	}
} else {
	document.writeln("[sigh, cannot reach room service]")
}
//--></script>
<noscript>sorry, psycblog needs javascript enabled for content transport</noscript>

The last element of the array will always be a string containing the nicks of the people that are currently present in the room - separated by spaces.

code/psyclog-people.js:
<script><!--
if (document.roomname) {
	document.writeln(document.roomname[document.roomname.length - 1]);
} else {
	document.writeln("[sigh, cannot reach room service]")
}
//--></script>
<noscript>sorry, psycblog needs javascript enabled for content transport</noscript>

When formatting into a table take into account that when a chatter does a /me the text element will be "" and the action may turn out to be very long. psyclog.js takes that into consideration by use of a colspan. So here it is, the default psyclog.js:

code/psyclog.js:
function psyclogView(logData) {
	if (logData) {
		l = logData.length-1
		for (i=0; i<l;) {
			when = logData[i++]
			who = logData[i++]
			how = logData[i++]
			what = logData[i++]

			if (what == "")
			    document.writeln("<tr><td nowrap class=ts>" +when
			    +"</td><td colspan=2 nowrap class=sp><b>"+who
			    +"</b> "+how +"</td></tr>")
			else document.writeln("<tr><td nowrap class=ts>" +when
			    +"</td><td nowrap class=sp><b>"+who
			    +"</b> "+how +":</td><td class=tx>"+what
			    +"</td></tr>")
		}
		document.writeln(
		    "<tr><td colspan=2 class=sp>CURRENTLY IN THIS ROOM</td>"
		    +"<td class=tx><b>"+ logData[l] +"</b></td></tr>")
	} else {
		document.writeln(
	    "<tr><td colspan=3>[sigh, cannot reach room service]</td></tr>")
	}
	document.writeln('<tr><td class=ts colspan=3>You can also enter the '
	    +'room with <a href="http://www.psyc.eu">PSYC</a> or IRC using '
	    +' /server psyced.org</td></tr>')
}