Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent) > Mods & Themes
Reply
  #1  
Old 17th January 2009, 21:33
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default [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
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
Reply

Tags
2x , adding , forum , pmbt , stats , tracker

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[PMBT 2.x]Add last forum posts to index joeroberts Mods & Themes 3 16th July 2013 04:01
Forum stats on TBDev DooM TBDev 4 12th March 2013 20:36
[PMBT 2.0] TLeech tracker and forum joeroberts Mods & Themes 23 3rd September 2010 21:11
problem adding torrents & tracker tHe_ImPrA Template Shares 9 17th October 2009 11:47
[PMBT 2.0]Add user for tracker! LoaT BT.Manager (phpMyBitTorrent) 1 2nd February 2009 03:12



All times are GMT +2. The time now is 23:07. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.