Try using hook location forumdisplay_complete instead of global_start, and go back to your original code (except you don't need $GLOBALS[displayresources], just use $displayresources).
A hook location is a place in the code. If you open the file global.php and search for global_start, you can see what a hook location looks like. It basically just inserts the plugin code at that point. The reason global_start didn't work is that it's a location that doesn't have the variables defined that you need, and it's not the right place to include a file like forumdisplay.php (in fact forumdisplay.php includes global.php, so that couldn't really work).
Also, you defined the $show['forumdisplay'] correctly, but if it's just going to be defined as 'true' always, then you don't really need it, you could just remove that condition from the template instead.
|