PDA

View Full Version : Administrative and Maintenance Tools - [GAE] Global Array Examiner


ReCom
11-27-2008, 10:00 PM
This is not really a mod because there is nothing to install. Only one file to upload to vbulletin directory. But anyway ..

Global Array Examiner is a tool that assists vBulletin developers by exposing the contents of global arrays like $_SERVER, $_COOKIE, $vbulletin->userinfo etc using a nice table representation.

To install, simply upload the attached gae.php to your vbulletin directory.

To use it, simply call the file from your web browser, for example www.yoursite.net/forum/gae.php. Then use the dropdown to examine the global array you want.

To uninstall, simply delete the file from your server. Really, this php file does not modify your database or vbulletin settings in any way.

So far, GAE exposes the following global arrays:

$_SERVER
$_COOKIE
$vbulletin->userinfo
$vbulletin->options
$vbulletin->bf_ugp
$vbulletin->config
$stylevar
$vbphrase


Also, you can use GAE to examine $_POST (form submission data) by temporarily making your form submit to gae.php?examine=post (i.e. in your form tag set action="pathto/gae.php?examine=post" or action="pathto/gae.php?examine=post&sort=1").

Due to the nature of these arrays, they may contain sensitive information that any sane admins do not want to expose to the whole internet. Thus, GAE has a mechanism that assigns security clearance level to each global array it exposes:

Level 0 (anybody): $_COOKIE, $vbulletin->userinfo, $vbulletin->bf_ugp, $stylevar
Level 1 (registered only)
Level 2 (mod and above): $vbphrase
Level 3 (admin and above): $_SERVER, $vbulletin->options
Level 4 (superadmin): $vbulletin->config


These settings can be easily modified in gae.php .. if you are using GAE you will probably know how to do it by just looking at the source code ;)

I created this tool to assist me in developing and debugging my mods. I hope other coders will benefit from GAE the way I do. Happy coding! :D

Note: since there's not much vbulletin architecture used in the code, I expect GAE can be used in any recent vBulletin versions, well maybe from 3.0 up until 3.9.x :p

NolF
11-29-2008, 11:23 PM
very useful mate :) Thx

s810car
11-29-2008, 11:46 PM
freaking awesome!! :D I love it, installed!

Is there a way to have it configured to view local variables, ones created by 'foo'.php or javascript responses (such as running file side by side with another window and testing onclick , onsubmit, onmouseover etc. type of event triggers)? The post option is a HUGE help :D

ZomgStuff
11-30-2008, 02:24 AM
that is freaking useful, this should be stickied in the programming forum. Very useful for developers!

Nominated for MOTM.

Leo Brazil
12-01-2008, 10:06 AM
Very useful. Installed.