웹마스터 팁

게시물에서 댓글 이나 글에서

 

해당 작성자의 IP를 {$comment->getIpaddress()} 를 통해 보여주고 있다면

 

관리자를 제외하고 *.숫자.숫자.숫자 형식으로 보여주게 되는데 맨앞까지 특정 그룹에게도 보여주게 하려면

 

 

/modules/document/document.item.php

 

function getIpAddress() 를 찾아서

 

    function getIpAddress()
    {
        $logged_info = Context::get('logged_info');
        if($this->isGranted()||$logged_info->group_list[해당 그룹 번호])

        {
            return $this->get('ipaddress');
        }
        return '*' . strstr($this->get('ipaddress'), '.');
    }

와 같이 변경

 

/modules/comment/comment.item.php

 

function getIpAddress() 를 찾아서

 

    function getIpAddress()
    {
        $logged_info = Context::get('logged_info');
        if($this->isGranted()||$logged_info->group_list[해당 그룹 번호])

        {
            return $this->get('ipaddress');
        }

        return '*' . strstr($this->get('ipaddress'), '.');
    }

 

로 변경하면 해당 그룹에게도 IP를 전부다 보여주게 할수 있다.