Инструменты пользователя

Инструменты сайта


wiki:plugin:accscounter

Это старая версия документа!


Счетчик доступа и плагин популярности для «ДокуВики»

Совместим с «Докувики»

  • 2024-02-06 "Kaos" да
  • 2023-04-04 "Jack Jackrum" да
  • 2022-07-31 "Igor" да
  • 2020-07-29 "Hogfather" да

plugin Экспортируйте количество тех, кто посетил указанную страницу в вашей вики сегодня, вчера или за весь период. Вы также можете отобразить список популярности в соответствии с данными журнала, полученными плагином. Этот плагин портирован из плагинов PukiWiki

Последнее обновление:
2020-06-11
Предоставляет
Syntax
Репозиторий
исходный код

Это расширение не находится в пространстве имен 'plugin' или 'template' и поэтому игнорируется.

Похож на top

Теги: counter, statistics, users

Примечания

:!: このページを日本語でご覧頂けます。(Эта страница также доступна на японском языке.)
:!: Я не являюсь носителем английского языка, поэтому эта страница может содержать некоторые ошибки в английских предложениях.

Краткое содержание

Этот плагин показывает количество людей, посетивших указанные страницы. Вы также можете показать список популярных страниц за сегодня, вчера и за весь период.

Я портировал плагин Counter и плагин Popular из PukiWiki.1)

Монтаж

Используйте менеджер плагинов для установки или…

  1. скачать zip-файл
  2. распаковать его в<dokuwiki>/lib/plugins/
  3. войдите как администратор и измените плагин в менеджере конфигурации

Применение

:!:Пожалуйста, добавьте макрос на страницу, на которой вы будете использовать этот плагин, поскольку данные будут изменяться в режиме реального времени, и страница не должна кэшироваться.

Счетчик доступа

{{counter}} человек посетили эту страницу до сих пор.

Затем экспортируется как 15 person(s) visited this page until now. (если страницу посетило 15 посетителей).

Также вы можете ввести так:

К этой странице обращались:
Сегодня: {{counter|сегодня}} / Вчера: {{counter|вчера}}
До сих пор: {{counter|total}}

Другой пример:

{{counter|total| человек посетил эту страницу до сих пор.| люди посетили эту страницу до сих пор.}}

Популярные страницы

:!:Будут перечислены страницы, на которых активен плагин счетчика посещений. Если вы хотите, чтобы популярный плагин проверял все страницы, вы поместите плагин счетчика в боковые панели или шаблоны.

Самый простой пример:

{{POPULAR}}

Затем вы увидите список 10 самых посещаемых на данный момент страниц, например:

Вы можете изменить параметры:

{{POPULAR 45 today}}
{{POPULAR 20 yesterday blacklist1|blacklist2}}

Посмотрите, как работает плагин

Посмотреть плагин в действии можно здесь (извините, но эта страница доступна только на японском языке).

Синтаксис

code.php
{{counter|argument|message A|message B}}
{{счетчик|аргумент|сообщение A|сообщение B}}
  • аргумент: today, yesterday, или total(по умолчанию)
  • сообщение A: текст, следующий за числом (когда число равно 0 или 1)
  • сообщение B: текст, следующий за числом (когда число равно 2 или больше)
{{POPULAR number argument blacklist}}
  • number: количество элементов, которые будут показаны
  • argument: today, yesterday, или allperiod (по умолчанию)
  • blacklist: страницы, которые не будут показаны в списке (разделить на |)

Менеджер данных

Вы можете выбрать «Диспетчер данных» в меню администратора вашей вики и легко просматривать и контролировать данные журнала!

Конфигурация и настройки

Вы можете изменить следующие настройки с помощью диспетчера конфигураций.

