[Pmwiki-users] Recording of IP-Addresses
Patrick R. Michaud
Sat Dec 11 09:27:15 CST 2004
On Sat, Dec 11, 2004 at 09:17:57AM -0500, Neil Herber wrote:
> > $_SERVER['REMOTE_ADDR'] = 'suppressed';
> >This will store 'suppressed' as the IP address for each edit instead
> >of the author's IP address. Of course, you can changed 'suppressed' to
> >be whatever string you want.
> This sounds like an easy way to handle both camps: people like me who
> always want the IP visible and those who don't even want it recorded (by
> PmWiki). Why not make recording and displaying the IP the default with this
> small entry commented out in sample-config.php for those who want to
> suppress IPs.
...except there's definitely more than two "camps" here:
- admins who want the IP always visible
- admins who don't want the IP recorded at all
- admins who want the IP recorded but not visible by default
and I can probably come up with still more.
And unless we're careful or clever, the "small entry" commented out in
sample-config.php isn't likely to be all that small. For example, if
we default the output of page revision in $DiffStartFmt to be
(html tags omitted here for clarity):
$DiffTime by $DiffAuthor [$DiffHost]
$DiffTime by $DiffAuthor from $DiffHost
then someone setting $_SERVER['REMOTE_ADDR']='suppressed' would probably
also want to get rid of that "[suppressed]" or "from suppressed" that will
appear in the output, so they have to set two variables, not one.
And what should happen if no author name was specified?
Currently $DiffAuthor is the IP address if no author was
supplied to the edit, but that makes
December 11, 2004 at 10:06 AM by 192.168.0.1 from 192.168.0.1
look funny. We could leave $DiffAuthor blank and get rid of
the "from", so that we end up with the following when no author is supplied
December 11, 2004 at 10:06 AM by 192.168.0.1
December 11, 2004 at 10:06 AM by Patrick Michaud 192.168.0.1
doesn't look quite right.
Which all leads me to think that perhaps PmWiki's original default --
displaying the IP address when no author name is given -- is the easiest
starting point. Admins who want to always display the IP address in
the history output simply redefine $DiffStartFmt; admins who want to
suppress recording of the IP address set $_SERVER['REMOTE_ADDR']
(and possibly redefine $DiffStartFmt); and admins who want the IP
address recorded but not displayed when an author name is provided
can leave things as is.
I'm not opposed to making changes at this point -- it's not a critical
setting and it's *all* customizable. I just want to have a reasonable
default that covers the majority of cases and then provide sufficient
pointers and examples for admins who want something different than
More information about the pmwiki-users