-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanagesettings.xml
63 lines (52 loc) · 1.7 KB
/
managesettings.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
<?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>JovanT:ultimate_profile</id>
<version>0.9</version>
<file name="$sourcedir/ManageSettings.php">
<operation>
<search position="before"><![CDATA[
'general' => 'ModifyGeneralModSettings',
]]></search>
<add><![CDATA[ 'ultprofile' => 'ModifyUltProfileSettings',
]]></add>
</operation>
<operation>
<search position="end" />
<add><![CDATA[
function ModifyUltProfileSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc;
loadLanguage('UltimateProfile');
$config_vars = array(
array('check', 'profile_enable_all'),
'',
array('check', 'profile_enable_pictures'),
array('text', 'profile_pictures_path'),
array('text', 'profile_pictures_url'),
array('int', 'profile_pictures_number'),
array('int', 'profile_pictures_width'),
'',
array('select', 'profile_buddies_shown', array(3 => $txt['buddy_top3'], 6 => $txt['buddy_top6'], 9 => $txt['buddy_top9'], 12 => $txt['buddy_top12'])),
'',
array('check', 'profile_allow_customize'),
array('check', 'profile_allow_mediabox'),
);
if ($return_config)
return $config_vars;
// Saving?
if (isset($_GET['save']))
{
checkSession();
saveDBSettings($config_vars);
writeLog();
redirectexit('action=admin;area=modsettings;sa=ultprofile');
}
$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=ultprofile';
$context['settings_title'] = $txt['ultimate_profile'];
prepareDBSettingContext($config_vars);
}
]]></add>
</operation>
</file>
</modification>