Issues (1061)

Themes/default/BoardIndex.template.php (5 issues)

1
<?php
2
/**
3
 * Simple Machines Forum (SMF)
4
 *
5
 * @package SMF
6
 * @author Simple Machines https://www.simplemachines.org
7
 * @copyright 2020 Simple Machines and individual contributors
8
 * @license https://www.simplemachines.org/about/smf/license.php BSD
9
 *
10
 * @version 2.1 RC2
11
 */
12
13
/**
14
 * The top part of the outer layer of the boardindex
15
 */
16
function template_boardindex_outer_above()
17
{
18
	template_newsfader();
19
}
20
21
/**
22
 * This shows the newsfader
23
 */
24
function template_newsfader()
25
{
26
	global $context, $settings;
27
28
	// Show the news fader?  (assuming there are things to show...)
29
	if (!empty($settings['show_newsfader']) && !empty($context['news_lines']))
30
	{
31
		echo '
32
		<ul id="smf_slider" class="roundframe">';
33
34
		foreach ($context['news_lines'] as $news)
35
			echo '
36
			<li>', $news, '</li>';
37
38
		echo '
39
		</ul>
40
		<script>
41
			jQuery("#smf_slider").slippry({
42
				pause: ', $settings['newsfader_time'], ',
43
				adaptiveHeight: 0,
44
				captions: 0,
45
				controls: 0,
46
			});
47
		</script>';
48
	}
49
}
50
51
/**
52
 * This actually displays the board index
53
 */
