Add a ranks to your forum automatically
4 posters
Page 1 of 1
Add a ranks to your forum automatically
:It works on all versions of the forum
_____________________________________
_____________________________________
Such as member rank in a profile
Every time a member's number of contributions increases, his rank increases
-------
With this trick you can do the same for your forum
The more contributions a forum has, the higher its rank
The more members the forum has, the greater the number of crowns
All this happens automatically ,
There are five ranks in the code
First rank: 1000 contributions
Normal forum ★
Second rank: 10,000 contributions
Active forum ★★
Third rank: 100,000 contributions
Very active forum ★★★
Fourth rank: 500,000 contributions
Very super active forum ★★★★
Fifth rank: 1,000,000 contributions
An active and legendary forum ★★★★★
----------------------------------------------
+
The code was created to place a crown image for every 1,000 registered members,
If your forum has 3,000 members, the number of crowns will be three
Every time 1000 members register, the number of crowns increases.
One crown for every 1000 members
----------------------------------------------
First rank: 1000 contributions
Normal forum ★
Second rank: 10,000 contributions
Active forum ★★
Third rank: 100,000 contributions
Very active forum ★★★
Fourth rank: 500,000 contributions
Very super active forum ★★★★
Fifth rank: 1,000,000 contributions
An active and legendary forum ★★★★★
----------------------------------------------
+
The code was created to place a crown image for every 1,000 registered members,
If your forum has 3,000 members, the number of crowns will be three
Every time 1000 members register, the number of crowns increases.
One crown for every 1000 members
----------------------------------------------
Installing the JavaScript
__________________________________________________________________________
Title * : as you like
Placement : In all the pages or In the home page
- Code:
(function() {
$(document).ready(function(){
var ranktop = parseInt($(".USERS-Forum-rank-stsr strong").text());
var starsCount = Math.floor(ranktop / 1000);
var starsHTML = '';
for (var i = 0; i < starsCount; i++) {
starsHTML += '<span style="color: #E91E63 !important;font-size: 20px !important;"><img src="https://i.servimg.com/u/f20/16/85/77/67/images10.png" /></span>';
}
$(".USERS-Forum-rank").append(starsHTML);
});
$(document).ready(function(){
var rangtopt = parseInt($(".post-Forum-rank-stsr strong").text());
var starsHTML = '';
if (rangtopt >= 1000) {
starsHTML = '<span style="color: yellow !important;font-size: 20px !important;">Normal forum ★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 10000) {
starsHTML = '<span style="color: #000 !important;font-size: 20px !important;">Active forum ★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 100000) {
starsHTML = '<span style="color: red !important;font-size: 20px !important;">Very active forum ★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 500000) {
starsHTML = '<span style="color: red !important;font-size: 20px !important;">Very super active forum ★★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 1000000) {
starsHTML = '<span style="color: green !important;font-size: 20px !important;">An active and legendary forum ★★★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
});
document.write('<style type="text/css">.USERS-Forum-rank-stsr,.post-Forum-rank-stsr {
font-size: 0;
}
.USERS-Forum-rank img {
width: 70px;
}
.post-Forum-rank-ا2 {
text-align: center;
padding: 5px;
color: #020202;
background: #ffffff;
border: solid #00000047 1px;
}
.USERS-Forum-rank-ا2 {
width: fit-content;
padding: 7px;
color: #020202;
background: #fff;
border: solid #00000047 1px;
border-bottom: 0;
border-radius: 22px 22px 0px 0px;
} </style>');
// by: كونان2000
//Using artificial intelligence
})();
Modification of index_body template
__________________________________________________________________________
Go to Administration Panel > Display > Templates > General > and open the template index_body
Add this to the Beginning of the template :
- Code:
<div align="center">
<div class="USERS-Forum-rank-ا2">
<div class="USERS-Forum-rank"></div>
</div>
<div class="post-Forum-rank-ا2">
<div class="post-Forum-rank"></div>
</div>
<!-- BEGIN disable_viewonline -->
<div class="USERS-Forum-rank-stsr">{TOTAL_USERS}</div>
<div class="post-Forum-rank-stsr">{TOTAL_POSTS}</div>
<!-- END disable_viewonline -->
</div>
-----------------------------------------------------------------------
Making an adjustment to the number of ranks and contributions
- click here:
If you want to change the names of the ranks and change the number of contributions to the rank
You can do this by editing the following parts of the code- Code:
if (rangtopt >= 1000) {
starsHTML = '<span style="color: yellow !important;font-size: 20px !important;">Normal forum ★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 10000) {
starsHTML = '<span style="color: #000 !important;font-size: 20px !important;">Active forum ★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 100000) {
starsHTML = '<span style="color: red !important;font-size: 20px !important;">Very active forum ★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 500000) {
starsHTML = '<span style="color: red !important;font-size: 20px !important;">Very super active forum ★★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
if (rangtopt >= 1000000) {
starsHTML = '<span style="color: green !important;font-size: 20px !important;">An active and legendary forum ★★★★★</span>';
$(".post-Forum-rank").html(starsHTML);
}
You can also add more ranks as you wish
By adding a new part to the code- Code:
if (rangtopt >= 1000) {
starsHTML = '<span style="color: yellow !important;font-size: 20px !important;">Normal forum ★</span>';
$(".post-Forum-rank").html(starsHTML);
}
Make an adjustment to the number of members
- click here:
You can change crown images and change the number of registered members to get one crown
By changing the following part in the code- Code:
$(document).ready(function(){
var ranktop = parseInt($(".USERS-Forum-rank-stsr strong").text());
var starsCount = Math.floor(ranktop / 1000);
var starsHTML = '';
for (var i = 0; i < starsCount; i++) {
starsHTML += '<span style="color: #E91E63 !important;font-size: 20px !important;"><img src="https://i.servimg.com/u/f20/16/85/77/67/images10.png" /></span>';
}
$(".USERS-Forum-rank").append(starsHTML);
});
According to your desire
Last edited by كونان2000 on March 28th 2024, 2:14 am; edited 2 times in total
skouliki, SarkZKalie, TonnyKamper, poesia-verses and S@MeH like this post
Re: Add a ranks to your forum automatically
Nice contribution! Nice idea! I like it!
كونان2000 and S@MeH like this post
Re: Add a ranks to your forum automatically
Thanks Obscure ^^Obscure wrote:Nice contribution! Nice idea! I like it!
I'm glad you liked it (●'◡'●)
S@MeH likes this post
Re: Add a ranks to your forum automatically
Hi can this be used on all versions of our forums ?
If now then you must state this in your first post.
If now then you must state this in your first post.
كونان2000 and S@MeH like this post
Re: Add a ranks to your forum automatically
hi ApeApe wrote:Hi can this be used on all versions of our forums ?
If now then you must state this in your first post.
Yes, it works on all versions of the forum
My first post has been edited
Ape, SLGray and S@MeH like this post
TonnyKamper likes this post
Similar topics
» Automatically Change Ranks?
» the forum logs me out automatically
» Register on a forum automatically?
» Post in one forum, and move it automatically to another
» forum access denied automatically
» the forum logs me out automatically
» Register on a forum automatically?
» Post in one forum, and move it automatically to another
» forum access denied automatically
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum