Bug 10 - Chatroom logging support
: Chatroom logging support
Status: RESOLVED FIXED
Product: ejabberd
mod_muc
: svn
: PC All
: P2 normal
Assigned To: Badlop
:
:
:
  Show dependency treegraph
 
Reported: 2005-01-12 22:30 MSK by Badlop
Modified: 2006-03-14 07:29 MSK (History)
2 users (show)

See Also:


Attachments
Adds chatroom logging (first revision) (9.33 KB, patch)
2005-01-12 22:33 MSK, Badlop
Details | Diff
Adds chatroom logging (second revision) (11.30 KB, patch)
2005-04-03 03:01 MSD, Badlop
Details | Diff
Adds chatroom logging (third revision) (11.30 KB, patch)
2005-04-05 22:18 MSD, Badlop
Details | Diff
patched mod_muc.erl for 0.9 (21.58 KB, text/source)
2005-05-18 08:36 MSD, Patrick Hanft
Details
patched mod_muc_room.erl for 0.9 (65.83 KB, text/source)
2005-05-18 08:37 MSD, Patrick Hanft
Details
Adds chatroom logging (fourth revision) (13.73 KB, patch)
2005-05-28 19:30 MSD, Badlop
Details | Diff
Adds chatroom logging (fifth revision) (14.10 KB, patch)
2005-09-13 21:51 MSD, Badlop
Details | Diff
Adds chatroom logging (sixth revision) (17.38 KB, patch)
2006-01-03 02:24 MSK, Badlop
Details | Diff
Adds chatroom logging (sixth revision, bis) (17.39 KB, patch)
2006-01-03 02:49 MSK, Badlop
Details | Diff
Adds chatroom logging (seventh revision) (19.84 KB, patch)
2006-02-26 22:56 MSK, Badlop
Details | Diff
Adds chatroom logging (seventh revision) SVN (19.96 KB, patch)
2006-02-26 23:00 MSK, Badlop
Details | Diff
Adds chatroom logging (eigth revision) 1.0.0 (22.45 KB, patch)
2006-02-28 04:49 MSK, Badlop
Details | Diff
Adds chatroom logging (eigth revision) SVN (22.57 KB, patch)
2006-02-28 04:51 MSK, Badlop
Details | Diff
Adds chatroom logging (nine revision) 1.0.0 (25.36 KB, patch)
2006-03-01 04:32 MSK, Badlop
Details | Diff
Adds chatroom logging (nine revision) SVN (25.44 KB, patch)
2006-03-01 04:34 MSK, Badlop
Details | Diff
Adds chatroom logging (ten revision) 1.0.0 (26.83 KB, patch)
2006-03-01 21:09 MSK, Badlop
Details | Diff
Adds chatroom logging (ten revision) SVN (26.90 KB, patch)
2006-03-01 21:10 MSK, Badlop
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description Badlop 2005-01-12 22:30:28 MSK
Chatroom logging is still not implemented, even if the option is already
available in configuration formulary for room owners.
Comment 1 Badlop 2005-01-12 22:33:55 MSK
Created an attachment (id=5) [details]
Adds chatroom logging (first revision)

This patch adds room logging. It's still untested on heavy load.

Read the comments to know how to use it.
Comment 2 Sander Devrieze 2005-01-19 21:37:19 MSK
It would be even more great if XHTML is used (as an option or as default) and 
that index.html files are created. Maybe this last seems a stupid feature but 
mu-conference can't do this and some people won't install mu-conference 
because of this; so if the MUC module in ejabberd can do it, they will 
probably migrate to ejabberd.... :-) 
 
