<?php
if(!is_object($vbulletin))
{
     exit;
}
if($vbulletin->userinfo['userid'] AND in_coventry($vbulletin->userinfo['userid'], true))
{
      // do nothing
}else{
      unset($counter_select);

      $tachyjoin .= "
      LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(thread.threadid = forum.lastthreadid AND thread.lastpostid = forum.lastpostid)
      LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.username = thread.lastposter)
      LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid)
      LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)";

      $counter_select .= "
      forum.forumid, forum.lastpost, forum.lastposter, forum.lastthread, forum.lastthreadid,
      forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid,
      user.userid AS lastposterid, user.avatarrevision,
      customavatar.width AS avwidth, customavatar.height AS avheight,
      customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb,
      NOT ISNULL(customavatar.userid) AS hascustom";
}
?>