Cách 1 mới chỉ fix dc ở say.php thôi nhé
Hôm nay mình hướng dẫn tiếp cách 2
mở /forum/includes/tema.php
tìm dòng
Mã:
$txt_tmp = str_replace("[/l]", "", $txt_tmp);
Thêm bên dưới
Mã:
$txt_tmp = preg_replace('#\[thank\](.*?)\[/thank\]#', '[Nội Dung Ẩn]', $txt_tmp);
tìm tiếp
Mã:
$txt_tmp = str_replace("\r\n", "
", $txt_tmp);
thêm bên dưới
Mã:
$txt_tmp = preg_replace('#\[thank\](.*?)\[/thank\]#', '[Nội Dung Ẩn]', $txt_tmp);
Lưu lại nhé
mở /forum/includes/post.php
Tìm dòng
Mã:
$text = functions::smileys($text, ($res['rights'] >= 1) ? 1 : 0);
Thêm bên dưới
Mã:
$checkthank = mysql_query('SELECT COUNT(*) FROM `forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $res['id'] . '" and `user` = "' . $res['user_id'] . '"');
$thankcheck = [url=http:if($thankcheck < 1 && $user_id != $res['user_id']) {
$text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '<div class="mainblok"><div class="phdr">Nội dung ẩn</div><div class="list1">Bạn vui lòng cảm ơn bài viết này để xem nội dung ẩn</div></div>', $text);
} else {
$text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '\1', $text);
}
Xong. Lưu lại nhé
Nguồn: GocMaster