-
Notifications
You must be signed in to change notification settings - Fork 0
/
modification.xml
53 lines (51 loc) · 2.47 KB
/
modification.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
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>sorunome:smf-fixes</id>
<version>0.1</version>
<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[$code = strtr($tag['content'], array('$1' => $data));]]></search>
<add><![CDATA[if(is_array($data)){
$code = strtr($tag['content'], array('$1' => $data[0]));
}else{
$code = strtr($tag['content'], array('$1' => $data));
}]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[if (preg_match(\'~^(?:http://((?:www|au|br|ca|es|fr|de|hk|ie|in|il|it|jp|kr|mx|nl|nz|pl|ru|tw|uk)\.)?youtube\.com/(?:[^"]*?)(?:(?:video_)?id=|(?:v|p)(?:/|=)))?([0-9a-f]{16}|[0-9a-z-_]{11})~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $link, $matches))]]></search>
<add><![CDATA[if (preg_match(\'~^(?:https?://((?:www|au|br|ca|es|fr|de|hk|ie|in|il|it|jp|kr|mx|nl|nz|pl|ru|tw|uk)\.)?youtube\.com/(?:[^"]*?)(?:(?:video_)?id=|(?:v|p)(?:/|=)))?([0-9a-f]{16}|[0-9a-z-_]{11})~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $link, $matches))]]></add>
</operation>
</file>
<file name="$themedir/index.template.php">
<operation>
<search position="after"><![CDATA[foreach ($context['menu_buttons'] as $act => $button)
{
]]></search>
<add><![CDATA[if(!isset($button['href']) || !isset($button['title'])) continue;]]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php"> //Added by geekboy1011 2/23/15 //Why did the refactor this into Security.php in smf 2.1? really like really
<operation>
<search position="replace"> if (!allowedTo('moderate_board'))
$timeLimit = isset($timeOverrides[$error_type]) ? $timeOverrides[$error_type] : $modSettings['spamWaitTime'];
else
$timeLimit = 2;</search>
<add> if (!allowedTo('moderate_board'))
$timeLimit = isset($timeOverrides[$error_type]) ? $timeOverrides[$error_type] : $modSettings['spamWaitTime'];
else
return false;;</add>
</operation>
<operation>
<search position="replace">WHERE log_time < {int:log_time}
AND log_type = {string:log_type}',</search>
<add>WHERE ( log_time < {int:log_time} AND log_type = {string:log_type} )
OR ( ip <> {string:ip} AND log_type = {string:log_type} )',</add>
</operation>
<operation>
<search position="after">'log_type' => $error_type,</search>
<add>
'ip' => $user_info['ip'],</add>
</operation>
</file>
</modification>