Help Hỏi về cách tắt lưu IP của xenforo

minhdat

Corporal
Tham gia
18/11/2015
Bài viết
153
Được Like
94
bạn vô user option có mục ip đấy, sửa thời gian lưu ip từ 365 ngày thành 15 hay 30 ngày thôi
 
  • Like
Reactions: THB

Luong

Private
Tham gia
05/11/2015
Bài viết
11
Được Like
9
đơn giản thôi mà :) cần ko tui chỉ
 

Luong

Private
Tham gia
05/11/2015
Bài viết
11
Được Like
9
mở file này: library\XenForo\Model\Ip.php
tìm và xóa đoạn
PHP:
xong
 
Sửa lần cuối:

Trung Skyer

Corporal
Tham gia
23/10/2015
Bài viết
154
Được Like
57
mở file này: library\XenForo\Model\Ip.php
tìm và xóa đoạn
PHP:
        $this->_getDb()->insert('xf_ip', array(
            'user_id' => $userId,
            'content_type' => $contentType,
            'content_id' => $contentId,
            'action' => $action,
            'ip' => $ipAddress,
            'log_date' => max(0, $date)
        ));
xong
Thế là nó không lưu IP nữa hả bác ?
Nếu em chỉ muốn lưu ip của member và không lưu ip của superadmin ,admin và mod thì sao ?
 
  • Like
Reactions: THB

Luong

Private
Tham gia
05/11/2015
Bài viết
11
Được Like
9
vậy thì đừng xóa đoạn đó mà thay thành:

PHP:
        if ($this->_getDb()->fetchRow('
            SELECT moderator.*, user.username
            FROM xf_moderator AS moderator
            INNER JOIN xf_user AS user ON (user.user_id = moderator.user_id)
            WHERE moderator.user_id = ?
        ', $userId)==''){
        $this->_getDb()->insert('xf_ip', array(
            'user_id' => $userId,
            'content_type' => $contentType,
            'content_id' => $contentId,
            'action' => $action,
            'ip' => $ipAddress,
            'log_date' => max(0, $date)
        ));}
 
Sửa lần cuối:

Trung Skyer

Corporal
Tham gia
23/10/2015
Bài viết
154
Được Like
57
vậy thì đừng xóa đoạn đó mà thay thành:

PHP:
        if ($this->_getDb()->fetchRow('
            SELECT moderator.*, user.username
            FROM xf_moderator AS moderator
            INNER JOIN xf_user AS user ON (user.user_id = moderator.user_id)
            WHERE moderator.user_id = ?
        ', $userId)==''){
        $this->_getDb()->insert('xf_ip', array(
            'user_id' => $userId,
            'content_type' => $contentType,
            'content_id' => $contentId,
            'action' => $action,
            'ip' => $ipAddress,
            'log_date' => max(0, $date)
        ));}
Cám ơn bạn . để mình thử
 

Trung Skyer

Corporal
Tham gia
23/10/2015
Bài viết
154
Được Like
57
vậy thì đừng xóa đoạn đó mà thay thành:

PHP:
        if ($this->_getDb()->fetchRow('
            SELECT moderator.*, user.username
            FROM xf_moderator AS moderator
            INNER JOIN xf_user AS user ON (user.user_id = moderator.user_id)
            WHERE moderator.user_id = ?
        ', $userId)==''){
        $this->_getDb()->insert('xf_ip', array(
            'user_id' => $userId,
            'content_type' => $contentType,
            'content_id' => $contentId,
            'action' => $action,
            'ip' => $ipAddress,
            'log_date' => max(0, $date)
        ));}
Nó vẫn lưu thím à . Xem trong http://domain.xxx/online/ vẫn có IP
 

Luong

Private
Tham gia
05/11/2015
Bài viết
11
Được Like
9
Nó vẫn lưu thím à . Xem trong http://domain.xxx/online/ vẫn có IP
cái đó là ip đang online, còn lưu là trong table xf_ip, khi nó lưu thì mọi thông hoạt động của user đều ghi nhật ký ip.
còn muốn không hiện ở /online/ đó thì vào template online_list, tìm và xóa:
Mã:
<a href="{xen:if '{$user.user_id}', {xen:link online/user-ip, $user}, {xen:link online/guest-ip, '', 'ip={$user.ipHex}'}}" class="OverlayTrigger ip"><span>{xen:helper ip, $user.ip}</span></a>

đó là xóa toàn bộ, muốn chỉ xóa ở admin hoặc mod thì ko xóa mà thay code thành
Mã:
<xen:if>...hỏi nữa thì nói :)</xen:if>[CODE]
 
Sửa lần cuối:
  • Like
Reactions: THB

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom