Page 1 of 1

Display Users IP in Viewtopic

Posted: 26 Jul 2011, 20:10
by Stoker
Display Users IP in Viewtopic
Written by rxu

Shows posters' IP addresses in topic for administrators and moderators.

Open viewtopic.php
Find:

Code: Select all

'post_edit_user'	 => $row['post_edit_user'],
After add:

Code: Select all

'poster_ip'			=> $row['poster_ip'],
Find:

Code: Select all

'POSTER_ID'			 => $poster_id,
After add:

Code: Select all

'POSTER_IP'			=> (($auth->acl_get('a_') || $auth->acl_get('m_')) && $user->data['is_registered']) ? $row['poster_ip'] : '',
Open styles/prosilver/template/viewtopic_body.html
Find:

Code: Select all

<!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
After add:

Code: Select all

<!-- IF postrow.POSTER_IP --><dd><strong>{L_IP}:</strong> {postrow.POSTER_IP}</dd><!-- ENDIF -->
Open styles/subsilver2/template/viewtopic_body.html
Find:

Code: Select all

<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
After add:

Code: Select all

<!-- IF postrow.POSTER_IP --><br /><b>{L_IP}:</b> {postrow.POSTER_IP}<!-- ENDIF -->