Hi again,
I have kind of settled and am not really happy with the way it works at the moment. What's happening is I have a template file for the appearance of each section (e.g. admin, moderator, public etc.), and the display class get's the content of the template and loads the appropriate content based on the URI (e.g. for
http://localhost/ the template
/template/public/index.php is loaded and
/public/home/index.php is added to the template).
However, if someone were to add an onload to the body tag in the template, things would stop working because currently it simply replaces the <body> tag with <body onload="..."> (which is messy but I'm really no good at regexp!). So ideally, I would like to check the template to see if onload="..." is specified, and if it is, get what's currently between the "..." and add it to the static var display::$onload so I can add other onload events throughout the display class before outputting the page.
If that clears things up a bit I'd greatly appreciate a bit of know-how from someone who knows what they're doing with preg_match!
Thanks,
Ben