(see also 
http://jabberstudio.org/projects/ejabberd/features/view.php?id=3937 )
Comment 3 Denis Nelubin 2005-03-30 16:30:47 MSD
This patch conflicts with tkabber's "Whiteboard". When you draw tkabber says 
"Unrecoverable Error (Item Not Found): Conference room does not exist".

ejabberd logs:
> =ERROR REPORT==== 2005-03-29 16:50:47 ===
> ** State machine <0.4120.0> terminating 
> ** Last event in was {route,{jid,"gelin",
> ....cut.....
>                                 [{xmlelement,
>                                      "x",
>                                      [{"xmlns","tkabber:whiteboard"}],
>                                      [{xmlelement,
>                                           "svg",
> ....cut.....
> ** Reason for termination = 
> ** {function_clause,[{xml,get_tag_cdata,[false]},
>                      {mod_muc_room,add_text_to_log,2},
>                      {mod_muc_room,add_message_to_history,3},
>                      {mod_muc_room,normal_state,2},
>                      {gen_fsm,handle_msg,7},
>                      {proc_lib,init_p,5}]}

Rooms where logging is disabled work right.
Comment 4 Badlop 2005-04-03 03:01:32 MSD
Created an attachment (id=11) [details]
Adds chatroom logging (second revision)

Changes on Second revision - 02/April/2005 :

  * Code reorganized a little
  * This patch modifies mod_muc_room.erl and mod_muc_room.erl, too
  * Fixed a bug that killed a room when a participant used Tkabber's Whiteboard

  * Date on page header can be localized in two ways: week&month strings and
format of phrase.


Configuration options for mod_muc on ejabberd.cfg's modules section:

  allow_room_log: Quick way to disable all chatroom logging. Default: true
    false: no logs will be generated, even if the room owner activates it
    true: chatroom logs will be generated if the option is enabled by the owner


  outdir: Directory where html will be generated. Default: "www/muc"

  dirtype: Type of directory that will be created. Default: subdirs
    subdirs: creates subdirectories for year and month: 2004/12/23.html
    plain: the filename contains the full date, no subdirs: 2004-12-23.html


Example configuration:

  {mod_muc, [{access, muc},
		     {access_create, muc},
		     {allow_room_log, true},
		     {outdir, "www/muc"},
		     {dirtype, plain},
		     {access_admin, muc_admin}]},
Comment 5 Denis Nelubin 2005-04-05 07:14:43 MSD
Second revision of this patch had been fixed one more bug: room died then
participant 
changes topic.
Now all works right.
Comment 6 Denis Nelubin 2005-04-05 07:37:52 MSD
Sorry for misinformation. Bug still alive.
I can change topic in Tkabber. But when I change it in Miranda (jabber.dll v.0.1.1.8) 
conference dies.

ejabberd logs:
=ERROR REPORT==== 2005-04-05 10:28:26 ===
** State machine <0.394.0> terminating
** Last event in was {route,{jid,"gelin",
                                 "jabber.lan.omsk.ru",
                                 "Miranda",
                                 "gelin",
                                 "jabber.lan.omsk.ru",
                                 "Miranda"},
                            [],
                            {xmlelement,
                                "message",
                                [{"to","test@conference.jabber.lan.omsk.ru"},
                                 {"type","groupchat"}],
                                [{xmlelement,
                                     "subject",
.......cut.......
** Reason for termination =
** {{case_clause,{{xmlelement,"subject",
                              [],
                              [{xmlcdata,
.......cut.......
                                    46]}]},
                  {xmlelement,"body",
                              [],
                              [{xmlcdata,
.......cut.......
                                    46]}]}}},
    [{mod_muc_room,add_to_log2,2},
     {mod_muc_room,add_message_to_history,3},
     {mod_muc_room,normal_state,2},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p,5}]}

Is Tkabber changes 'topic', but Miranda changes 'subject' ?
Comment 7 Badlop 2005-04-05 21:56:43 MSD
> I can change topic in Tkabber. 
> But when I change it in Miranda (jabber.dll v.0.1.1.8) conference dies.

Miranda does not follow JEP-0045: Multi-User Chat. In '7.1 Modifying the Room
Subject' [1] it clearly says:
'The subject is changed by sending a message of type "groupchat" to the
room@service, containing no body but a <subject/> that specifies the new subject'.

But Miranda Jabber plugins (both the old 0.1.1.8 and the newest 0.2.0.2a [2])
send a message with both 'subject' and 'body' elements, as we can see on the
Erlang debugger:

{xmlelement,"message",
  [{"to","vim3@conference.localhost"},{"type","groupchat"}],
  [{xmlelement,"subject",[],[{xmlcdata,"thissubject"}]},
   {xmlelement,"body",[],
     [{xmlcdata,"/me has set the topic to: thissubject"}]}]}})

I've modified my patch to allow this even when it's not JEP45-compliant, because
I don't want malicious software crashing rooms out there. 
Replace:
	{SubEl, false} ->
		Message = {subject, htmlize(xml:get_tag_cdata(SubEl))},
		add_message_to_log(Nick, Room, Message);
	{false, SubEl} ->
		Message = {body, htmlize(xml:get_tag_cdata(SubEl))},
		add_message_to_log(Nick, Room, Message)
with:
	{false, SubEl} ->
		Message = {body, htmlize(xml:get_tag_cdata(SubEl))},
		add_message_to_log(Nick, Room, Message);
	{SubEl, _false} ->
		Message = {subject, htmlize(xml:get_tag_cdata(SubEl))},
		add_message_to_log(Nick, Room, Message)

Anyway, the Miranda plugin must be fixed. I'll email Ghazan, and you should
update the plugin to latest versions.

----

[1] http://www.jabber.org/jeps/jep-0045.html#subject-mod
[2] http://www.miranda-im.org/download/details.php?action=viewfile&id=1912
Comment 8 Badlop 2005-04-05 22:18:53 MSD
Created an attachment (id=12) [details]
Adds chatroom logging (third revision)

Changes on Third revision - 05/April/2005 :

  * Fixed a bug that allowed a client to crash a room when setting the subject
  * This patch modifies two files: mod_muc.erl and mod_muc_room.erl
Comment 9 Patrick Hanft 2005-05-18 08:04:19 MSD
Hi there, 
 
I think that's a really cool feature and I'd love to use it. Unfortunately I 
broke my ejabber-0.9 installation trying to make this patch work with 0.9. :( 
Well I'm no developer so my own fault. It would be great if you could make this 
patch work with 0.9 version. Thanks!
Comment 10 Patrick Hanft 2005-05-18 08:34:40 MSD
Never mind! I just got it working! Well, I'm maybe just good enough to apply a 
patch but I'm most certainly too stupid to make one. But I still want to 
contribute something, even it's the tinyest bit. So I'll attach my two files  
mod_muc.erl and mod_muc_room.erl that worked for me now. Maybe one of you dev 
guys can make this into a patch. 
 
Thank you for this feature :)
Comment 11 Patrick Hanft 2005-05-18 08:36:31 MSD
Created an attachment (id=24) [details]
patched mod_muc.erl for 0.9
Comment 12 Patrick Hanft 2005-05-18 08:37:15 MSD
Created an attachment (id=25) [details]
patched mod_muc_room.erl for 0.9
Comment 13 Badlop 2005-05-28 19:30:26 MSD
Created an attachment (id=29) [details]
Adds chatroom logging (fourth revision)

Patch that adds MUC rooms chat logging to HTML

Changes on Fourth revision - 28/May/2005
  * Patch updated to ejabberd 0.9.1 (and only for 0.9.1)
  * Most code has moved to a new file: mod_muc_log.erl
  * Now there are minimum changes on mod_muc_room.erl and mod_muc_room.erl
  * If MUC logging is disabled on the server, the room config form informs
about it
  * New option to specify the CSS file: cssfile

How to apply:
  Copy mod_muc-logpatch.diff to the directory 'ejabberd/src/'
  $ cd ejabberd/src/
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now /.configure, make and restart ejabberd. Configuration in ejabberd.cfg is
optional.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: Quick way to disable all chatroom logging. Default: true
    false: no logs will be generated, even if the room owner activates it
    true: chatroom logs will be generated if the option is enabled by the owner


  outdir: Directory where html will be generated. Default: "www/muc".
    Make sure the system user has write access on that dir.

  dirtype: Type of directory that will be created. Default: subdirs
    subdirs: creates subdirectories for year and month: 2004/12/23.html
    plain: the filename contains the full date, no subdirs: 2004-12-23.html

  cssfile: If HTMLs will use a custom CSS file or the embedded one. Default:
false
    false: HTMLs will include the standard CSS code
    "CSS-URL": the URL of the CSS file. Example:
"http://jabberser.org/custom.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {allow_room_log, true},
	     {outdir, "www/muc"},
	     {dirtype, plain},
	     {cssfile, false},
	     {access_admin, muc_admin}]},
Comment 14 Badlop 2005-09-13 21:51:55 MSD
Created an attachment (id=66) [details]
Adds chatroom logging (fifth revision)

Patch that adds MUC rooms chat logging to HTML

Changes on Fifth revision - 13/Sep/2005
  * Patch updated to ejabberd 0.9.8

This patch should add mod_muc logging to all virtual hosts. However, all of
them will share the same configuration. It seems 'per-vhost log configuration'
would take some time to implement.
Comment 15 Badlop 2006-01-03 02:24:48 MSK
Created an attachment (id=114) [details]
Adds chatroom logging (sixth revision)

Patch that adds MUC rooms chat logging to HTML

Changes on Sixth revision - 3/Jan/2006
  * Patch updated to ejabberd 1.0.0
  * New option to prevent chatroom owners to modify chatroom logging:
access_log
  * More information is provided on top of page: Room title, subject, subject
author and configuration

Feature requests:
  * support per-vhost configuration
  * log chatroom configuration changes

How to apply:
  Copy mod_muc-logpatch.diff to the directory 'ejabberd/src/'
  $ cd ejabberd/src/
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now ./configure, make and restart ejabberd.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: Quick way to disable all chatroom logging. Default: true
    false: no logs will be generated, even if the room owner activates it
    true: chatroom logs will be generated if the option is enabled by the owner


  access_log: To restrict which users are allowed to enable or disable chatroom
logging.
    Default: muc_admin. If you want to allow any chatroom owner, put: muc.

  outdir: Full path to the directory where html will be generated. Default:
"www/muc".
    Make sure the system user has write access on that dir.

  dirtype: Type of directory that will be created. Default: subdirs
    subdirs: creates subdirectories for year and month: 2004/12/23.html
    plain: the filename contains the full date, no subdirs: 2004-12-23.html

  cssfile: If HTMLs will use a custom CSS file or the embedded one. Default:
false
    false: HTMLs will include the standard CSS code
    "CSS-URL": the URL of the CSS file. Example:
"http://jabberser.org/custom.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {allow_room_log, true},
	     {access_log, muc},
	     {outdir, "/var/www/muclogs"},
	     {dirtype, plain},
	     {cssfile, false},
	     {access_admin, muc_admin}]},
Comment 16 Badlop 2006-01-03 02:49:44 MSK
Created an attachment (id=115) [details]
Adds chatroom logging (sixth revision, bis)

Small fix on CSS.
Comment 17 Badlop 2006-02-26 22:56:40 MSK
Created an attachment (id=132) [details]
Adds chatroom logging (seventh revision)

Patch that adds support for HTML MUC logging to ejabberd 1.0.0

Changes on Seventh revision - 26/Feb/2006
 * Fixed a bug that allowed a chatroom owner to bypass 'access_log' restriction

 * Improved 'Configuration' logging: label in bold, disabled options are
stroken
 * New feature: chatroom configuration changes are tracked and displayed

Feature requests:
 * support per-vhost configuration
 * log participants on top of log page
 * log participants roles and affiliation changes

How to apply:
  Copy mod_muc-logpatch.diff to the directory 'ejabberd/src/'
  $ cd ejabberd/src/
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now ./configure, make and restart ejabberd. You can optionally configure it.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: 
    Quick way to disable all chatroom logging
    Default: true
      false: no logs will be generated, even if the room owner activates it
      true: chatroom logs are generated if the option is enabled by the owner

  access_log: 
    Restricts which users are allowed to enable or disable chatroom logging
    Default: muc_admin
    If you want to allow any chatroom owner, put: muc

  outdir: Full path to the directory where html will be generated
    Default: "www/muc"
    Make sure the system user has write access on that dir

  dirtype: Type of directory that will be created
    Default: subdirs
      subdirs: creates subdirectories for year and month: 2004/12/23.html
      plain: the filename contains the full date, no subdirs: 2004-12-23.html

  cssfile: 
    If HTMLs will use a custom CSS file or the embedded one
    Default: false
      false: HTMLs will include the standard CSS code
      "CSS-URL": the URL of the CSS file. Example: "http://example.com/my.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {allow_room_log, true},
	     {access_log, muc},
	     {outdir, "/var/www/muclogs"},
	     {dirtype, plain},
	     {cssfile, false},
	     {access_admin, muc_admin}
  ]},
