Outsourcing of the fixed statistics panel in a plugin
continue with #363
This commit is contained in:
commit
cd91ab68cf
@ -12,26 +12,18 @@
|
||||
* @author NoWhereMan <real_nowhereman at users dot sf dot com>
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class admin_entry extends AdminPanel {
|
||||
|
||||
|
||||
var $panelname = "entry";
|
||||
var $actions = array(
|
||||
'list' => true,
|
||||
'write' => true,
|
||||
'write' => true,
|
||||
'commentlist' => false,
|
||||
'commedit' => false,
|
||||
'delete' => false,
|
||||
'cats' => true,
|
||||
'stats' => true
|
||||
'cats' => true
|
||||
);
|
||||
var $defaultaction = 'list';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Spravovat příspěvky',
|
||||
'write' => 'Přidat nový příspěvek',
|
||||
'cats' => 'Manage Categories',
|
||||
'stats' => 'Statistiky'
|
||||
'cats' => 'Manage Categories'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Administrer bidrag',
|
||||
'write' => 'Skriv et bidrag',
|
||||
'cats' => 'Administrer kategorier',
|
||||
'stats' => 'Statistik'
|
||||
'cats' => 'Administrer kategorier'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -160,19 +159,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Der opstod en fejl ved sletning af kategorierne',
|
||||
-3 => 'Kategori ID <strong>skal være større end 0</strong>. Værdien <strong>0</strong> er ikke tilladt.'
|
||||
);
|
||||
|
||||
/* stats */
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistik',
|
||||
'entries' => 'Bidrag',
|
||||
'you_have' => 'Du har',
|
||||
'entries_using' => 'indlæg med',
|
||||
'characters_in' => 'tegn i',
|
||||
'words' => 'ord',
|
||||
'total_disk_space_is' => 'Den samlede lagerplads er',
|
||||
'comments' => 'Kommentarer',
|
||||
'comments_using' => 'Kommentarer med',
|
||||
'the' => 'De',
|
||||
'most_commented_entries' => 'mest kommenterede indlæg'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Beiträge verwalten',
|
||||
'write' => 'Beitrag schreiben',
|
||||
'cats' => 'Kategorien verwalten',
|
||||
'stats' => 'Statistiken'
|
||||
'cats' => 'Kategorien verwalten'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -160,19 +159,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Ein Fehler ist beim Löschen der Kategorien aufgetreten',
|
||||
-3 => 'Die Kategorie ID <strong>muss größer als 0 sein</strong>. Der Wert <strong>0</strong> 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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Διαχείριση καταχωρήσεων',
|
||||
'write' => 'Δημιουργία καταχώρησης',
|
||||
'cats' => 'Διαχείριση κατηγοριών',
|
||||
'stats' => 'Στατιστική'
|
||||
'cats' => 'Διαχείριση κατηγοριών'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Προέκυψε κάποιο σφάλμα κατά τη διαγραφή των κατηγοριών',
|
||||
-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' => 'πιο σχολιασμένες αναρτήσεις'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Manage Entries',
|
||||
'write' => 'Write Entry',
|
||||
'cats' => 'Manage Categories',
|
||||
'stats' => 'Stats'
|
||||
'cats' => 'Manage Categories'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'An error occurred while trying to clear categories',
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Administrar entradas',
|
||||
'write' => 'Escribir entrada',
|
||||
'cats' => 'Administrar Categorías',
|
||||
'stats' => 'Estadísticas'
|
||||
'cats' => 'Administrar Categorías'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Se produjo un error al intentar vaciar categorías',
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Gérer les billets',
|
||||
'write' => 'Écrire un billet',
|
||||
'cats' => 'Gérer les catégories',
|
||||
'stats' => 'Statistiques'
|
||||
'cats' => 'Gérer les catégories'
|
||||
);
|
||||
|
||||
/* action par défaut */
|
||||
@ -160,19 +159,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Une erreur est survenue pendant la suppression des catégories',
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Gestione Articoli',
|
||||
'write' => 'Scrivi Articolo',
|
||||
'cats' => 'Gestione Categorie',
|
||||
'stats' => 'Statistiche'
|
||||
'cats' => 'Gestione Categorie'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -160,19 +159,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Si è verificato un errore durante l\'eliminazione delle categorie',
|
||||
-3 => 'Gli ID delle categorie devono essere assolutamente positivi (lo 0 non è consentito)'
|
||||
);
|
||||
|
||||
/* stats */
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistiche',
|
||||
'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' => 'Gli',
|
||||
'most_commented_entries' => 'articoli più commentati'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => '記事の管理',
|
||||
'write' => '記事の作成',
|
||||
'cats' => '記事カテゴリの管理',
|
||||
'stats' => '統計情報'
|
||||
'cats' => '記事カテゴリの管理'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -158,19 +157,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'カテゴリデータの消去ができませんでした。',
|
||||
-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' => '作品'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Vermeldingen beheren',
|
||||
'write' => 'Schrijf vermelding',
|
||||
'cats' => 'Categorie beheren',
|
||||
'stats' => 'Statistieken'
|
||||
'cats' => 'Categorie beheren'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Er is een fout opgetreden tijdens het wissen van categorie',
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Lista de posts',
|
||||
'write' => 'Criar um post',
|
||||
'cats' => 'Administrar as categorias',
|
||||
'stats' => 'Estatísticas'
|
||||
'cats' => 'Administrar as categorias'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Ocorreu um erro ao tentar apagar as categorias.',
|
||||
-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'
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Управление записями',
|
||||
'write' => 'Создать запись',
|
||||
'cats' => 'Управление категориями',
|
||||
'stats' => 'Статистика'
|
||||
'cats' => 'Управление категориями'
|
||||
);
|
||||
|
||||
/* default action */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'При попытке очистить категории возникла ошибка',
|
||||
-3 => 'Идентификаторы категорий должны быть строго положительными (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' => ''
|
||||
);
|
||||
?>
|
||||
|
@ -2,8 +2,7 @@
|
||||
$lang ['admin'] ['entry'] ['submenu'] = array(
|
||||
'list' => 'Upravljanje Vnosov',
|
||||
'write' => 'Napiši Vnos',
|
||||
'cats' => 'Upravljanje Kategorij',
|
||||
'stats' => 'Statistika'
|
||||
'cats' => 'Upravljanje Kategorij'
|
||||
);
|
||||
|
||||
/* privzeta dejanja */
|
||||
@ -159,19 +158,4 @@ $lang ['admin'] ['entry'] ['cats'] ['msgs'] = array(
|
||||
-2 => 'Prišlo je do napake med poskusom brisanja kategorij',
|
||||
-3 => 'ID-ji kategorij morajo biti strogo pozitivni (0 ni dovoljeno)'
|
||||
);
|
||||
|
||||
/* statistika */
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistika',
|
||||
'entries' => 'Vnosi',
|
||||
'you_have' => 'Imate',
|
||||
'entries_using' => 'vnosov, ki uporabljajo',
|
||||
'characters_in' => 'znakov v',
|
||||
'words' => 'besedah',
|
||||
'total_disk_space_is' => 'Skupna velikost diska je',
|
||||
'comments' => 'Komentarji',
|
||||
'comments_using' => 'komentarjev, ki uporabljajo',
|
||||
'the' => 'Naj',
|
||||
'most_commented_entries' => 'najbolj komentirani vnosi'
|
||||
);
|
||||
?>
|
||||
|
17
fp-plugins/stats/lang/lang.cs-cz.php
Normal file
17
fp-plugins/stats/lang/lang.cs-cz.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistiky';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.da-dk.php
Normal file
17
fp-plugins/stats/lang/lang.da-dk.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistik';
|
||||
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistik',
|
||||
'entries' => 'Bidrag',
|
||||
'you_have' => 'Du har',
|
||||
'entries_using' => 'indlæg med',
|
||||
'characters_in' => 'tegn i',
|
||||
'words' => 'ord',
|
||||
'total_disk_space_is' => 'Den samlede lagerplads er',
|
||||
'comments' => 'Kommentarer',
|
||||
'comments_using' => 'Kommentarer med',
|
||||
'the' => 'De',
|
||||
'most_commented_entries' => 'mest kommenterede indlæg'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.de-de.php
Normal file
17
fp-plugins/stats/lang/lang.de-de.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistiken';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.el-gr.php
Normal file
17
fp-plugins/stats/lang/lang.el-gr.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Στατιστική';
|
||||
|
||||
$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' => 'πιο σχολιασμένες αναρτήσεις'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.en-us.php
Normal file
17
fp-plugins/stats/lang/lang.en-us.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = '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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.es-es.php
Normal file
17
fp-plugins/stats/lang/lang.es-es.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Estadísticas';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.fr-fr.php
Normal file
17
fp-plugins/stats/lang/lang.fr-fr.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistiques';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.it-it.php
Normal file
17
fp-plugins/stats/lang/lang.it-it.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistiche';
|
||||
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistiche',
|
||||
'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' => 'articoli più commentati'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.ja-jp.php
Normal file
17
fp-plugins/stats/lang/lang.ja-jp.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = '統計情報';
|
||||
|
||||
$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' => '作品'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.nl-nl.php
Normal file
17
fp-plugins/stats/lang/lang.nl-nl.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistieken';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.pt-br.php
Normal file
17
fp-plugins/stats/lang/lang.pt-br.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Estatísticas';
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.ru-ru.php
Normal file
17
fp-plugins/stats/lang/lang.ru-ru.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Статистика';
|
||||
|
||||
$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' => ''
|
||||
);
|
||||
?>
|
17
fp-plugins/stats/lang/lang.sl-si.php
Normal file
17
fp-plugins/stats/lang/lang.sl-si.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$lang ['admin'] ['entry'] ['submenu'] = 'Statistika';
|
||||
|
||||
$lang ['admin'] ['entry'] ['stats'] = array(
|
||||
'head' => 'Statistika',
|
||||
'entries' => 'Vnosi',
|
||||
'you_have' => 'Imate',
|
||||
'entries_using' => 'vnosov, ki uporabljajo',
|
||||
'characters_in' => 'znakov v',
|
||||
'words' => 'besedah',
|
||||
'total_disk_space_is' => 'Skupna velikost diska je',
|
||||
'comments' => 'Komentarji',
|
||||
'comments_using' => 'komentarjev, ki uporabljajo',
|
||||
'the' => 'Naj',
|
||||
'most_commented_entries' => 'najbolj komentirani vnosi'
|
||||
);
|
||||
?>
|
151
fp-plugins/stats/plugin.stats.php
Normal file
151
fp-plugins/stats/plugin.stats.php
Normal file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/*
|
||||
* Plugin Name: Stats
|
||||
* Description: Shows statistics about entries. Part of the standard distribution.
|
||||
* Version: 1.0.0
|
||||
* Plugin URI: https://flatpress.org
|
||||
* Author: FlatPress
|
||||
* Author URI: https://flatpress.org
|
||||
*/
|
||||
require_once ABS_PATH . 'defaults.php';
|
||||
require_once INCLUDES_DIR . 'includes.php';
|
||||
|
||||
if (class_exists('AdminPanelAction')) {
|
||||
|
||||
|
||||
class admin_entry_stats extends AdminPanelAction {
|
||||
|
||||
var $lang = 'plugin:stats';
|
||||
|
||||
|
||||
function format_number($num, $sep) {
|
||||
$ss = $sep * $sep;
|
||||
$i = 0;
|
||||
while ( $num > $ss ) {
|
||||
$num = (float) $num / $sep;
|
||||
$i++;
|
||||
}
|
||||
|
||||
return array(number_format((int)$num), $i);
|
||||
|
||||
}
|
||||
|
||||
function setup() {
|
||||
global $lang;
|
||||
|
||||
$lang = lang_load('plugin:stats');
|
||||
$lang ['admin'] ['entry'] ['stats'] = array();
|
||||
$this->smarty->assign('admin_resource', 'plugin:stats/admin.plugin.stats');
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
global $fpdb;
|
||||
$lang = lang_load('plugin:stats');
|
||||
|
||||
$fpdb->query(array(
|
||||
'count' => -1, // show all
|
||||
'fullparse' => true
|
||||
));
|
||||
|
||||
$q = $fpdb->getQuery();
|
||||
|
||||
$comments =
|
||||
$entries = array(
|
||||
'count' => 0,
|
||||
'words' => 0,
|
||||
'chars' => 0,
|
||||
'size' => 0,
|
||||
'topten' => array()
|
||||
);
|
||||
|
||||
$entries ['comments'] = 0;
|
||||
|
||||
$toplist = array();
|
||||
|
||||
while ($q->hasMore()) {
|
||||
|
||||
list($id, $e) = $q->getEntry();
|
||||
|
||||
$entries ['count'] ++;
|
||||
$entries ['words'] += str_word_count($e ['subject']) + str_word_count($e ['content']);
|
||||
|
||||
$entries ['chars'] += strlen($e ['subject']) + strlen($e ['content']);
|
||||
|
||||
$entries ['size'] += filesize(entry_exists($id));
|
||||
|
||||
$cc = $q->hasComments();
|
||||
$entries ['comments'] += $cc;
|
||||
$toplist [$id] = $cc;
|
||||
$toplistsubj [$id] = $e ['subject'];
|
||||
|
||||
$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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
arsort($toplist);
|
||||
|
||||
$i = 0;
|
||||
foreach($toplist as $k => $v) {
|
||||
if ($i >= 10 || $v < 1)
|
||||
break;
|
||||
|
||||
$entries ['topten'] [$k] = array(
|
||||
'subject' => $toplistsubj [$k],
|
||||
'comments' => $v
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$decunit = array('', 'Thousand', 'Million', 'Billion', 'Trillion', 'Zillion', 'Gazillion');
|
||||
$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 ['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 ['comments'], 1000);
|
||||
$entries ['comments'] = $count . ' ' . $decunit [$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 ['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 ['size'], 1024);
|
||||
$comments ['size'] = $count . ' ' . $binunit [$approx];
|
||||
|
||||
|
||||
$this->smarty->assign('comments', $comments);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// register to 'entry' menu
|
||||
admin_addpanelaction('entry', 'stats', true);
|
||||
}
|
27
fp-plugins/stats/tpls/admin.plugin.stats.tpl
Normal file
27
fp-plugins/stats/tpls/admin.plugin.stats.tpl
Normal file
@ -0,0 +1,27 @@
|
||||
<h2>{$panelstrings.head}</h2>
|
||||
|
||||
{include file="shared:errorlist.tpl"}
|
||||
|
||||
<h3>{$panelstrings.entries}</h3>
|
||||
<p>{$panelstrings.you_have} <strong>{"%s"|sprintf:$entries.count}</strong>
|
||||
{$panelstrings.entries_using} <strong>{"%s"|sprintf:$entries.chars}</strong> {$panelstrings.characters_in} <strong>{"%s"|sprintf:$entries.words}</strong> {$panelstrings.words}.</p>
|
||||
<p>{$panelstrings.total_disk_space_is} <strong>{"%s"|sprintf:$entries.size}</strong>.</p>
|
||||
|
||||
<h3>{$panelstrings.comments}</h3>
|
||||
<p>{$panelstrings.you_have} <strong>{"%s"|sprintf:$comments.count}</strong>
|
||||
{$panelstrings.comments_using} <strong>{"%s"|sprintf:$comments.chars}</strong> {$panelstrings.characters_in} <strong>{"%s"|sprintf:$comments.words}</strong> {$panelstrings.words}.</p>
|
||||
<p>{$panelstrings.total_disk_space_is} <strong>{"%s"|sprintf:$comments.size}</strong>.</p>
|
||||
|
||||
|
||||
{if $entries.topten}
|
||||
|
||||
<h3>{$panelstrings.the} {$entries.topten|@count} {$panelstrings.most_commented_entries} </h3>
|
||||
|
||||
<ol>
|
||||
{foreach from=$entries.topten key=id item=this_entry}
|
||||
<li><a href="{$panel_url|action_link:commentlist}&entry={$id}">{$this_entry.subject}</a> ({$this_entry.comments})</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
|
||||
{/if}
|
||||
|
Loading…
x
Reference in New Issue
Block a user