•  » Extensions
  •  » version 2 of the 'ip_location' plugin

#1 2026-05-25 09:58:10

Charles69
Member
2025-10-22
46

version 2 of the 'ip_location' plugin

Hello,

A new feature has been added to the plugin, following an excellent suggestion from Katryne: the optional ability to add a 'Visits' item to the main bar, displaying site visits by country over a selected period.

https://i.ibb.co/d0cys2bz/2026-05-25-09h56-31.png

This naturally raises the question: 'What constitutes a visit?'
Is it someone accessing the site 5,000 times in one night? No
Is it someone who immediately requests photos created in 2024 with the tag 'Landscape'? No
Is it someone who immediately requests a calendar? No.
All of these visits are bots.

Here is the arbitrary definition of what constitutes a credible 'visit'.
"Each access to an album and/or a photo is counted as a visit, provided there was a connection to the site's homepage within approximately half an hour."

If the number of stored accesses is insufficient for this calculation, hovering over the indicator (orange triangle) displays the period used for calculating visits. To achieve this, you need to increase the value of the 'automatic clear' count.

A filter allowing you to list accesses for an 'IP address starting with' has been added to the Access Log.

You can find it here: [extension by Charles69] IP Location

Last edited by Charles69 (2026-05-26 11:12:10)

Offline

 

#2 2026-05-25 15:54:14

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14098

Re: version 2 of the 'ip_location' plugin

Hi Charles69

I understand the feature and I find it perfectly interesting. What I don't understand is:

1) why a custom design, unrelated to the Piwigo design?

2) why is it in the gallery and not in the administration? (is it on purpose because you want visitors to see this stats?)

Offline

 

#3 2026-05-25 20:05:44

Charles69
Member
2025-10-22
46

Re: version 2 of the 'ip_location' plugin

Hi plg,

plg wrote:

why a custom design, unrelated to the Piwigo design?

Can you explain to me why this doesn’t comply with the Piwigo design? Is it the colour? The country icons?
Katryne and I agreed that the coloured country flags effectively conveyed the message.

plg wrote:

why is it in the gallery and not in the administration? (is it on purpose because you want visitors to see this stats?)

Yes, it is deliberately displayed in the gallery. But it’s a plugin option; the administrator can choose whether to display it or not

This stats table isn’t the plugin’s primary purpose; originally, it was just a tool to track the origin of traffic to Piwigo following an increase in bot activity.
I noticed that 95% of bot traffic came from the US, which is why I added the option to block access by country, and one thing led to another, so I added IP blocking.

Looking at the log details, you’ll find URLs that make no sense, are constructed randomly and are strung together incoherently.
Hence the idea of identifying, by process of elimination, URLs with a credible human origin, and displaying them.

Offline

 

#4 2026-05-25 20:25:03

Katryne
Member
Provence, France
2016-12-03
612

Re: version 2 of the 'ip_location' plugin

As for the style, if I understand your question correctly, Pierrick, the very latest version pf the plugin includes CSS selectors for customizing the style; the webmasters can add them into LFE or integrate them more permanently into their theme. I have not yet studied further what the CSS selectors correspond to, since this plugin version is 1 or 2 hours old. I just know that all style adjustments are now possible.

Last edited by Katryne (2026-05-25 20:25:40)


https://album.chauvigne.info/ v.16.4  PHP: 8.4.23
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 
  •  » Extensions
  •  » version 2 of the 'ip_location' plugin

Board footer

Powered by FluxBB