Fixed reputation (to be modified by admins only)
Page 1 of 1
Fixed reputation (to be modified by admins only)
Hello and goodmorning to you!
I've followed Ange's tutorial just now installing the reputation bar (https://help.forumotion.com/t132299-add-a-bar-for-reputation#888421), but I want it fixed so that one starts with 100% and admins can control it, Forumotion style. How do I do that?
Sam.
I've followed Ange's tutorial just now installing the reputation bar (https://help.forumotion.com/t132299-add-a-bar-for-reputation#888421), but I want it fixed so that one starts with 100% and admins can control it, Forumotion style. How do I do that?
Sam.
Last edited by SamanthaS on December 19th 2014, 11:17 am; edited 1 time in total
Guest- Guest
Re: Fixed reputation (to be modified by admins only)
Hello @Samantha,
Do you mean that members start with a set reputation count, and then you subtract it ? You can set the default reputation here : Modules > Reputation > Default value
Do you mean that members start with a set reputation count, and then you subtract it ? You can set the default reputation here : Modules > Reputation > Default value
Re: Fixed reputation (to be modified by admins only)
Hi Ange and thanks (I won't be calling you baby cuz you ain't ). Hey, could you be a bit more precise on that please. I tried that. I got a points and reputation system installed as well. So, if you could please give he exact insight to what you meant, this tall blonde 'd be very pleased tonight yk, ty!
Guest- Guest
Re: Fixed reputation (to be modified by admins only)
Ange Tuteur wrote:Will you be using this as a warning system ?
Indeed, Forumotion style if you can. I'd like to start with 100%, increments by 20. Dropped down to 0% is a ban to me.
Guest- Guest
Re: Fixed reputation (to be modified by admins only)
I think you already know, but on the support we use a profile field. ( Topic )
However, if you want to use this script for that you could do something like this :
Go to Administration Panel > Modules > Reputation
Set the default value to 5. Then change your script to this :
Fill in the fields as needed.
Now if you're going to use Reputation as the warning system you need to remove it from use of normal members. Or you could create a new number field that only moderators or administrators can modify.
Let me know what you want to use.
However, if you want to use this script for that you could do something like this :
Go to Administration Panel > Modules > Reputation
Set the default value to 5. Then change your script to this :
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Reputation',
repImage1 : '100% image',
repImage2 : '80% image',
repImage3 : '60% image',
repImage4 : '40% image',
repImage5 : '20% image',
repImage6 : '0% image'
};
var repLv = {
lv1 : 5,
lv2 : 4,
lv3 : 3,
lv4 : 2,
lv5 : 1,
lv6 : 0,
};
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+(\\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').html('<img src="'+settings.repImage1+'"/>') }
if (rep >= repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
if (rep >= repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
if (rep >= repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
if (rep >= repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
if (rep >= repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
});
}
});
Fill in the fields as needed.
Now if you're going to use Reputation as the warning system you need to remove it from use of normal members. Or you could create a new number field that only moderators or administrators can modify.
Let me know what you want to use.
Re: Fixed reputation (to be modified by admins only)
Yeah, I think I should go with that last option, but I'm not sure. In fact I'm very much confused now! I've got things installed now (JS and CSS) when I stumbled upon your tutorial.
I want to be able to set member's reputation as a warning system to members in their profiles using these perhaps: https://help.forumotion.com/t74247-translucent-warning-bars .
What should I do next? Remove your tutorial JS and CSS and start over using what?
I want to be able to set member's reputation as a warning system to members in their profiles using these perhaps: https://help.forumotion.com/t74247-translucent-warning-bars .
What should I do next? Remove your tutorial JS and CSS and start over using what?
Guest- Guest
Re: Fixed reputation (to be modified by admins only)
Create a profile field with the following content. ( You can change the name to what you want )
Make sure to replace the content after saving.
Then create a new script with this :
Placement : In the topics
Change rep to the name of your field.
Make sure to replace the content after saving.
Then create a new script with this :
Placement : In the topics
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Rep',
repImage1 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png',
repImage2 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-80.png',
repImage3 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-60.png',
repImage4 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-40.png',
repImage5 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-20.png',
repImage6 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-0.png'
};
var repLv = {
lv1 : 5,
lv2 : 4,
lv3 : 3,
lv4 : 2,
lv5 : 1,
lv6 : 0,
};
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+(\\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').html('<img src="'+settings.repImage1+'"/>') }
if (rep == repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
if (rep == repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
if (rep == repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
if (rep == repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
if (rep == repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
});
}
});
Change rep to the name of your field.
Re: Fixed reputation (to be modified by admins only)
Replace your script with this :
- Code:
$(document).ready(function() {
var version = 'phpbb3';
var settings = {
repName : 'Rep',
repImage1 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png',
repImage2 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-80.png',
repImage3 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-60.png',
repImage4 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-40.png',
repImage5 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-20.png',
repImage6 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-0.png'
};
var repLv = {
lv1 : 5,
lv2 : 4,
lv3 : 3,
lv4 : 2,
lv5 : 1,
lv6 : 0,
};
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+(\\d+).*'), regex = new RegExp('<span class="label"><span style="color:#.*?;">'+settings.repName+'</span>: </span> \\d+<br>');
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').html('<img src="'+settings.repImage1+'"/>') }
if (rep == repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
if (rep == repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
if (rep == repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
if (rep == repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
if (rep == repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
$(this).html($(this).html().replace(regex,''));
});
}
});
Re: Fixed reputation (to be modified by admins only)
Yay!
Het werkt! Dank je wel, Ange! (Dutch)
It works! Thank you, Ange!
Het werkt! Dank je wel, Ange! (Dutch)
It works! Thank you, Ange!
Guest- Guest
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum