-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall.xml
67 lines (58 loc) · 2.09 KB
/
install.xml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "https://www.simplemachines.org/xml/modification">
<modification xmlns="https://www.simplemachines.org/xml/modification" xmlns:smf="https://www.simplemachines.org/">
<id>spuds:member_awards</id>
<version>3.0</version>
<file name="$sourcedir/Admin.php">
<operation>
<search position="before"><![CDATA[
// You have to be able to do at least one of the below to see this page.
isAllowedTo(array('admin_forum', 'manage_permissions', 'moderate_forum',]]></search>
<add><![CDATA[ 'manage_awards',]]></add>
</operation>
</file>
<file name="$sourcedir/Load.php">
<operation>
<search position="before"><![CDATA[
'permissions' => array(),]]></search>
<add><![CDATA[
'awards' => isset($user_settings['awards']) ? $user_settings['awards'] : array(),]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
$user_profile[$row['id_member']] = $row;]]></search>
<add><![CDATA[
$user_profile[$row['id_member']]['awards'] = array();
$user_profile[$row['id_member']]['awardlist'] = array();]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
}
if (!empty($new_loaded_ids) && $set !== 'minimal')]]></search>
<add><![CDATA[
// I'm sorry, but I've got to stick this award somewhere ...
if ($modSettings['awards_in_post'] > 0 && !empty($new_loaded_ids) && !empty($modSettings['awards_enabled']))
{
global $sourcedir;
require_once($sourcedir . '/AwardsManage.php');
loadTemplate(false, 'awards');
AwardsLoad($new_loaded_ids);
AwardsAutoCheck($new_loaded_ids);
}]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
'local_time' => timeformat(time() + ($profile['time_offset'] - $user_info['time_offset']) * 3600, false),]]></search>
<add><![CDATA[
'awards' => &$profile['awards'],]]></add>
</operation>
</file>
<file name="$sourcedir/Who.php">
<operation>
<search position="before"><![CDATA[
'viewmembers' => array('moderate_forum'),]]></search>
<add><![CDATA[
'awards' => array('manage_awards'),]]></add>
</operation>
</file>
</modification>