• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Hide Admin / Moderator IP Address

Hide Admin / Moderator IP Address 1.0.1

No permission to download
Compatible XF 1.x versions
1.5
License
Creative Commons license
No download is needed :)
___________________


This is how to hide IP address of Admin / Moderator's / Any other user that you pick (as long as you have defined specific user ID).
Well, it is not "hiding", actually it is overwriting their IP data in the database with a fake IP.

This modification needs file editing to core Xenforo files, which are located in :
Code:
/library/Xenforo/Visitor.php
/library/Xenforo/Model/Ip.php
Please make a backup copy of those filse before proceeding ;)

But please note :
  • The file changes will be overwritten if you upload new Xenforo files while upgrading the board.
  • Even when you undo the file edit, the fake IP data will not be replaced with the real IP. This is one-way replacement.
  • This mod does not replace IP data which was recorded before this mod is activated.
    So if you want to replace your old IP data, you have to run a SQL query such as this :
    Code:
    UPDATE xf_ip SET ip =  'cccc' WHERE user_id =1
    (cccc means 99.99.99.99, if you wonder)
~~~~~~~~~~~
First, you have to decide which fake IP do you want to use. 99.99.99.99, or 88.88.88.88 or something else.
Please note : i noticed that some IP such as 1.1.1.1 won't work, which means NULL will be recorded as the IP.
I don't know why that happens.
I picked 99.99.99.99 :D

Second, here goes the file editing, for example you want to set user ID 1, 22, 33 to have IP 99.99.99.99
Code:
/library/Xenforo/Visitor.php
Search for this :
PHP code is in
Code:
https://pastebin.com/unBYb3K0
Change into :
PHP code is in
Code:
https://pastebin.com/51F2aJUx
Code:
/library/Xenforo/Model/Ip.php
Search for this :
PHP code is in
Code:
https://pastebin.com/Z3puZdsF
Change into :
PHP code is in
Code:
https://pastebin.com/VeMEUjmM

(code to change IP by usergroup IDs can not change IP on user login log, so i decide to remove that particular code)
  • Tested on Xenforo 1.5.14
  • This modification is free, and you can use this code in your add on for free, just PM me first ;)

Donation can be sent to my BTC address :
Code:
1BCCqfw7kRQ3UY398BYMS3qAsrMMVbS819
Author
semprot
Downloads
54
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from semprot

Latest updates

  1. Hide IP by Usergroup

    Hide IP by usergroup (primary / secondary).
  2. Hide IP Everywhere

    Now just single file edit to hide IP everywhere (admin log, moderator log, online list, and...
  3. Hiding IP in Moderator Log

    There is a new file editing to hide IP in Moderator Log. :)

Latest reviews

Nice and simple! It works very nice, but hope to have an upgrade version with better way for running cron jobs.
semprot
semprot
Can you explain what task would you with cron job? :)