Change the code for the plugin: latest_gallery_images ->hook:forumhome_complete to:
Code:
// #################### Latest Gallery-Additions #######################
// fetch the permissions for each forum
global $vbulletin;
$thumbs = $db->query_read("SELECT gallery, threadid, firstpostid, ". TABLE_PREFIX . "thread.title, attachmentid, ". TABLE_PREFIX . "attachment.dateline FROM ". TABLE_PREFIX . "attachment, ". TABLE_PREFIX . "thread, ". TABLE_PREFIX . "forum
WHERE gallery='1' AND ". TABLE_PREFIX . "thread.forumid=". TABLE_PREFIX . "forum.forumid AND ". TABLE_PREFIX . "thread.firstpostid = ". TABLE_PREFIX . "attachment.postid AND ". TABLE_PREFIX . "attachment.dateline < " . TIME() ." ORDER BY RAND() LIMIT 4");
while ($gallery = $db->fetch_array($thumbs))
{
eval('$latestgallery .= "' . fetch_template('latestgallery') . '";');
This should do it.