0) {
$entries[ $i ][ 'rates' ] = $rating_array[ 'points' ] / $rating_array[ 'votes' ];
}
else {
$entries[ $i ][ 'rates' ] = 0;
}
unset( $rating_array );
// Count comments
if ( $blog_config[ 'blog_enable_comments' ] == true ) {
$comment_file_array = sb_folder_listing( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/comments/', array( '.txt', '.gz' ) );
for ( $k = 0; $k < count( $comment_file_array ); $k++ ) {
$total_number_comments++;
$total_words_comments+=str_word_count( sb_read_file( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/comments/' . $comment_file_array[ $k ] ) );
$total_bytes_comments+=filesize( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/comments/' . $comment_file_array[ $k ] );
}
$entries[ $i ][ 'comments' ]=$k;
$entries[ $i ][ 'views' ]=sb_read_file( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/view_counter.txt');
}
else {
$entries[ $i ][ 'comments' ]=0;
$entries[ $i ][ 'views' ]=0;
}
unset( $comment_file_array );
// Count trackbacks
if ( $blog_config[ 'blog_trackback_enabled' ] == true ) {
$trackback_file_array = sb_folder_listing( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/trackbacks/', array( '.txt', '.gz' ) );
for ( $k = 0; $k < count( $trackback_file_array ); $k++ ) {
$total_number_trackbacks++;
$total_bytes_trackbacks+=filesize( 'content/' . $year_dir . '/' . $month_dir . '/' . sb_strip_extension( $entry_filename ) . '/trackbacks/' . $trackback_file_array[ $k ] );
}
$entries[ $i ][ 'trackbacks' ]=$k;
}
else {
$entries[ $i ][ 'trackbacks' ]=0;
}
unset( $trackback_file_array );
}
unset( $entry_file_array );
// Count static pages
$static_file_array = sb_folder_listing( 'content/static/', array( '.txt', '.gz' ) );
for ( $i = 0; $i < count( $static_file_array ); $i++ ) {
$total_number_statics++;
$total_words_statics+=str_word_count( sb_read_file( 'content/static/' . $static_file_array[ $i ] ) );
$total_bytes_statics+=filesize( 'content/static/' . $static_file_array[ $i ] );
}
unset( $static_file_array );
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'title' ] . ' - ' . $lang_string[ 'general' ];
$entry_array[ 'entry' ] = $entry_array[ 'entry' ] . sprintf( $lang_string[ 'entry_info' ], number_format( $total_number_entries, 0 ), number_format( $total_words_entries, 0 ), number_format( $total_bytes_entries, 0 ) ) . '.
';
$entry_array[ 'entry' ] = $entry_array[ 'entry' ] . sprintf( $lang_string[ 'comment_info' ], number_format( $total_number_comments, 0 ), number_format( $total_words_comments, 0 ), number_format( $total_bytes_comments, 0 ) ) . '.
';
$entry_array[ 'entry' ] = $entry_array[ 'entry' ] . sprintf( $lang_string[ 'trackback_info' ], number_format( $total_number_trackbacks, 0 ), number_format( $total_bytes_trackbacks, 0 ) ) . '.
';
$entry_array[ 'entry' ] = $entry_array[ 'entry' ] . sprintf( $lang_string[ 'static_info' ], number_format( $total_number_statics, 0 ), number_format( $total_words_statics, 0 ), number_format( $total_bytes_statics, 0 ) ) . '.
';
$entry_array[ 'entry' ] = $entry_array[ 'entry' ] . sprintf( $lang_string[ 'vote_info' ], number_format( $total_number_votes, 0 ), number_format( $total_bytes_votes, 0 ) ) . '.
';
echo( theme_staticentry( $entry_array ) );
if ( $blog_config[ 'blog_enable_voting' ] == true ) {
if ( is_array( $entries ) ) {
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'most_rated_entries' ];
usort( $entries, 'sort_rates' );
for ( $i=0; $i' . $entries[ $i ][ 'subject' ] . ' (' . number_format( $entries[ $i ][ 'rates' ], 2 ) . ').
';
}
echo( theme_staticentry( $entry_array ) );
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'most_voted_entries' ];
usort( $entries, 'sort_votes' );
for ( $i=0; $i' . $entries[ $i ][ 'subject' ] . ' (' . number_format( $entries[ $i ][ 'votes' ], 0 ) . ').
';
}
echo( theme_staticentry( $entry_array ) );
}
}
if ( $blog_config[ 'blog_enable_comments' ] == true ) {
if ( is_array( $entries ) ) {
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'most_viewed_entries' ];
usort( $entries, 'sort_views' );
for ( $i=0; $i' . $entries[ $i ][ 'subject' ] . ' (' . number_format( $entries[ $i ][ 'views' ], 0 ) . ').
';
}
echo( theme_staticentry( $entry_array ) );
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'most_commented_entries' ];
usort( $entries, 'sort_comments' );
for ( $i=0; $i' . $entries[ $i ][ 'subject' ] . ' (' . number_format( $entries[ $i ][ 'comments' ], 0 ) . ').
';
}
echo( theme_staticentry( $entry_array ) );
}
}
if ( $blog_config[ 'blog_trackback_enabled' ] ) {
if ( is_array( $entries ) ) {
$entry_array = array();
$entry_array[ 'subject' ] = $lang_string[ 'most_trackbacked_entries' ];
usort( $entries, 'sort_trackbacks' );
for ( $i=0; $i' . $entries[ $i ][ 'subject' ] . ' (' . number_format( $entries[ $i ][ 'trackbacks' ], 0 ) . ').
';
}
echo( theme_staticentry( $entry_array ) );
}
}
}
?>
'>