Introducing "Custom_Rank" Addon for Cody Chat!
Take your Cody Chat site to the next level with the "Custom_Rank" addon! This powerful feature allows administrators to assign custom ranks and titles to users, adding a new layer of personalization and fun to the chat experience. Custom ranks are purely visual and do not grant any actual staff privileges or functionalities.
To ensure smooth functionality, a few adjustments need to be made to your Cody Chat files during or after installation. Here’s a step-by-step guide to get you started:
Required File Adjustments:
Open
chat_log.php
in thesystem/
directory:- Locate the following code snippet:boom_users.user_name, boom_users.user_color, boom_users.user_font, boom_users.user_rank, boom_users.bccolor, boom_users.user_sex, boom_users.user_age, boom_users.user_tumb, boom_users.user_cover, boom_users.country, boom_users.user_bot
- Replace it with:boom_users.custom_rank, boom_users.custom_rank_name, boom_users.user_name, boom_users.user_color, boom_users.user_font, boom_users.user_rank, boom_users.bccolor, boom_users.user_sex, boom_users.user_age, boom_users.user_tumb, boom_users.user_cover, boom_users.country, boom_users.user_bot
- Again, locate the same code snippet:boom_users.user_name, boom_users.user_color, boom_users.user_font, boom_users.user_rank, boom_users.bccolor, boom_users.user_sex, boom_users.user_age, boom_users.user_tumb, boom_users.user_cover, boom_users.country, boom_users.user_bot
- Replace it with:boom_users.custom_rank, boom_users.custom_rank_name, boom_users.user_name, boom_users.user_color, boom_users.user_font, boom_users.user_rank, boom_users.bccolor, boom_users.user_sex, boom_users.user_age, boom_users.user_tumb, boom_users.user_cover, boom_users.country, boom_users.user_bot
- Locate the following code snippet:
Open
function.php
in thesystem/
directory:Locate the following function:
function chatRank($user){global $data; if(isBot($user)){ return ''; }
Add a new line after the
if(isBot($user)){ return ''; }
line and insert the following code:if(!empty($user['custom_rank']) or !empty($user['custom_rank_name'])){return customRank($user, 'chat_rank'); }
The updated
chatRank
function should look like this:function chatRank($user){global $data; if(isBot($user)){ return ''; } if(!empty($user['custom_rank']) or !empty($user['custom_rank_name'])){ return customRank($user, 'chat_rank'); } $rank = systemRank($user['user_rank'], 'chat_rank'); if($rank != ''){ return $rank; } }
Locate the following function:
function proRanking($user, $type){if(isBot($user)){ return proRank($type, botRankTitle(), botRankIcon()); }
Add a new line after the
if(isBot($user)){ return proRank($type, botRankTitle(), botRankIcon()); }
line and insert the following code:else if(!empty($user['custom_rank']) or !empty($user['custom_rank_name'])){return customRankPro($user, $type); }
The updated
proRanking
function should look like this:function proRanking($user, $type){if(isBot($user)){ return proRank($type, botRankTitle(), botRankIcon()); } else if(!empty($user['custom_rank']) or !empty($user['custom_rank_name'])){ return customRankPro($user, $type); } else { switch($user['user_rank']){ case 0: case 1: case 2: case 8: case 9: case 10: case 11: return proRank($type, rankTitle($user['user_rank']), rankIcon($user['user_rank'])); default: return ''; } } }
Locate the following function:
function proRank($type, $txt, $icon){ return '<img src="default_images/rank/' . $icon . '" class="' . $type . '"/> ' . $txt; }
Add a new line after the
return '<img src="default_images/rank/' . $icon . '" class="' . $type . '"/> ' . $txt;
line and insert the following code:function customRank($list, $type){return '<img src="' . $list['custom_rank'] . '" class="' . $type . '" title="' . $list['custom_rank_name'] . '"/>'; } function customRankPro($list, $type){ return '<img src="' . $list['custom_rank'] . '" class="' . $type . '"/> ' . $list['custom_rank_name']; }
Locate the following function:
function getRankIcon($list, $type){if(isBot($list)){ return botRank($type); }
Add a new line after the
if(isBot($list)){ return botRank($type); }
line and insert the following code:else if(!empty($list['custom_rank']) or !empty($list['custom_rank_name'])){return customRank($list, $type); }
The updated
getRankIcon
function should look like this:function getRankIcon($list, $type){if(isBot($list)){ return botRank($type); } else if(!empty($list['custom_rank']) or !empty($list['custom_rank_name'])){ return customRank($list, $type); } else if(haveRole($list['user_role']) && !isStaff($list['user_rank'])){ return roomRank($list['user_role'], $type); } else { return systemRank($list['user_rank'], $type); } }
Open
user_list.php
in thesystem/panel
directory:- Locate the following code snippet:SELECT user_name, user_mobile, user_color, user_font, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex, user_age, user_cover, country,
- Replace it with:SELECT custom_rank, custom_rank_name, user_name, user_mobile, user_color, user_font, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex, user_age, user_cover, country,
- Again, locate the same code snippet:SELECT user_name, user_mobile, user_color, user_font, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex, user_age, user_cover, country,
- Replace it with:SELECT custom_rank, custom_rank_name, user_name, user_mobile, user_color, user_font, user_rank, user_dj, user_onair, user_join, user_tumb, user_status, user_sex, user_age, user_cover, country,
- Locate the following code snippet:
After making these adjustments, save all the files and upload them to your server via FTP to replace the old ones. Your "Custom_Rank" addon is now ready to use!
Features:
- Assign Custom Ranks: Easily give users fake ranks and create unique rank titles.
- Personalize User Experience: Enhance the chat experience by adding custom ranks that reflect user achievements or roles.
- Seamless Integration: Simple adjustments to existing Cody Chat files ensure a smooth integration of custom ranks.
Make your chat site more engaging and personalized with the "Custom_Rank" addon. Empower users with unique ranks and titles today!
Please Note: The custom ranks provided by this addon are purely visual and do not grant any actual staff privileges or functionalities.
PHP-compatibility | |
PHP7.4 PHP8.1 PHP8.2 | Fully compatible with 7.4,8.1 and 8.2 |
CodyChat Version | |
CodyChat3.6 | It has been tested directly with versions 3.6 and works without any problems. |
CodyChat3.7 | It has been tested directly with versions 3.7 and works without any problems. |
Custom_Rank
- Product Code: addon
- Availability: In Stock
-
26.00₼
Tags: Cody Chat, Custom Rank, Chat Addon, User Ranks, Chat Personalization, Visual Ranks, Custom Titles, Chat Enhancement