Posted Sun Apr 09, 2017 11:00 pm
Administration Panel → Modules → HTML & Javascript → Javascript codes management
Name: Reputation Style IPB
Placement: In the Topics
Punbb
- Code:
$(document).ready(function() {
$(".pun .post .user").each(function(){
$(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
});
$('.user-info .post_field:contains("Reputation")').each(function() {
var rep = $(this).text().match(/\d+/g);
$(this).addClass('reputation');
$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep == 0) {
$(this).find('.title').text('Neutral');
$(this).addClass('zero');
}
else if(rep >= 1 && rep < 5) {
$(this).find('.title').text('Member');
}
else if(rep >= 5 && rep < 10) {
$(this).find('.title').text('Active Member');
}
else if(rep >= 10) {
$(this).find('.title').text('Excellent');
}
});
});
Phpbb3
- Code:
$(document).ready(function() {
$(".postprofile dl").each(function(){
$(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
});
$('.postprofile dl .post_field:contains("Reputation")').each(function() {
var rep = $(this).text().match(/\d+/g);
$(this).addClass('reputation');
$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep == 0) {
$(this).find('.title').text('Neutral');
$(this).addClass('zero');
}
else if(rep >= 1 && rep < 5) {
$(this).find('.title').text('Member');
}
else if(rep >= 5 && rep < 10) {
$(this).find('.title').text('Active Member');
}
else if(rep >= 10) {
$(this).find('.title').text('Excellent');
}
});
});
Phpbb2
- Code:
$(document).ready(function() {
$(".post .row1 .postdetails").each(function(){
$(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
});
$('.post .row1 .postdetails .post_field:contains("Reputation")').each(function() {
var rep = $(this).text().match(/\d+/g);
$(this).addClass('reputation');
$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep == 0) {
$(this).find('.title').text('Neutral');
$(this).addClass('zero');
}
else if(rep >= 1 && rep < 5) {
$(this).find('.title').text('Member');
}
else if(rep >= 5 && rep < 10) {
$(this).find('.title').text('Active Member');
}
else if(rep >= 10) {
$(this).find('.title').text('Excellent');
}
});
});
Invision
- Code:
$(document).ready(function() {
$(".postprofile .postprofile-details.postdetails").each(function(){
$(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
});
$('.postprofile .postprofile-details.postdetails .post_field:contains("Reputation")').each(function() {
var rep = $(this).text().match(/\d+/g);
$(this).addClass('reputation');
$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep == 0) {
$(this).find('.title').text('Neutral');
$(this).addClass('zero');
}
else if(rep >= 1 && rep < 5) {
$(this).find('.title').text('Member');
}
else if(rep >= 5 && rep < 10) {
$(this).find('.title').text('Active Member');
}
else if(rep >= 10) {
$(this).find('.title').text('Excellent');
}
});
});
Administration Panel → Display → Pictures & Colors → CSS
- Code:
.reputation {
background-color: rgb(141, 177, 62)!important;
background-image: url(http://i38.servimg.com/u/f38/17/31/71/58/highli10.png);
border-radius: 3px;
color: rgb(255, 255, 255);
font-weight: bold;
display: block;
margin: 0 auto;
margin-bottom: 3px;
padding: 3px 7px;
max-width: 125px;
text-align: center;
text-shadow: rgba(0, 0, 0, 0.298039) 0px -1px 0px;
background-position: 0px 1px;
background-repeat: repeat no-repeat;
}
.reputation.zero {
background-color: rgb(16, 16, 16)!important;
color: rgb(255, 255, 255);
}
- Spoiler:
- if you have question & Problem please create a thread