PDA

View Full Version : Global Variable for a directory


jasharen
06-30-2006, 02:05 AM
Ok looking for a little help here :)

What I want to do is have a global variable containing the location of my custom files for vBulletin. So that anytime I want to refer to a custom php file that I've created I can just use this variable, with the filename appended to it. I don't like the idea of having my files mixed in all over the place and would like to keep them contained together.

Any help would be greatly appriciated!

sabret00the
06-30-2006, 07:27 AM
add a setting to an already globalised array/object such as the $vBulletin->options. there's not muhc of a better use for the ability you can add custom settings than yours :)

jasharen
06-30-2006, 11:58 AM
What hook should I use to do that? And could you give an example?

Disclaimer: Still very new to this :)

sabret00the
06-30-2006, 12:27 PM
throw your board into debug mode, go into the admincp, open up the vboptions, add a setting group, add a setting i.e. my_personal_mods and then save, when you're done you'll be able to call it by just typing
$vbulletin->options['my_personal_mods']