Status
Not open for further replies.

danswano

Active Member
59
2010
0
0
Hello everyone, if you go to the left bottom of the page of this forum http://filesharingtalk.com/forum.php

you will see the queries number and execution time, how to enable just those 2 numbers in footer.

i know about $config['Misc']['debug'] = 1; in config.php but it's too explicit for public.

any idea? :)
 
3 comments
AdminCP > Plugins & Products > Add New Plugin ...

Hook Location
global_start

Title
Microstats

Execution Order
5

Plugin PHP Code
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
    <plugin active="1" executionorder="5" product="vbulletin">
        <title>Microstats</title>
        <hookname>global_start</hookname>
        <phpcode><![CDATA[// Microstats 1.2.1 Plugin 

$pageendtime = microtime(); 
$starttime = explode(' ', $pagestarttime); 
$endtime = explode(' ', $pageendtime); 
$totaltime = vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], 5); 
$debughtml = '<div style="padding-right: 20px;" align="right"><img src="/images/stat_time.gif" border="0" style="vertical-align:middle" alt="" /> ' . $totaltime . ' sec 
&nbsp;&nbsp;<img src="/images/stat_sql.gif" border="0" style="vertical-align:middle" alt="" /> ' . $vbulletin->db->querycount . ' queries 
&nbsp;&nbsp;<img src="/images/stat_gzip.gif" border="0" style="vertical-align:middle" alt="" /> GZIP Enabled</div>'; 

$debughtml .= ""; 

if (!$vbulletin->config['Microstats']['replacementvariable']) { 

    $vbulletin->config['Microstats']['replacementvariable'] = '<!-- /content area table -->'; 

} 

if (($vbulletin->config['Microstats']['adminonly'] and $vbulletin->userinfo['usergroupid'] == 11) or !$vbulletin->config['Microstats']['adminonly']){ 

    $output = str_replace($vbulletin->config['Microstats']['replacementvariable'], $debughtml . $vbulletin->config['Microstats']['replacementvariable'], $output); 

} 

// Microstats 1.2.1 Plugin]]></phpcode>
    </plugin>
</plugins>


Plugin is Active

Yes.

Then upload your images ;)

/images/stat_time.gif
/images/stat_sql.gif
/images/stat_gzip.gif
 
Parse error: syntax error, unexpected '<' in /home/user/public_html/forum/global.php(29) : eval()'d code on line 18

Note that i want it for VB4
 
Status
Not open for further replies.
Back
Top