-
Notifications
You must be signed in to change notification settings - Fork 0
/
modification.xml
65 lines (63 loc) · 2.02 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
54
55
56
57
58
59
60
61
62
63
64
65
<?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/">
<name>Location Search in memberlist</name>
<id>digger:location_search</id>
<version>1.0</version>
<file name="$sourcedir/Memberlist.php">
<operation>
<search position="before"><![CDATA[
'msn' => array(
'label' => $txt['msn'],
'width' => '25'
),]]></search>
<add><![CDATA[
//Location
'location' => array(
'label' => $txt['location']
),]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
'msn' => array(
'down' => 'LENGTH(mem.msn) > 0 ASC, IFNULL(mem.msn, 1=1) DESC, mem.msn DESC',
'up' => 'LENGTH(mem.msn) > 0 DESC, IFNULL(mem.msn, 1=1) ASC, mem.msn ASC'
),]]></search>
<add><![CDATA[
//location
'location' => array(
'down' => 'mem.location DESC',
'up' => 'mem.location ASC'
),]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
'group' => $txt['mlist_search_group'],]]></search>
<add><![CDATA[
'location' => $txt['mlist_search_location'],]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
// Search for messengers...
if (in_array('messenger', $_POST['fields']) && (!$user_info['is_guest'] || empty($modSettings['guest_hideContacts'])))
$fields += array(3 => 'msn', 'aim', 'icq', 'yim');]]></search>
<add><![CDATA[
// Search for location.
if (in_array('location', $_POST['fields']))
$fields += array(11 => 'location');]]></add>
</operation>
</file>
<file name="$themedir/Memberlist.template.php">
<operation>
<search position="before"><![CDATA[
// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2">', $member['msn']['link'], '</td>';]]></search>
<add><![CDATA[
if (!isset($context['disabled_fields']['location']))
echo '
<td class="windowbg2">', $member['location'], '</td>';]]></add>
</operation>
</file>
</modification>