View Full Version : Display extra 'Golden' pips when members have large reputations
Paul M
09-23-2004, 10:00 PM
This modification is no longer available or supported.
This simple modification extends the existing reputation display system into three flexible groups - dark green & light green pips (similar to the default) followed by 'golden' pips. The number and value of the pips in each group is defined by six variables in the code.
The defaults in the hack make the first 5 pips worth 100, followed by 5 pips worth 200, followed by the golden pips worth 1000 (max 10) - so ;
1 - 100 = 1 Dark green
101 - 200 = 2 Dark green
401 - 500 = 5 Dark green
501 - 700 = 5 Dark green, 1 Light green
701 - 900 = 5 Dark green, 2 Light green
501 - 1500 = 5 Dark green, 5 Light green
1501 - 2500 = 5 Dark green, 5 Light green, 1 Gold
2501 - 3500 = 5 Dark green, 5 Light green, 2 Gold
10501 - onwards = 5 Dark green, 5 Light green, 10 Gold
Negative reputations are similarly displayed in red (no gold). If your reputation is zero then the neutral grey pip is displayed. A screenshot of someone with 5000 points is attached (note: the word "Reputation:" has been removed from our postbit display, so only pips are shown).
v1.1 Minor update: Added missing code for people who disable the display of their reputation. If you don't use or allow members to disable their display then you have nothing to worry about, otherwise just apply the modified hack. Also made the 'golden ball' slightly less dark.
v1.21 Added another level for people who exceed all the pips set in the main three levels - this displays a larger 'star' for each time they have passed the maximum allowed by the three pip levels - and then resets the pips to start again. Another star will be displayed each time they "Lap" the main levels.
dndog
09-24-2004, 10:07 PM
Nice.
Will install when I get time.
moley
09-25-2004, 07:41 AM
nice i'll be adding this later as well.
tomshawk
09-25-2004, 01:24 PM
Hi, installed it, very nice ;)
My users say they look more brown then gold, one even said they look like excrement but....
cant please everyone
Thanks for the kewl hack
Paul M
09-25-2004, 02:07 PM
Hi, installed it, very nice ;)
My users say they look more brown then gold, one even said they look like excrement but....
cant please everyone
Thanks for the kewl hackLOL, It is very hard to make such a small gif look gold, but you could try and make it a bit more yellow if they moan. Your background colour can alter peoples perception of it as well. Anyway, glad you like it :)
turbidblue
09-25-2004, 03:45 PM
thanks!
such an easy, yet fun hack ;)
* turbidblue clicks install :)
Phalynx
09-27-2004, 10:52 AM
Great!
Thats a good idea. Golden for more :)
Gio Takahashi
09-28-2004, 08:51 PM
...call me crazy but where is functions_reputation o_O
Paul M
09-28-2004, 09:54 PM
...call me crazy but where is functions_reputation o_OIn the 'includes' directory.
Gio Takahashi
09-28-2004, 09:57 PM
O_o its not there..I don't have it.
Paul M
09-28-2004, 10:06 PM
Probably because you are not using vB 3.0.3
Gio Takahashi
09-28-2004, 10:53 PM
Meh, I'm not about to upgrade to vB 3.0.3, it is *WAY* too much work to do so.
Any chance of seeing vB3.0.0 compatible hack?
rinkrat
09-29-2004, 01:28 AM
Wow I suggested this in the other reputation mod and here it is!! Sweet!!
Erwin
09-29-2004, 01:44 AM
Great idea! :)
rookie7
09-29-2004, 04:53 AM
Great mod. Can you make it so that it would reset the pip and start over with 1 gold instead of adding it to the light green?
Paul M
09-29-2004, 02:28 PM
Any chance of seeing vB3.0.0 compatible hack?Sorry, I don't have a version of 3.0.0.
I would imagine the same (or very similar) block of code is just located in a different file, so you just need to find and replace it.
Paul M
09-29-2004, 02:30 PM
Great mod. Can you make it so that it would reset the pip and start over with 1 gold instead of adding it to the light green?Probably, I'll have a look later to see if it's easy to modify, i'm a bit busy atm. :)
Edit;
Under ;
$repval = $post['reputation'];
Add ;
$cutoff = ($repval > (($band_a_val * $band_a_count) + ($band_b_val * $band_b_count))) ;
Change the Band a & b eval statements to ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
Be warned that this will make larger negative reputations look a bit odd as they don't have a third colour equivelent to 'gold'.
rookie7
10-01-2004, 04:43 PM
Thank you for answering my request. I'm a bit slow so...could you please tell me what you mean by
Change the Band a & b eval statements to ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
Paul M
10-01-2004, 07:48 PM
Thank you for answering my request. I'm a bit slow so...could you please tell me what you mean byFind ;
$posneg = $repa;
replace the next line with ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
and again, find ;
$posneg = $repb;
and replace the next line with ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
:D
rookie7
10-05-2004, 06:44 PM
Thank you very much. Works great!
Renat_
12-28-2004, 04:22 PM
working as a charm! Thanks!
Paul M
12-28-2004, 05:38 PM
working as a charm! Thanks!Glad to hear it. :)
Megareus Rex
12-31-2004, 10:57 PM
Yes, I and my members much prefer this to the normal rep. The gold adds an extra sense of accomplishment :D (even though my site is a major repping site, and thus most people have gold pips, lol)
Paul M
12-31-2004, 11:55 PM
Yes, I and my members much prefer this to the normal rep. The gold adds an extra sense of accomplishment :D (even though my site is a major repping site, and thus most people have gold pips, lol)You could always alter the band values so they need more points to "go gold" :)
nathanaus
01-07-2005, 01:28 AM
Find ;
$posneg = $repa;
replace the next line with ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
and again, find ;
$posneg = $repb;
and replace the next line with ;
if (!$cutoff) { eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";'); }
:D
Hi, I love this hack. I installed it on my testing forum and will tranfer it over to my live forum soon.
One question - this small mod to the code I have quoted, is that supposed to remove all the green pips to display the gold pips only - when the users rep gets that high?
if so, it doesn't seem to be working for me.
I tested it, got all the green one happening, then eventually got the gold to show up next to the green as was written in the original hack. However, I have modified the line under the $repa and $repb section to reflect the change outlinedi n the quoted text above. When the user now gets to the lvel of a gold pip it keeps going right next to the green.
Have I done something wrong or does that modification not do what I thought it would?
I was hoping it would completely remove all the green (say 5 dark green and 5 light green) with one gold pip, then again as the users rep build more gold pip's are added. Essentially making it look like the user has gone above that of "ordinary" user rep and now has a line of gold instead of a line of green and gold.
Thank you
Paul M
01-07-2005, 01:41 AM
I think you missed this bit, which is also required as part of that mod.
Edit;
Under ;
$repval = $post['reputation'];
Add ;
$cutoff = ($repval > (($band_a_val * $band_a_count) + ($band_b_val * $band_b_count))) ;
nathanaus
01-07-2005, 01:50 AM
I think you missed this bit, which is also required as part of that mod.
Oops so I did.
BRILLIANT it all works.
This mod is great! Thank you so much for making it.
nathanaus
01-07-2005, 01:52 AM
Oh another thought. okay so say you wanted to go beyond gold to say plantinum.
The user starts out in dark green then after 5 pips goes to light green. After 10 green pip the user then goes to one gold pip. Moving along the user gets to 5 gold pips, what would be needed to add a different coloured pip after that (eg platinum)? So the user then has 5 gold and one platinum up to 5 gold and 5 platinum. Essentially after the user gets to that next level beyond green it becomes like the two green's but with gold and another colour. Is that possible/hard?
Would that be a matter of adding a $repd?
Also (sorry) does this hack over-ride the reputation settings in the admincp? I notice in the code to add into the functions_reputation.php code you have written that a value is 100 posts b value is 200 posts c value is 1000, where in the admincp you can set different levels for different post counts.
Paul M
01-07-2005, 11:10 AM
Oh another thought. okay so say you wanted to go beyond gold to say plantinum.
The user starts out in dark green then after 5 pips goes to light green. After 10 green pip the user then goes to one gold pip. Moving along the user gets to 5 gold pips, what would be needed to add a different coloured pip after that (eg platinum)? So the user then has 5 gold and one platinum up to 5 gold and 5 platinum. Essentially after the user gets to that next level beyond green it becomes like the two green's but with gold and another colour. Is that possible/hard?
Would that be a matter of adding a $repd?
Basically yes, you could add a fourth (or more) band by replicating the appropiate parts of the code for repd, repe etc. BTW, I found Platinum to be a hard colour to add to the little images - it just looked grey ......
Also (sorry) does this hack over-ride the reputation settings in the admincp? I notice in the code to add into the functions_reputation.php code you have written that a value is 100 posts b value is 200 posts c value is 1000, where in the admincp you can set different levels for different post counts.You are referring to the description bands - this hack has no effect on them.
nathanaus
01-07-2005, 10:53 PM
Thank you kindly
MorrisMcD
01-16-2005, 05:12 AM
Awesome hack.. And so simple.. Thanks
mindbuster
01-21-2005, 04:11 PM
Having a problem, no matter how high a reputation is it only shows greens/light greens, no gold ones.
It shows 5 dark greens and 6 light greens, and thats all, no gold.
I followed the easy instructions, but no worky :disappointed:
Paul M
01-21-2005, 06:30 PM
Having a problem, no matter how high a reputation is it only shows greens/light greens, no gold ones.
It shows 5 dark greens and 6 light greens, and thats all, no gold.
I followed the easy instructions, but no worky :disappointed:That sounds like the existiing reputation display - are you sure you uploaded the changed file ?
mindbuster
01-21-2005, 09:49 PM
That sounds like the existiing reputation display - are you sure you uploaded the changed file ?
I did.........atleast now i did....... :tired:
Maaan, after installing 9 hacks including some major ones like uCS/v3arcade/vbacmps/vBaGallery etc etc one would guess i wouldnt screw this up :rolleyes:
It's working fine now :p
Thanks, nice hack.
Paul M
01-21-2005, 10:23 PM
I did.........atleast now i did....... :tired:
Maaan, after installing 9 hacks including some major ones like uCS/v3arcade/vbacmps/vBaGallery etc etc one would guess i wouldnt screw this up :rolleyes:
It's working fine now :p
Thanks, nice hack.Glad it's working - now you can click on install. :)
Lottis
01-25-2005, 08:51 AM
I run 3.0.6 anf this is how my function.reputation lookes like; :surprised:
Soo, where should i put the replacement?
// ###################### Start getreputationimage #######################
function fetch_reputation_image(&$post, &$perms)
{
global $vboptions, $stylevar, $vbphrase;
if (!$vboptions['reputationenable'])
{
return true;
}
$reputation_value = $post['reputation'];
if ($post['reputation'] == 0)
{
$reputationgif = 'balance';
$reputation_value = $post['reputation'] * -1;
}
else if ($post['reputation'] < 0)
{
$reputationgif = 'neg';
$reputationhighgif = 'highneg';
$reputation_value = $post['reputation'] * -1;
}
else
{
$reputationgif = 'pos';
$reputationhighgif = 'highpos';
}
if ($reputation_value > 500)
{ // bright green bars take 200 pts not the normal 100
$reputation_value = ($reputation_value - ($reputation_value - 500)) + (($reputation_value - 500) / 2);
}
$reputationbars = intval($reputation_value / 100); // award 1 reputation bar for every 100 points
if ($reputationbars > 10)
{
$reputationbars = 10;
}
if (!$post['showreputation'] AND $perms['genericpermissions'] & CANHIDEREP)
{
$posneg = 'off';
$post['level'] = $vbphrase['reputation_disabled'];
eval('$post[\'reputationdisplay\'] = "' . fetch_template('postbit_reputation') . '";');
}
else
{
if (!$post['reputationlevelid'])
{
$post['level'] = $vboptions['reputationundefined'];
}
for ($i = 0; $i <= $reputationbars; $i++)
{
if ($i >= 5)
{
$posneg = $reputationhighgif;
}
else
{
$posneg = $reputationgif;
}
eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";');
}
}
return true;
}
Paul M
01-25-2005, 04:27 PM
You replace the code you just posted, just like the instructions say. :)
Lottis
01-25-2005, 04:41 PM
Find ;
// ###################### Start getreputationimage #######################
<current block of code>
/*================================================= =====================*\
|| ################################################## ##################
This is not the same. ;)
Ore is it? :blush:
mindbuster
01-25-2005, 06:09 PM
Yes it is ;)
It's you current block of code as you mentioned further up :D
Lottis
01-26-2005, 07:43 AM
Thanx mindbuster. :)
*install*
dfdems
02-04-2005, 03:45 AM
I have played around with this for about 4 hours and I cant get it right. I have this hack installed
In functions_reputation.php
Find (line 81):
Code:
$reputation_value = $post['reputation'];
Immediately after, ADD:
Code:
$reputation_power = fetch_reppower($post, $perms);
$post['reputationpower'] = $reputation_power;
Now, you can use $post[reputationpower] the same way you can use $post[reputation] in your postbit template...
__________________
Tony - webmaster@is300.net
(Done! From phpbb to vb3 - 1.5m posts/20k users)
Its from here (https://vborg.vbsupport.ru/showthread.php?t=61408&page=5&pp=15)
I cant get the two to play nice together. I can get one or the other to work, not both. My question is where would I install this
$reputation_power = fetch_reppower($post, $perms);
$post['reputationpower'] = $reputation_power;
to get this to work or am I on the wrong track here with this?
Paul M
02-04-2005, 08:42 AM
Well that's not really my hack to support - but from a quick look, I think they should work if you put them after ;
global $vboptions, $stylevar, $vbphrase;
:)
dfdems
02-09-2005, 03:35 AM
I just got a chance to try what you wrote. It worked.
Thanks for taking the time to help me out, I didnt want to have to choose between the two hacks and I already have a couple of your hacks installed (and they all work). I figured based on that I would ask here rather than the other thread.
Thanks again
Paul M
02-09-2005, 07:27 AM
Thanks againNo problem.
Paul M
05-10-2005, 01:43 AM
Version 1.21 uploaded. See main post for the change(s). :)
secret1980
05-11-2005, 05:00 PM
nice work mate :claps: itz workin cool for me :D
excellent.. thank you. :)
Paul M
05-15-2005, 10:24 AM
excellent.. thank you. :)Glad you like it, please show your thanks by clickiig the install link. It helps hack writers to know how many people are using something :)
MissKalunji
05-22-2005, 09:43 AM
Hey will this work with 3.5.0? thx
Paul M
05-22-2005, 10:08 AM
Hey will this work with 3.5.0? thxThat would be a little hard to answer as 3.5.0 does not come out for a few weeks, and then only as a beta. :)
MissKalunji
05-22-2005, 02:08 PM
That would be a little hard to answer as 3.5.0 does not come out for a few weeks, and then only as a beta. :)
thank you :nervous:
Paul M
05-22-2005, 02:17 PM
I can tell you that all all my main hacks will be adapted (if necessary) to work on 3.5.x as they are all used on our forum.
Jamie-UK
06-23-2005, 01:29 PM
Is there any way I could get this working under 3.0.3 ?
Paul M
06-23-2005, 08:06 PM
Is there any way I could get this working under 3.0.3 ?It was written on 3.0.3 so it should work perfectly.
Jamie-UK
06-23-2005, 09:06 PM
It was written on 3.0.3 so it should work perfectly.
That is strange.. I don't have a functions_reputation.php in vbb installation.
I have a adminfunctions_reputation.php and a reputation.php but neither contain the function needed to replace..
:(
Paul M
06-23-2005, 09:38 PM
That is strange.. I don't have a functions_reputation.php in vbb installation.
I have a adminfunctions_reputation.php and a reputation.php but neither contain the function needed to replace..
:(
Then you don't have 3.0.3 ......
The code was in functions_showthread in versions prior to 3.0.2 :)
Jamie-UK
06-23-2005, 10:17 PM
I do apologise. For some reason, I thought I had installed 3.0.3
I don't. I have 3.0.1
Ho Hum... :(
Marco van Herwaarden
06-24-2005, 03:51 AM
Then i would suggest that you upgrade your board or at least apply security patches. Some security holes have been fixed since 3.0.1
The Joint
07-07-2005, 06:54 PM
this should be a relatively simple question....
how do i get the "line" of "pips" to start a new line after 5 pips....let me explain, i use pot leaves instead of pips, which are bigger, and i only want 5 on a row but instead i get 6 or more, what little piece of code should i edit [tell me what to do, i'm a n00b] to get the rep images to start a new line after 5 pips?
thanks in advance, and excellent hack btw, -luke
Paul M
07-07-2005, 07:18 PM
how do i get the "line" of "pips" to start a new line after 5 pips....let me explain, i use pot leaves instead of pips, which are bigger, and i only want 5 on a row but instead i get 6 or more, what little piece of code should i edit [tell me what to do, i'm a n00b] to get the rep images to start a new line after 5 pips?
In the hack code, place this line
if ($repval > 0) $post['reputationdisplay'] .= "<br />";
below this line ;
$count = $band_b_count;
and also below this line ;
$count = $band_c_count;
The Joint
07-07-2005, 07:24 PM
thanks paul, you rawk my world!
The Joint
07-07-2005, 07:29 PM
works very nicely, thanks again paul
sharonkitty67
07-14-2005, 12:14 PM
Thanks - even an idiot like me, got this hack working :) Members love it!
Hastin
09-17-2005, 07:35 PM
Sorry to bump an old thread, but ws wondering:
Paul, is there anyway to make this work with vB 3.5? (I don't mind editing files, using plug-ins, or both.) :)
Paul M
09-17-2005, 08:53 PM
Sorry to bump an old thread, but ws wondering:
Paul, is there anyway to make this work with vB 3.5? (I don't mind editing files, using plug-ins, or both.) :)There will be a 3.5 version of this released - it's working on my test system - but not ready for release yet. :)
ambumann
09-19-2005, 07:31 PM
There will be a 3.5 version of this released - it's working on my test system - but not ready for release yet. :)
Looking forward to see it!
Paul M
09-19-2005, 10:05 PM
Looking forward to see it!Yes.
It needs a new hook adding otherwise a file edit is required. I have requested this hook but until the next version comes out I won't know if it's been added.
It is tempting to release it anyway, but that means upgrading it later ......
mfizzel
09-23-2005, 02:54 AM
great hack, thanks
Hastin
09-23-2005, 06:43 AM
Did it as a file edit, and got it working. Just had to change a term. :)
Paul M
10-07-2005, 01:03 AM
Sorry to bump an old thread, but ws wondering:
Paul, is there anyway to make this work with vB 3.5? (I don't mind editing files, using plug-ins, or both.) :)
Now ported to 3.5.
https://vborg.vbsupport.ru/showthread.php?t=97777
MissKalunji
10-07-2005, 01:45 AM
Now ported to 3.5.
https://vborg.vbsupport.ru/showthread.php?t=97777
Hurray :nervous:
slvr ralliart
10-23-2005, 07:29 PM
ok... i did that all replacing in the functions-rep.php and uploaded the gifs so now how do i run this/install? or what do i do next?
maharajah
10-24-2005, 01:57 AM
nice work buddy
Installed.
.
Malibu
11-14-2006, 05:23 AM
Is it possible to adjust when a member recieves each green/gold box within the admin control panel? is there a mod/product plugin for that?
cheers
Malibu
www.limestonelifestyle.com (http://www.limestonelifestyle.com)
BigJimTheLug
07-19-2007, 12:21 PM
Installed. sweet.
Smitty
07-28-2008, 04:30 AM
Anyone know of anything like this for 3.7.2?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.