2010-05-23, 09:02 PM
A simplified version of what MyBB does is pull the templates from the database, and then store them in an array for the duration of the script. The $templates->get() function simply returns the array, which you then eval("\$myVar = \"" . $templates->get("whatever") . "\";"); which handles the variable replacing.