-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMoegirlRanking.php
30 lines (26 loc) · 1003 Bytes
/
MoegirlRanking.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* Created by PhpStorm.
* User: Hi_old
* Date: 2018/11/20
* Time: 14:01
*/
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'MoegirlRanking',
'author' => 'Hi_old',
'url' => '#',
'description' => '自动记录首页以外的,文章点击次数并排名',
'version' => 1.0,
'license-name' => 'Apache-2.0+'
);
//页面访问完毕Hook
$wgHooks ['BeforePageDisplay'][] = 'MoegirlRankingHandlerHook::onBeforePageDisplay';
//升级数据库Hook
$wgHooks['LoadExtensionSchemaUpdates'][] = 'MoegirlRankingHandlerHook::addDatabases';
$wgHooks['ParserFirstCallInit'][] = 'ExampleExtension::onParserFirstCallInit';
$wgAutoloadClasses['MoegirlRankingHandlerHook'] = __DIR__ . '/MoegirlRankingHandlerHook.php';
$wgAutoloadClasses['MGRankingAPI'] = __DIR__ . '/api/MGRankingAPI.php';
$wgAutoloadClasses['ExampleExtension'] = __DIR__ . '/includes/parserfunctions/MoegirlRanking.php';
$wgAPIModules['MGRankingAPI'] = 'MGRankingAPI';
return true;