Hi guys, Im using reputation bar by @ange tuteur and its a great code btw thanks for sharing this great code/script ange & other people who contribute for that code.
what i want here ...
1. it is possible to make the green bar becomes red bar when it comes to minus points? with the same level from the green bar. anyone can help me how to do the code things for this? See the example pic below for the red bar minus reputation
and the last.. if this too much please skip this
2. it is possible to change the description of the green bar per level.
Example : the green bars description showing Reputation 1 ( Next : 1/500 ) , can we just change the description to like this : Reputation 1 ( +Username+ has starting to become famous now ) Or see the pic below for the example
Note : the bar reputation code by ange is little bit from mine, im using the code from luffy to suit the FAE template. Here's the code
what i want here ...
1. it is possible to make the green bar becomes red bar when it comes to minus points? with the same level from the green bar. anyone can help me how to do the code things for this? See the example pic below for the red bar minus reputation
- Spoiler:
and the last.. if this too much please skip this
2. it is possible to change the description of the green bar per level.
Example : the green bars description showing Reputation 1 ( Next : 1/500 ) , can we just change the description to like this : Reputation 1 ( +Username+ has starting to become famous now ) Or see the pic below for the example
- Spoiler:
Note : the bar reputation code by ange is little bit from mine, im using the code from luffy to suit the FAE template. Here's the code
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Reputation',
repStyle : 'block',
repImage : 'https://i.servimg.com/u/f57/18/21/41/30/star12.png'
};
var repLv = {
lv1 : 1,
lv2 : 500,
lv3 : 750,
lv4 : 1000,
lv5 : 3000,
lv6 : 5000,
lv7 : 7500,
lv8 : 9000,
lv9 : 10000,
lv10 : 15000
};
if (settings.repStyle.toLowerCase() == 'block') { var repBlock = '<span id="rLv" class="repuBlock">' }
else if (settings.repStyle.toLowerCase() == 'image') { var repBlock = '<img id="rLv" src="'+settings.repImage+'"/>' }
else { var repBlock = '<span id="rLv" class="repuBlock">' }
var ver = { phpbb2 : version.toLowerCase() == 'phpbb2', phpbb3 : version.toLowerCase() == 'phpbb3', punbb : version.toLowerCase() == 'punbb', invision : version.toLowerCase() == 'invision' };
var reg = new RegExp('.*'+settings.repName+'\\s+:\\s+(\\d+).*');
if (ver.phpbb3 || ver.punbb || ver.invision) {
if (ver.phpbb3 || ver.invision) { var profSel = '.postprofile'; var addRepu = $(this).find('dt').append('<div id="repu">'); }
else if (ver.punbb) { var profSel = '.user'; var addRepu = $(this).find('.user-ident').prepend('<div id="repu">'); }
$(profSel).each(function() {
var rep = Number($(this).text().replace(reg,'$1'));
addRepu;
if (rep >= repLv.lv1) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2 }
if (rep >= repLv.lv2) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3 }
if (rep >= repLv.lv3) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4 }
if (rep >= repLv.lv4) {$(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5 }
if (rep >= repLv.lv5) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6 }
if (rep >= repLv.lv6) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7 }
if (rep >= repLv.lv7) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8 }
if (rep >= repLv.lv8) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv9 }
if (rep >= repLv.lv9) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv10 }
if (rep >= repLv.lv10) { $(this).find('#repu').append(repBlock); var next = 'MAX' }
$(this).find('#repu').attr('title','Reputation ' + $(this).find('#rLv').length + '\nNext: (' + next + ')');
});
}
else if (ver.phpbb2) {
$('td .postdetails.poster-profile').each(function() {
var rep = Number($(this).text().replace(reg,'$1'));
$(this).parent().find('.name').next().after('<div id="repu">');
if (rep >= repLv.lv1) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2 }
if (rep >= repLv.lv2) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3 }
if (rep >= repLv.lv3) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4 }
if (rep >= repLv.lv4) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5 }
if (rep >= repLv.lv5) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6 }
if (rep >= repLv.lv6) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7 }
if (rep >= repLv.lv7) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8 }
if (rep >= repLv.lv8) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv9 }
if (rep >= repLv.lv9) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv10 }
if (rep >= repLv.lv10) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv11 }
if (rep >= repLv.lv11) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv12 }
if (rep >= repLv.lv12) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv13 }
if (rep >= repLv.lv13) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv14 }
if (rep >= repLv.lv14) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv15 }
if (rep >= repLv.lv15) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv16 }
if (rep >= repLv.lv16) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv17 }
if (rep >= repLv.lv17) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv18 }
if (rep >= repLv.lv18) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv19 }
if (rep >= repLv.lv19) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv20 }
if (rep >= repLv.lv20) { $(this).parent().find('#repu').append(repBlock); var next = 'MAX' }
$(this).parent().find('#repu').attr('title','Reputation level ' + $(this).parent().find('#rLv').length + '\nNext : (' + next + ')');
});
}
});
Last edited by ArmorKiller on December 10th 2018, 5:38 pm; edited 1 time in total