<?php
if(!is_object($vbulletin))
{
     exit;
}
$hook_query_fields = ",
user.userid AS lastposterid, user.avatarrevision AS avatarrevision, post_user.avatarrevision AS post_avatarrevision,
customavatar.width AS avwidth, customavatar.height AS avheight,
post_customavatar.width AS post_avwidth, post_customavatar.height AS post_avheight,
NOT ISNULL(post_customavatar.userid) AS post_customavatar,
NOT ISNULL(customavatar.userid) AS hascustom
";
$hook_query_joins = "
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.username = thread.lastposter)
LEFT JOIN " . TABLE_PREFIX . "user AS post_user ON(post_user.userid = thread.postuserid)
LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "avatar AS post_avatar ON(post_avatar.avatarid = post_user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS post_customavatar ON(post_customavatar.userid = thread.postuserid)
";
?>