[BETA] Debug infos (Another one?)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
Daijoubu
Registered User
Posts: 64
Joined: Wed Aug 21, 2002 4:31 pm
Location: Montreal QC Canada
Contact:

[BETA] Debug infos (Another one?)

Post by Daijoubu »

Well, I couldn't find the old one so I made mine
Shouldn't have any bugs (heh, I've made many mods for IPB)
Pretty straight foward...

Output:
[ Script Execution Time: 0.0897 | 12 queries used | GZIP Enabled ]

Code: Select all

############################################################## 
## MOD Title: Debug infos
## MOD Author: Daijoubu < daijoubu@ptprophecy.com > (N/A) http://ptprophecy.com
## MOD Description: Shows execution time, number of queries used and GZIP state
## MOD Version: 1.0.0
## 
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: extension.inc
##		  includes\page_tail.php
##		  templates\subSilver\overall_footer.tpl
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: For extra accuracy, the timer have been moved.
## Also cleaned up/optimized the code a litte bit...
##############################################################
## MOD History:
##
##   2004-03-03 - Version 1.0.0
##      - Initial release for phpBB 2.0.6
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#

extension.inc

#
#-----[ FIND ]------------------------------------------
#

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

//
// Change this if your extension is not .php!
//
$phpEx = "php";

$starttime = 0;

#
#-----[ REPLACE WITH ]------------------------------------------
#

$starttime = array_sum(explode (' ', microtime()));

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

//
// Change this if your extension is not .php!
//
$phpEx = 'php';

#
#-----[ OPEN ]------------------------------------------
#

includes\page_tail.php

#
#-----[ FIND ]------------------------------------------
#

$template->assign_vars(array(
	'PHPBB_VERSION' => '2' . $board_config['version'],
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 
	'ADMIN_LINK' => $admin_link)
);

#
#-----[ REPLACE WITH ]------------------------------------------
#

$template->assign_vars(array(
				'PHPBB_VERSION'		=> '2'.$board_config['version'],
				'TRANSLATION_INFO'	=> isset($lang['TRANSLATION_INFO']) ? $lang['TRANSLATION_INFO'] : '',
				'ADMIN_LINK'		=> $admin_link,
				'DEBUG'			=> '[ Script Execution Time: '.number_format((array_sum(explode(' ', microtime())) - $starttime), 4).' | '.$db->num_queries.' queries used | '. ($board_config['gzip_compress'] ? 'GZIP Enabled' : 'GZIP Disabled') .' ]'
			    )
		      );

#
#-----[ OPEN ]------------------------------------------
#

templates\subSilver\overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#


<div align="center"><span class="copyright"><br />{ADMIN_LINK}<br />

#
#-----[ REPLACE WITH ]------------------------------------------
#

<div class="copyright" align="center">{ADMIN_LINK}<br />{DEBUG}<br /><br />

#
#-----[ FIND ]------------------------------------------
#

</span></div>

#
#-----[ REPLACE WITH ]------------------------------------------
#

</div>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
thebuisnessman
Registered User
Posts: 86
Joined: Thu Jan 29, 2004 2:07 am

Post by thebuisnessman »

And what does this do? Describe the errors instead of just error on line ...?
User avatar
Rookie7
Registered User
Posts: 189
Joined: Mon Mar 10, 2003 3:32 pm
Contact:

Re: [BETA] Debug infos (Another one?)

Post by Rookie7 »

Daijoubu wrote: Output:
[ Script Execution Time: 0.0897 | 12 queries used | GZIP Enabled ]
Daijoubu
Registered User
Posts: 64
Joined: Wed Aug 21, 2002 4:31 pm
Location: Montreal QC Canada
Contact:

Post by Daijoubu »

Display a debug output similar to IPB (at the bottom...)
thebuisnessman
Registered User
Posts: 86
Joined: Thu Jan 29, 2004 2:07 am

Post by thebuisnessman »

Ahh thank you for clarifying.
Post Reply

Return to “[2.0.x] MODs in Development”