Show commenter IP address to admins (Drupal 7 / AdaptiveTheme) Once upon a time, with an older version of AdaptiveTheme, I got this to work by patching templates/comment.tpl.php.  The patch I was looking looked something like:

-      print t('Submitted by !username on !datetime',
-      array('!username' =&gt; $author, '!datetime' =&gt; '&lt;time datetime="' . $datetime . '"&gt;' . $created . '&lt;/time&gt;'));
+      if ( function_exists('user_access') &amp;&amp; user_access('administer site configuration') ) {
+          $authorstring = 'Submitted by !username on !datetime from !hostname';
+      }
+      else {
+          $authorstring = 'Submitted by !username on !datetime';
+      }
+      print t($authorstring,
+      array('!username' =&gt; $author, '!datetime' =&gt; '&lt;time datetime="' . $datetime . '"&gt;' . $created . '&lt;/time&gt;', '!hostname' =&gt; $comment-&gt;hostname));


That was for a much older version of AdaptiveTheme (7.x-1.x, I think).

Thanks to hints from Laryn, I now have a working patch that does what I need.  Here it is:


From 8c064aca6e2fd35da411473c5e50ce471d30d3cf Mon Sep 17 00:00:00 2001
From: Zed Pobre 
Date: Tue, 4 Nov 2014 02:54:21 -0500
Subject: [PATCH] Administrators see submitter IP addresses in comments

---
 at_core/inc/preprocess.inc |   24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/at_core/inc/preprocess.inc b/at_core/inc/preprocess.inc
index ef50fda..ba9b45e 100755
--- a/at_core/inc/preprocess.inc
+++ b/at_core/inc/preprocess.inc
@@ -832,13 +832,23 @@ function adaptivetheme_preprocess_comment(&$vars) {

   $vars['datetime'] = format_date($vars['comment']->created, 'custom', 'Y-m-d\TH:i:s\Z'); // Generate the timestamp, PHP "c" format is wrong

-  $vars['submitted'] = t('Submitted by !username on !datetime',
-    array(
-      '!username' => $vars['author'],
-      '!datetime' => '' . $vars['created'] . '',
-    )
-  );
-
+  if ( function_exists('user_access') && user_access('administer site configuration') ) {
+    $vars['submitted'] = t('Submitted by !username on !datetime from !ipaddress',
+                           array(
+                             '!username' => $vars['author'],
+                             '!datetime' => '' . $vars['created'] . '',
+                             '!ipaddress' => ip_address(),
+                                )
+                          );
+  }
+  else {
+    $vars['submitted'] = t('Submitted by !username on !datetime',
+                           array(
+                             '!username' => $vars['author'],
+                             '!datetime' => '' . $vars['created'] . '',
+                                )
+                          );
+  }
   // Unpublished?
   $vars['unpublished'] = ''; // Initialize for backwards compatibility
   if ($vars['status'] === 'comment-unpublished') {
--
1.7.10.4
It looks like you're adding your code within the adaptivetheme_preprocess_node function but you should be working within the adaptivetheme_preprocess_comment function (a little further down the page).

Specifically the following could be modified with your code above as a starting point (starting at line 835 in preprocess.inc for AdaptiveTheme 3.2):

  $vars['submitted'] = t('Submitted by !username on !datetime',
array(
  '!username' =&gt; $vars['author'],
  '!datetime' =&gt; '&lt;time datetime="' . $vars['datetime'] . '" pubdate="pubdate"&gt;' . $vars['created'] . '&lt;/time&gt;',
)
);