Version: 1.00, by MrEyes
Developer Last Online: May 2017
Category: Administrative and Maintenance Tools -
Version: 3.7.0
Rating:
Released: 05-01-2008
Last Update: Never
Installs: 7
Re-useable Code Code Changes Translations
No support by the author.
Summary
As just about everybody knows you can enabled vBulletin debug mode by placing the following:
Code:
$config['Misc']['debug'] = true;
into the includes/config.php file. While the information this provides is extremely useful it has IMHO two major drawbacks:
Once added debug output is visible and enabled for all users of the forum.
You have to edit files on the server to enable debug mode. Yes this doesn't take long but it is still a pain.
The following hack go some way towards solving both of these drawbacks. In summary you make a single one time edit to the config.php file, once done you can enabled/disable debug mode via URL querystring arguments.
How do I use this?
Once installed, if you want to see debug output you simple add the following to the end of the URL you are viewing:
Open this in your favourite text editor and scroll to the last line
Directly above the "?>" paste in the following text:
Code:
if ($_GET["debugmode"] == "XXX")
{
$config['Misc']['debug'] = true;
}
Change the XXX part to some difficult to guess value (no spaces and only alphanumeric characters). If you prefer you can also change the "debugmode" query string key to something else to give a little extra security.
Save and upload the config.php file.
Once uploaded you can now view debug output by adding the querystring arguments as described above to the URL you are viewing. No more config changes and debug info is only accessible to those who know you secret "XXX" key.
Gotchas!!
This does not work when submitting data, so for example if you enter debug mode for post reply, when you click the button and submit the fact that you were in debug mode on the submission page is not carried across, and as you cannot edit the post URL the resulting page does not display debug output.
I did attempt to rectify this by added a check value into "$_SESSION", however it would seem that VB's internal session handling does not allow this to be carried through.
So if anybody has any suggestions for this issue, feel free to post them.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.