OptionDescriptionValue TypeDefault Value
timezoneTimezone used to judge changing of the day (if empty, the timezone set to the server will be used. You can specify one of IDs in List of Supported Timezones" at PHP Manualstring2)
excludeMgAndSpDon't count managers and superusers? (see config «manager» and «superuserpull-down choice from 0 (Count both), sp (Don't count superusers), or mg (Don't count managers (including superusers))0
exclusionListIPs and remote hosts that will be excluded
The plugin don't count users with these IPs and remote hosts. This list will be useful if your website has many accesses by robot(s) from specified IP(s) and remote host(s).
The plugin gets remote hosts by IPs reverse lookup (gethostbyaddr).
Enter one IP or remote host per line.
Wildcards available:
? = one character (an alphanumeric character, a dot ».«, or a hyphen »-«)
* = one or more characters (alphanumeric characters, dots ».«, or hyphens »-«)
! = one character (a numeral)
~ = one or more characters (numerals)

e.g.: «123.456.???.123» → 123.456.789.123, etc. (123.456.78.123 won't be excluded)
e.g.: «*.example.com» → 123.456.789.123.example.com, 1-2-3-4.rooter.example.com, etc.
textarea3)
usrExclusionUsers or user groups that will be excluded
The plugin don't count these users and users in these groups.
Enter users and user groups separated by comma.
string4)
cntrExclusionCountries that will be exluded
The plugin don't count users from these countries. This list will be useful if your website has many accesses by robot(s) from specified country(ies).
The plugin gets country codes by a DNS service of «cc.wariate.jp» (Details in Japanese).
Enter two-character country codes(ISO 3166-1 alpha-2) separated by comma.
string5)
cntrInclusionSet specific countries to be counted
If you specify county(ies) here, the plugin will count users ONLY from these countries.
The plugin gets country codes by a DNS service of «cc.wariate.jp» (Details in Japanese).
Enter two-character country codes(ISO 3166-1 alpha-2) separated by comma.
string6)
reverseLookupFailedExclude from the counter when the reverse lookup (IPs to remote hosts) failed (IPs of robots tend to reject the reverse lookup)boolean0
reverseLookupExceptionIPs which the plugin doesn't apply to the option «reverseLookupFailed»
Enter one IP per line.
Wildcards available:
? = one character
* = one or more characters

e.g.: «123.456.???.123» → 123.456.789.123, etc. (123.456.78.123 won't be excluded)
e.g.: «123.*.789.123» → 123.456.789.123, 123.9.789.123, etc.
textarea7)
reverseLookupCntrExceptionCountries which the plugin doesn't apply to the option «reverseLookupFailed»
The plugin gets country codes by a DNS service of «cc.wariate.jp» (Details in Japanese).
Enter two-character country codes(ISO 3166-1 alpha-2) separated by comma.
string8)
sfsExFreqCheck the frequency score of the visitor's IP address not to count spammers? (Stopforumspam2 plugin required)
If the given number is «0» then the plugin won't do that, otherwise it'll do. You can define the borderline special to this function. If »-1« then the plugin will use the conf «freqBorder» of Stopforumspam2 plugin, if more than 0 then the number will be the borderline.
numeric (-1 +)0
sfsExConfCheck the confidence score of the visitor's IP address not to count spammers? (Stopforumspam2 plugin required)
If the given number is «0» then the plugin won't do that, otherwise it'll do. You can define the borderline special to this function. If »-1« then the plugin will use the conf «confidenceBorder» of Stopforumspam2 plugin, if more than 0 (and 100 or less) then the number will be the borderline.
numeric (-1 - 100)0
saveLogSave the log of IPs, the date and the time when visitors access this wiki?
The log will be recorded for every page. This option will be useful when you decide which IPs, remote hosts, and countries to exclude from the counter.
The log files will be saved in accscounterlog directory in your cache directory (inside the data directory in default config). Pick up and delete the log files if necessary.
pull-down choice from 0 (Don't save), ppage (Save (Don't make files for every date)), or pdate (Save (Make files for every date))0

Development

Change Log

  • 2018-07-02
    • Initial release
  • 2018-07-17
    • Fixed the bug (The plugin sometimes used to do their works with tomorrow's date)
  • 2018-08-08
    • Fixed the bug (An elementary mistake. The plugin used to write files without making a directory)
  • 2018-08-29
    • Added a htaccess file
  • 2018-10-30
    • Big update! Added options of black lists and the log saving system.
  • 2019-02-10
    • Changed saving destinations of this plugin's data to be compatible with some plugins like farmer plugin. You can move or delete data in old directories. See the notification you'll see after updating the plugin.
    • Added a function that uses stopforumspam2 plugin.
  • 2019-03-12
    • Changed saving destinations of this plugin's data AGAIN, to be easy to uninstall. See the notification you'll see after updating the plugin.
    • Added the function of Data Manager.
  • 2019-10-21
    • Added the conf cntrInclusion
  • 2019-11-07
    • Bug fix

Known Bugs and Issues

(Currently none)

ToDo and Wishlist

I'll do my best if you think this leaves something to be desired

  • A kind of CSS formatting will be nice. In my case the counter on the in a wide sidebar looks bad, the Numbers of the pages are just on sidebar shown under the page Name, not beside it. IT has nothing to do with of the sidebar. Maybe conflicts somehow with the sidebar formatting of the 'Bootstrap3 Template'?

Contact Me

If you find some problems in this plugin, you can make issue topics on the GitHub page, or if you wanna contact me for other things, you can contact me by:

Обновление

Для обновления удалите исходную папку lib/plugins/displaywikipage и установите новую версию, как указано выше.

Файл для загрузки

Лицензия

1)
согласно лицензии оригинального плагина
2) , 3) , 4) , 5) , 6) , 7) , 8)
empty
Только авторизованные участники могут оставлять комментарии.
wiki/plugin/accscounter.1743016842.txt.gz · Последнее изменение: vladpolskiy