Giờ là 10:18 Chúc buổi sáng vui vẻ
Trang ChủDiễn ĐànThông Tin
Hãy nhanh tay Đăng Kí hoặc Đăng Nhập để trở thành thành viên chính thức của ๖ۣۜVina๖ۣۜMasTer๖ۣۜXtgem๖ۣۜCom๖ và cùng thảo luận!
HarryWillson * HarryWillson (Member) [Off]
* 20-09-2016

Đâ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
function 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 == '<small>' '<b>').'<s>' $user['name'] . '</s>'.($mod == '</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;
}
?>

Copy code

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:
include 'func.php';
Copy code

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']
Copy code

(Trong forum)
Thay bằng:
nick($res['user_id'])
Copy code

hầu như là thay from thành user_id và thêm hàm nick() ở trước và name thành id.

(0)
Đang Trực Tuyến
1 Khách Viếng Thăm
-->
Liên Minh VinaMasTer™
CodeBlogGer.Club - Nơi Chia Sẽ Code BlogGer
Anmie37.Cf - Trang Đọc Truyện OnLine, Thể Loại Truyện Phong Phú
VnMaster.Yn.Lt
Admin cần liên kết wap 2 sll ai textlink click vào đây để lh Admin
•©opyRight By: HarryWillSon™
•Timeload : 0.0003/Giây
•TimeOut : 0.1%

pacman, rainbows, and roller s