Display Users IP in Viewtopic

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Display Users IP in Viewtopic

Post 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 -->
Board rules! No PM support
Post Reply