-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpackage-info.xml
233 lines (191 loc) · 10.5 KB
/
package-info.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>SleePy:StopForumSpam</id>
<name>Stop Forum Spam</name>
<version>1.5.7</version>
<type>modification</type>
<!-- 2.0 has no support for hooks -->
<install for="2.0.*">
<code type="inline"><![CDATA[<?php
define('REQUIRED_PHP_VERSION', '8');
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
fatal_error(
sprintf(
'This mod requires a minimum of PHP %s in order to function. (You are currently running PHP %s)',
REQUIRED_PHP_VERSION,
PHP_VERSION
),
false
);
?>]]></code>
<readme type="file" parsebbc="true">README.bbc</readme>
<database>install_sfs.php</database>
<code type="file">sfs_hooks_install.php</code>
<code type="file">upgrade_sfs.php</code>
<modification>install_smf20.xml</modification>
<require-file name="StopForumSpam.php" destination="$sourcedir" />
<require-dir name="StopForumSpam" destination="$sourcedir" />
<require-file name="StopForumSpam.template.php" destination="$themedir" />
<!-- this dir may not exist in SMF -->
<create-dir name="admin" destination="$themedir/images" />
<require-file name="sfs.webp" destination="$themedir/images/admin" />
<!-- language files -->
<require-file name="language/StopForumSpam.english.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.finnish.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.russian.php" destination="$themes_dir/default/languages" />
<redirect url="?action=admin;area=modsettings;sa=sfs" />
</install>
<uninstall for="2.0.*">
<!-- database changes, undone -->
<database>install_sfs.php</database>
<code type="file">sfs_hooks_remove.php</code>
<modification reverse="true">install_smf20.xml</modification>
<!-- language files, removed -->
<remove-dir name="$themes_dir/default/languages/StopForumSpam.english.php" />
<remove-dir name="$themes_dir/default/languages/StopForumSpam.finnish.php" />
<remove-dir name="$themes_dir/default/languages/StopForumSpam.russian.php" />
<!-- source files, removed -->
<remove-file name="$sourcedir/StopForumSpam.php" />
<remove-dir name="$sourcedir/StopForumSpam" />
<remove-file name="$themedir/StopForumSpam.template.php" />
<remove-file name="$themedir/images/admin/sfs.webp" />
</uninstall>
<install for="2.1.*">
<code type="inline"><![CDATA[<?php
define('REQUIRED_PHP_VERSION', '8');
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
fatal_error(
sprintf(
'This mod requires a minimum of PHP %s in order to function. (You are currently running PHP %s)',
REQUIRED_PHP_VERSION,
PHP_VERSION
),
false
);
?>]]></code>
<readme type="file" parsebbc="true">README.bbc</readme>
<database>install_sfs.php</database>
<code type="file">upgrade_sfs.php</code>
<require-file name="StopForumSpam.php" destination="$sourcedir" />
<require-dir name="StopForumSpam" destination="$sourcedir" />
<require-file name="StopForumSpam.template.php" destination="$themedir" />
<require-file name="language/StopForumSpam.english.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.finnish.php" destination="$themes_dir/default/languages" />
<!-- this dir may not exist in SMF -->
<create-dir name="admin" destination="$themedir/images" />
<require-file name="sfs.webp" destination="$themedir/images/admin" />
<!-- All the hooks -->
<!-- Main Section -->
<hook hook="integrate_pre_include" function="$sourcedir/StopForumSpam.php" />
<hook hook="integrate_pre_load" function="SFS::hook_pre_load" />
<hook hook="integrate_register" function="SFS::hook_register" />
<hook hook="integrate_create_control_verification_test" function="SFS::hook_create_control_verification_test" />
<!-- Admin Section -->
<hook hook="integrate_admin_include" function="$sourcedir/StopForumSpam/SFS-Admin.php" />
<hook hook="integrate_admin_areas" function="SFSA::hook_admin_areas" />
<hook hook="integrate_modify_modifications" function="SFSA::hook_modify_modifications" />
<hook hook="integrate_manage_logs" function="SFSL::hook_manage_logs" file="$sourcedir/StopForumSpam/SFS-Logs.php" />
<hook hook="integrate_manage_registrations" function="SFSA::hook_manage_registrations" />
<!-- Profile Section -->
<hook hook="integrate_pre_profile_areas" function="SFSP::hook_pre_profile_areas" file="$sourcedir/StopForumSpam/SFS-Profile.php" />
<!-- Display Section -->
<hook hook="integrate_prepare_display_context" function="SFS::hook_prepare_display_context" />
<hook hook="integrate_mod_buttons" function="SFS::hook_mod_buttons" />
<redirect url="?action=admin;area=modsettings;sa=sfs" />
</install>
<uninstall for="2.1.*">
<!-- database changes, undone -->
<database>install_sfs.php</database>
<!-- All the hooks, removed -->
<!-- Main Section -->
<hook hook="integrate_pre_include" function="$sourcedir/StopForumSpam.php" reverse="true" />
<hook hook="integrate_pre_load" function="SFS::hook_pre_load" reverse="true" />
<hook hook="integrate_register" function="SFS::hook_register" reverse="true" />
<hook hook="integrate_create_control_verification_test" function="SFS::hook_create_control_verification_test" reverse="true" />
<!-- Admin Section -->
<hook hook="integrate_admin_include" function="$sourcedir/StopForumSpam/SFS-Admin.php" reverse="true" />
<hook hook="integrate_admin_areas" function="SFSA::hook_admin_areas" reverse="true" />
<hook hook="integrate_modify_modifications" function="SFSA::hook_modify_modifications" reverse="true" />
<hook hook="integrate_manage_logs" function="SFSL::hook_manage_logs" file="$sourcedir/StopForumSpam/SFS-Logs.php" reverse="true" />
<hook hook="integrate_manage_registrations" function="SFSA::hook_manage_registrations" reverse="true" />
<!-- Profile Section -->
<hook hook="integrate_pre_profile_areas" function="SFSP::hook_pre_profile_areas" file="$sourcedir/StopForumSpam/SFS-Profile.php" reverse="true" />
<!-- Display Section -->
<hook hook="integrate_prepare_display_context" function="SFS::hook_prepare_display_context" reverse="true" />
<hook hook="integrate_mod_buttons" function="SFS::hook_mod_buttons" reverse="true" />
<!-- language files, removed -->
<remove-file name="$themes_dir/default/languages/StopForumSpam.english.php" />
<remove-file name="$themes_dir/default/languages/StopForumSpam.finnish.php" />
<remove-file name="$themes_dir/default/languages/StopForumSpam.russian.php" />
<!-- source files, removed -->
<remove-file name="$sourcedir/StopForumSpam.php" />
<remove-dir name="$sourcedir/StopForumSpam" />
<remove-file name="$themedir/StopForumSpam.template.php" />
<remove-file name="$themedir/images/admin/sfs.webp" />
</uninstall>
<upgrade from="1.0-1.5.6" for="2.1.*">
<code type="inline"><![CDATA[<?php
define('REQUIRED_PHP_VERSION', '8');
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
fatal_error(
sprintf(
'This mod requires a minimum of PHP %s in order to function. (You are currently running PHP %s)',
REQUIRED_PHP_VERSION,
PHP_VERSION
),
false
);
?>]]></code>
<code type="file">upgrade_sfs.php</code>
<require-file name="language/StopForumSpam.english.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.finnish.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.russian.php" destination="$themes_dir/default/languages" />
<require-file name="StopForumSpam.php" destination="$sourcedir" />
<require-dir name="StopForumSpam" destination="$sourcedir" />
<remove-file name="$sourcedir/SFS.php" error="ignore" />
<remove-file name="$sourcedir/SFS-Subs-Admin.php" error="ignore" />
<remove-file name="$sourcedir/SFS-Subs-Logs.php" error="ignore" />
<require-file name="StopForumSpam.template.php" destination="$themedir" />
<hook hook="integrate_pre_include" function="$sourcedir/StopForumSpam.php" />
<hook hook="integrate_pre_include" function="$sourcedir/SFS.php" reverse="true" />
<hook hook="integrate_admin_include" function="$sourcedir/StopForumSpam/SFS-Admin.php" />
<hook hook="integrate_admin_include" function="$sourcedir/SFS-Subs-Admin.php" reverse="true" />
<hook hook="integrate_manage_logs" function="SFSA::hook_manage_logs" reverse="true" error="ignore" />
<hook hook="integrate_manage_logs" function="SFSL::hook_manage_logs" file="$sourcedir/StopForumSpam/SFS-Logs.php" />
<hook hook="integrate_pre_profile_areas" function="SFSP::hook_pre_profile_areas" file="$sourcedir/StopForumSpam/SFS-Profile.php" />
<hook hook="integrate_pre_profile_areas" function="SFS::hook_pre_profile_areas" reverse="true" />
<hook hook="integrate_prepare_display_context" function="SFS::hook_prepare_display_context" />
<hook hook="integrate_mod_buttons" function="SFS::hook_mod_buttons" />
<!-- this dir may not exist in SMF -->
<create-dir name="admin" destination="$themedir/images" />
<require-file name="sfs.webp" destination="$themedir/images/admin" />
</upgrade>
<upgrade from="1.0-1.5.6" for="2.0.*">
<code type="inline"><![CDATA[<?php
define('REQUIRED_PHP_VERSION', '8');
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
fatal_error(
sprintf(
'This mod requires a minimum of PHP %s in order to function. (You are currently running PHP %s)',
REQUIRED_PHP_VERSION,
PHP_VERSION
),
false
);
?>]]></code>
<code type="file">upgrade_sfs.php</code>
<code type="file">sfs_hooks_install.php</code>
<require-file name="language/StopForumSpam.english.php" destination="$themes_dir/default/languages" />
<require-file name="language/StopForumSpam.finnish.php" destination="$themes_dir/default/languages" />
<require-file name="StopForumSpam.php" destination="$sourcedir" />
<require-dir name="StopForumSpam" destination="$sourcedir" />
<remove-file name="$sourcedir/SFS.php" error="ignore" />
<remove-file name="$sourcedir/SFS-Subs-Admin.php" error="ignore" />
<remove-file name="$sourcedir/SFS-Subs-Logs.php" error="ignore" />
<require-file name="StopForumSpam.template.php" destination="$themedir" />
<!-- this dir may not exist in SMF -->
<create-dir name="admin" destination="$themedir/images" />
<require-file name="sfs.webp" destination="$themedir/images/admin" />
</upgrade>
</package-info>