Extension:HitCounters/ru
HitCounters Статус релиза: стабильно |
|
---|---|
Реализация | База данных , Извлечение данных, MyWiki |
Описание | Предоставляет функциональность просмотров страницы |
Автор(ы) | Mark A. Hershberger (MarkAHershbergertalk) |
MediaWiki | |
PHP | 7.3.19+ |
Composer | mediawiki/hit-counters |
Таблицы | hit_counter hit_counter_extension |
Лицензия | Лицензия не указана |
Скачать | |
hitcounter-exempt |
|
Ежеквартальные загрузки | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Использование общедоступными вики | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Переведите расширение HitCounters, если оно доступно на translatewiki.net | |
Роль Vagrant | hitcounters |
Проблемы | Открытые задачи · Сообщить об ошибке |
Расширение HitCounters отображает количество просмотров в нижнем колонтитуле страницы и список самых просматриваемых страниц на служебной странице под названием PopularPages. Расширение предоставляет статистику просмотров страницы, которая была удалена в MediaWiki 1.25 .
Общие сведения
Преимущества
Расширение предоставляет редакторам обратную связь в виде измерения аудитории. Редакторы могут определять и улучшать популярные статьи, зная их примерный размер аудитории. Служебная страница HitCounters PopularPages также позволяет редакторам сосредоточить внимание на улучшение статей с наибольшей посещаемостью и помогает читателям узнавать наиболее курируемый контент проекта.
Расширение HitCounters включает определение wikiFactor — примерное определение популярности вики-сайта.
Расширение HitCounters минимально навязчивое с уважением к безопасности данных и опасениям по поводу конфиденциальности. The extension handles metrics on the server side so aggregated data stays within the site's security boundary. The extension does not inject JavaScript to be executed by the client, and does not ask a client to download additional un-audited code from a third party, like GoogleAnalyticsMetrics.
Расширение не следит за пользователями, посещающие страницу. As such, there's no need for special handling of Do Not Track browser requests or Global Privacy Control settings. The extension also does not use third party services, like GoogleAnalyticsMetrics.
Расширение не имеет зависимости, от которых могут возникнуть конфликты. Other extensions, like GoogleAnalyticsMetrics, can cause problems during a Composer update. Also see Phabricator P6481 .
Отличия от изначальной реализации MediaWiki
Before MediaWiki 1.25, the page views counting functionality was in core MediaWiki. This extension is based on that same code, but was deliberately done in a more lightweight way in order to speed up processing time. Many lines of superfluous code were removed. Also, the old MediaWiki core code did numerous database queries on every page hit; these have all been removed as well. This change may possibly lead to some inaccuracies in the data.
The core differences that wiki administrators need to know are:
- The hit counts are stored in cache.
- The visible hit count at the bottom of each page is updated only once per day. (Pages with hit count less than 100 are updated once per minute.)
- If you refresh your browser on a wiki page, that hit is ignored.
Что считается за просмотр
According to tests conducted by several MediaWiki operators, a view is counted if a page is accessed normally (action=view
), as well as action=render
and when accessing a page revision.
A view is not counted with the other actions, such as action=raw
, action=edit
, and action=info
.
Migration
Установка
Вы можете использовать composer для того, чтобы установить расширение, выполнив следующие две команды в вашей директории с MediaWiki:
- <translate> [[<tvar name=2>Special:ExtensionDistributor/HitCounters/ru</tvar>|Download]] and move the extracted <tvar name=name>
HitCounters/ru
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HitCounters%2Fru - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'HitCounters/ru' );
- <translate> Run the [[<tvar name=update>Special:MyLanguage/Manual:Update.php</tvar>|update script]] which will automatically create the necessary database tables that this extension needs.</translate>
- Configure as required.
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
<translate> Vagrant installation:</translate>
- <translate> If using <tvar name=vagrant>Vagrant </tvar>, install with <tvar name=code>
vagrant roles enable hitcounters --provision
</tvar></translate>
Настройка
$wgDisableCounters
- When set to
true
, it disables the notice in the pages footer saying "This page has been accessed 256 times." as well as the special pagePopularPages
. This configuration parameter was removed with MediaWiki 1.35.0.
- When set to
$wgHitcounterUpdateFreq
- Sets how often page counters should be updated. Default value is
1
.
- Sets how often page counters should be updated. Default value is
$wgGroupPermissions['sysop']['hitcounter-exempt'] = true;
- Exclude user group page views from counting.
Fork
There is a fork of this extension that offers custom settings to the user:
- REL1_25-v0.5.4 is backward compatible to MediaWiki 1.25.0.
- REL1_35-v0.5.5 is backward compatible to MediaWiki 1.35.3.
- REL1_38-v0.5.5 is backward compatible to MediaWiki 1.38.0.
See also
- Extension:GoogleAnalyticsMetrics - Provides site-wide metrics for Google Analytics users
File:OOjs UI icon information-progressive.svg | <translate> This extension is included in the following wiki farms/hosts and/or packages:</translate>
<translate> This is not an authoritative list.</translate> <translate> Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.</translate> <translate> Always check with your wiki farms/hosts or bundle to confirm.</translate> |
- Pages with script errors
- Pages with broken file links
- Stable extensions/ru
- Database extensions/ru
- Data extraction extensions/ru
- Personalization extensions/ru
- Extensions without MediaWiki version
- Extensions supporting Composer/ru
- Extensions with no license specified/ru
- Extensions in Wikimedia version control/ru
- Extensions which add rights/ru
- All extensions/ru
- Extensions not in ExtensionJson
- Statistics extensions/ru
- Special page extensions/ru