54
function template_main()
55
{
56
	global $context, $txt, $scripturl;
57
58
	echo '
59
	<div id="boardindex_table" class="boardindex_table">';
60
61
	/* Each category in categories is made up of:
62
	id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
63
	new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
64
	and boards. (see below.) */
65
	foreach ($context['categories'] as $category)
66
	{
67
		// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
68
		if (empty($category['boards']) && !$category['is_collapsed'])
69
			continue;
70
71
		echo '
72
		<div class="main_container">
73
			<div class="cat_bar ', $category['is_collapsed'] ? 'collapsed' : '', '" id="category_', $category['id'], '">
74
				<h3 class="catbg">';
75
76
		// If this category even can collapse, show a link to collapse it.
77
		if ($category['can_collapse'])
78
			echo '
79
					<span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>';
80
81
		echo '
82
					', $category['link'], '
83
				</h3>', !empty($category['description']) ? '
84
				<div class="desc">' . $category['description'] . '</div>' : '', '
85
			</div>
86
			<div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>';
87
88
		/* Each board in each category's boards has:
89
		new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
90
		children (see below.), link_children (easier to use.), children_new (are they new?),
91
		topics (# of), posts (# of), link, href, and last_post. (see below.) */
92
		foreach ($category['boards'] as $board)
93
		{
94
			echo '
95
				<div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '">
96
					<div class="board_icon">
97
						', function_exists('template_bi_' . $board['type'] . '_icon') ? call_user_func('template_bi_' . $board['type'] . '_icon', $board) : template_bi_board_icon($board), '
0 ignored issues
show
Are you sure the usage of template_bi_board_icon($board) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
98
					</div>
99
					<div class="info">
100
						', function_exists('template_bi_' . $board['type'] . '_info') ? call_user_func('template_bi_' . $board['type'] . '_info', $board) : template_bi_board_info($board), '
0 ignored issues
show
Are you sure the usage of template_bi_board_info($board) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
101
					</div><!-- .info -->';
102
103
			// Show some basic information about the number of posts, etc.
104
			echo '
105
					<div class="board_stats">
106
						', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), '
0 ignored issues
show
Are you sure the usage of template_bi_board_stats($board) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
107
					</div>';
108
109
			// Show the last post if there is one.
110
			if(!empty($board['last_post']['id']))
111
				echo'
112
					<div class="lastpost lpr_border">
113
						', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), '
0 ignored issues
show
Are you sure the usage of template_bi_board_lastpost($board) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
114
					</div>';
115
116
			// Won't somebody think of the children!
117
			if (function_exists('template_bi_' . $board['type'] . '_children'))
118
				call_user_func('template_bi_' . $board['type'] . '_children', $board);
119
			else
120
				template_bi_board_children($board);
121
122
			echo '
123
				</div><!-- #board_[id] -->';
124
		}
125
126
		echo '
127
			</div><!-- #category_[id]_boards -->
128
		</div><!-- .main_container -->';
129
	}
130
131
	echo '
132
	</div><!-- #boardindex_table -->';
133
134
	// Show the mark all as read button?
135
	if ($context['user']['is_logged'] && !empty($context['categories']))
136
		echo '
137
	<div class="mark_read">
138
		', template_button_strip($context['mark_read_button'], 'right'), '
0 ignored issues
show
Are you sure the usage of template_button_strip($c...read_button'], 'right') is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
139
	</div>';
140
}
141
142
/**
143
 * Outputs the board icon for a standard board.
144
 *
145
 * @param array $board Current board information.
146
 */
147
function template_bi_board_icon($board)
148
{
149
	global $context, $scripturl;
150
151
	echo '
152
		<a href="', ($context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>';
153
}
154
155
/**
156
 * Outputs the board icon for a redirect.
157
 *
158
 * @param array $board Current board information.
159
 */
160
function template_bi_redirect_icon($board)
161
{
162
	global $context, $scripturl;
163
164
	echo '
165
		<a href="', $board['href'], '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>';
166
}
167
168
/**
169
 * Outputs the board info for a standard board or redirect.
170
 *
171
 * @param array $board Current board information.
172
 */
173
function template_bi_board_info($board)
174
{
175
	global $context, $scripturl, $txt;
176
177
	echo '
178
		<a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '">
179
			', $board['name'], '
180
		</a>';
181
182
	// Has it outstanding posts for approval?
183
	if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
184
		echo '
185
		<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link amt">!</a>';
186
187
	echo '
188
		<div class="board_description">', $board['description'], '</div>';
189
190
	// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
191
	if (!empty($board['link_moderators']))
192
		echo '
193
		<p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
194
}
195
196
/**
197
 * Outputs the board stats for a standard board.
198
 *
199
 * @param array $board Current board information.
200
 */
201
function template_bi_board_stats($board)
202
{
203
	global $txt;
204
205
	echo '
206
		<p>
207
			', $txt['posts'], ': ', comma_format($board['posts']), '<br>', $txt['board_topics'], ': ', comma_format($board['topics']), '
208
		</p>';
209
}
210
211
/**
212
 * Outputs the board stats for a redirect.
213
 *
214
 * @param array $board Current board information.
215
 */
216
function template_bi_redirect_stats($board)
217
{
218
	global $txt;
219
220
	echo '
221
		<p>
222
			', $txt['redirects'], ': ', comma_format($board['posts']), '
223
		</p>';
224
}
225
226
/**
227
 * Outputs the board lastposts for a standard board or a redirect.
228
 * When on a mobile device, this may be hidden if no last post exists.
229
 *
230
 * @param array $board Current board information.
231
 */
232
function template_bi_board_lastpost($board)
233
{
234
	if (!empty($board['last_post']['id']))
235
		echo '
236
			<p>', $board['last_post']['last_post_message'], '</p>';
237
}
238
239
/**
240
 * Outputs the board children for a standard board.
241
 *
242
 * @param array $board Current board information.
243
 */
244
function template_bi_board_children($board)
245
{
246
	global $txt, $scripturl, $context;
247
248
	// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
249
	if (!empty($board['children']))
250
	{
251
		// Sort the links into an array with new boards bold so it can be imploded.
252
		$children = array();
253
		/* Each child in each board's children has:
254
			id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
255
		foreach ($board['children'] as $child)
256
		{
257
			if (!$child['is_redirect'])
258
				$child['link'] = '' . ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')" class="new_posts">' . $txt['new'] . '</a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
259
			else
260
				$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
261
262
			// Has it posts awaiting approval?
263
			if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
264
				$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link amt">!</a>';
265
266
			$children[] = $child['new'] ? '<span class="strong">' . $child['link'] . '</span>' : '<span>' . $child['link'] . '</span>';
267
		}
268
269
		echo '
270
			<div id="board_', $board['id'], '_children" class="children">
271
				<p><strong id="child_list_', $board['id'], '">', $txt['sub_boards'], '</strong>', implode($children), '</p>
272
			</div>';
273
	}
274
}
275
276
/**
277
 * The lower part of the outer layer of the board index
278
 */
279
function template_boardindex_outer_below()
280
{
281
	template_info_center();
282
}
283
284
/**
285
 * Displays the info center
286
 */
287
function template_info_center()
288
{
289
	global $context, $options, $txt;
290
291
	if (empty($context['info_center']))
292
		return;
293
294
	// Here's where the "Info Center" starts...
295
	echo '
296
	<div class="roundframe" id="info_center">
297
		<div class="title_bar">
298
			<h3 class="titlebg">
299
				<span class="toggle_up floatright" id="upshrink_ic" title="', $txt['hide_infocenter'], '" style="display: none;"></span>
300
				<a href="#" id="upshrink_link">', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '</a>
301
			</h3>
302
		</div>
303
		<div id="upshrink_stats"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
304
305
	foreach ($context['info_center'] as $block)
306
	{
307
		$func = 'template_ic_block_' . $block['tpl'];
308
		$func();
309
	}
310
311
	echo '
312
		</div><!-- #upshrink_stats -->
313
	</div><!-- #info_center -->';
314
315
	// Info center collapse object.
316
	echo '
317
	<script>
318
		var oInfoCenterToggle = new smc_Toggle({
319
			bToggleEnabled: true,
320
			bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
321
			aSwappableContainers: [
322
				\'upshrink_stats\'
323
			],
324
			aSwapImages: [
325
				{
326
					sId: \'upshrink_ic\',
327
					altExpanded: ', JavaScriptEscape($txt['hide_infocenter']), ',
328
					altCollapsed: ', JavaScriptEscape($txt['show_infocenter']), '
329
				}
330
			],
331
			aSwapLinks: [
332
				{
333
					sId: \'upshrink_link\',
334
					msgExpanded: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), ',
335
					msgCollapsed: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), '
336
				}
337
			],
338
			oThemeOptions: {
339
				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
340
				sOptionName: \'collapse_header_ic\',
341
				sSessionId: smf_session_id,
342
				sSessionVar: smf_session_var,
343
			},
344
			oCookieOptions: {
345
				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
346
				sCookieName: \'upshrinkIC\'
347
			}
348
		});
349
	</script>';
350
}
351
352
/**
353
 * The recent posts section of the info center
354
 */
355
function template_ic_block_recent()
356
{
357
	global $context, $scripturl, $settings, $txt;
358
359
	// This is the "Recent Posts" bar.
360
	echo '
361
			<div class="sub_bar">
362
				<h4 class="subbg">
363
					<a href="', $scripturl, '?action=recent"><span class="xx"></span>', $txt['recent_posts'], '</a>
364
				</h4>
365
			</div>
366
			<div id="recent_posts_content">';
367
368
	// Only show one post.
369
	if ($settings['number_recent_posts'] == 1)
370
	{
371
		// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
372
		echo '
373
				<p id="infocenter_onepost" class="inline">
374
					<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a> ', sprintf($txt['is_recent_updated'], '&quot;' . $context['latest_post']['link'] . '&quot;'), ' (', $context['latest_post']['time'], ')<br>
375
				</p>';
376
	}
377
	// Show lots of posts.
378
	elseif (!empty($context['latest_posts']))
379
	{
380
		echo '
381
				<table id="ic_recentposts">
382
					<tr class="windowbg">
383
						<th class="recentpost">', $txt['message'], '</th>
384
						<th class="recentposter">', $txt['author'], '</th>
385
						<th class="recentboard">', $txt['board'], '</th>
386
						<th class="recenttime">', $txt['date'], '</th>
387
					</tr>';
388
389
		/* Each post in latest_posts has:
390
			board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
391
			subject, short_subject (shortened with...), time, link, and href. */
392
		foreach ($context['latest_posts'] as $post)
393
			echo '
394
					<tr class="windowbg">
395
						<td class="recentpost"><strong>', $post['link'], '</strong></td>
396
						<td class="recentposter">', $post['poster']['link'], '</td>
397
						<td class="recentboard">', $post['board']['link'], '</td>
398
						<td class="recenttime">', $post['time'], '</td>
399
					</tr>';
400
		echo '
401
				</table>';
402
	}
403
	echo '
404
			</div><!-- #recent_posts_content -->';
405
}
406
407
/**
408
 * The calendar section of the info center
409
 */
410
function template_ic_block_calendar()
411
{
412
	global $context, $scripturl, $txt;
413
414
	// Show information about events, birthdays, and holidays on the calendar.
415
	echo '
416
			<div class="sub_bar">
417
				<h4 class="subbg">
418
					<a href="', $scripturl, '?action=calendar' . '"><span class="main_icons calendar"></span> ', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</a>
419
				</h4>
420
			</div>';
421
422
	// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P
423
	if (!empty($context['calendar_holidays']))
424
		echo '
425
			<p class="inline holiday">
426
				<span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '
427
			</p>';
428
429
	// People's birthdays. Like mine. And yours, I guess. Kidding.
430
	if (!empty($context['calendar_birthdays']))
431
	{
432
		echo '
433
			<p class="inline">
434
				<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';
435
436
		// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
437
		foreach ($context['calendar_birthdays'] as $member)
438
			echo '
439
				<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
440
441
		echo '
442
			</p>';
443
	}
444
445
	// Events like community get-togethers.
446
	if (!empty($context['calendar_events']))
447
	{
448
		echo '
449
			<p class="inline">
450
				<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
451
452
		// Each event in calendar_events should have:
453
		//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
454
		foreach ($context['calendar_events'] as $event)
455
			echo '
456
				', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="main_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', ';
457
		echo '
458
			</p>';
459
	}
460
}
461
462
/**
463
 * The stats section of the info center
464
 */
465
function template_ic_block_stats()
466
{
467
	global $scripturl, $txt, $context, $settings;
468
469
	// Show statistical style information...
470
	echo '
471
			<div class="sub_bar">
472
				<h4 class="subbg">
473
					<a href="', $scripturl, '?action=stats" title="', $txt['more_stats'], '"><span class="main_icons stats"></span> ', $txt['forum_stats'], '</a>
474
				</h4>
475
			</div>
476
			<p class="inline">
477
				', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - ' . $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br>
478
				', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  (' . $context['latest_post']['time'] . ')<br>' : ''), '
479
				<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>
480
			</p>';
481
}
482
483
/**
484
 * The who's online section of the admin center
485
 */
