XenForo Hide Admin

[XFB] Konu Bilgileri

Konu Hakkında Merhaba, tarihinde Xenforo kategorisinde root tarafından oluşturulan XenForo Hide Admin başlıklı konuyu okuyorsunuz. Bu konu şimdiye dek 22 kez görüntülenmiş, 0 yorum ve 0 tepki puanı almıştır...
Kategori Adı Xenforo
Konu Başlığı XenForo Hide Admin
Konbuyu başlatan root
Başlangıç tarihi
Cevaplar
Görüntüleme
İlk mesaj tepki puanı
Son Mesaj Yazan root
Kayıtlı
1 Yıl 4 Ay
Katılım
6 Şub 2024
Konular
0
Mesajlar
272
Rep
0
Tepkime puanı
0
Yaş
25
Konum
bayram.moon
Sayfanızda Yer alan Yöneticilerin İp adreslerini Güvenlik Amacıyla Gizlemek isteriz zaman zaman 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;

Kod:
/library/Xenforo/Model/Ip.php

Bu Kısımı;


Kod:
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;
Kod:
public function logIp($userId, $contentType, $contentId, $action, $ipAddress = null, $date = null)
{
if (1 == $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;

Kod:
public function logIp($userId, $contentType, $contentId, $action, $ipAddress = null, $date = null)
{
if (in_array($userId, array(1, 22, 192, 391))) {/* 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();
}

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.

SQL:
UPDATE xf_ip SET ip = '99.99.99.99' WHERE user_id =1
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Üst