-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod-func-user_pages.php
36 lines (33 loc) · 1.02 KB
/
mod-func-user_pages.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
31
32
33
34
35
36
<?php
// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
/**
* @return array
*/
function module_user_pages_info()
{
return [
'name' => tra('User Pages'),
'description' => tra('Displays to registered users the specified number of wiki pages which they were the last to edit.'),
'prefs' => ['feature_wiki'],
'params' => [],
'common_params' => ["rows", "nonums"]
];
}
/**
* @param $mod_reference
* @param $module_params
*/
function module_user_pages($mod_reference, $module_params)
{
global $user;
if ($user) {
$tikilib = TikiLib::lib('tiki');
$smarty = TikiLib::lib('smarty');
$ranking = $tikilib->get_user_pages($user, $mod_reference["rows"]);
$smarty->assign('modUserPages', $ranking);
$smarty->assign('tpl_module_title', tra("My Pages"));
}
}