[SNIPPET] Replace WHOIS with IPHub lookup

Mixed forum with phpBB code snippets
Guides and styles

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

Replace WHOIS with IPHub lookup

We have the WHOIS lookup popup in the viewonline section. It doesnt really give us any good info.
By replacing it with a lookup from IPHub, we can see if a proxy is used and country.

One tiny edit.

Open: styles/prosilver/template/viewonline_body.html

Find:

Code: Select all

{user_row.U_WHOIS}
Replace with:

Code: Select all

https://iphub.info/?ip={{ user_row.USER_IP }}
Save, upload and purge cache.


The result when clicking the WHOIS link in the viewonline page:
iphub.png
You do not have the required permissions to view the files attached to this post.

[SNIPPET] Replace WHOIS with IPHub lookup

Post by SpIdErPiGgY »

I like https://ipinfo.io

Code: Select all

<a href="https://ipinfo.io/{{ user_row.USER_IP }}" onclick="popup(this.href, 950, 500); return false;">

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

I've had a look at that one too. Its neat and display country.
Also doesnt need a big popup so saves space.

[SNIPPET] Replace WHOIS with IPHub lookup

Post by deninho32 »

This works really well. However, when I click the "i" button above a post and then click on the IP address, I still see the old screen showing the Amsterdam IP address.
Would it be possible to implement this improvement there as well?

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

Not that I know of.
But should be possible to do with mcgirrs ip in topic ext.

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

@deninho32
Try this https://www.phpbb.com/customise/db/exte ... viewtopic/

It has a popup with info built in

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

Btw, its this version you should use https://www.phpbb.com/customise/db/exte ... 51#p847851

[SNIPPET] Replace WHOIS with IPHub lookup

Post by deninho32 »

I have used that one before, not what I desired, but it's a useful work around, thanks for reminding me.

[SNIPPET] Replace WHOIS with IPHub lookup

Post by Stoker »

The one you are talking about is MCP, correct?
Cant do anything about that.

But you can adapt mcgirrs to display the poup from iphub instead.
Use this in the template instead:

Code: Select all

{% if postrow.POSTER_IP_VISIBLE %}
	<dd class="profile-posts"><strong>{{ lang('IP') }}{{ lang('COLON') }}</strong> <a href="https://iphub.info/?ip={{ postrow.POSTER_IP }}" onclick="popup(this.href, 750, 600); return false;">{{ postrow.POSTER_IP }}</a></dd>
{% endif %}

[SNIPPET] Replace WHOIS with IPHub lookup

Post by deninho32 »

That's perfect, thanks for that!