I'm using a number 'boxes' on my forum page to pull in information from the forum (such as calendar, buddies, events, etc, etc. They're displayed on sidebars in the forum. The problem is that some of the variables I'm using are conflicting with many other variables the forum uses and it's messing info up (for example, the mini calendar and events is screwing up when people submit calendar events - someone tries to submit an event for the first and it submits to another day for some reason)
The only thing I can think to solve this is either change all the variable names in ALL my side-box includes or put them inside of functions.
I'm familiar with using functions and as far as I know have set the globals correctly, however no matter what I do, it will not output the templates. I've looked at other functions in VB as examples and I just have no clue what I'm doing wrong. Does something else need to be included? even something as simple as the following *will not* work:
PHP Code:
function testfunction() {
global $bbuserinfo,$testtemplate;
if ($bbuserinfo[userid]) {
eval("\$testtemplate = \"".gettemplate('test_template')."\";");
}
}
testfunction();
whereas if I leave the function out of it, it does work. Any ideas?