var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); function top_commentators(){ global $wpdb; $length = 9; // Максимальная длинна имени в символах, если стоит 0, то имя не обрезается $month = true; // true - за текущий месяц, false - за все время $comment = true; // показывать количество комментариев $nofollow = true; // ссылки nofollow $count = 6; // количество комментаторов $col = 3; // количество колонок $avatarSize = 80; // размер аватара $exceptionEmail = 'mail1@dom.ru, mail2@mod.ru, forex4you.smirnov@yandex.ru'; // мыла-исключения $results = $wpdb->get_results(' SELECT COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url FROM (select * from '.$wpdb->comments.' order by comment_ID desc) as pc WHERE comment_author_email != "" AND comment_type = "" AND comment_approved = 1 AND comment_author_email NOT IN ('.preg_replace('/([\w\d\.\-_]+@[\w\d\.\-_]+)(,? ?)/','"\\1"\\2',$exceptionEmail).')'. ($month ? 'AND month(comment_date) = month(now()) AND year(comment_date) = year(now())' : ''). 'GROUP BY comment_author_email ORDER BY comments_count DESC LIMIT '.$count ); $output = "
".get_avatar($result->comment_author_email,$avatarSize)." ";
if ($length and $length | ";
}
if ($i<=$col) $output .= "