vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - [GAE] Global Array Examiner (https://vborg.vbsupport.ru/showthread.php?t=197481)

ReCom 11-27-2008 10:00 PM

[GAE] Global Array Examiner
 
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.


All times are GMT. The time now is 02:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01221 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete