Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=93)
-   -   [PMBT 2.x] Adding tracker stats to forum (http://www.bvlist.com/showthread.php?t=1819)

joeroberts 17th January 2009 21:33

[PMBT 2.x] Adding tracker stats to forum
 
this is not as hard as it may look

Step 1
open phpBB3/viewtopic.php and find
PHP Code:

$post_list $user_cache $id_cache $attachments $attach_list $rowset $update_count $post_edit_list = array(); 

now replace that with
PHP Code:

#$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
#tracker stats
$post_list $user_cache $tracker_user_cache $tracker_id_cache $id_cache $attachments $attach_list $rowset $update_count $post_edit_list = array(); 

now find
PHP Code:

            // We add the signature to every posters entry because enable_sig is post dependant
            
if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
            {
                
$user_sig $row['user_sig'];
            } 

And add after
PHP Code:

if (defined('BT_SHARE'))
{
$tracker_user_cache[$poster_id] = get_tracker_stats($poster_id);


Now find
PHP Code:

$postrow = array( 

and add after
PHP Code:

    //tracker stats
        
'POSTER_UPLOAD'        => (!defined('BT_SHARE'))? '' $tracker_user_cache[$poster_id]['uploaded'],
        
'POSTER_DOWN_LOAD'     => (!defined('BT_SHARE'))? '' $tracker_user_cache[$poster_id]['downloaded'],
        
'POSTER_RATIO'         => (!defined('BT_SHARE'))? '' $tracker_user_cache[$poster_id]['ratio'],
        
//end 

OK your done there
now open say
phpBB3/styles/prosilver/templates/viewtopic_body.html
and find
HTML Code:

        <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
        <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
        <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->

And add before
HTML Code:

                    <!-- IF postrow.POSTER_UPLOAD != '' --><dd><strong>Uploaded:</strong> {postrow.POSTER_UPLOAD}</dd><!-- ENDIF -->
                    <!-- IF postrow.POSTER_DOWN_LOAD != '' --><dd><strong>Downloaded:</strong> {postrow.POSTER_DOWN_LOAD}</dd><!-- ENDIF -->
                    <!-- IF postrow.POSTER_RATIO != '' --><dd><strong>Ratio:</strong> {postrow.POSTER_RATIO}</dd><!-- ENDIF -->

edit language to match yours
now go to admin panel purge cache and your done


All times are GMT +2. The time now is 23:38.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.