Top Voted posts widget

Top voted posts widget needs post type settings. I only need to display top voted custom posts in the widget. Is there any way to do this? I looked into class_wdpv_model.php file and found this:

$sql = "SELECT *, SUM(vote) as total FROM " . // SUM(vote) for getting the count - GROUP BY post_id to get to individual posts
				$this->db->base_prefix . "wdpv_post_votes LEFT JOIN " . // Get the post data too - LEFT JOIN what we need
				$this->db->prefix . "posts ON " . $this->db->prefix . "posts.ID=" .	$this->db->base_prefix . "wdpv_post_votes.post_id " .
				"WHERE site_id={$site_id} AND blog_id={$blog_id} " . // Only posts on set site/blog

and changed this line:

"WHERE site_id={$site_id} AND blog_id={$blog_id} "

Like this(http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query):

"WHERE site_id={$site_id} AND blog_id={$blog_id} AND $wpdb->posts.post_type = 'post'"

But it didn't seem to work. can anyone help?