Changeset

107:0e4e000e3de9

mod_muc_log_http: merge
author Thilo Cestonaro <thilo@cestona.ro>
date Tue, 08 Dec 2009 21:24:26 +0100
parents 105:cef943f0a551 (current diff) 106:f535306535f9 (diff)
children 108:4c2b35e3d979
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua mod_muc_log_http/muc_log_http/themes/default/components_body.html mod_muc_log_http/muc_log_http/themes/default/day_body.html mod_muc_log_http/muc_log_http/themes/default/day_presence_join.html mod_muc_log_http/muc_log_http/themes/default/day_presence_leave.html mod_muc_log_http/muc_log_http/themes/default/day_presence_statusChange.html mod_muc_log_http/muc_log_http/themes/default/days_body.html mod_muc_log_http/muc_log_http/themes/default/rooms_body.html
diffstat 8 files changed, 128 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Tue Dec 08 21:24:26 2009 +0100
@@ -38,7 +38,126 @@
 * Default templates for the html output.
 ]]--
 local html = {};
+<<<<<<< local
 local theme = "default";
+=======
+html.doc = [[<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
+<head>
+	<title>muc_log</title>
+</head>
+<script type="text/javascript"><!--
+function showHide(name) {
+	var eles = document.getElementsByName(name);
+	for (var i = 0; i < eles.length; i++) {
+		eles[i].style.display = eles[i].style.display != "none" ? "none" : "";
+	}
+}
+--></script>
+<style type="text/css">
+<!--
+.day { font: 12px Verdana; height: 17px; }
+.weekday { font: 10px Verdana; height: 17px; color: #FFFFFF; background-color: #000000; }
+.timestuff {color: #AAAAAA; text-decoration: none;}
+.muc_join {color: #009900; font-style: italic;}
+.muc_leave {color: #009900; font-style: italic;}
+.muc_statusChange {color: #009900; font-style: italic;}
+.muc_title {color: #BBBBBB; font-size: 32px;}
+.muc_titleChange {color: #009900; font-style: italic;}
+.muc_kick {color: #009900; font-style: italic;}
+.muc_bann {color: #009900; font-style: italic;}
+.muc_msg_nick {color: #0000AA;}
+.muc_msg_me {color: #0000AA;}
+.join_link {font-height: 9px;}
+//-->
+</style>
+<body>
+###BODY_STUFF###
+</body>
+<script><!--
+window.captureEvents(Event.RESIZE | Event.LOAD);
+window.onresize = resize;
+window.onload = load;
+function load(e) {
+	resize(e);
+}
+
+function resize(e) {
+	var ele = document.getElementById("main");
+	ele.style.height = window.innerHeight - ele.offsetTop - 25;
+	
+	var yearDivs = document.getElemetsByName("yearDiv");
+	if(yearDivs) {
+		for each (var year in yearDivs) {
+			year.style.width = window.innerWidth - year.style.padding;
+		}
+	}
+}
+
+--></script>
+</html>]];
+
+html.components = {};
+html.components.bit = [[<a href="###COMPONENT###/">###COMPONENT###</a><br />]]
+html.components.body = [[<h2>Available Multi-User Chats:</h2><hr /><p>
+###COMPONENTS_STUFF###
+</p><hr />]];
+
+html.rooms = {};
+html.rooms.bit = [[<a href="###ROOM###/">###ROOM###</a><br />]]
+html.rooms.body = [[<h2>Available rooms on ###COMPONENT###:</h2><hr /><p>
+###ROOMS_STUFF###
+</p><hr />]];
+
+html.days = {};
+html.days.bit = [[<a href="###BARE_DAY###/">###DAY###</a><br />]];
+html.days.body = [[<h2>Available days for ###JID###:</h2><hr /><div id="main" style="overflow: auto;">
+###DAYS_STUFF###
+</div><hr />]];
+
+html.day = {};
+html.day.title = [[Subject: <font class="muc_title">###TITLE###</font>]];
+html.day.time = [[<a name="###TIME###" href="####TIME###" class="timestuff">[###TIME###]</a> ]]; -- the one ####TIME### need to stay! it will evaluate to e.g. #09:10:56 which is an anker then
+html.day.presence = {};
+html.day.presence.join = [[<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_join"> *** ###NICK### has joined the room</font><br /></div>]];
+html.day.presence.leave = [[<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_leave"> *** ###NICK### has left the room</font><br /></div>]];
+html.day.presence.statusText = [[ and his status message is "###STATUS###"]];
+html.day.presence.statusChange = [[<div name="status" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_statusChange"> *** ###NICK### shows as "###SHOW###"###STATUS_STUFF###</font><br /></div>]];
+html.day.message = [[###TIME_STUFF###<font class="muc_msg_nick">&lt;###NICK###&gt;</font> ###MSG###<br />]];
+html.day.message_me = [[###TIME_STUFF###<font class="muc_msg_me">*###NICK### ###MSG###</font><br />]];
+html.day.titleChange = [[###TIME_STUFF###<font class="muc_titleChange"> *** ###NICK### changed the title to "###TITLE###"</font><br />]];
+html.day.reason = [[, the reason was "###REASON###"]]
+html.day.kick = [[###TIME_STUFF###<font class="muc_kick"> *** ###VICTIM### got kicked###REASON_STUFF###</font><br />]];
+html.day.bann = [[###TIME_STUFF###<font class="muc_bann"> *** ###VICTIM### got banned###REASON_STUFF###</font><br />]];
+html.day.day_link = [[<a href="../###DAY###/">###TEXT###</a>]]
+html.day.body = [[<h2>Logs for ###JID### on 20###YEAR###/###MONTH###/###DAY###</h2>
+<p>###TITLE_STUFF###</p>
+<font class="join_link"><a href="http://speeqe.com/room/###JID###/" target="_blank">Join room via speeqe.com</a></font><br />
+###PREVIOUS_LINK###   ###NEXT_LINK###<br />
+<input type="checkbox" onclick="showHide('joinLeave')" ###JOIN_CHECKED###/>show/hide joins and leaves</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="checkbox" onclick="showHide('status')" ###STATUS_CHECKED###/>show/hide status changes</button>
+<hr /><div id="main" style="overflow: auto;">
+###DAY_STUFF###
+</div><hr />
+]];
+
+-- Calendar stuff
+html.year = {};
+html.year.title = [[<center><font style="font: bold 16px Verdana;"><a name="###YEAR###">###YEAR###</a></font></center>]];
+
+html.month = {};
+html.month.header = [[<table rules="groups" cellpadding="5">
+<thead><tr><td colspan="7"><center><H2><font size="2" face="Verdana">###TITLE###</font></H2></center></td></tr></thead>
+<tbody style="border: solid black 1px;">
+<tr>
+###WEEKDAYS###</tr>
+]];
+html.month.weekDay = [[    <th class="weekday" valign="middle" align="center">###DAY###</th>]];
+html.month.emptyDay = [[    <td class="day">&nbsp;</td>]];
+html.month.day = [[    <td class="day" valign="middle" align="center">###DAY###</td>]];
+html.month.footer = [[</tbody></table>]];
+
+>>>>>>> other
 
 local function checkDatastorePathExists(node, host, today, create)
 	create = create or false;
--- a/mod_muc_log_http/muc_log_http/themes/default/components_body.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/components_body.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,3 +1,3 @@
-<h2>MUC hosts available on this server:</h2><hr /><p>
+<h2>Available Multi-User Chats:</h2><hr /><p>
 ###COMPONENTS_STUFF###
 </p><hr />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_body.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_body.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,8 +1,8 @@
-<h2>Logs of room ###JID### of 20###YEAR###/###MONTH###/###DAY###</h2>
+<h2>Logs for ###JID### on 20###YEAR###/###MONTH###/###DAY###</h2>
 <p>###TITLE_STUFF###</p>
-<font class="join_link"><a href="http://speeqe.com/room/###JID###/" target="_blank">Join room now via speeqe.com!</a></font><br />
+<font class="join_link"><a href="http://speeqe.com/room/###JID###/" target="_blank">Join room via speeqe.com</a></font><br />
 ###PREVIOUS_LINK###   ###NEXT_LINK###<br />
-<input type="checkbox" onclick="showHide('joinLeave')" ###JOIN_CHECKED###/>show/hide joins and Leaves</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="checkbox" onclick="showHide('joinLeave')" ###JOIN_CHECKED###/>show/hide joins and leaves</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <input type="checkbox" onclick="showHide('status')" ###STATUS_CHECKED###/>show/hide status changes</button>
 <hr /><div id="main" style="overflow: auto;">
 ###DAY_STUFF###
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_join.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_presence_join.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,1 +1,1 @@
-<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_join"> *** ###NICK### joins the room</font><br /></div>
\ No newline at end of file
+<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_join"> *** ###NICK### has joined the room</font><br /></div>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_leave.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_presence_leave.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,1 +1,1 @@
-<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_leave"> *** ###NICK### leaves the room</font><br /></div>
\ No newline at end of file
+<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_leave"> *** ###NICK### has left the room</font><br /></div>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_statusChange.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_presence_statusChange.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,1 +1,1 @@
-<div name="status" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_statusChange"> *** ###NICK### shows now as "###SHOW###"###STATUS_STUFF###</font><br /></div>
\ No newline at end of file
+<div name="status" style="display: ###SHOWHIDE###;">###TIME_STUFF###<font class="muc_statusChange"> *** ###NICK### shows as "###SHOW###"###STATUS_STUFF###</font><br /></div>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/days_body.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/days_body.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,3 +1,3 @@
-<h2>available logged days of room: ###JID###</h2><hr /><div id="main" style="overflow: auto;">
+<h2>Available days for ###JID###:</h2><hr /><div id="main" style="overflow: auto;">
 ###DAYS_STUFF###
 </div><hr />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/rooms_body.html	Tue Dec 08 21:12:40 2009 +0100
+++ b/mod_muc_log_http/muc_log_http/themes/default/rooms_body.html	Tue Dec 08 21:24:26 2009 +0100
@@ -1,3 +1,3 @@
-<h2>Rooms hosted on MUC host: ###COMPONENT###</h2><hr /><p>
+<h2>Available rooms on ###COMPONENT###:</h2><hr /><p>
 ###ROOMS_STUFF###
 </p><hr />
\ No newline at end of file