Alternatively if I can’t disable ipv6 showing, is there a way to better center the info so it can be read more easily?
ok, so we can hide the ip6, but getting the ip4 is harder i think.
I found this post relating to Cloudfare which tends to indicate that even an ip4 might be just a Cloudflare address, but I only spent 2 minutes reading though !!
https://wordpress.org/support/topic/real-ip-for-the-customers-cloudflare/
so to hide an IP6, try this (untested!)
add_filter ('bbp_get_author_ip', 'rew_hide_v6') ;
function rew_hide_v6 ($author_ip='') {
if ($strlen($author_ip)>20) $author_ip='' ;
return $author_ip ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Let me know if it works
Tried it out on our testsite and when I click on anything to do with comments it errors out.
There has been a critical error on this website.
apologies, try this
add_filter ('bbp_get_author_ip', 'rew_hide_v6') ;
function rew_hide_v6 ($author_ip='') {
if (strlen($author_ip)>20) $author_ip='' ;
return $author_ip ;
}
Well that didn’t blow it up, but it removed any reference to an IP address at all.
What if we try this a different way? Can we format the Ipv6 to not be centered and instead be left justified?
The thing is the moderators want to see the IPv6 to run it through spam sites.
ok so your first post said the exact opposite 🙂 ie they didn’t want to see the IP6
Did you read the cloudfare link that said they might not be seeing the real IP address, but rather a cloudfare server address? may or not be relevant.
The classes for that are
bbp-reply-ip
bbp-topic-ip
so should be
.bbp-reply-ip, .bbp-topic-ip{
text-align: left !important;
}
They don’t want to see ipv6, they want to see the IPv4 versions like the site used to present. Now it does a mixture of ipv4 and ipv6 and it’s hard to read the ipv6 as it spreads into the border of the post.
Sorry if I didn’t make that clear.
Sorry for being dense but how do I use the below to make the IPv6 address left justify?
.bbp-reply-ip, .bbp-topic-ip{
text-align: left !important;
}