vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Display extra 'Golden' pips when members have large reputations (https://vborg.vbsupport.ru/showthread.php?t=69836)

Paul M 09-23-2004 10:00 PM

Display extra 'Golden' pips when members have large reputations
 
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

Quote:

Originally Posted by tomshawk
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

LOL, 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 ;)

[high]* turbidblue clicks install :)[/high]

Phalynx 09-27-2004 10:52 AM

Great!

Dan 09-27-2004 07:14 PM

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

Quote:

Originally Posted by Gio Takahashi
...call me crazy but where is functions_reputation o_O

In 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

Quote:

Originally Posted by Gio Takahashi
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

Quote:

Originally Posted by rookie7
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
Quote:

Originally Posted by Paul M
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

Quote:

Originally Posted by rookie7
Thank you for answering my request. I'm a bit slow so...could you please tell me what you mean by

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

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

Quote:

Originally Posted by Renat_
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

Quote:

Originally Posted by Megareus Rex
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

Quote:

Originally Posted by Paul M
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.

Quote:

Originally Posted by Paul M
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

Quote:

Originally Posted by Paul M
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

Quote:

Originally Posted by nathanaus
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 ......

Quote:

Originally Posted by nathanaus
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

Quote:

Originally Posted by mindbuster
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

Quote:

Originally Posted by Paul M
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

Quote:

Originally Posted by mindbuster
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


All times are GMT. The time now is 04:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01358 seconds
  • Memory Usage 1,838KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete