Jump to content

[SOLVED] Hyperlink IPs in Visitors Online


Recommended Posts

Hi,

 

I was wondering if anyone knows if it's possible to hyperlink the list of IP addresses in Visitors Online in the BO, so that I can link them to ip-tracker.org for instance and then just click the IP to see where the visitor is located.

 

Thanks in advance for any help,

 

Luke

Edited by Stroud Vaping (see edit history)
Link to comment
Share on other sites

in file:

modules/statslive/statslive.php

 

you've got there:

foreach ($visitors as $visitor)
				$this->html .= '<tr'.($irow++ % 2 ? ' class="alt_row"' : '').'>
					<td>'.$visitor['id_guest'].'</td>
					<td style="width: 80px;">'.long2ip($visitor['ip_address']).'</td>
					<td style="width: 100px;">'.substr($visitor['date_add'], 11).'</td>
					<td style="width: 200px;">'.(isset($visitor['page']) ? $visitor['page'] : $this->l('Undefined')).'</td>
					<td style="width: 200px;">'.(empty($visitor['http_referer']) ? $this->l('None') : parse_url($visitor['http_referer'], PHP_URL_HOST)).'</td>
				</tr>';
			$this->html .= '</table></div>';

add ahref with any page you want here:

<td style="width: 80px;">'.long2ip($visitor['ip_address']).'</td>

it should look like:

<td style="width: 80px;"><a href="somepage.com/?ip='.long2ip($visitor['ip_address']).'>'.long2ip($visitor['ip_address']).'</a></td>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...