-
Notifications
You must be signed in to change notification settings - Fork 0
/
modifications.xml
executable file
·122 lines (122 loc) · 4.7 KB
/
modifications.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
<?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>Labradoodle-360:childboards-as-dropdown</id>
<version>2.0.4</version>
<file name="$sourcedir/Load.php">
<operation>
<search position="before"><![CDATA[
detectBrowser();
]]></search>
<add><![CDATA[
//-- Labradoodle-360; Childboards as Dropdown
if ((empty($context['current_action']) || !empty($context['current_action']) && in_array($_GET['action'], array('forum', 'tpmod', 'collapse')) && empty($_GET['topic'])))
{
require_once($sourcedir . '/cad_source/main.php');
loadChildboards_as_Dropdown();
}
// End Labradoodle-360; Childboards as Dropdown --//
]]></add>
</operation>
</file>
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
]]></search>
<add><![CDATA[
//-- Labradoodle-360; Childboards as Dropdown
global $modSettings;
if (!empty($modSettings['lab360_childboard_dropdown']) && (isset($modSettings['lab360_childboard_limit']) && ($modSettings['lab360_childboard_limit'] == 0 || count(array_keys($board['children'])) > $modSettings['lab360_childboard_limit']) || !isset($modSettings['lab360_childboard_limit'])))
{
unset($children);
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<form action="', $scripturl, '?" method="get">
<strong>', $txt['parent_boards'], ':</strong>
<select name="board" id="board" onchange="javascript:jsRedirect(this);">
<option value="">', $txt['lab360_cad']['select_child'], '</option>
<optgroup label="', $txt['lab360_cad']['board_children'], ':">';
foreach ($board['children'] as $key => $value)
{
echo '<option value="', $key, '">', $value['name'], $value['new'] ? '*' : '', '</option>';
}
echo '</optgroup>
</select>
<noscript>
<input type="submit" value="', $txt['lab360_cad']['go'], '" class="button_submit" />
</noscript>
</form>
</td>
</tr>
';
}
else
{
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], ':</strong> ', implode(', ', $children), '
</td>
</tr>
';
}
// End Labradoodle-360; Childboards as Dropdown --//
]]></add>
</operation>
</file>
<file name="$themedir/MessageIndex.template.php">
<operation>
<search position="replace"><![CDATA[
echo '
<tr id="board_', $board['id'], '_children"><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
]]></search>
<add><![CDATA[
//-- Labradoodle-360; Childboards as Dropdown
global $modSettings;
if (!empty($modSettings['lab360_childboard_dropdown']) && (isset($modSettings['lab360_childboard_limit']) && ($modSettings['lab360_childboard_limit'] == 0 || count(array_keys($board['children'])) > $modSettings['lab360_childboard_limit']) || !isset($modSettings['lab360_childboard_limit'])))
{
unset($children);
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<form action="', $scripturl, '?" method="get">
<strong>', $txt['parent_boards'], ':</strong>
<select name="board" id="board" onchange="javascript:jsRedirect(this);">
<option value="">', $txt['lab360_cad']['select_child'], '</option>
<optgroup label="', $txt['lab360_cad']['board_children'], ':">';
foreach ($board['children'] as $key => $value)
{
echo '<option value="', $key, '">', $value['name'], $value['new'] ? '*' : '', '</option>';
}
echo '</optgroup>
</select>
<noscript>
<input type="submit" value="', $txt['lab360_cad']['go'], '" class="button_submit" />
</noscript>
</form>
</td>
</tr>
';
}
else
{
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], ':</strong> ', implode(', ', $children), '
</td>
</tr>
';
}
// End Labradoodle-360; Childboards as Dropdown --//
]]></add>
</operation>
</file>
</modification>