View Full Version : Administrative and Maintenance Tools - ZH - Debug Mode
This modification was brought to you by
KXDesign
http://www.kxdesign.com/
~Hack name
Debug Mode
~Hack description
Enables debug mode in admincp/modcp and forums
~Hack options
Turn on/off in forums
Turn on/off in admincp
Turn on/off in modcp
Turn on/off in archive
~Hack info
File uploads: 0
Template edits: 0
File edits: 0
Plugins: 4
SQL Queries: 0
Phrases: 9
Settings: 4
Install time: 2 sec
Install level: Easy
~Hack installation
Step 1: Import product
~Hack screenshots
None
~Hack copyright
This may not be distributed,released or claimed as your work without author's permission.
New version here,with explain feature :) http://www.kxdesign.com/plugins/53-kx-debug-mode.html
Barakat
12-03-2006, 12:36 AM
thanks ziki
No problem.I think this should be vb default
ninjamaster
12-04-2006, 06:57 PM
thanks ;)
KW802
12-05-2006, 05:00 PM
Thanks. :) Being able to debug only in ACP makes life easier.
gldtn
01-03-2007, 05:11 PM
No problem.I think this should be vb default
Works great, thanks for the hack ;)
Indeed, it should be vBs default!
Yes to make developer life easier :p
polly977
01-06-2007, 09:59 PM
Explain SQL statements is not working in ACP if ACP debug flag is enabled with this modification.
What do you expect it to do?
BigJimTheLug
01-10-2007, 04:27 PM
Can I get an explanation of what this does.
Please give an explanation that is more in-depth than, "This mod enables debug mode."
Thank you.
If you don't understand please refer to vbulletin manual.THis is for developers mostly
Logikos
01-24-2007, 06:30 AM
Same thing here: http://www.vbhackers.com/f76/vbdebug-options-2921/
The problem with this is you can't use the explain option because the statement is executed after the global.php include. At least this is the problem I had with my hack.
bjohnson045
04-10-2007, 07:07 PM
yah doesnt work
Yes I know that is known thing.
UltimateOreo!
06-04-2007, 01:13 AM
Fantastic, it works perfectly on the newest version of VB. Installed!
albibak
10-28-2007, 07:15 PM
Great hack Ziki, very usefull.
Find in attachment the french translation ;)
testebr
12-06-2007, 07:16 PM
Any idea how to enable option "explain" with this mod?
Not possible with a plugin,for that you have to edit the files
REVHEAD
02-10-2008, 09:13 AM
this mod is great thanyou.
Andreas
02-10-2008, 09:23 AM
Not possible with a plugin,for that you have to edit the files
Believe me, it is (to some great extend - the only query you miss is datastore setup) - i've already done this:
Create a plugin with execution order = 1 on init_startup
Check if explain=1, otherweise done
Copy the Resouce ID # o fthe mySQL connection and all other stuff you need from $db
Require class_database_explain.php
Unset $db, create a new object of class vB_Database_Explain and set the properties
And you're done :)
Sample Code
if ($condition_to_activate_explain)
{
switch (strtolower($vbulletin->config['Database']['dbtype']))
{
// load standard MySQL class
case 'mysql':
case '':
{
require_once(DIR . '/includes/class_database_explain.php');
$newdb =& new vB_Database_Explain($vbulletin);
break;
}
// load MySQLi class
case 'mysqli':
{
require_once(DIR . '/includes/class_database_explain.php');
$newdb =& new vB_Database_MySQLi_Explain($vbulletin);
break;
}
}
if (!empty($newdb))
{
$newdb->appname = $db->appname;
$newdb->appshortname = $db->appshortname;
$newdb->database = $db->database;
$newdb->connection_master = $db->connection_master;
$newdb->connection_slave =& $newdb->connection_master;
$newdb->connection_recent = $db->connection_recent;
$newdb->multiserver = $db->multiserver;
$newdb->shutdownqueries = $db->shutdownqueries;
$newdb->sql = $db->sql;
$newdb->reporterror = $db->reporterror;
$newdb->error = $db->error;
$newdb->errno = $db->errno;
$newdb->maxpacket = $db->maxpacket;
$newdb->locked = $db->locked;
$newdb->querycount = $db->querycount;
$db = $newdb;
$vbulletin->db =& $db;
}
}
New version here,with explain feature :) http://www.kxdesign.com/plugins/53-kx-debug-mode.html
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.