diff --git a/admin/panels/entry/admin.entry.php b/admin/panels/entry/admin.entry.php index 3ad3b48..a5ff2a2 100755 --- a/admin/panels/entry/admin.entry.php +++ b/admin/panels/entry/admin.entry.php @@ -24,7 +24,7 @@ 'commedit' => false, 'delete' => false, 'cats' => true, - 'stats' => false + 'stats' => true ); var $defaultaction = 'list'; diff --git a/admin/panels/entry/admin.entry.stats.php b/admin/panels/entry/admin.entry.stats.php index a01680d..a60e25f 100644 --- a/admin/panels/entry/admin.entry.stats.php +++ b/admin/panels/entry/admin.entry.stats.php @@ -16,7 +16,7 @@ class admin_entry_stats extends AdminPanelAction { function format_number($num, $sep) { - $ss = $sep*$sep; + $ss = $sep * $sep; $i = 0; while ( $num > $ss ) { $num = (float) $num / $sep; @@ -29,8 +29,8 @@ function setup() { global $lang; - $lang['admin']['entry']['stats'] = array(); - $this->smarty->assign('warnings', '[Dev Notice] Panel lang strings are currently hardcoded.'); + $lang ['admin'] ['entry'] ['stats'] = array(); + // $this->smarty->assign('warnings', '[Dev Notice] Panel lang strings are currently hardcoded.'); } function main() { @@ -47,13 +47,13 @@ $comments = $entries = array( 'count' => 0, - 'words' => 0, - 'chars' => 0, - 'size' => 0, - 'topten' => array() + 'words' => 0, + 'chars' => 0, + 'size' => 0, + 'topten' => array() ); - $entries['comments'] = 0; + $entries ['comments'] = 0; $toplist = array(); @@ -61,27 +61,25 @@ list($id, $e) = $q->getEntry(); - $entries['count']++; - $entries['words'] += str_word_count($e['subject']) + - str_word_count($e['content']); + $entries ['count'] ++; + $entries ['words'] += str_word_count($e ['subject']) + str_word_count($e ['content']); - $entries['chars'] += strlen($e['subject']) + - strlen($e['content']); + $entries ['chars'] += strlen($e ['subject']) + strlen($e ['content']); - $entries['size'] += filesize(entry_exists($id)); + $entries ['size'] += filesize(entry_exists($id)); $cc = $q->hasComments(); - $entries['comments'] += $cc; - $toplist[$id] = $cc; - $toplistsubj[$id] = $e['subject']; + $entries ['comments'] += $cc; + $toplist [$id] = $cc; + $toplistsubj [$id] = $e ['subject']; - $comments['count']+= $cc; + $comments ['count'] += $cc; while ($q->comments->hasMore()) { list($cid, $c) = $q->comments->getComment(); - $comments['words'] += str_word_count($c['content']); - $comments['chars'] += strlen($c['content']); - $comments['size'] += filesize(comment_exists($id, $cid)); + $comments ['words'] += str_word_count($c ['content']); + $comments ['chars'] += strlen($c ['content']); + $comments ['size'] += filesize(comment_exists($id, $cid)); } } @@ -89,12 +87,12 @@ arsort($toplist); $i = 0; - foreach($toplist as $k=>$v) { - if ($i>=10 || $v < 1) + foreach($toplist as $k => $v) { + if ($i >= 10 || $v < 1) break; - $entries['topten'][$k] = array( - 'subject' => $toplistsubj[$k], + $entries ['topten'] [$k] = array( + 'subject' => $toplistsubj [$k], 'comments' => $v ); $i++; @@ -104,37 +102,37 @@ $binunit = array('Bytes', 'KiloBytes', 'MegaBytes', 'GigaBytes', 'TeraBytes', 'Many', 'ManyBytes'); - list($count, $approx) = $this->format_number($entries['count'], 1000); - $entries['count'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($entries ['count'], 1000); + $entries ['count'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($entries['words'], 1000); - $entries['words'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($entries ['words'], 1000); + $entries ['words'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($entries['chars'], 1000); - $entries['chars'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($entries ['chars'], 1000); + $entries ['chars'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($entries['comments'], 1000); - $entries['comments'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($entries ['comments'], 1000); + $entries ['comments'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($entries['size'], 1024); - $entries['size'] = $count .' '. $binunit[$approx]; + list($count, $approx) = $this->format_number($entries ['size'], 1024); + $entries ['size'] = $count . ' ' . $binunit [$approx]; $this->smarty->assign('entries', $entries); - list($count, $approx) = $this->format_number($comments['count'], 1000); - $comments['count'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($comments ['count'], 1000); + $comments ['count'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($comments['words'], 1000); - $comments['words'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($comments ['words'], 1000); + $comments ['words'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($comments['chars'], 1000); - $comments['chars'] = $count .' '. $decunit[$approx]; + list($count, $approx) = $this->format_number($comments ['chars'], 1000); + $comments ['chars'] = $count . ' ' . $decunit [$approx]; - list($count, $approx) = $this->format_number($comments['size'], 1024); - $comments['size'] = $count .' '. $binunit[$approx]; + list($count, $approx) = $this->format_number($comments ['size'], 1024); + $comments ['size'] = $count . ' ' . $binunit [$approx]; $this->smarty->assign('comments', $comments); diff --git a/admin/panels/entry/admin.entry.stats.tpl b/admin/panels/entry/admin.entry.stats.tpl index ce435ab..0e98e99 100644 --- a/admin/panels/entry/admin.entry.stats.tpl +++ b/admin/panels/entry/admin.entry.stats.tpl @@ -1,29 +1,25 @@ -
You have %s -entries using %s characters -in %s words.
-Total disk space is -%s.
"|sprintf:$entries.count:$entries.chars:$entries.words:$entries.size} +{$panelstrings.you_have} {"%s"|sprintf:$entries.count} +{$panelstrings.entries_using} {"%s"|sprintf:$entries.chars} {$panelstrings.characters_in} {"%s"|sprintf:$entries.words} {$panelstrings.words}.
+{$panelstrings.total_disk_space_is} {"%s"|sprintf:$entries.size}.
-You have %s -comments using %s characters -in %s words.
-Total disk space is -%s.
"|sprintf:$comments.count:$comments.chars:$comments.words:$comments.size} +{$panelstrings.you_have} {"%s"|sprintf:$comments.count} +{$panelstrings.comments_using} {"%s"|sprintf:$comments.chars} {$panelstrings.characters_in} {"%s"|sprintf:$comments.words} {$panelstrings.words}.
+{$panelstrings.total_disk_space_is} {"%s"|sprintf:$comments.size}.
{if $entries.topten} -Použijte formulář (dole) pro úpravu kategorií.
Každá kategorie by měla být v tomto formátu - "jméno kategorie: id_number". Položky odsazené pomlčkami tvoří hierarchii.
+$lang ['admin'] ['entry'] ['cats'] = array( + 'head' => 'Upravit kategorie', + 'descr' => 'Použijte formulář (dole) pro úpravu kategorií.
Každá kategorie by měla být v tomto formátu - "jméno kategorie: id_number". Položky odsazené pomlčkami tvoří hierarchii.
Příklad:
@@ -136,20 +137,34 @@ Hlavní :1 Různé :5 -Technologie :6', - 'clear' => 'Smazat všechna data', + 'clear' => 'Smazat všechna data', - 'fset1' => 'Úprava', - 'fset2' => 'Použít změny', - 'submit' => 'Uložit' - ); + 'fset1' => 'Úprava', + 'fset2' => 'Použít změny', + 'submit' => 'Uložit' +); - $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( +$lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( - 1 => 'Kategorie byli úspěšně uložené', - -1 => 'Při pokusu uložit kategorie nastala chyba', - 2 => 'Kategorie byly smazané', - -2 => 'Při pokusu smazat kategorie nastala chyba.', - -3 => 'ID kategorií musí být KLADNÉ!!' - ); + 1 => 'Kategorie byli úspěšně uložené', + -1 => 'Při pokusu uložit kategorie nastala chyba', + 2 => 'Kategorie byly smazané', + -2 => 'Při pokusu smazat kategorie nastala chyba.', + -3 => 'ID kategorií musí být KLADNÉ!!' +); - ?> +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Statistiky', + 'entries' => 'Záznamy', + 'you_have' => 'Máte', + 'entries_using' => 'záznamů s', + 'characters_in' => 'znaky v', + 'words' => 'slovech', + 'total_disk_space_is' => 'Celkový prostor v paměti je', + 'comments' => 'Komentáře', + 'comments_using' => 'komentářů s', + 'the' => '', + 'most_commented_entries' => 'nejkomentovanější příspěvky' +); +?> diff --git a/fp-interface/lang/de-de/lang.admin.entry.php b/fp-interface/lang/de-de/lang.admin.entry.php index b154afe..a562e74 100644 --- a/fp-interface/lang/de-de/lang.admin.entry.php +++ b/fp-interface/lang/de-de/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Beiträge verwalten', 'write' => 'Beitrag schreiben', - 'cats' => 'Kategorien verwalten' + 'cats' => 'Kategorien verwalten', + 'stats' => 'Statiskiken' ); /* default action */ @@ -152,4 +153,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Die Kategorie ID muss größer als 0 sein. Der Wert 0 ist nicht erlaubt.' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Statistiken', + 'entries' => 'Beiträge', + 'you_have' => 'Du hast', + 'entries_using' => 'Beiträge mit', + 'characters_in' => 'Zeichen in', + 'words' => 'Wörtern', + 'total_disk_space_is' => 'Der gesamte Speicherplatz beträgt', + 'comments' => 'Kommentare', + 'comments_using' => 'Kommentare mit', + 'the' => 'Die', + 'most_commented_entries' => 'meist kommentierten Beiträge' +); + ?> diff --git a/fp-interface/lang/el-gr/lang.admin.entry.php b/fp-interface/lang/el-gr/lang.admin.entry.php index aa5e26c..4ab4fa6 100644 --- a/fp-interface/lang/el-gr/lang.admin.entry.php +++ b/fp-interface/lang/el-gr/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Διαχείριση καταχωρήσεων', 'write' => 'Δημιουργία καταχώρησης', - 'cats' => 'Διαχείριση κατηγοριών' + 'cats' => 'Διαχείριση κατηγοριών', + 'stats' => 'Στατιστική' ); /* default action */ @@ -155,4 +156,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Τα IDs των κατηγοριών πρέπει να είναι οπωσδήποτε θετικά (το 0 δεν επιτρέπεται)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Στατιστική', + 'entries' => 'Ενδείξεις', + 'you_have' => 'Έχετε', + 'entries_using' => 'καταχωρήσεις με', + 'characters_in' => 'χαρακτήρες', + 'words' => 'λέξεις', + 'total_disk_space_is' => 'Ο συνολικός χώρος αποθήκευσης είναι', + 'comments' => 'Σχόλια', + 'comments_using' => 'σχόλια με', + 'the' => 'Οι', + 'most_commented_entries' => 'πιο σχολιασμένες αναρτήσεις' +); + ?> diff --git a/fp-interface/lang/en-us/lang.admin.entry.php b/fp-interface/lang/en-us/lang.admin.entry.php index 3959583..f0bac02 100755 --- a/fp-interface/lang/en-us/lang.admin.entry.php +++ b/fp-interface/lang/en-us/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Manage Entries', 'write' => 'Write Entry', - 'cats' => 'Manage Categories' + 'cats' => 'Manage Categories', + 'stats' => 'Stats' ); /* default action */ @@ -155,4 +156,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Category IDs must be strictly positive (0 is not allowed)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Stats', + 'entries' => 'Entries', + 'you_have' => 'You have', + 'entries_using' => 'entries using', + 'characters_in' => 'characters in', + 'words' => 'words', + 'total_disk_space_is' => 'Total disk space is', + 'comments' => 'Comments', + 'comments_using' => 'comments using', + 'the' => 'The', + 'most_commented_entries' => 'most commented entries' +); + ?> diff --git a/fp-interface/lang/es-es/lang.admin.entry.php b/fp-interface/lang/es-es/lang.admin.entry.php index a30d4cc..ebb84da 100644 --- a/fp-interface/lang/es-es/lang.admin.entry.php +++ b/fp-interface/lang/es-es/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Administrar entradas', 'write' => 'Escribir entrada', - 'cats' => 'Administrar Categorías' + 'cats' => 'Administrar Categorías', + 'stats' => 'Estadísticas' ); /* default action */ @@ -155,4 +156,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Los ID de categoría deben ser estrictamente positivos (0 is not allowed)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Estadísticas', + 'entries' => 'Entradas', + 'you_have' => 'Tiene', + 'entries_using' => 'entradas con', + 'characters_in' => 'caracteres en', + 'words' => 'palabras', + 'total_disk_space_is' => 'El espacio de almacenamiento total es de', + 'comments' => 'Comentarios', + 'comments_using' => 'comentarios con', + 'the' => 'Las', + 'most_commented_entries' => 'entradas más comentadas' +); + ?> diff --git a/fp-interface/lang/fr-fr/lang.admin.entry.php b/fp-interface/lang/fr-fr/lang.admin.entry.php index 83cc26f..825c7fe 100644 --- a/fp-interface/lang/fr-fr/lang.admin.entry.php +++ b/fp-interface/lang/fr-fr/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Gérer les billets', 'write' => 'Écrire un billet', - 'cats' => 'Gérer les catégories' + 'cats' => 'Gérer les catégories', + 'stats' => 'Statistiques' ); /* action par défaut */ @@ -152,4 +153,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Le numéro de catégorie doit être positif (0 pas permis)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Statistiques', + 'entries' => 'Entrées', + 'you_have' => 'Tu as', + 'entries_using' => 'entrées avec', + 'characters_in' => 'caractères dans', + 'words' => 'mots', + 'total_disk_space_is' => 'L\'espace mémoire total est de', + 'comments' => 'Commentaires', + 'comments_using' => 'commentaires avec', + 'the' => 'Les', + 'most_commented_entries' => 'entrées les plus commentées' +); + ?> diff --git a/fp-interface/lang/it-it/lang.admin.entry.php b/fp-interface/lang/it-it/lang.admin.entry.php index 5da028d..aba6f2c 100644 --- a/fp-interface/lang/it-it/lang.admin.entry.php +++ b/fp-interface/lang/it-it/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Gestione Articoli', 'write' => 'Scrivi Articolo', - 'cats' => 'Gestione Categorie' + 'cats' => 'Gestione Categorie', + 'stats' => 'Statistica' ); /* default action */ @@ -155,4 +156,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Gli ID delle categorie devono essere assolutamente positivi (lo 0 non è consentito)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Statistica', + 'entries' => 'Entrate', + 'you_have' => 'Hai', + 'entries_using' => 'voci con', + 'characters_in' => 'caratteri in', + 'words' => 'parole', + 'total_disk_space_is' => 'Lo spazio di archiviazione totale è di', + 'comments' => 'Commenti', + 'comments_using' => 'commenti con', + 'the' => 'Le', + 'most_commented_entries' => 'voci più commentate' +); + ?> diff --git a/fp-interface/lang/ja-jp/lang.admin.entry.php b/fp-interface/lang/ja-jp/lang.admin.entry.php index e2b2622..c616fbc 100644 --- a/fp-interface/lang/ja-jp/lang.admin.entry.php +++ b/fp-interface/lang/ja-jp/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => '記事の管理', 'write' => '記事の作成', - 'cats' => '記事カテゴリの管理' + 'cats' => '記事カテゴリの管理', + 'stats' => '統計情報' ); /* default action */ @@ -152,4 +153,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Category IDs must be strictly positive (0 is not allowed)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => '統計情報', + 'entries' => 'エントリー', + 'you_have' => '', + 'entries_using' => '件、', + 'characters_in' => '文字、', + 'words' => '語。', + 'total_disk_space_is' => '総収納容量は', + 'comments' => 'コメント', + 'comments_using' => '件', + 'the' => 'コメント数が多かった', + 'most_commented_entries' => '作品' +); + ?> diff --git a/fp-interface/lang/nl-nl/lang.admin.entry.php b/fp-interface/lang/nl-nl/lang.admin.entry.php index 93f7579..b019d27 100644 --- a/fp-interface/lang/nl-nl/lang.admin.entry.php +++ b/fp-interface/lang/nl-nl/lang.admin.entry.php @@ -2,7 +2,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Vermeldingen beheren', 'write' => 'Schrijf vermelding', - 'cats' => 'Categorie beheren' + 'cats' => 'Categorie beheren', + 'stats' => 'Statistieken' ); /* default action */ @@ -155,4 +156,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Categorie ID moeten strikt positief zijn (0 is niet toegestaan)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Statistieken', + 'entries' => 'Vermeldingen', + 'you_have' => 'Je hebt', + 'entries_using' => 'berichten met', + 'characters_in' => 'tekens in', + 'words' => 'woorden', + 'total_disk_space_is' => 'De totale opslagruimte is', + 'comments' => 'Reacties', + 'comments_using' => 'reacties met', + 'the' => 'De', + 'most_commented_entries' => 'meest becommentarieerde inzendingen' +); + ?> diff --git a/fp-interface/lang/pt-br/lang.admin.entry.php b/fp-interface/lang/pt-br/lang.admin.entry.php index de807ae..e93f436 100644 --- a/fp-interface/lang/pt-br/lang.admin.entry.php +++ b/fp-interface/lang/pt-br/lang.admin.entry.php @@ -3,7 +3,8 @@ $lang ['admin'] ['entry'] ['submenu'] = array( 'list' => 'Lista de posts', 'write' => 'Criar um post', - 'cats' => 'Administrar as categorias' + 'cats' => 'Administrar as categorias', + 'stats' => 'Estatísticas' ); /* default action */ @@ -153,4 +154,19 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array( -3 => 'Os IDs da categoria devem ser apenas positivos. (0 não é permitido.)' ); +/* stats */ +$lang ['admin'] ['entry'] ['stats'] = array( + 'head' => 'Estatísticas', + 'entries' => 'Entradas', + 'you_have' => 'Você tem', + 'entries_using' => 'entradas com', + 'characters_in' => 'caracteres em', + 'words' => 'palavras', + 'total_disk_space_is' => 'O espaço total de armazenamento é de', + 'comments' => 'Comentários', + 'comments_using' => 'comentários com', + 'the' => 'As', + 'most_commented_entries' => 'entradas mais comentadas' +); + ?>