Publicidad

Incontenible

Opinión Gráfica

Cartelera: Mujeres al poder en Zenit Tattoo

LAS NOTICIAS EN TU BUZÓN

Suscríbete a nuestros boletines para que estés al tanto de los artículos más relevantes publicados en OnCuba.

LAS NOTICIAS EN TU BUZÓN

Diario

Semanal

Breaking News

Media

Publirreportaje

Peleador, según Dorian
125279

Otros artículos

', $after = '', $show_pass_post = false, $duration='') { global $wpdb; $request = "SELECT ID, post_title, post_author,(SELECT user_nicename from $wpdb->users where ID = post_author)as post_author_name, COUNT($wpdb->comments.comment_post_ID) AS 'comment_count' FROM $wpdb->posts, $wpdb->comments"; $request .= " WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish'"; if(!$show_pass_post) $request .= " AND post_password =''"; if($duration !="") { $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date "; } $request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts"; $posts = $wpdb->get_results($request); $output = ''; if ($posts) { foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $comment_count = $post->comment_count; $permalink = get_permalink($post->ID); $output .= $before . '' . $post_title . ' (' . $comment_count.')'.$post->post_author_name . $after; } } else { $output .= $before . "No hay nada" . $after; } echo $output; } entradas_mas_comentadas(); */?>