2016-05-08, 12:51
Description:
This tutorial will improve the functionalities of default reputation box and add ranks based on post numbers.
Installation steps:
1º - Javascript
Add the following code to the Javascript:
Placement: In Topics
Explanation: [ic]if(rep>=1&&rep<10)[/ic] // means if user have less than 10 reputation points they will have Newbie rank.
[ic] if(rep>=10&&rep<30){$(this).find('.title').text('\nGetting used to fame')}[/ic] If user have less than 30 reputation points they will have "getting used to fame' rank.
You are free to edit for your needs.
IMPORTANT change [ic]Reputation[/ic] and [ic]Reputation: 0[/ic] field to your language if it's not on English
Preview:
This tutorial will improve the functionalities of default reputation box and add ranks based on post numbers.
Installation steps:
1º - Javascript
Add the following code to the Javascript:
Placement: In Topics
- Code:
[panda=js]jQuery(document).ready(function(){
jQuery('.user-info .post_field:contains("Reputation")').attr('style','background-color: #dff0d8;
border-radius: 3px;
color: #3c763d;
display: block;
font-weight: 700;
margin: 0 auto 5px;
max-width: 123px;
padding: 3px 8px;
text-align: center;');
jQuery(document).ready(function(){
jQuery('.user-info .post_field:contains("Reputation: 0")').attr('style','background-color: rgb(222, 222, 222);
border-radius: 3px;
color: #6e6e6e;
display: block;
font-weight: 700;
margin: 0 auto 5px;
max-width: 123px;
padding: 3px 8px;
text-align: center;');
});
$('.user-info .post_field:contains("Reputation")').each(function(){var rep=$(this).text().match(/\d+/g);$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep==0){$(this).find('.title').text('\nNeutral')}
if(rep>=1&&rep<10){$(this).find('.title').text('\nNewbie')}
if(rep>=10&&rep<30){$(this).find('.title').text('\nGetting used to fame')}
if(rep>=30&&rep<50){$(this).find('.title').text('\nBrilliant future')}
if(rep>=50&&rep<100){$(this).find('.title').text('\nEveryone admire you')}
if(rep>=100&&rep<200){$(this).find('.title').text('\nHonored elite ')}
if(rep>=200){$(this).find('.title').text('\nBeyond famous')}})});
Explanation: [ic]if(rep>=1&&rep<10)[/ic] // means if user have less than 10 reputation points they will have Newbie rank.
[ic] if(rep>=10&&rep<30){$(this).find('.title').text('\nGetting used to fame')}[/ic] If user have less than 30 reputation points they will have "getting used to fame' rank.
You are free to edit for your needs.
IMPORTANT change [ic]Reputation[/ic] and [ic]Reputation: 0[/ic] field to your language if it's not on English
Preview: