태터툴즈 고쳐쓰기 #8 - nofollow, whois 연결

별거 아닌 내용을 태터 수정 시리즈로 포스팅하려니 좀 뻘줌하지만 까먹지 않기 위하여..

댓글 부분만 약간 수정한건데 스패머들이 코멘트에 거는 링크를 검색순위 계산에 포함하지 않기위해 구글에서 새로 만든 rel="nofollow" 속성(관련링크)을 추가하고 리플러의 아이피를 클릭하면 new21.com의 IP 조회 페이지로 연결시키도록 수정.

   inc_function.php 파일 442 번째 줄의 아래 내용을 찾아서,
if ($homepage) $name = "<a href=\"$homepage\" target=\"_blank\">".str_tag_off($name)."</a>";
$body = nl2br(autolink(str_tag_off(" ".$body." ")));
if (return_authority() && $ip) $body .= " <font size=\"1\" face=\"tahoma\"> // $ip</font>";

   아래처럼 바꾼다
if ($homepage) $name = "<a href=\"$homepage\" rel=\"nofollow\" target=\"_blank\">".str_tag_off($name)."</a>";
$body = nl2br(autolink(str_tag_off(" ".$body." ")));
if (return_authority() && $ip) $body .= " <font size=\"1\" face=\"Tahoma\"><a href=\"http://new21.com/domain/whois.php?mode=whois&host=$ip\" target=\"_blank\">($ip)</a></font>";

구글이 하는 일이니 표준이 될 것 같기도 한데 그동안 여기저기 코멘트 달면서 조금씩이나마 구글 랭킹을 증가시켰던 짓은 이제 할 수 없게 되니 살짝 아쉽..;;
태그 :