PDA

View Full Version : PHP Chatlog Parser -- make it readable!



emb
August 30th, 2007, 15:03
Hey all,

I really wanted to give the chatlog to my players, but it's pretty hard to read straight out of the program.

So I made a PHP script that opens the chatlog, parses it, and puts in headings and links.

Example https://files.seanclarkhess.com/fg/chatlog.php

You just have to fill out some stuff at the top of chatlog.php, then put both it and your html chatlog on the server, and bingo! (You never have to edit chatlog.html).

Enjoy!

AndyPan
August 30th, 2007, 20:53
Interesting, but seems like an awful lot of work. After an issue with my computer where I lost a huge chunk of my ongoing chatlog, I started cutting the log up into bite-size chunks. At the end (or the beginning) of each session, the log html file is taken out of the FG folder, dated, and is placed in a seperate folde ron my laptop. I have a log for each session that can be easily opened to check for somethng that happened in the last session or at any other given time. As sometimes I need to share the chatlog with my players, and there are sometimes things I do not wish them to see (such as maybe a whispered conversation regarding what the rogue really found when he was alone down that hallway), I will copy the html text into Word, edit the text, then save it as a Word file. The player is then send the Word file. This works really well for me.

I'm sure your method works well too. Just seems like a lot more work to go to.

emb
August 30th, 2007, 21:04
No, it's easier than I made it sound. When I finish a session, I follow these steps.

1) Find the time when I started, and add it to the thing at the top
2) FTP chatlog.html to my server.

That's it. It handles the rest. Also, it highlights things better than the normal chatlog. It puts narration text back in bold again, among other things.

Ram Tyr
August 30th, 2007, 22:28
I believe there was a chatlog tool kicking around here somewhere...

Check out this link at FUM (https://www.fouruglymonsters.com/community/showthread.php?t=195).

You might be able to snag some ideas on improvements from Teelas and/or joshuha's work. Or, combine your efforts.

I haven't used the older version or this version. This is just a suggestion in case it might be useful to making things better for everyone.

Later.

emb
August 31st, 2007, 05:06
Cool, thanks for the link. I definitely didn't spend too much time on mine, so it's good to see what else has been done.

Thanks

Tropico
September 1st, 2007, 12:57
Hey this is pretty cool, thanks emb :)

I suspect the perception of how much 'work' it is will depend on how familiar one is with PHP and webserver use. In my case they'e both my living, so your script is just the thing.