Comment 18 Badlop 2006-02-26 23:00:24 MSK
Created an attachment (id=133) [details]
Adds chatroom logging (seventh revision) SVN

Exactly the same patch, but against ejabberd SVN rev 511.
Comment 19 Badlop 2006-02-28 04:49:22 MSK
Created an attachment (id=134) [details]
Adds chatroom logging (eigth revision) 1.0.0

Patch that adds support for HTML MUC logging to ejabberd

Requires ejabberd 1.0.0

Changes on Eigth revision - 28/Feb/2006
 * Fixed a bug when URLs were separated by a newline character
 * The generated HTML is standard compliant: HTML 4.01 Transitional and CSS
 * Added page title
 * Timestamps are now self-referencing links
 * Improved chatroom config logging: more eye-candy

Feature requests:
 * support per-vhost configuration
 * log participants on top of log page
 * log participants roles and affiliation changes

How to apply:
  Copy mod_muc-logpatch.diff to the directory 'ejabberd/src/'
  $ cd ejabberd/src/
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now ./configure, make and restart ejabberd. You can optionally configure it.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: 
    Quick way to disable all chatroom logging
    Default: true
      false: no logs will be generated, even if the room owner activates it
      true: chatroom logs are generated if the option is enabled by the owner

  access_log: 
    Restricts which users are allowed to enable or disable chatroom logging
    Default: muc_admin
    If you want to allow any chatroom owner, put: muc

  outdir: Full path to the directory where html will be generated
    Default: "www/muc"
    Make sure the system user has write access on that dir

  dirtype: Type of directory that will be created
    Default: subdirs
      subdirs: creates subdirectories for year and month: 2004/12/23.html
      plain: the filename contains the full date, no subdirs: 2004-12-23.html

  cssfile: 
    If HTMLs will use a custom CSS file or the embedded one
    Default: false
      false: HTMLs will include the standard CSS code
      "CSS-URL": the URL of the CSS file. Example: "http://example.com/my.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {allow_room_log, true},
	     {access_log, muc},
	     {outdir, "/var/www/muclogs"},
	     {dirtype, plain},
	     {cssfile, false},
	     {access_admin, muc_admin}
  ]},
