Help Cần hướng dẫn mod màu nick thành viên cho johncms

khanhsak3r

khanhsak3r

Active Member
Có ai còn nghịch cái này ko xin đc chỉ giáo và toàn bộ thể loại mod nếu đc
 
Tạo thêm cột ncolor vào user
Rùi vào nick muốn đổi màu - edit cái chức vụ - rùi tìm cột ncolor ghi vào màu nick chức vụ
Xong ra chỗ mún hiện <font color="'.$lay['ncolor'].'">Username</font>
 
Tạo thêm cột ncolor vào user
Rùi vào nick muốn đổi màu - edit cái chức vụ - rùi tìm cột ncolor ghi vào màu nick chức vụ
Xong ra chỗ mún hiện <font color="'.$lay['ncolor'].'">Username</font>
Chi tiết hơn đc ko bro :3
 
Đây là hàm (function) hiển thị nick thành viên cho JohnCMS bao gồm:
+Màu nick
+Nick bị band
Các bạn tạo file mang tên func.php (Nếu chưa có thì tạo) rồi dán code sau vào:
PHP:
<?phpfunction nick($id, $mod = false) {$ban = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `user_id` = '" . $id . "' AND `ban_time` > '" . time() . "'"), 0);$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '" . $id . "'"));if($ban > 0) {$out .= '<font color="black">'.($mod == 1 ? '<small>' : '<b>').'<s>' . $user['name'] . '</s>'.($mod == 1 ? '</small>' : '</b>').'</font>';} else {if($user['rights'] > 1) {if($user['rights'] == 3) {$font = '<font color="green">';}if($user['rights'] > 3) {$font = '<font color="red">';}if($user['rights'] == 6) {$font = '<font color="#993399">';}if($user['rights'] == 7) {$font = '<font color="gold">';}if($user['rights'] == 9) {$font = '<font color="red">';}if($user['rights'] == 10) {$font = '<font color="#7192a8">';}$out .= ''.$font.'' . $user['name'] . '</font>';} else {$out .= '<font color="blue">' . $user['name'] . '</font>';}}return $out;}
?>
Các bạn up func.php lên thư mục incfiles
Tiếp theo mở file incfiles/core.php và dán đoạn sau vào dưới cùng:
PHP:
include 'func.php';
Xong!
Hướng dẫn sử dụng trước khi dùng:
Các bạn sẽ phải chỉnh sửa forum/file index.php, function.php
Cách dùng:
Tìm
$res['from']
(Trong forum)
Thay bằng:
nick($res['user_id'])
hầu như là thay from thành user_id và thêm hàm nick() ở trước và name thành id.
Nguồn: NhanhNao
 
Đây là hàm (function) hiển thị nick thành viên cho JohnCMS bao gồm:
+Màu nick
+Nick bị band
Các bạn tạo file mang tên func.php (Nếu chưa có thì tạo) rồi dán code sau vào:
PHP:
<?phpfunction nick($id, $mod = false) {$ban = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `user_id` = '" . $id . "' AND `ban_time` > '" . time() . "'"), 0);$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '" . $id . "'"));if($ban > 0) {$out .= '<font color="black">'.($mod == 1 ? '<small>' : '<b>').'<s>' . $user['name'] . '</s>'.($mod == 1 ? '</small>' : '</b>').'</font>';} else {if($user['rights'] > 1) {if($user['rights'] == 3) {$font = '<font color="green">';}if($user['rights'] > 3) {$font = '<font color="red">';}if($user['rights'] == 6) {$font = '<font color="#993399">';}if($user['rights'] == 7) {$font = '<font color="gold">';}if($user['rights'] == 9) {$font = '<font color="red">';}if($user['rights'] == 10) {$font = '<font color="#7192a8">';}$out .= ''.$font.'' . $user['name'] . '</font>';} else {$out .= '<font color="blue">' . $user['name'] . '</font>';}}return $out;}
?>
Các bạn up func.php lên thư mục incfiles
Tiếp theo mở file incfiles/core.php và dán đoạn sau vào dưới cùng:
PHP:
include 'func.php';
Xong!
Hướng dẫn sử dụng trước khi dùng:
Các bạn sẽ phải chỉnh sửa forum/file index.php, function.php
Cách dùng:
Tìm
$res['from']
(Trong forum)
Thay bằng:
nick($res['user_id'])
hầu như là thay from thành user_id và thêm hàm nick() ở trước và name thành id.
Nguồn: NhanhNao
Cái này mình xem rồi nhưng vẫn chịu thôi, file funtions thì sửa như nào?
 

Facebook Comments

Similar threads

yoona
Replies
5
Views
5K
AdminAdmin is verified member.
Admin
C
Replies
3
Views
2K
thethems
T
V
Replies
13
Views
2K
I
Back
Top