Just try to replace
Code: Select all
$user_cache[$poster_id]['ip']
Code: Select all
$row['poster_ip']
Code: Select all
$user_cache[$poster_id]['ip']
Code: Select all
$row['poster_ip']
The DNS Stuff lookup is very limited as you really need an account with them to get unlimited lookups. Is there another site that uses this type of query that we can substitute with in the code?Philthy wrote:If you want to do an IP lookup, this simple tweak will help:maddog1077 wrote:Great mod, easy to install too. Is there any plan to expand the functionality, for example if you click on the IP it can give you information like all users that have posted/registered under that IP?
Either way its an excellent tool, thanks again!
In viewtopic_body.html
FindAnd replace with:Code: Select all
{postrow.POSTER_IP}
I am assuming that you have already modded this file with this code for the mod:Code: Select all
<a href="http://www.dnsstuff.com/tools/whois.ch?ip={postrow.POSTER_IP}">{postrow.POSTER_IP}</a>
Code: Select all
<!-- IF postrow.POSTER_IP --><dd><strong>{L_IP}:</strong> {postrow.POSTER_IP}</dd><!-- ENDIF -->
I tried this so that users could only see their own IP but mods and admins could see all the IPs but now I can't see any IPs -even my own don't show up -whereas with the original line of code in viewtopic I could see all IPs.Sure. Try the following code in viewtopic.php instead of default MOD code
Code: Select all
'POSTER_IP' => (($auth->acl_get('a_') || $auth->acl_get('m_') || ($user->ip == $user_cache[$poster_id]['ip'])) && $user->data['is_registered']) ? $user_cache[$poster_id]['ip'] : '',
This is theoretically possible but will complicate the MOD code and add more SQL queries at viewtopic.dvancouver wrote:can you also make it so only admin can see mods and that mods cannot see other mods ips?
Ok I understand completely what you are saying it's just I am able to do this in IPB and thought it might be just as easy in phpbb. Maybe just have mods when they post insert into the database private instead of their ip #, is that a doable solution?rxu wrote:This is theoretically possible but will complicate the MOD code and add more SQL queries at viewtopic.dvancouver wrote:can you also make it so only admin can see mods and that mods cannot see other mods ips?
Code: Select all
<!-- IF postrow.POSTER_IP --><dd><strong>IP:</strong> {postrow.POSTER_IP}</dd><!-- ENDIF -->
Code: Select all
<!-- IF postrow.POSTER_IP and U_ACP --><dd><strong>IP:</strong> {postrow.POSTER_IP}</dd><!-- ENDIF -->