Comment 20 Badlop 2006-02-28 04:51:10 MSK
Created an attachment (id=135) [details]
Adds chatroom logging (eigth revision) SVN

Exactly the same patch, but built against ejabberd SVN rev 513.
Comment 21 Badlop 2006-03-01 04:32:59 MSK
Created an attachment (id=136) [details]
Adds chatroom logging (nine revision) 1.0.0

Patch that adds support for HTML MUC logging to ejabberd

Requires ejabberd 1.0.0

Changes on Nine revision - 1/Mar/2006
 * Supports per-vhost configuration
 * Added META header to HTML to indicate utf-8 encoding
 * More control over system messages with CSS
 * Strings are translatable (only on patch for SVN)
 * XHTML 1.0 Transitional compliant
 * Room title and JID are links to join the chatroom (using XMPP-IRI)
 * New option to specify wether to log timestamps local or GMT: timezone
 * Timezone used on timestampts is shown on the log files

How to apply:
  Copy mod_muc-logpatch.diff to the directory were you unpacked ejabberd 
  On that directory, execute:
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now go to the src/ subdir and execute: ./configure; make
  Don't forget to restart ejabberd. You can optionally configure on
ejabberd.cfg.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: 
    Disables all chatroom logging support
    Default: true
      false: no logs will be generated, even if the room configuration says so
      true: chatroom logs are generated if the option is enabled on the
