IRCRehberi.Net- Türkiyenin En iyi IRC ve Genel Forum Sitesi

IRCRehberi.Net- Türkiyenin En iyi IRC ve Genel Forum Sitesi (https://www.ircrehberi.net/)
-   XenForo (https://www.ircrehberi.net/xenforo/)
-   -   XenForo Hide Admin / Moderator IP Address (https://www.ircrehberi.net/xenforo/72901-xenforo-hide-admin-moderator-ip-address.html)

Absent 07 Haziran 2021 10:52

XenForo Hide Admin / Moderator IP Address
 
Sayfanızda yer alan yöneticilerin İp adreslerini güvenlik amacıyla gizlemek isteriz ve bu düzenleme tamamen bu ihtiyacımızı karşılamak için yapılmıştır.

Yapılacak işlemler xenforo sistem dosyalarından "ip.php" dosyasını düzenlemek.

Adım Adım Bu işlemi yapalım.

Editör Programı yardımıyla Açın;


PHP- Kodu:

/library/Xenforo/Model/Ip.php
Bu Kısımı
;
PHP:
public function 
logIp($userId$contentType$contentId$action$ipAddress null$date null)
{
$ipAddress XenForo_Helper_Ip::getBinaryIp(null$ipAddress);
if (!
$ipAddress)
{
return 
0;
}

if (
$date === null)
{
$date XenForo_Application::$time;
}

$this->_getDb()->insert('xf_ip', array(
'user_id' => $userId,
'content_type' => $contentType,
'content_id' => $contentId,
'action' => $action,
'ip' => $ipAddress,
'log_date' => max(0$date)
));

return 
$this->_getDb()->lastInsertId();


Bununla Değiştirin;

PHP- Kodu:

public function logIp($userId$contentType$contentId$action$ipAddress null$date null)
{
if (
== $userId) {/* Semprot modification */
$ipAddress '99.99.99.99';
}

$ipAddress XenForo_Helper_Ip::getBinaryIp(null$ipAddress);
if (!
$ipAddress)
{
return 
0;
}

if (
$date === null)
{
$date XenForo_Application::$time;
}

$this->_getDb()->insert('xf_ip', array(
'user_id' => $userId,
'content_type' => $contentType,
'content_id' => $contentId,
'action' => $action,
'ip' => $ipAddress,
'log_date' => max(0$date)
));

return 
$this->_getDb()->lastInsertId();


Bu işlem Sadece Yöneticilerin İp adresini gizleyecektir.
Belirlemiş Olduğumuz başka Kullanıcılarında ip adresini gizlemek mümkün.
onun için Aşağıdaki Bölümle Değişim yapıyoruz;


PHP- Kodu:

public function logIp($userId$contentType$contentId$action$ipAddress null$date null)
{
if (
in_array($userId, array(122192391))) {/* Semprot modification */
$ipAddress '99.99.99.99';
}

$ipAddress XenForo_Helper_Ip::getBinaryIp(null$ipAddress);
if (!
$ipAddress)
{
return 
0;
}

if (
$date === null)
{
$date XenForo_Application::$time;
}

$this->_getDb()->insert('xf_ip', array(
'user_id' => $userId,
'content_type' => $contentType,
'content_id' => $contentId,
'action' => $action,
'ip' => $ipAddress,
'log_date' => max(0$date)
));

return 
$this->_getDb()->lastInsertId();
}
HTML:
(
$userId, array(122192391))
bölümünde yer alan "1,22,192,391" İD nolarını Değişmeniz Yeterlidir

================================================== ===
Bu işlemleri yaptığınızda var olan ip adreslerinin üzerine yazılmaz bunu güncellemeniz gerekmektedir. Bu işlem içinde PhpmyAdmin'e erişim sağlayıp

Bu Sorguyu Çalıştırmanız yeterlidir.
HTML:
UPDATE xf_ip SET ip = '99.99.99.99' WHERE user_id =1

Webmaster forumundan alıntıdır

Saruhan 07 Haziran 2021 17:55

Bilgilendirici konular için teşekkür ederim emeğine sağlık


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 16:53.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.

Copyright ©2019 - 2025 | IRCRehberi.Net