486
function template_ic_block_online()
487
{
488
	global $context, $scripturl, $txt, $modSettings, $settings;
489
	// "Users online" - in order of activity.
490
	echo '
491
			<div class="sub_bar">
492
				<h4 class="subbg">
493
					', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<span class="main_icons people"></span> ', $txt['online_users'], '', $context['show_who'] ? '</a>' : '', '
494
				</h4>
495
			</div>
496
			<p class="inline">
497
				', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<strong>', $txt['online'], ': </strong>', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
498
499
	// Handle hidden users and buddies.
500
	$bracketList = array();
501
502
	if ($context['show_buddies'])
503
		$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
504
505
	if (!empty($context['num_spiders']))
506
		$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
507
508
	if (!empty($context['num_users_hidden']))
509
		$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']);
510
511
	if (!empty($bracketList))
512
		echo ' (' . implode(', ', $bracketList) . ')';
513
514
	echo $context['show_who'] ? '</a>' : '', '
515
516
				&nbsp;-&nbsp;', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>&nbsp;-&nbsp;
517
				', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')<br>';
518
519
	// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
520
	if (!empty($context['users_online']))
521
	{
522
		echo '
523
				', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']);
524
525
		// Showing membergroups?
526
		if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
527
			echo '
528
				<span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>';
529
	}
530
531
	echo '
532
			</p>';
533
}
534
535
?>