chatroom

  access_log: 
    Restricts which users are allowed to enable or disable chatroom logging
    Default: muc_admin
    If you want to allow any chatroom owner put: muc

  outdir: Full path to the directory where html will be generated
    Default: "www/muc"
    Make sure the system user has write access on that dir

  dirtype: Type of directory that will be created
    Default: subdirs
      subdirs: creates subdirectories for year and month: 2004/12/23.html
      plain: the filename contains the full date, no subdirs: 2004-12-23.html

  timezone: What timezone should be used
    Default: local
      local: use local time, as reported to Erlang by the operating system
      universal: use GMT/UTC time

  cssfile: 
    If HTMLs will use a custom CSS file or the embedded one
    Default: false
      false: HTMLs will include the standard CSS code
      "CSS-URL": the URL of the CSS file. Example: "http://example.com/my.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {allow_room_log, true},
	     {access_log, muc},
	     {outdir, "/var/www/muclogs"},
	     {dirtype, plain},
	     {cssfile, false},
	     {access_admin, muc_admin}
  ]},

Feature requests:
 * In a non-anonymous room: replace nick names like badlop with <a
href="xmpp:badlop@example.net">badlop</a>
 * Log participants on top of log page
 * Log participants roles and affiliation changes
Comment 22 Badlop 2006-03-01 04:34:39 MSK
Created an attachment (id=137) [details]
Adds chatroom logging (nine revision) SVN

Exactly the same patch, but built against ejabberd SVN rev 513.
Comment 23 Badlop 2006-03-01 21:09:28 MSK
Created an attachment (id=138) [details]
Adds chatroom logging (ten revision) 1.0.0

Patch that adds support for HTML MUC logging to ejabberd 1.0.0

