- Kod: Tümünü seç
################################################################
## MOD Title: İstatistik bilgilerine bilgi ekle
## MOD Author: Nix82 | http://nix82.too.it
## MOD Modify: sabri ünal <sabriunal@tnn.net>
## MOD Description: Panele arama tablosu ve mesaj tablosu büyüklüğünü de ekler
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit: 3
## admin/index.php
## templates/subSilver/admin/index_body.tpl
## language/lang_english/lang_admin.php
## Included Files: n/a
##############################################################
## Author Notes:
## Bu kişinin modu daha fazla özellik içeriyordu, fakat stabil değildi
## çalışan özellikleri topladım, 10 özellikten 2 özellik stabil çıktı
##############################################################
#
#-----[ OPEN ]---------------------------------------------
#
admin/index.php
#
#-----[ FIND ]---------------------------------------------
#
#
"L_USERS_PER_DAY" => $lang['Users_per_day'],
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Stats & info MOD
"L_SIZE_POSTS_TABLES" => $lang['Size_posts_tables'],
"L_SIZE_SEARCH_TABLES" => $lang['Size_search_tables'],
// Stats & info MOD
#
#-----[ FIND ]---------------------------------------------
#
#
$dbsize = 0;
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Stats & info MOD
$size_posts_tables = 0;
$size_search_tables = 0;
// Stats & info MOD
#
#-----[ FIND ]---------------------------------------------
#
#
if( strstr($tabledata_ary[$i]['Name'], $table_prefix) )
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Stats & info MOD
if( $tabledata_ary[$i]['Name'] == POSTS_TABLE || $tabledata_ary[$i]['Name'] == POSTS_TEXT_TABLE)
{
$size_posts_tables += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
if( $tabledata_ary[$i]['Name'] == SEARCH_WORD_TABLE || $tabledata_ary[$i]['Name'] == SEARCH_MATCH_TABLE)
{
$size_search_tables += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
// Stats & info MOD
#
#-----[ FIND ]---------------------------------------------
#
#
if ( is_integer($dbsize) )
{
if( $dbsize >= 1048576 )
{
$dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
}
else if( $dbsize >= 1024 )
{
$dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
}
else
{
$dbsize = sprintf("%.2f Bytes", $dbsize);
}
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Stats & info MOD
$size_posts_tables = sprintf("%.2f MB", ( $size_posts_tables / 1048576 ));
$size_search_tables = sprintf("%.2f MB", ( $size_search_tables / 1048576 ));
// Stats & info MOD
#
#-----[ FIND ]---------------------------------------------
#
#
"NUMBER_OF_USERS" => $total_users,
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Stats & info MOD
"SIZE_POSTS_TABLES" => $size_posts_tables,
"SIZE_SEARCH_TABLES" => $size_search_tables,
// Stats & info MOD
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/index_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
#
<tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_USERS}:</td>
<td class="row2"><b>{NUMBER_OF_USERS}</b></td>
<td class="row1" nowrap="nowrap">{L_USERS_PER_DAY}:</td>
<td class="row2"><b>{USERS_PER_DAY}</b></td>
</tr>
#
#-----[ AFTER, ADD ]---------------------------------------------
#
<tr>
<td class="row1" nowrap="nowrap">{L_SIZE_SEARCH_TABLES}:</td>
<td class="row2"><b>{SIZE_SEARCH_TABLES}</b></td>
<td class="row1" nowrap="nowrap">{L_SIZE_POSTS_TABLES}:</td>
<td class="row2"><b>{SIZE_POSTS_TABLES}</b></td>
</tr>
#
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]---------------------------------------------
#
#
$lang['Not_available'] = 'Not available';
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Add stats & info MOD
$lang['Size_posts_tables'] = 'Tables posts size';
$lang['Size_search_tables'] = 'Tables search size';
// Add stats & info MOD
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM