Back to vBulletin 3.0 Add-Ons

Display Reputation Power in postbit
Mod Version: 1.00, by Gary King

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 31
Released: 11 Feb 2004 Last Update: Never Downloads: 4
Not Supported  

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

Download

No files for download.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024