Old school Swatch Watches
» » » [Share] Mod bình luận nhanh cho JohnCMS 5x
Bạn phải để Bình luận
30-08-2016#
admin offline * LeYTi (Sáng Lập!)
Level MAX  Like 0
Xu 0  TN 0
VnMaster

Mod bình luận trả lời nhanh cho JohnCMS 5x

Cái này fix lỗi cho 1 số phiên bản trước xài được nhưng đến 4.5.1 thì xài bị lỗi.
Thực ra cũng không thay đổi mấy

Mở forum/index.php tìm: (có 2 cái. Thay cái thứ 2 nhé)
if (($user_id && !$type1['edit'] && !$set_forum['upfp'] && $set['mod_forum'] != 3) || ($rights >= 7 && !$set_forum['upfp'])) {
echo '<div class="gmenu"><form name="form2" action="index.php?act=say&amp;id='. $id . '" method="post">';
if ($set_forum['farea']) {
$token = mt_rand(1000, 100000);
$_SESSION['token'] = $token;
echo '<p>';
if (!$is_mobile)
echo bbcode::auto_bb('form2', 'msg');
echo '<textarea rows="' . $set_user['field_h'] . '" name="msg"></textarea><br/></p>' .
'<p><input type="checkbox" name="addfiles" value="1" /> ' .$lng_forum['add_file'];
if ($set_user['translit'])
echo '<br /><input type="checkbox" name="msgtrans" value="1" /> ' .$lng['translit'];
echo'</p><p><input type="submit" name="submit" value="' . $lng['write'] . '" style="width: 107px; cursor: pointer;"/> ' .
($set_forum['preview'] ? '<input type="submit" value="' . $lng['preview'] . '" style="width: 107px; cursor: pointer;"/>' : '') .
'<input type="hidden" name="token" value="' . $token . '"/>' .
'</p></form></div>';
} else {
echo '<p><input type="submit" name="submit" value="' . $lng['write'] . '"/></p></form></div>';
}
}

Copy code

Thay tất cả thành:
if ($user_id) {
echo '<div class="gmenu"><form name="form2" action="index.php?act=say&amp;id='. $id . '" method="post">';

$token = mt_rand(1000, 100000);
$_SESSION['token'] = $token;
echo '<p>';
if (!$is_mobile)
echo bbcode::auto_bb('form2', 'msg');
echo '<textarea rows="' . $set_user['field_h'] . '" name="msg"></textarea><br/></p>' .
'<p><input type="checkbox" name="addfiles" value="1" /> ' .$lng_forum['add_file'];
if ($set_user['translit'])
echo '<br /><input type="checkbox" name="msgtrans" value="1" /> ' .$lng['translit'];
echo'</p><p><input type="submit" name="submit" value="' . $lng['write'] . '" style="width: 107px; cursor: pointer;"/> ' .
($set_forum['preview'] ? '<input type="submit" value="' . $lng['preview'] . '" style="width: 107px; cursor: pointer;"/>' : '') .
'<input type="hidden" name="token" value="' . $token . '"/>' .
'</p></form></div>';
} else {
echo 'Bạn cần <a href="/login.php">đăng nhập</a> để bình luận';
}

Copy code

Xong!!!
Tốt nhất nên include tránh lỗi :v
Tổng số 1 bình luận
Chia sẻ bài viết: Sắp xếp:
Liên kết:
BBcode:
Tìm kiếm
Online
» Có 0 thành viên1 khách đang trực tuyến.
Stats
TOP
Facebook - Thanks to XTgem™ Sitemap - Nội quy
© 2015-2017 VnMaster.Yn.Lt
-->