Jeez!
PHP Code:
$welcomestatss = $db->query("
SELECT post.dateline, thread.lastpost, user.joindate
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(thread.firstpostid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
WHERE 1=1
");
This query selects ALL posts ... every time you visit Forumhome.
Doesn't surprise me that this causes HEAVY load.
This query must be optimized to process only thos posts that are newer then today midnight or last visit (whatever is older).
Furthermore the "Template-Caching" isn't good:
PHP Code:
$globaltemplates = array_merge($globaltemplates, array('welcome_panel'));
cache_templates($globaltemplates, $style['templatelist']);
unset($globaltemplates);
This code should be removed.
And the following put in Hook cache_templates:
PHP Code:
$globaltemplates = array_merge($globaltemplates, array('welcome_panel'));