Daily Lucky Numbers:
9
14
19
31
34
40

Recent posts

#11
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 12, 2025, 10:10:10 PM
I found a free up to date PHP library class for IP manipulation which we can try in this modification.
This is not fully tested & I have no idea if it converts the IP's to something close to the same location.
It would have to have currently known IP block locations stored in a file or accessed via an API (likely using Json objects).
I doubt it's any better than what was being used in v1.2 but you can try it out.

Failing that, I would have to find & put together code likely using free API's to get IP data which I don't have time to do at the moment.
My other projects are a priority & someone else has already been put on hold while I looked at this.
I do like a challenge but I just don't have the time to look into this any further at the moment.
Either way it does change the IP adequately, albeit apparently not to your standards due to geo location.

Perhaps the library I found will work for you, give it a try and let me know.
#12
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 12, 2025, 07:37:37 PM

I told you from the beginning that it's a bogus IP address.
There is no direct equivalent for all IPv6 to IPv4.

So what are you asking for now?
You want it to use a free API for a geo location query & then output a bogus IPv4 from that same geo location?

Why is this so important to you?

#13
Site Discussion / Re: IPV4
Last post by Duban Black - March 12, 2025, 03:09:16 PM
The mod installed without problem, in both javascript and php versions it shows an IP in ipv4 format, but it is not the correct equivalent of ipv6, it shows another country, another internet operator, another ISP, etc.
#14
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 12, 2025, 01:34:55 PM
I've attached version 1.2 which does do a single file edit to any template containing the file: "Display.template.php".
I didn't want to go that route because of the file parsing but using PHP mode it doesn't use any DOM manipulation.

If your theme is similar to the default SMF theme then the file parsing will pass.
#15
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 12, 2025, 12:52:28 PM
So does that mod work for you with its latest update?
#16
Site Discussion / Re: IPV4
Last post by Duban Black - March 12, 2025, 12:49:58 PM
In my forum it is forbidden to use VPN and my moderators verify the IPs so that they do not create accounts pretending to be other people.

What I needed was not to create a fake ipv4, but that the ipv6 is transformed into ipv4, but that the IP information itself is the same, I need an equivalent.
#17
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 12, 2025, 01:32:12 AM

Why are you bothering to run VPN tests on the bogus generated IPv4 addresses?
They're just what is visible for Admins on your forum & are not recorded in the database.
Also your regular users usually can't view any IP's except their own & I doubt they're going to run a check on what's visible.

To be honest, the IPv6 address likely doesn't bother people as this seems to be a pet peeve of yours.

Quote from: Duban Black on March 11, 2025, 08:49:52 PMuBOL: Generic cosmetic filtering stopped because no more DOM changes  css-generic.js:231
This appears to be a misdemeanor message from an add-on that you've loaded into your browser that you can ignore.

#18
Site Discussion / Re: IPV4
Last post by Duban Black - March 11, 2025, 08:49:52 PM
The installation works perfectly.

Yes, I think the javascript version is the best, because it is an aesthetic problem, I think it is good that internally the tracking works with the original data.

Visually now you can see the IP with IPV4 format, but I think there is an error with the conversion, because it shows me different data. I leave evidence:
2806:268:488:853:297d:d16:20de:feb

This is the generated IP
40.6.38.8

About the last thing you mention, I checked the browser inspector shows me this:
uBOL: Generic cosmetic filtering stopped because no more DOM changes  css-generic.js:231
I understand that it is just an output generated by the code and does not mean any error, I wanted to mention it anyway.

Thank you very much, you are the best
#19
Site Discussion / Re: IPV4
Last post by Chen Zhen - March 11, 2025, 04:35:08 PM
I used a global constant that only exists in PHP 8.2.27 or newer.
The attachment has a fix for your lower version of PHP.




Also note my reason for the PHP vs. JavaScript option...

I wanted to make the mod all hooks, negating the parsing of any SMF template files.
Due to the way SMF stores the IP in the $context array, the PHP option for this mod will render the IP tracking link invalid.
This can be dealt with using a single file edit to theme file(s) if necessary.

The JavaScript option will only change what is visible & will not effect the IP tracking link.
However, I can't be certain this will work for all themes due to the possible use of unique CSS classes (DOM identifiers/manipulation).
#20
Site Discussion / Re: IPV4
Last post by Duban Black - March 11, 2025, 11:37:45 AM
ok, I had no problems with the installation.

However when I select javascript I get this error:



When I select php I get this error:



In any case it does not allow me to see the post information.