jdarwood007 commited on 2020-01-05 09:16:30
Showing 2 changed files, with 38 additions and 3 deletions.
... | ... |
@@ -0,0 +1,25 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+if (!defined('SMF')) |
|
4 |
+ die('Hacking attempt...'); |
|
5 |
+ |
|
6 |
+/** |
|
7 |
+ * Recreates member groups for the board index to only show online groups.. |
|
8 |
+ * |
|
9 |
+ * |
|
10 |
+ * @since 1.1 |
|
11 |
+*/ |
|
12 |
+function integrate_mark_read_button_OOG() |
|
13 |
+{ |
|
14 |
+ global $settings, $context, $scripturl; |
|
15 |
+ |
|
16 |
+ if (!empty($settings['show_group_key'])) |
|
17 |
+ { |
|
18 |
+ $context['membergroups'] = array(); |
|
19 |
+ foreach ($context['online_groups'] as $group) |
|
20 |
+ { |
|
21 |
+ if ($group['color'] != '' && $group['hidden'] == 0 && $group['id'] != 3) // so, has a colour, is visible and isn't Moderator |
|
22 |
+ $context['membergroups'][] = '<a href="' . $scripturl . '?action=groups;sa=members;group=' . $group['id'] . '" style="color: ' . $group['color'] . '">' . $group['name'] . '</a>'; |
|
23 |
+ } |
|
24 |
+ } |
|
25 |
+} |
|
0 | 26 |
\ No newline at end of file |
... | ... |
@@ -3,15 +3,25 @@ |
3 | 3 |
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/"> |
4 | 4 |
<id>SimpleDeskTeam:OnlineOnlyGroup</id> |
5 | 5 |
<name>Online Only Groups in the Group Key</name> |
6 |
- <version>1.0</version> |
|
6 |
+ <version>1.1</version> |
|
7 | 7 |
<type>modification</type> |
8 | 8 |
|
9 |
- <install for="2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 RC5, 2.0-2.0.99"> |
|
9 |
+ <install for="2.0-2.0.99"> |
|
10 | 10 |
<modification type="file">install20.xml</modification> |
11 | 11 |
</install> |
12 | 12 |
|
13 |
- <uninstall for="2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 RC5, 2.0-2.0.99"> |
|
13 |
+ <uninstall for="2.0-2.0.99"> |
|
14 | 14 |
<modification type="file" reverse="true">install20.xml</modification> |
15 | 15 |
</uninstall> |
16 | 16 |
|
17 |
+ <install for="2.1 Beta 3, 2.1 Beta 4, 2.1 RC1"> |
|
18 |
+ <require-file name="Subs-MembersOnlineOnly.php" destination="$sourcedir" /> |
|
19 |
+ <hook function="integrate_mark_read_button_OOG" hook="integrate_mark_read_button" file="$sourcedir/Subs-MembersOnlineOnly.php" /> |
|
20 |
+ </install> |
|
21 |
+ |
|
22 |
+ <uninstall for="2.1 Beta 3, 2.1 Beta 4, 2.1 RC1"> |
|
23 |
+ <remove-file name="$sourcedir/Subs-MembersOnlineOnly.php" /> |
|
24 |
+ <hook function="integrate_mark_read_button_OOG" hook="integrate_mark_read_button" file="$sourcedir/Subs-MembersOnlineOnly.php" reverse="true" /> |
|
25 |
+ </uninstall> |
|
26 |
+ |
|
17 | 27 |
</package-info> |
18 | 28 |
\ No newline at end of file |
19 | 29 |