open( "comments-last", $config['skin'] ); if( ! $commentslast ) { $sql = $db->query( "SELECT comments.id AS comment_id, comments.post_id, comments.autor, post.title, post.alt_name, post.comm_num, comments.date FROM " . PREFIX . "_post AS post RIGHT JOIN (SELECT * FROM " . PREFIX . "_comments AS c WHERE 1=1 ORDER BY c.date DESC) AS comments ON post.id = comments.post_id AND post.approve=1 GROUP BY post.id ORDER BY comments.date DESC LIMIT 0, 15"); while( $row = $db->get_row() ) { if( strlen( $row['autor']) > 10 ) $user = substr( $row['autor'], 0, 10 ); else $user = $row['autor']; if( strlen( $row['title']) > 15 ) $title = substr( $row['title'], 0, 15 ) . "..."; else $title = $row['title']; $autor = "" . $user . ""; $full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html"; $post = "" . stripslashes( $title ) . "" ; $lcomm .= "
  • {$row['comm_num']}{$autor} - {$post}
  • "; } $commentslast= ""; $db->free(); $cache->save( "comments-last", $commentslast, $config['skin'] ); } ?>