diff -r b25d34fbc7ab -r e0787bb6285b includes/clientside/static/comments.js
--- a/includes/clientside/static/comments.js Sun Jan 20 22:34:02 2008 -0500
+++ b/includes/clientside/static/comments.js Mon Jan 21 10:09:48 2008 -0500
@@ -218,6 +218,16 @@
// Moderation: Delete post link
tplvars.MOD_DELETE_LINK='' + $lang.get('comment_btn_mod_delete') + '';
+ // Moderation: IP address link
+ if ( this_comment.have_ip )
+ {
+ tplvars.MOD_IP_LINK = '';
+ }
+ else
+ {
+ tplvars.MOD_IP_LINK = $lang.get('comment_btn_mod_ip_missing');
+ }
+
var tplbool = new Object();
tplbool.signature = ( this_comment.signature == '' ) ? false : true;
@@ -376,6 +386,13 @@
{
document.getElementById('comment_source_' + data.id).value = data.src;
}
+ if ( data.ip_addr )
+ {
+ var span = $('comment_ip_' + data.local_id).object;
+ if ( !span )
+ return false;
+ span.innerHTML = $lang.get('comment_msg_ip_address') + ' ' + data.ip_addr + '';
+ }
}
function approveComment(id)
@@ -480,6 +497,9 @@
// Moderation: Delete post link
tplvars.MOD_DELETE_LINK='' + $lang.get('comment_btn_mod_delete') + '';
+ // Moderation: IP address link
+ tplvars.MOD_IP_LINK = '';
+
var tplbool = new Object();
tplbool.signature = ( data.signature == '' ) ? false : true;
@@ -582,6 +602,22 @@
}
}
+function viewCommentIP(id, local_id)
+{
+ // set "loading" indicator on IP button
+ var span = $('comment_ip_' + local_id).object;
+ if ( !span )
+ return false;
+ span.innerHTML = '';
+
+ var parms = {
+ mode: 'view_ip',
+ id: id,
+ local_id: local_id
+ }
+ ajaxComments(parms);
+}
+
function htmlspecialchars(text)
{
text = text.replace(/