Ange Tuteur's Reputation bars - Founder's problem
3 posters
Page 1 of 1
Ange Tuteur's Reputation bars - Founder's problem
I used it, but for the founder account it does not work. I use Phpbb3. it says:
undefined.. and level 0?? If the founder has 200 points...
- Code:
<div id="repu" original-title="Reputation's level 0
Next : (undefined)"></div>
undefined.. and level 0?? If the founder has 200 points...
Re: Ange Tuteur's Reputation bars - Founder's problem
Oh yeah! Sorry, is not updated on my profile. But is this:
http://www.live-the-worldwide.com/
EDITED: I do not know why.. but I changed the permissions of the Points to be seen by guests.. and when I visit the site as guest it is shown.. but when I enter no.
PS: Sorry for my english, I am Spanish XD
http://www.live-the-worldwide.com/
EDITED: I do not know why.. but I changed the permissions of the Points to be seen by guests.. and when I visit the site as guest it is shown.. but when I enter no.
PS: Sorry for my english, I am Spanish XD
Re: Ange Tuteur's Reputation bars - Founder's problem
It might be down to your profile field layout. Try replacing your script with this :
- Code:
$(function() {
var settings = {
repName : 'Reputation',
repStyle : 'block',
repImage : 'http://i57.servimg.com/u/f57/18/21/41/30/star12.png'
};
var repLv = {
lv1 : 1,
lv2 : 2,
lv3 : 3,
lv4 : 4,
lv5 : 5,
lv6 : 6,
lv7 : 7,
lv8 : 8
};
if (settings.repStyle.toLowerCase() == 'block') { var repBlock = '<span class="rLv" class="repuBlock">' }
else if (settings.repStyle.toLowerCase() == 'image') { var repBlock = '<img class="rLv" src="'+settings.repImage+'"/>' }
else { var repBlock = '<span id="rLv" class="repuBlock">' }
$('.postprofile').each(function() {
var rep = Number($(this).text().replace(RegExp('.*'+settings.repName+'<\/span>:\\s+(\\d+).*'),'$1'));
$(this).find('dt').append('<div id="repu">')
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 = 'MAX' }
$(this).find('#repu').attr('title','Reputation level ' + $(this).find('.rLv').length + '\nNext : (' + next + ')');
});
});
Re: Ange Tuteur's Reputation bars - Founder's problem
try this :
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Feeding Points',
repImage0 : 'http://i.imgur.com/1Lnr1av.png',
repImage1 : 'http://i.imgur.com/mIKzCOh.png',
repImage2 : 'http://i.imgur.com/upGbiDk.png',
repImage3 : 'http://i.imgur.com/6EYRM2l.png',
repImage4 : 'http://i.imgur.com/YdicLpI.png'
};
var repLv = {
lv0 : 0,
lv1 : 100,
lv2 : 200,
lv3 : 300,
lv4 : 500
};
var ver = { phpbb2 : version.toLowerCase() == 'phpbb2', phpbb3 : version.toLowerCase() == 'phpbb3', punbb : version.toLowerCase() == 'punbb', invision : version.toLowerCase() == 'invision' };
var reg = new RegExp('.*'+settings.repName+'</span>:\\s+(\\d+).*');
if (ver.phpbb3 || ver.punbb || ver.invision) {
if (ver.phpbb3 || ver.invision) { var profSel = '.postprofile'; var addRepu = $(this).find('.feedingpoints').append('<span style="color: #EAB85E; font-family: amarante; font-size:11pt!important ;text-shadow: 1px 0 2px #000000, 0 0 3px #1F0603;">Hunger Level: </span><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.lv0) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage0+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv1 }
if (rep >= repLv.lv1) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage1+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv2 }
if (rep >= repLv.lv2) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage2+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv3 }
if (rep >= repLv.lv3) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage3+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv4 }
if (rep >= repLv.lv4) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage4+'"/>'); var next = 'Maximum!' }
$(this).find('#repu').attr('title', next);
});
}
});
Re: Ange Tuteur's Reputation bars - Founder's problem
Nothing, now it does not work on any of the profiles. Before it was working to everybody except on mine. And, is possible to make it work for negative numbers? ty for your answers
Re: Ange Tuteur's Reputation bars - Founder's problem
What's different on your field ? Could you show an image what the label and value of your field looks like ? That should be enough to figure out why it's not working for your profile specifically.
Re: Ange Tuteur's Reputation bars - Founder's problem
On my profile is just the name:
https://i.imgur.com/RYBMm2e.png
On others.. is the image showing with the tooltip title when hover:
https://i.imgur.com/yZQ5yyq.png
Got what I mean?
https://i.imgur.com/RYBMm2e.png
On others.. is the image showing with the tooltip title when hover:
https://i.imgur.com/yZQ5yyq.png
Got what I mean?
Last edited by Str0ng on March 20th 2015, 8:06 am; edited 1 time in total
Re: Ange Tuteur's Reputation bars - Founder's problem
Without the code what is the value of "hunger level" is it a number or word ?
example :
LABEL : VALUE
Reputation : 15
If the value is not a number, it's most likely what's causing the problem.
example :
LABEL : VALUE
Reputation : 15
If the value is not a number, it's most likely what's causing the problem.
Re: Ange Tuteur's Reputation bars - Founder's problem
It is a number value. I tried it without the code as well.. and it is a number. The weird thing is that if I give permissions to the field to be seen by guests, then.. it is shown (visiting as a guest) on my profile.. but no when you logged in.
EDITED: Never mind, I found what was causing it.. it was a code on a field of my profile. Ty!
And for the negative numbers? How can I set them?
EDITED: Never mind, I found what was causing it.. it was a code on a field of my profile. Ty!
And for the negative numbers? How can I set them?
Re: Ange Tuteur's Reputation bars - Founder's problem
I suppose you could do something like this :
I added comments for a brief explanation.
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Feeding Points',
repImageN0 : '', // negative image
repImage0 : 'http://i.imgur.com/1Lnr1av.png',
repImage1 : 'http://i.imgur.com/mIKzCOh.png',
repImage2 : 'http://i.imgur.com/upGbiDk.png',
repImage3 : 'http://i.imgur.com/6EYRM2l.png',
repImage4 : 'http://i.imgur.com/YdicLpI.png'
};
var repLv = {
lvN0 : -10, // negative level
lv0 : 0,
lv1 : 100,
lv2 : 200,
lv3 : 300,
lv4 : 500
};
var ver = { phpbb2 : version.toLowerCase() == 'phpbb2', phpbb3 : version.toLowerCase() == 'phpbb3', punbb : version.toLowerCase() == 'punbb', invision : version.toLowerCase() == 'invision' };
var reg = new RegExp('.*'+settings.repName+'</span>:\\s+(\\d+).*');
if (ver.phpbb3 || ver.punbb || ver.invision) {
if (ver.phpbb3 || ver.invision) { var profSel = '.postprofile'; var addRepu = $(this).find('.feedingpoints').append('<span style="color: #EAB85E; font-family: amarante; font-size:11pt!important ;text-shadow: 1px 0 2px #000000, 0 0 3px #1F0603;">Hunger Level: </span><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;
// negative conditions
if (rep <= repLv.lvN0) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImageN0+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv0 }
// positive conditions
if (rep >= repLv.lv0) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage0+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv1 }
if (rep >= repLv.lv1) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage1+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv2 }
if (rep >= repLv.lv2) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage2+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv3 }
if (rep >= repLv.lv3) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage3+'"/>'); var next = 'Current: ' + rep + ' / ' + 'Next: ' + repLv.lv4 }
if (rep >= repLv.lv4) { $(this).find('#repu').html('<img id="rLv" src="'+settings.repImage4+'"/>'); var next = 'Maximum!' }
$(this).find('#repu').attr('title', next);
});
}
});
I added comments for a brief explanation.
Re: Ange Tuteur's Reputation bars - Founder's problem
Hmmm no
Is like the <= is not recognized properly.
https://i.imgur.com/4ICsuQO.png
If I put it with equal or higher.. the blue disappears:
https://i.imgur.com/FkWhP7h.png
Is like the <= is not recognized properly.
https://i.imgur.com/4ICsuQO.png
If I put it with equal or higher.. the blue disappears:
https://i.imgur.com/FkWhP7h.png
Re: Ange Tuteur's Reputation bars - Founder's problem
Something like that?
- 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("Reputação")').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) {
$('.title', this).text('Neutro');
$(this).addClass('zero');
}
else if(rep >= 1 && rep < 5) {
$('.title', this).text('Iniciante');
}
else if(rep >= 5 && rep < 10) {
$('.title', this).text('Membro ativo');
}
else if(rep >= 10) {
$('.title', this).text('Excelente');
}
});
});
Daemon- Forumember
- Posts : 104
Reputation : 91
Language : Português
Similar topics
» Bars Code problem
» Congrats Ange Tuteur
» Tagging Ange Tuteur
» Ask the staff (No support here)
» Thank You Ange Tuteur!
» Congrats Ange Tuteur
» Tagging Ange Tuteur
» Ask the staff (No support here)
» Thank You Ange Tuteur!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum