Можете считать меня параноиком, но не люблю я когда без моего ведома любой может поставить свою ссылку. Раньше это просто делалось из-за любви к другому ресурсу, теперь скорее из-за любви к баблу :)
Начнемс ковырять пока комменты, хотя еще есть несколько мест где тиснуть можно ссылку, не беспокойтесь, мы их все прикроем.
В комментах 3 места где может появится левая ссылка
1. Тело комментария.
2. Иконка www под комментарием.
3. Подпись юзера.
Делаем файлик redirect.php в корне сайта с таким содержимым
<?
foreach ($_GET as $url=>$a) {
$url = str_replace('http://','',$url);
$url = str_replace('_','.',$url);
header("Location: http://$url");
echo "<html><head><meta http-equiv='Refresh' content='0; URL=http://$url'></meta></head><body></body></html>";
print $url;
break;
}
?>
Далее лезем в файл www\class\rcxcomments.php и кромсаем по списку
Находим строки
if ($poster->getVar("url") != "") {
$www_image = "<a href='".$poster->getVar("url")."'><img src='".RCX_URL."/images/icons/www.gif' alt='"._VISITWEBSITE."' target='_blank' /></a>";
}
Меняем на
if ($poster->getVar("url") != "") {
$str = base64_encode($poster->getVar("url"));
$www_image = "<a href='/redirect.php?".$str."' target='_blank' /><img src='".RCX_URL."/images/icons/www.gif' alt='"._VISITWEBSITE."'></a>";
}
Находим строки
$subject = $this->getVar("subject");
$comment = $this->getVar("comment");
if ( ($poster->getVar("attachsig") == 1) && ($poster->getVar("user_sig") != "") ) {
$comment .= "--";
$comment .= $myts->makeTareaData4Show($poster->getVar("user_sig", "N"), 0, 1, 1);
}
$username = 'getVar("uid").'">'.$poster->getVar("uname").'';
showThread($color_num, $subject_image, $subject, $comment, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $username,
$rank['title'], $rank['image'], $avatar_image, $reg_date,
$posts, $user_from, $online_image, $profile_image, $pm_image, $email_image, $www_image, $icq_image, $aim_image, $yim_image, $msnm_image);
} else {
$subject = $this->getVar("subject");
$comment = $this->getVar("comment");
showThread($color_num, $subject_image, $subject, $comment, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $rcxConfig['anonymous']);
Меняем на
$subject = $this->getVar("subject");
$comment = $this->getVar("comment");
$rcx_url_arr = parse_url(RCX_URL);
$comment = preg_replace('#hrefs*=s*('|")http://(?!' . preg_quote($rcx_url_arr['host']) . ')([^"']*)('|")#iUse', "'href="/redirect.php?'.base64_encode('http://$2').'"'",
$comment);
if ( ($poster->getVar("attachsig") == 1) && ($poster->getVar("user_sig") != "") ) {
$comment .= "
<hr style=""border-style:" border-width:="" size=""0,5"" />
";
$comment .= $myts->makeTareaData4Show($poster->getVar("user_sig", "N"), 0, 0, 0);
}
$username = 'getVar("uid").'">'.$poster->getVar("uname").'';
showThread($color_num, $subject_image, $subject, $comment, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $username, $rank['title'], $rank['image'],
$avatar_image, $reg_date, $posts, $user_from, $online_image,
$profile_image, $pm_image, $email_image, $www_image, $icq_image, $aim_image, $yim_image, $msnm_image);
} else {
$subject = $this->getVar("subject");
$comment = $this->getVar("comment");
$rcx_url_arr = parse_url(RCX_URL);
$comment = preg_replace('#hrefs*=s*('|")http://(?!' . preg_quote($rcx_url_arr['host']) . ')([^"']*)('|")#iUse', "'href="/redirect.php?'.base64_encode('http://$2').'"'",
$comment);
showThread($color_num, $subject_image, $subject, $comment, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $rcxConfig['anonymous']);
Все сохраняем и в файле robots.txt делаем запись
Disallow: /redirect.php
P.S. Как вы видите, я не использую встроенные комментарии RUNCMS, это платный (7 баксов) скрипт, покупать тут yourcommentit.ru