Version 0.9.2 ()
------------------------------------------------------------------------
+ * Fix personal configuration no more able to lock you out of all
+ user groups (garvinhicking)
+
* File CSS stylesheets occasionally not returning the right path
(garvinhicking)
if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken()) {
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
- if ( (!serendipity_checkPermission('adminUsersEditUserlevel') || !serendipity_checkPermission('adminUsersMaintainOthers') )
+ if ( (!serendipity_checkPermission('adminUsersEditUserlevel') || !serendipity_checkPermission('adminUsersMaintainOthers') )
&& (int)$_POST['userlevel'] > $serendipity['serendipityUserlevel']) {
echo '<div class="serendipityAdminMsgError">' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
} elseif (!empty($_POST['password']) && $_POST['check_password'] != $_SESSION['serendipityPassword'] && md5($_POST['check_password']) != $_SESSION['serendipityPassword']) {
continue;
}
- serendipity_updateGroups($_POST[$item['var']], $serendipity['authorid']);
+ if (count($_POST[$item['var']]) < 1) {
+ echo '<div class="serendipityAdminMsgError">' . WARNING_NO_GROUPS_SELECTED . '</div>';
+ } else {
+ serendipity_updateGroups($_POST[$item['var']], $serendipity['authorid']);
+ }
continue;
}
} ?>
<form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post">
-<?php
+<?php
echo serendipity_setFormToken();
$template = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
$user = serendipity_fetchUsers($serendipity['authorid']);
$from = $user[0];
-$from['groups'] = serendipity_getGroups($serendipity['authorid']);
+$from['groups'] = serendipity_getGroups($serendipity['authorid']);
unset($from['password']);
serendipity_printConfigTemplate($template, $from, true, false);
?>
echo '<div class="serendipityAdminMsgError">' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
} else {
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
-
+
if (serendipity_checkPermission('adminUsersMaintainOthers') ||
(serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect)) {
serendipity_deleteAuthor($user[0]['authorid']);
continue;
}
- serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user']);
+ if (count($_POST[$item['var']]) < 1) {
+ echo '<div class="serendipityAdminMsgError">' . WARNING_NO_GROUPS_SELECTED . '</div>';
+ } else {
+ serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user']);
+ }
continue;
}
continue;
}
- serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user']);
+ if (count($_POST[$item['var']]) < 1) {
+ echo '<div class="serendipityAdminMsgError">' . WARNING_NO_GROUPS_SELECTED . '</div>';
+ } else {
+ serendipity_updateGroups($_POST[$item['var']], $serendipity['POST']['user']);
+ }
continue;
}
if ($serendipity['GET']['adminAction'] == 'edit') {
$user = serendipity_fetchUsers($serendipity['GET']['userid']);
$group_intersect = serendipity_intersectGroup($user[0]['authorid']);
-
+
if ($user[0]['userlevel'] >= $serendipity['serendipityUserlevel'] && $user[0]['authorid'] != $serendipity['authorid'] && !serendipity_checkPermission('adminUsersMaintainOthers')) {
echo '<strong>' . CREATE_NOT_AUTHORIZED . '</strong><br />';
echo EDIT;
$from['groups'] = serendipity_getGroups($serendipity['GET']['userid']);
} else {
$from['groups'] = array();
-}
+}
serendipity_printConfigTemplate($config, $from, true, false);
-<?php # $Id: serendipity_lang_bg.inc.php 694 2005-11-13 09:14:15Z ogi $
+<?php # $Id: serendipity_lang_bg.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) 2004 Bogomil Shopov <bogomil@spisanie.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Ако тази опция е активирана, броят на статиите от този автор ще бъде показан до името на автора в скоби.');
@define('COMMENT_NOT_ADDED', 'Не можете да добавите коментар, защото са забранени коментарите към тази статия.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_cn.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_cn.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', '您的回响不能增入因为此篇文章不允许回响. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_cs.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_cs.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) 2005 Josef Klimosz <ok2wo@centrum.cz>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Váš komentář nebyl přidán, protože k tomuto záznamu nejsou komentáře umožněny. %sVraťte se%s zpět ke komentářům nebo %szavřete%s toto okno.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_cz.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_cz.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) 2004 Josef Klimosz <ok2wo@centrum.cz>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Váš komentář nebyl přidán, protože k tomuto záznamu nejsou komentáře umožněny. %sVraťte se%s zpět ke komentářům nebo %szavřete%s toto okno.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_da.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_da.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Tom Sommer, <ts@dreamcoder.dk>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunne ikke tilføjes fordi kommentarer til denne artikel er blevet deaktiveret.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_de.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_de.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Jannis Hermanns, Garvin Hicking and others
@define('CATEGORY_PLUGIN_SHOWCOUNT', 'Show number of entries per category?');
@define('AUTHORS_SHOW_ARTICLE_COUNT', 'Show number of articles next to author name?');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_en.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_en.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@define('CATEGORY_PLUGIN_SHOWCOUNT', 'Show number of entries per category?');
@define('AUTHORS_SHOW_ARTICLE_COUNT', 'Show number of articles next to author name?');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_es.inc.php 606 2005-10-26 08:08:50Z garvinhicking $
+<?php # $Id: serendipity_lang_es.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Luis Cervantes <LuisCervantes@ono.com>,
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Si esta opción es activada, el número de artículos del autor se muestra al lado del nombre del autor en paréntesis.');
@define('COMMENT_NOT_ADDED', 'Tu comentario no ha podido ser añadido, la posibilidad de añadir comentarios a esta entrada ha sido desactivada.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_fa.inc.php 595 2005-10-24 17:54:43Z omidmottaghi $
+<?php # $Id: serendipity_lang_fa.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# this translation, translated by Omid Mottaghi <http://oxygenws.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'اگر این گزینه فعال باشد، تعداد ارسال های یک نویسنده، جلوی نام وی، داخل پرانتز، نمایش داده می شود.');
@define('COMMENT_NOT_ADDED', 'ارسال نظر برای این مطلب ممکن نیست. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_fi.inc.php 600 2005-10-25 10:08:17Z garvinhicking $
+<?php # $Id: serendipity_lang_fi.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Mauri Sahlberg <mos@iki.fi>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Tämän kirjauksen kommentointi ei ole sallittua. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_fr.inc.php 607 2005-10-26 08:40:05Z garvinhicking $
+<?php # $Id: serendipity_lang_fr.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Sebastian Mordziol <argh@php-tools.net>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Si cette option est activée, le nombre de billets crées par cet auteur seront affichés à côté de son nom, entre parenthèses.');
@define('COMMENT_NOT_ADDED', 'Votre commentaire n\'a pas pû être ajouté, car les commentaires pour ce billet ont été désactivés. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'A megjegyzések hozzáfűzése le van tiltva, így nem tudom a tiedet sem hozzáadni. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_is.inc.php 669 2005-11-09 13:26:15Z garvinhicking $
+<?php # $Id: serendipity_lang_is.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Örn Arnarson <orn@arnarson.net>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Ef þessi möguleiki er virkjaður mun fjöldi greina eftir þennan höfund vera sýndur við hliðina á nafni hans innan sviga.');
@define('COMMENT_NOT_ADDED', 'Gat ekki bætt athugasemd þinni við, því athugasemdir hafa verið gerðar óvirkar fyrir þessa færslu. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_it.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_it.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Alessandro Pellizzari <alex@amiran.it>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Il tuo commento non può essere aggiunto, perché i commenti per questa notizia sono stati disattivati. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_ja.inc.php 629 2005-10-30 20:59:59Z elf2000 $
+<?php # $Id: serendipity_lang_ja.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Tadashi Jokagi <elf2000@users.sourceforge.net>, 2004-2005.
@define('LINK','リンク');
@define('COMMENT_NOT_ADDED', 'このエントリへのコメントが無効になったのでコメントは追加できませんでした。'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_ko.inc.php 603 2005-10-25 11:36:06Z wesley $
+<?php # $Id: serendipity_lang_ko.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, 각 작성자의 이름 옆 괄호 속에 해당 작성자가 쓴 글의 수를 표시합니다.');
@define('COMMENT_NOT_ADDED', '덧글 금지가 되어 있어 덧글을 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_nl.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_nl.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Christiaan Heerze <webmaster@heimp.nl>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Uw reactie kon niet worden toegevoegd omdat deze functie voor deze inzending is uitgeschakeld. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_no.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_no.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Jo Christian Oterhals <oterhals@gmail.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunne ikke legges til fordi kommentarer til denne artikkelen er blitt deaktivert.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_pt.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_pt.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Agner Olson <agner@agner.net>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Seus comentários não foram adicionados, porque comentários para este artigo foram desabilitadas. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Se esta opção for activada, o número de artigos deste autor será mostrado entre parêntesis junto ao nome do autor.');
@define('COMMENT_NOT_ADDED', 'Os seus comentários não foram adicionados, porque comentários para este artigo não estão autorizados. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Comentariul tău nu a putut fi adăugat, deoarece autorul nu permite comentarii la această însemnare. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_ru.inc.php 665 2005-11-07 19:34:28Z garvinhicking $
+<?php # $Id: serendipity_lang_ru.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Если эта опция включена, то в скобках возле имени автора приводится общее число сделанных им записей.');
@define('COMMENT_NOT_ADDED', 'Ваш комментарий не смог быть добавлен, потому что эту запись запрещено комментировать. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('CUSTOM_ADMIN_INTERFACE', 'Personligt administrationsgränssnitt tillgänligt');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunde inte läggas till därför att kommentarer inte är tillåtna för denna artikel. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_tn.inc.php 571 2005-10-18 20:07:05Z capriskye $
+<?php # $Id: serendipity_lang_tn.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '如果開啟這個設定,作者的文章數會顯示在名稱旁邊。');
@define('COMMENT_NOT_ADDED', '您的迴響不能增入因為此篇文章不允許迴響. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_tw.inc.php 571 2005-10-18 20:07:05Z capriskye $
+<?php # $Id: serendipity_lang_tw.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '如果開啟這個設定,作者的文章數會顯示在名稱旁邊。');
@define('COMMENT_NOT_ADDED', '您的迴響不能增入因為此篇文章不允許迴響. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-<?php # $Id: serendipity_lang_zh.inc.php 568 2005-10-18 19:01:10Z garvinhicking $
+<?php # $Id: serendipity_lang_zh.inc.php 716 2005-11-21 08:58:33Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', '您的回响不能增入因为此篇文章不允许回响. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
-@define('AUTHORS_SHOW_ARTICLE_COUNT', 'Show number of articles next to author name?');
-@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Àêî òàçè îïöèÿ å àêòèâèðàíà, áðîÿò íà ñòàòèèòå îò òîçè àâòîð ùå áúäå ïîêàçàí äî èìåòî íà àâòîðà â ñêîáè.');
@define('COMMENT_NOT_ADDED', 'Íå ìîæåòå äà äîáàâèòå êîìåíòàð, çàùîòî ñà çàáðàíåíè êîìåíòàðèòå êúì òàçè ñòàòèÿ.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', '您的回响不能增入因为此篇文章不允许回响. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Vá\9a komentáø nebyl pøidán, proto\9ee k tomuto záznamu nejsou komentáøe umo\9enìny. %sVra\9dte se%s zpìt ke komentáøùm nebo %szavøete%s toto okno.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Vá¹ komentáø nebyl pøidán, proto¾e k tomuto záznamu nejsou komentáøe umo¾nìny. %sVra»te se%s zpìt ke komentáøùm nebo %szavøete%s toto okno.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunne ikke tilføjes fordi kommentarer til denne artikel er blevet deaktiveret.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('CATEGORY_PLUGIN_SHOWCOUNT', 'Show number of entries per category?');
@define('AUTHORS_SHOW_ARTICLE_COUNT', 'Show number of articles next to author name?');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('CATEGORY_PLUGIN_SHOWCOUNT', 'Show number of entries per category?');
@define('AUTHORS_SHOW_ARTICLE_COUNT', 'Show number of articles next to author name?');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Si esta opción es activada, el número de artículos del autor se muestra al lado del nombre del autor en paréntesis.');
@define('COMMENT_NOT_ADDED', 'Tu comentario no ha podido ser añadido, la posibilidad de añadir comentarios a esta entrada ha sido desactivada.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'اگر این گزینه فعال باشد، تعداد ارسال های یک نویسنده، جلوی نام وی، داخل پرانتز، نمایش داده می شود.');
@define('COMMENT_NOT_ADDED', 'ارسال نظر برای این مطلب ممکن نیست. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Tämän kirjauksen kommentointi ei ole sallittua. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Si cette option est activée, le nombre de billets crées par cet auteur seront affichés à côté de son nom, entre parenthèses.');
@define('COMMENT_NOT_ADDED', 'Votre commentaire n\'a pas pû être ajouté, car les commentaires pour ce billet ont été désactivés. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'A megjegyzések hozzáfûzése le van tiltva, így nem tudom a tiedet sem hozzáadni. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Ef þessi möguleiki er virkjaður mun fjöldi greina eftir þennan höfund vera sýndur við hliðina á nafni hans innan sviga.');
@define('COMMENT_NOT_ADDED', 'Gat ekki bætt athugasemd þinni við, því athugasemdir hafa verið gerðar óvirkar fyrir þessa færslu. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Il tuo commento non può essere aggiunto, perché i commenti per questa notizia sono stati disattivati. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('LINK','リンク');
@define('COMMENT_NOT_ADDED', 'このエントリへのコメントが無効になったのでコメントは追加できませんでした。'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, 각 작성자의 이름 옆 괄호 속에 해당 작성자가 쓴 글의 수를 표시합니다.');
@define('COMMENT_NOT_ADDED', '덧글 금지가 되어 있어 덧글을 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Uw reactie kon niet worden toegevoegd omdat deze functie voor deze inzending is uitgeschakeld. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunne ikke legges til fordi kommentarer til denne artikkelen er blitt deaktivert.'); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Seus comentários não foram adicionados, porque comentários para este artigo foram desabilitadas. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Se esta opção for activada, o número de artigos deste autor será mostrado entre parêntesis junto ao nome do autor.');
@define('COMMENT_NOT_ADDED', 'Os seus comentários não foram adicionados, porque comentários para este artigo não estão autorizados. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'Comentariul tău nu a putut fi adăugat, deoarece autorul nu permite comentarii la această însemnare. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'Если эта опция включена, то в скобках возле имени автора приводится общее число сделанных им записей.');
@define('COMMENT_NOT_ADDED', 'Ваш комментарий не смог быть добавлен, потому что эту запись запрещено комментировать. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('CUSTOM_ADMIN_INTERFACE', 'Personligt administrationsgränssnitt tillgänligt');
@define('COMMENT_NOT_ADDED', 'Din kommentar kunde inte läggas till därför att kommentarer inte är tillåtna för denna artikel. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '如果開啟這個設定,作者的文章數會顯示在名稱旁邊。');
@define('COMMENT_NOT_ADDED', '您的迴響不能增入因為此篇文章不允許迴響. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '¦pªG¶}±Ò³oÓ³]©w¡A§@ªÌªº¤å³¹¼Æ·|Åã¥Ü¦b¦WºÙ®ÇÃä¡C');
@define('COMMENT_NOT_ADDED', '±zªº°jÅT¤£¯à¼W¤J¦]¬°¦¹½g¤å³¹¤£¤¹³\°jÅT. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', 'If this option is enabled, the number of articles by this author is shown next to the authors name in parentheses.');
@define('COMMENT_NOT_ADDED', 'ÄúµÄ»ØÏì²»ÄÜÔöÈëÒòΪ´ËƪÎÄÕ²»ÔÊÐí»ØÏì. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.'
+@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISITORS', 'Nr of vistors');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISTODAY', 'Nr of vistors today');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISTOTAL', 'Total nr of vistors');
-@define('PLUGIN_EVENT_STATISTICS_EXT_VISSINCE', 'The extended visitor´s statistic feature has collected data since');
+@define('PLUGIN_EVENT_STATISTICS_EXT_VISSINCE', 'The extended visitors statistic feature has collected data since');
@define('PLUGIN_EVENT_STATISTICS_EXT_VISLATEST', 'Latest Visitors');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS', 'Top Referrers');
@define('PLUGIN_EVENT_STATISTICS_EXT_TOPREFS_NONE', 'No referrers has yet been registered.');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS', 'Ban browsers from beeing counted');
@define('PLUGIN_EVENT_STATISTICS_BANNED_HOSTS_DESC', 'Insert browsers that should be excluded from counting, separated by "|"');
-
+
class serendipity_event_statistics extends serendipity_event
{
var $title = PLUGIN_EVENT_STATISTICS_NAME;
$propbag->add('description', PLUGIN_EVENT_STATISTICS_MAX_ITEMS_DESC);
$propbag->add('default', 20);
break;
-
-
+
+
case 'ext_vis_stat':
$select = array('no' => PLUGIN_EVENT_STATISTICS_EXT_OPT1, 'yesBot' => PLUGIN_EVENT_STATISTICS_EXT_OPT2, 'yesTop' => PLUGIN_EVENT_STATISTICS_EXT_OPT3);
$propbag->add('type', 'select');
$propbag->add('default', 'no');
break;
-
+
case 'banned_bots':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_STATISTICS_BANNED_HOSTS);
if (isset($hooks[$event])) {
switch($event) {
-
+
case 'frontend_configure':
if ($this->get_config('ext_vis_stat') == 'no') {
return;
if (!is_array($tableChecker)){
$this->createTables();
}
-
+
//Unique visitors are beeing registered and counted here. Calling function below.
$sessionChecker = serendipity_db_query("SELECT count(sessID) FROM {$serendipity['dbPrefix']}visitors WHERE '".serendipity_db_escape_string(session_id())."' = sessID GROUP BY sessID", true);
if (!is_array($sessionChecker) || (is_array($sessionChecker)) && ($sessionChecker[0] == 0)) {
-
+
// avoiding banned browsers
$banned_bots = $this->get_config('banned_bots');
$tmp_array = explode('|', $banned_bots);
if (trim($tmp_array[$i]) == trim($_SERVER['HTTP_USER_AGENT'])){
$found = 'yes';
}
- }
- if ($found == 'no'){
+ }
+ if ($found == 'no'){
$this->countVisitor();
}
}
-
+
break;
case 'backend_sidebar_entries':
?>
if (!$max_items || !is_numeric($max_items) || $max_items < 1) {
$max_items = 20;
}
-
+
if ($ext_vis_stat == 'yesTop') {
$this->extendedVisitorStatistics($max_items);
}
-
+
$first_entry = serendipity_db_query("SELECT timestamp FROM {$serendipity['dbPrefix']}entries ORDER BY timestamp ASC limit 1", true);
$last_entry = serendipity_db_query("SELECT timestamp FROM {$serendipity['dbPrefix']}entries ORDER BY timestamp DESC limit 1", true);
$total_count = serendipity_db_query("SELECT count(id) FROM {$serendipity['dbPrefix']}entries", true);
<hr />
<?php serendipity_plugin_api::hook_event('event_additional_statistics', $eventData, array('maxitems' => $max_items)); ?>
</div>
-
+
<?php
if ($ext_vis_stat == 'yesBot') {
return false;
}
}
-
+
function countVisitor(){
-
+
global $serendipity;
$referer = $_SERVER['HTTP_REFERER'];
'browser'=> strip_tags($_SERVER['HTTP_USER_AGENT']),
'ip' => strip_tags($_SERVER['REMOTE_ADDR'])
);
-
+
serendipity_db_insert('visitors', $values);
-
+
// updating the referrer-table
if (strlen($referer) >= 1) {
//retrieving the referrer base URL
- $temp_array = explode('?', $referer);
- $urlA = $temp_array[0];
-
+ $temp_array = explode('?', $referer);
+ $urlA = $temp_array[0];
+
//removing "http://" & trailing subdirectories
$temp_array3 = explode('//', $urlA);
$urlB = $temp_array3[1];
$temp_array4 = explode('/', $urlB);
$urlB = $temp_array4[0];
-
+
//removing www
$urlC = serendipity_db_escape_string(str_replace('www.', '', $urlB));
-
+
//updating db
$q = serendipity_db_query("SELECT count(refs) FROM {$serendipity['dbPrefix']}refs WHERE refs = '$urlC' GROUP BY refs", true);
if (!is_array($q) || $q[0] >= 1){
serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}refs (refs, count) VALUES ('$urlC', 1)");
}
}
-
+
} //end of function countVisitor
-
-
+
+
function extendedVisitorStatistics($max_items){
-
+
global $serendipity;
-
+
// ---------------QUERIES for Viewing statistics ----------------------------------------------
$day = date('Y-m-d');
$visitors_count_today = serendipity_db_query("SELECT count(counter_id) FROM {$serendipity['dbPrefix']}visitors WHERE day = '".$day."'", true);
$visitors_count = serendipity_db_query("SELECT count(counter_id) FROM {$serendipity['dbPrefix']}visitors", true);
$visitors_latest = serendipity_db_query("SELECT counter_id, day, time, ref, browser, ip FROM {$serendipity['dbPrefix']}visitors ORDER BY counter_id DESC LIMIT ".$max_items."");
$top_refs = serendipity_db_query("SELECT refs, count FROM {$serendipity['dbPrefix']}refs ORDER BY count DESC LIMIT ".$max_items."");
-
+
// ---------------STYLES for Viewing statistics ----------------------------------------------
echo "<style type='text/css'>";
echo ".colVis {text-align: center; width:600px; font-size: 10px; background-color:#dddddd;} ";
<div style="margin: 5px; padding: 5px">
<dl>
<dt><?php echo PLUGIN_EVENT_STATISTICS_EXT_VISSINCE." ".$visitors_count_firstday[0].".<br /><br /><br />\n"?></dt>
-
+
<dt><strong><?php echo PLUGIN_EVENT_STATISTICS_EXT_VISITORS; ?></strong></dt>
<dd>
<div class="colVis">
- <?php
+ <?php
echo PLUGIN_EVENT_STATISTICS_EXT_VISTODAY.": <strong>".$visitors_count_today[0]."</strong><br />\n";
echo PLUGIN_EVENT_STATISTICS_EXT_VISTOTAL.": <strong>".$visitors_count[0]."</strong><br />\n";
?>
</div>
</dd>
</dl>
-
+
<dl>
-
+
<dt><strong><?php echo PLUGIN_EVENT_STATISTICS_EXT_VISLATEST;?></strong></dt>
<dd>
<table>
</table><br />
</dd>
</dl>
-
+
<dl>
<dt><strong>
- <?php
+ <?php
echo PLUGIN_EVENT_STATISTICS_EXT_TOPREFS;
?>
</strong></dt>
<hr />
<?php
} //end of function extendedVisitorStatistics()
-
-
+
+
function createTables() {
global $serendipity;
-
+
//create table xxxx_visitors
$q = "CREATE TABLE {$serendipity['dbPrefix']}visitors (
counter_id {AUTOINCREMENT} {PRIMARY},
count int(11) not null default '0'
)";
serendipity_db_schema_import($q);
-
+
} //end of function createTables()
function dropTables() {
-
+
global $serendipity;
-
+
// Drop tables
$q = "DROP TABLE ".$serendipity['dbPrefix']."visitors";
$sql = serendipity_db_schema_import($q);
$q = "DROP TABLE ".$serendipity['dbPrefix']."refs";
$sql = serendipity_db_schema_import($q);
-
+
} //end of function dropTables
-
+
function install(){
-
+
$this->createTables();
-
+
}
-
+
function uninstall(){
-
+
$this->dropTables();
-
+
}
-
+
}
/* vim: set sts=4 ts=4 expandtab : */