This revision is titled as "Definitive".
Subtitle: "You've come a long way, baby"

Changes on Ten revision - 1/Mar/2006
 * Customizable link of top right corner: top_link
 * New links on top: Previous day, Next day, Up
 * Subject on top is now 'htmlized'
 * Fixed room configuration logging
 * W3C images are shown on the bottom instead of text

Accumulated features:

 MUC:
 * Information provided on top of page: Room title, JID, subject author,
subject and configuration
 * Room title and JID are links to join the chatroom (using XMPP-IRI)
 * Subject and chatroom configuration changes are tracked and displayed
 * Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed,
including the reason when available
 * Timestamp includes seconds, providings are displayed  is displagranularity
of seconds

 HTML:
 * XHTML 1.0 Transitional and CSS compliant
 * Timestamps are self-referencing links
 * Links on top for quicker navigation: Previous day, Next day, Up
 * Extensive use of CSS for style definition
 * URLs on messages and subjects are converted to hyperlinks

 CUSTOMIZATION:
 * Supports per-vhost configuration
 * access_log: allow or prevent chatroom owners to modify chatroom logging
 * allow_room_log: enables or disables completely all MUC logging features
 * cssfile: specify an external CSS file
 * timezone: specify wether to log timestamps local or GMT
 * outdir: directory where output htmls wil be stored
 * dirtype:to select two different directory and file name behaviours
 * top_link: customizable link of top right corner
 * If MUC logging is disabled on the server, the room config form informs about
it

 WORLD:
 * All system strings are translatable as usual on ejabberd
 * Date format on page top can be localized (on the source code only)
 * Timezone used on timestampts is shown on the log files

How to apply:
  Copy mod_muc-logpatch.diff to the directory were you unpacked ejabberd 
  On that directory, execute:
  $ patch -p0 <mod_muc-logpatch.diff
    patching file mod_muc/Makefile.in
    patching file mod_muc/Makefile.win32
    patching file mod_muc/mod_muc.erl
    patching file mod_muc/mod_muc_log.erl
    patching file mod_muc/mod_muc_room.erl
  Now go to the src/ subdir and execute: ./configure; make
  Don't forget to restart ejabberd. You can optionally configure on
ejabberd.cfg.

Configuration options for mod_muc_log on ejabberd.cfg's modules section:

  allow_room_log: 
    Enables chatroom logging support
    Default: true
      true: chatroom logs are generated if the option is enabled on the
chatroom
      false: no logs will be generated, even if the room configuration says so

  access_log: 
    Restricts which users are allowed to enable or disable chatroom logging
    Default: muc_admin
    If you want to allow any chatroom owner put: muc

  outdir: Full path to the directory where html will be generated
    Default: "www/muc"
    Make sure the system user has write access on that dir

  dirtype: Type of directory that will be created
    Default: subdirs
      subdirs: creates subdirectories for year and month: 2004/12/23.html
      plain: the filename contains the full date, no subdirs: 2004-12-23.html

  timezone: What timezone should be used
    Default: local
      local: use local time, as reported to Erlang by the operating system
      universal: use GMT/UTC time

  top_link: Customizable link on top right corner with syntax: {"URL", "Text"}
    Default: {"/", "Home"}

  cssfile: 
    If HTMLs will use a custom CSS file or the embedded one
    Default: false
      false: HTMLs will include the standard CSS code
      "CSS-URL": the URL of the CSS file. Example: "http://example.com/my.css"

Example configuration:
  {mod_muc, [{access, muc},
	     {access_create, muc},
	     {access_admin, muc_admin},
	     {access_log, muc},
	     {allow_room_log, true},
	     {outdir, "/var/www/muclogs"},
	     {dirtype, plain},
	     {timezone, universal},
	     {top_link, {"http://www.jabber.ru", "Jabber.ru"}},
	     {cssfile, "http://example.com/my.css"}
  ]},

Feature requests:
 * In a non-anonymous room: replace nick names with <a
href="xmpp:romeo@example.net">Locke</a>
 * Log participants on top of log page
 * Log participants roles and affiliation changes
Comment 24 Badlop 2006-03-01 21:10:46 MSK
Created an attachment (id=139) [details]
Adds chatroom logging (ten revision) SVN

Exactly the same patch, but built against ejabberd SVN rev 513.
Comment 25 Alexey Shchepin 2006-03-14 07:29:42 MSK
Committed to SVN with a few modification, in particular mod_muc_log works as a
separate module now.