IP-address in topic for phpBB3

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
datkeoniguy
Registered User
Posts: 150
Joined: Sat Jan 24, 2004 8:11 pm

Re: IP-address in topic for phpBB3

Post by datkeoniguy »

I had this working before but now, perhaps after the upgrade, the IP addresses no longer show. I'm not sure what happened.

I have done this:

Code: Select all

FIND
'post_edit_user'	=> $row['post_edit_user'],

Code: Select all

ADD AFTER
'poster_ip'			=> $row['poster_ip'],
AND

Code: Select all

FIND
'POSTER_ID'			=> $poster_id,
ADD AFTER

Code: Select all

'POSTER_IP'         => (($auth->acl_get('a_') || $auth->acl_get('m_') || $user->data['user_id'] == $poster_id) && $user->data['is_registered']) ? $row['poster_ip'] : '',
Do I need to also do the following? Sorry, I'm confused with so many changes in all the posts that makes it hard to follow.

Code: Select all

FIND
      'poster_ip'         => $row['poster_ip'],

Code: Select all

REPLACE WITH
      'poster_ip'         => ($row['user_type'] == USER_FOUNDER) ? '' : $row['poster_ip'],
I want moderators and admin to see all IPs and users to see only their own.
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

datkeoniguy
Did you apply template changes to the styles you're using?
datkeoniguy
Registered User
Posts: 150
Joined: Sat Jan 24, 2004 8:11 pm

Re: IP-address in topic for phpBB3

Post by datkeoniguy »

yes that made the difference. i had done that before but I guess I missed something in the upgrade.

One last question and sorry to be such a bother but what does the part below do? Only prevent the founder's IP from showing to anyone?

Code: Select all

FIND
          'poster_ip'         => $row['poster_ip'],

Code: Select all

Select all
    REPLACE WITH
          'poster_ip'         => ($row['user_type'] == USER_FOUNDER) ? '' : $row['poster_ip'],
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

datkeoniguy wrote:One last question and sorry to be such a bother
It's ok :)
datkeoniguy wrote:what does the part below do? Only prevent the founder's IP from showing to anyone?
Yes.
stye
Registered User
Posts: 22
Joined: Tue May 13, 2008 1:12 am

Re: IP-address in topic for phpBB3

Post by stye »

how to install this there is no installation guide plz guide me

thanxz
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

This is MODX format, so xml file is the installation instruction. Just point your browser on it.
mr.beery
Registered User
Posts: 51
Joined: Fri Oct 28, 2005 1:30 pm
Location: Bangkok , Thailand
Contact:

Re: IP-address in topic for phpBB3

Post by mr.beery »

I installed this mod on phpbb3.01 it work fine for administrators and moderators.

I want to show ip address in public or registered user can see all ip address in topic, how can i do this?

Can ip address to show in 127.0.0.x or 61.61.61.xx ? For guest and registered user can see in 127.0.0.x but Admin can see in full ip address 127.0.0.1 or 61.61.61.61

Thank you, regards
Last edited by mr.beery on Thu Jul 10, 2008 7:27 am, edited 2 times in total.
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

If you want all of registered users to see IP address, try to use the following code instead of the stock one in viewtopic.php

Code: Select all

		'POSTER_IP'			=> ($user->data['is_registered']) ? $row['poster_ip'] : '',
mr.beery wrote:Can ip address to show in 127.0.0.xxx ?
It shows address that is in database, so if it's 127.0.0.x, it will be shown as well :)
mr.beery
Registered User
Posts: 51
Joined: Fri Oct 28, 2005 1:30 pm
Location: Bangkok , Thailand
Contact:

Re: IP-address in topic for phpBB3

Post by mr.beery »

rxu wrote:If you want all of registered users to see IP address, try to use the following code instead of the stock one in viewtopic.php

Code: Select all

		'POSTER_IP'			=> ($user->data['is_registered']) ? $row['poster_ip'] : '',
mr.beery wrote:Can ip address to show in 127.0.0.xxx ?
It shows address that is in database, so if it's 127.0.0.x, it will be shown as well :)
Thank for you code , it work .
but i need to censor ip only last number.
if my ip is 127.0.0.1 i want that ip show in topic in 127.0.0.x
and admin or mod can see full ip in 127.0.0.1
wg83
Registered User
Posts: 32
Joined: Thu Apr 24, 2008 5:57 pm

Re: IP-address in topic for phpBB3

Post by wg83 »

nice mod, works great
Deploat
Registered User
Posts: 2
Joined: Wed Jun 18, 2008 8:59 am
Location: place of the Russians

Re: IP-address in topic for phpBB3

Post by Deploat »

I have made other changes of template

Code: Select all

OPEN: styles/prosilver/template/viewtopic_body.html

FIND
	<h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->>

ADD BEFORE
	<!-- IF postrow.POSTER_IP --><div class="ip_title">{L_IP}: <strong>{postrow.POSTER_IP}</strong></div><!-- ENDIF -->

Code: Select all

OPEN: styles/prosilver/theme/content.css

ADD TO END

div.ip_title {
	float: right;
	padding: 4px 20px;
}
patchouly
Registered User
Posts: 82
Joined: Wed Jul 09, 2008 4:26 pm

Re: IP-address in topic for phpBB3

Post by patchouly »

I've installed this mod, but the IP address is not showing up. I tried deleting the cached file, refreshing the template cache and the site cache, but still nothing.

All the XML file said to do was to add the line:

Code: Select all

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

Code: Select all

<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
And that's what I did.

That section in my viewtopic_body.html now reads:

Code: Select all

<span class="postdetails">
<!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
<!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
<!-- IF postrow.POSTER_IP --><br /><b>{L_IP}:</b> {postrow.POSTER_IP}<!-- ENDIF -->
<!-- IF postrow.S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
<br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
					<!-- ENDIF -->
What am I doing wrong?
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

Did you apply the template changes for the style you're currently using?
danswano
Registered User
Posts: 273
Joined: Sun Apr 06, 2008 10:43 pm

Re: IP-address in topic for phpBB3

Post by danswano »

I have in the team, Admins, globals mods and mods.
Admins and global mods can see the IP Address but how i will make the new mod created group see the ip too ? :?
rxu
Extensions Development Team
Posts: 3364
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: IP-address in topic for phpBB3

Post by rxu »

Regrettably, there's no special permission for this MOD for users or groups. Nevertheless, if you set "Can view post details" permission to "Yes" for your new group, you can try the following code:

Code: Select all

OPEN
viewtopic.php

FIND
		'POSTER_IP'			=> (($auth->acl_get('a_') || $auth->acl_get('m_')) && $user->data['is_registered']) ? $row['poster_ip'] : '',

REPLACE WITH
		'POSTER_IP'			=> ($auth->acl_get('m_info') && $user->data['is_registered']) ? $row['poster_ip'] : '',
Locked

Return to “[3.0.x] MOD Database Releases”