SocialEngine 4: Add Clickable IP Info

This mod will change the showing of Members Statistics in APAndrew - SocialEngine

Installation is quite simple:

1. Open ../application/modules/User/views/scripts/admin-manage/stats.tpl
2.Find code:

<?php if( _ENGINE_ADMIN_NEUTER ): ?>
          <?php echo $this->translate('(hidden)') ?>
        <?php else: ?>
          <?php
            if (isset($this->user->creation_ip)) {
              $ipObj = new Engine_IP($this->user->creation_ip);
              echo $ipObj->toString();
            }
          ?>
        <?php endif ?>

3. Replace it with:

<?php if( _ENGINE_ADMIN_NEUTER ): ?>
          <?php echo $this->translate('(hidden)') ?>
        <?php else: ?>
          <a href="http://whois.domaintools.com/<?php
            $ipObj = new Engine_IP($this->user->creation_ip);
            echo $ipObj->toString();
          ?>" target="_blank" title="Click here for more info about this IP"><?php
            $ipObj = new Engine_IP($this->user->creation_ip);
            echo $ipObj->toString();
          ?></a>
        <?php endif ?>

4. Find code:

<?php if( _ENGINE_ADMIN_NEUTER ): ?>
          <?php echo $this->translate('(hidden)') ?>
        <?php elseif( $this->user->lastlogin_ip ): ?>
          <?php
            $ipObj = new Engine_IP($this->user->lastlogin_ip);
            echo $ipObj->toString();
          ?>
        <?php else: ?>
          <?php echo $this->translate('None') ?>
        <?php endif ?>

5. Replace it with:

 <?php if( _ENGINE_ADMIN_NEUTER ): ?>
          <?php echo $this->translate('(hidden)') ?>
        <?php elseif( $this->user->lastlogin_ip ): ?>
          <a href="http://whois.domaintools.com/<?php
            $ipObj = new Engine_IP($this->user->lastlogin_ip);
            echo $ipObj->toString();
          ?>" target="_blank" title="Click here for more info about this IP"><?php
            $ipObj = new Engine_IP($this->user->lastlogin_ip);
            echo $ipObj->toString();
          ?></a>
        <?php else: ?>
          <?php echo $this->translate('None') ?>
        <?php endif ?>
member stats
Looking for quality SocialEngine Hosting? Look no further than Arvixe Web Hosting!
Tags: , , , , , , , , , , , | Posted under SocialEngine | RSS 2.0

Author Spotlight

Andrew Cross

Hi, I'm Andrew. A am a 26, ICT Administrator which offers support to company's around the South Wales Area. I have created a few social sites for myself and other company's. So far 2 out of 3 have been successful using the powerful SocialEngine Script. I continue to try and help the community of SocialEngine by giving Support and Technical Help where possible.

Leave a Reply

Your email address will not be published. Required fields are marked *