Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Display Reputation Power in postbit Details »»
Display Reputation Power in postbit
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-09-2004 Last Update: Never Installs: 31
 
No support by the author.

This hack will display each user's reputation power in their postbit.

No extra queries run and this code doesn't really add too much extra load time, maybe only 0.0000000000000001 seconds

Very easy hack to install, 1 minute or less

Okay let's begin

First create a new Global phrase called reputation_power with the content
Code:
Reputation Power
Now open up includes/functions_showthread.php and find

PHP Code:
        $post['joindate'] = vbdate($vboptions['registereddateformat'], $post['joindate']); 
Above, add
PHP Code:
        $repjoindate $post[joindate]; 
Find:
PHP Code:
    $show['messageicon'] = iif($post['iconpath'], truefalse); 
Above add
PHP Code:
    $show['score'] = 1;
    
// reputation SECTION
    // initialize reputation power
    
$score 1;

    
// for every certain number of posts, gain a point
    
if ($vboptions['pcpower'])
    {
        
$postfactor intval($post['posts'] / $vboptions['pcpower']);
    }
    else
    {
        
$postfactor 0;
    }


    
// for every certain number of reputation points, gain a point
    
if ($vboptions['kppower'])
    {
        
$reputationfactor intval($post['reputation'] / $vboptions['kppower']);
    }
    else
    {
        
$reputationfactor 0;
    }

    
// for every certain number of days registered, gain a point
    
$timepassed intval((TIMENOW $repjoindate) / 86400);    
    if (
$vboptions['rdpower'])
    {
        
$timefactor intval($timepassed $vboptions['rdpower']);
    }
    else
    {
        
$timefactor 0;
    }

    
// compute the user's total reputation power
    
$score $score $postfactor $timefactor $reputationfactor;

    
# the following only matters for admin
    
$perms fetch_permissions(0$post['userid'], $post);
    if (
$perms['adminpermissions'] & CANCONTROLPANEL AND $vboptions['adminpower'])
    {
        
$score $vboptions['adminpower'];
    }
    else if ((
$post['posts'] < $vboptions['minreputationpost']) OR ($post['reputation'] < $vboptions['minreputationcount']))
    {
        
$score 0;
    }
    
##### 
Now open up postbit template and find
HTML Code:
					</div>
					<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
Above add
HTML Code:
						<if condition="$show[score]"><br />$vbphrase[reputation_power]: $score</if>
All done

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-11-2004, 11:14 PM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its on. Take a look if you can...

I have only found 4 or 5 users that get the 0 power level. From looking at their profiles I still cannot see anything different that would set them apart. Totally wierd.

In the admincp they have proper power ratings...I swear to god!
Reply With Quote
  #23  
Old 02-11-2004, 11:50 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez
Its on. Take a look if you can...

I have only found 4 or 5 users that get the 0 power level. From looking at their profiles I still cannot see anything different that would set them apart. Totally wierd.

In the admincp they have proper power ratings...I swear to god!
Then that's even stranger, if there is no pattern with the ones with 0 power level. Does it show 0 power level for them in all their posts?
Reply With Quote
  #24  
Old 02-12-2004, 12:04 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. I'm still looking and don't see what it could possibly be. Some of the users affected are old members some are new. Seems to be no pattern and I even changed some of their user options that would effect this, ie: post count, joindate, rep score. Very bizarre.

Did you manage to get on my forum and see the problem for yourself? I made you an account and PM'ed the details.
Reply With Quote
  #25  
Old 02-12-2004, 12:45 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez
Yes. I'm still looking and don't see what it could possibly be. Some of the users affected are old members some are new. Seems to be no pattern and I even changed some of their user options that would effect this, ie: post count, joindate, rep score. Very bizarre.

Did you manage to get on my forum and see the problem for yourself? I made you an account and PM'ed the details.
It looks strange, I mean there is no (obvious) pattern. Possibly additional usergroups, etc. affecting it? Strange, very strange indeed
Reply With Quote
  #26  
Old 02-12-2004, 12:55 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No additional user groups. I will keep looking.

I have also found a second bug. When you look at your private messages the Repuation Power text does not show up. I will attach an image so you can see what I mean.
Reply With Quote
  #27  
Old 02-12-2004, 12:57 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez
No additional user groups. I will keep looking.

I have also found a second bug. When you look at your private messages the Repuation Power text does not show up. I will attach an image so you can see what I mean.
Change the new phrase type from Show Thread to Global type
Reply With Quote
  #28  
Old 02-12-2004, 01:02 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice
Reply With Quote
  #29  
Old 02-12-2004, 03:17 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow I still have no idea what could be causing the 0 to show up under some (4) users Rep Power scores. Seems to be only these 4 users in the group I created. It's baffling because in the admincp the proper score is displayed. I have gone into the database and compared 2 users: 1 who is working peoperly and 1 who isn't. I don't see any clues or indicators as to what it could be.
Reply With Quote
  #30  
Old 02-12-2004, 03:59 AM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You might have it set so that a user has to post 50 messages to have their power work and they have less than 50 posts. I'm pretty sure it's something like this. Check your Reputation settings.
Reply With Quote
  #31  
Old 02-12-2004, 11:09 AM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope. The users affected have 1500 posts.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04589 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete