forked from barneycg/temars-eve-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_profile_template.xml
150 lines (138 loc) · 10.2 KB
/
mod_profile_template.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
<?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>temar:TEA</id>
<version>1.00</version>
<file name="$themedir/Profile.template.php">
<!-- <operation>
<search position="replace"><![CDATA[
// Can they add this member as a buddy?
]]></search>
<add><![CDATA[
global $sourcedir, $tea, $db_prefix, $txt;
$tea -> DisplayAPIinfo($context, $modSettings, $db_prefix, $txt);
// Can they add this member as a buddy?
]]></add>
</operation> -->
<!-- <operation>
<search position="replace"><![CDATA[function template_error_message()]]></search>
<add><![CDATA[function template_ModifyTEA()
{
global $tea, $options, $scripturl;
$tea -> UserModifyTEA($options, $scripturl);
}
function template_error_message()]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ // Fill the select box with all primary member groups that can be assigned to a member.]]></search>
<add><![CDATA[
if ($context['allow_edit_membergroups'])
{
global $tea, $context, $txt;
$tea -> manaualconfirm($context['member']['id'], $context, $txt);
}
// Fill the select box with all primary member groups that can be assigned to a member.]]></add>
</operation>
-->
<operation>
<search position="replace"><![CDATA[function template_profile_avatar_select()
{
global $context, $txt, $modSettings;
]]></search>
<add><![CDATA[function template_profile_avatar_select()
{
global $context, $txt, $modSettings;
Global $tea;
$tea -> avatar_option_lock();
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
echo '
<script type="text/javascript">]]></search>
<add><![CDATA[
// Use Stored Characters to get Eve Avatar
if ($modSettings["tea_enable"])
{
Global $tea;
$tea -> avatar_option();
}
echo '
<script type="text/javascript">]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "' . ($context['member']['avatar']['choice'] == 'server_stored' ? '' : 'none') . '";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "' . ($context['member']['avatar']['choice'] == 'external' ? '' : 'none') . '";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "' . ($context['member']['avatar']['choice'] == 'upload' ? '' : 'none') . '";' : '', '
function swap_avatar(type)
{
switch(type.id)
{
case "avatar_choice_server_stored":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
break;
case "avatar_choice_external":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
break;
case "avatar_choice_upload":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '', '
break;
case "avatar_choice_none":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
break;
}
}]]></search>
<add><![CDATA[ ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "' . ($context['member']['avatar']['choice'] == 'server_stored' ? '' : 'none') . '";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "' . ($context['member']['avatar']['choice'] == 'external' ? '' : 'none') . '";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "' . ($context['member']['avatar']['choice'] == 'upload' ? '' : 'none') . '";' : '', '
', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "' . ($context['member']['avatar']['choice'] == 'tea' ? '' : 'none') . '";' : '', '
function swap_avatar(type)
{
switch(type.id)
{
case "avatar_choice_server_stored":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
break;
case "avatar_choice_external":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
break;
case "avatar_choice_upload":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '', '
', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
break;
case "avatar_choice_tea":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "";' : '', '
break;
case "avatar_choice_none":
', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
break; }
}]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ ', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label>' : '', ']]></search>
<add><![CDATA[ ', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label><br />' : '', '
', !empty($modSettings["tea_enable"]) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_tea" value="tea"' . ($context['member']['avatar']['choice'] == 'tea' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['tea_avatar'] . '</label>' : '', ']]></add>
</operation>
</file>
</modification>