Passed
Push — master ( da7076...4708a2 )
by Dark❶
01:52
created

listener::mas_search_posts_query()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 * Member Avatar & Status [MAS]. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2018, Dark❶ [dark1]
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace dark1\memberavatarstatus\event;
12
13
/**
14
 * @ignore
15
 */
16
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\EventD...ventSubscriberInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use dark1\memberavatarstatus\core\memberavatarstatus;
18
use phpbb\auth\auth;
19
use phpbb\config\config;
20
use phpbb\user;
0 ignored issues
show
Bug introduced by
The type phpbb\user was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
use phpbb\language\language;
22
use phpbb\template\template;
23
24
/**
25
 * Member Avatar & Status Event listener.
26
 */
27
class listener implements EventSubscriberInterface
28
{
29
	/** @var \dark1\memberavatarstatus\core\memberavatarstatus */
30
	protected $mas_func;
31
32
	/** @var \phpbb\auth\auth */
33
	protected $auth;
34
35
	/** @var \phpbb\config\config */
36
	protected $config;
37
38
	/** @var \phpbb\user */
39
	protected $user;
40
41
	/** @var \phpbb\language\language */
42
	protected $language;
43
44
	/** @var \phpbb\template\twig\twig */
45
	protected $template;
46
47
/**
48
 * Constructor for listener
49
 *
50
 * @param \dark1\memberavatarstatus\core\memberavatarstatus		$mas_func	dark1 mas_func
51
 * @param \phpbb\auth\auth										$auth		phpBB auth
52
 * @param \phpbb\config\config									$config		phpBB config
53
 * @param \phpbb\user											$user		phpBB user
54
 * @param \phpbb\language\language								$language	phpBB language
55
 * @param \phpbb\template\template								$template	phpBB template
56
 * @access public
57
 */
58
	public function __construct(
59
		memberavatarstatus	$mas_func,
60
		auth				$auth,
61
		config				$config,
62
		user				$user,
63
		language			$language,
64
		template			$template
65
	){
66
		$this->mas_func		= $mas_func;
67
		$this->auth			= $auth;
68
		$this->config		= $config;
69
		$this->user			= $user;
70
		$this->language		= $language;
71
		$this->template		= $template;
72
	}
73
74
/**
75
 * Assign functions defined in this class to event listeners in the core
76
 *
77
 * @return array
78
 * @static
79
 * @access public
80
 */
81
	static public function getSubscribedEvents()
82
	{
83
		return array(
84
			// Main Setup
85
			'core.user_setup_after'							=> 'mas_load_lang',
86
			'core.page_header_after'						=> 'mas_header',
87
			// MemberList Team Setup
88
			'core.memberlist_team_modify_query'				=> 'mas_memberlist_team_query',
89
			'core.memberlist_team_modify_template_vars'		=> 'mas_memberlist_team_template',
90
			// ViewOnline Page Setup
91
			'core.viewonline_modify_sql'					=> 'mas_viewonline_page_query',
92
			'core.viewonline_modify_user_row'				=> 'mas_viewonline_page_template',
93
			// ViewOnline Stat Block Setup
94
			'core.obtain_users_online_string_sql'			=> 'mas_viewonline_stat_block_query',
95
			'core.obtain_users_online_string_before_modify'	=> 'mas_viewonline_stat_block_template',
96
			// ViewForum DisplayForums Setup
97
			'core.display_forums_modify_sql'				=> 'mas_viewforum_displayforums_query',
98
			'core.display_forums_modify_template_vars'		=> 'mas_viewforum_displayforums_template',
99
			// ViewForum Topic Setup
100
			'core.viewforum_get_topic_data'					=> 'mas_viewforum_topic_query',
101
			'core.viewforum_modify_topicrow'				=> 'mas_viewforum_topic_template',
102
			// Search Setup
103
			'core.search_get_posts_data'					=> 'mas_search_posts_query',
104
			'core.search_get_topic_data'					=> 'mas_search_topic_query',
105
			'core.search_modify_tpl_ary'					=> 'mas_search_template',
106
		);
107
	}
108
109
110
111
/**
112
 * Member Avatar & Status Event Function.
113
 */
114
115
116
117
/**
118
 * MAS Load language files during user setup after
119
 *
120
 * @param object $event The event object
121
 * @return null
122
 * @access public
123
 */
124
	public function mas_load_lang($event)
125
	{
126
		$this->language->add_lang(array('lang_mas',), 'dark1/memberavatarstatus');
127
	}
128
129
130
131
/**
132
 * MAS Header setup during page header after
133
 *
134
 * @param object $event The event object
135
 * @return null
136
 * @access public
137
 */
138
	public function mas_header($event)
139
	{
140
		$ext_name_mas = 'Member Avatar & Status [MAS]';
141
		$ext_by_dark1 = 'Dark❶ [dark1]';
142
143
		// Assign template var's
144
		$this->template->assign_vars(array(
145
			'MAS_EXT_NAME'		=> $ext_name_mas,
146
			'MAS_EXT_DEV'		=> $ext_by_dark1,
147
			// MemberList
148
			'MAS_ML_AVATAR'		=> $this->config['dark1_mas_ml_av'],
149
			'MAS_ML_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_ml_av_sz', $this->mas_func::AV_DEF_SZ_BIG, $this->mas_func::AV_MAX_SZ_BIG),
150
			'MAS_ML_ONLINE'		=> $this->config['dark1_mas_ml_ol'],
151
			// ViewOnline
152
			'MAS_VO_PG_AVATAR'	=> $this->config['dark1_mas_vo_pg_av'],
153
			'MAS_VO_PG_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_vo_pg_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
154
			'MAS_VO_SB_AVATAR'	=> $this->config['dark1_mas_vo_sb_av'],
155
			'MAS_VO_SB_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_vo_sb_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
156
			// ViewForum
157
			'MAS_VF_FP_AVATAR'	=> $this->config['dark1_mas_vf_fp_av'],
158
			'MAS_VF_FP_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_vf_fp_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
159
			'MAS_VF_FP_ONLINE'	=> $this->config['dark1_mas_vf_fp_ol'],
160
			'MAS_VF_LP_AVATAR'	=> $this->config['dark1_mas_vf_lp_av'],
161
			'MAS_VF_LP_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_vf_lp_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
162
			'MAS_VF_LP_ONLINE'	=> $this->config['dark1_mas_vf_lp_ol'],
163
			// Search
164
			'MAS_SH_FP_AVATAR'	=> $this->config['dark1_mas_sh_fp_av'],
165
			'MAS_SH_FP_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_sh_fp_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
166
			'MAS_SH_FP_ONLINE'	=> $this->config['dark1_mas_sh_fp_ol'],
167
			'MAS_SH_LP_AVATAR'	=> $this->config['dark1_mas_sh_lp_av'],
168
			'MAS_SH_LP_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_sh_lp_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
169
			'MAS_SH_LP_ONLINE'	=> $this->config['dark1_mas_sh_lp_ol'],
170
			'MAS_SH_UP_AVATAR'	=> $this->config['dark1_mas_sh_up_av'],
171
			'MAS_SH_UP_AV_SIZE'	=> $this->mas_func->mas_get_config_avatar_size('dark1_mas_sh_up_av_sz', $this->mas_func::AV_DEF_SZ_SML, $this->mas_func::AV_MAX_SZ_SML),
172
			'MAS_SH_UP_ONLINE'	=> $this->config['dark1_mas_sh_up_ol'],
173
			// No Avatar IMG
174
			'MAS_NO_AVATAR_IMG'	=> $this->mas_func->mas_get_no_avatar_img(),
175
		));
176
	}
177
178
179
180
/**
181
 * MAS MemberList Team SQL Query Setup
182
 *
183
 * @param object $event The event object
184
 * @return null
185
 * @access public
186
 */
187
	public function mas_memberlist_team_query($event)
188
	{
189
		// Get Event Array `sql_ary`
190
		$sql_ary = $event['sql_ary'];
191
192
		// Add Query Details
193
		$temp_sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_ml', '', 'u', 'user', '');
194
		$sql_ary['SELECT'] = $temp_sql_ary['SELECT'];
195
		$sql_ary = $this->mas_func->mas_online_sql_query($sql_ary, 'dark1_mas_ml', 'ug.user_id', 's', '', '');
196
197
		// Assign sql_ary to event -> sql_ary
198
		$event['sql_ary'] = $sql_ary;
199
	}
200
201
202
203
/**
204
 * MAS MemberList Team Template Setup
205
 *
206
 * @param object $event The event object
207
 * @return null
208
 * @access public
209
 */
210
	public function mas_memberlist_team_template($event)
211
	{
212
		// Get Event Array `row` & `template_vars`
213
		$row = $event['row'];
214
		$template_vars = $event['template_vars'];
215
216
		// Set Avatar
217
		$avatar = $this->mas_func->mas_get_avatar('dark1_mas_ml', 'user', $row);
218
219
		// Get Online Status
220
		$online = (!($row['user_type'] == USER_INACTIVE)) ? $this->mas_func->mas_get_online('dark1_mas_ml', '', $row) : '';
221
222
		// Modify "USERNAME_FULL"
223
		$template_vars['USERNAME_FULL'] = $this->mas_func->mas_get_username_wrap($template_vars['USERNAME_FULL'], 'dark1_mas_ml', $avatar, $online);
224
225
		// Assign template_vars to event -> template_vars
226
		$event['template_vars'] = $template_vars;
227
	}
228
229
230
231
/**
232
 * MAS ViewOnline Avatar SQL Query Setup
233
 *
234
 * @param object $event The event object
235
 * @return null
236
 * @access public
237
 */
238
	public function mas_viewonline_page_query($event)
239
	{
240
		// Get Event Array `sql_ary`
241
		$sql_ary = $event['sql_ary'];
242
243
		// Add Query Details
244
		$temp_sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_vo_pg', '', 'u', 'user', '');
245
		$sql_ary['SELECT'] = $temp_sql_ary['SELECT'];
246
247
		// Assign sql_ary to event -> sql_ary
248
		$event['sql_ary'] = $sql_ary;
249
	}
250
251
252
253
/**
254
 * MAS ViewOnline Avatar Template Setup
255
 *
256
 * @param object $event The event object
257
 * @return null
258
 * @access public
259
 */
260
	public function mas_viewonline_page_template($event)
261
	{
262
		// Get Event Array `row` & `template_vars`
263
		$row = $event['row'];
264
		$template_row = $event['template_row'];
265
266
		// Get Avatar
267
		$avatar = $this->mas_func->mas_get_avatar('dark1_mas_vo_pg', 'user', $row);
268
269
		// Add Avatar to "USERNAME_FULL"
270
		$template_row['USERNAME_FULL'] = $this->mas_func->mas_get_username_wrap($template_row['USERNAME_FULL'], 'dark1_mas_vo_pg', $avatar, '');
271
272
		// Assign template_vars to event -> template_vars
273
		$event['template_row'] = $template_row;
274
	}
275
276
277
278
/**
279
 * MAS ViewOnline Stat Block Avatar SQL Query Setup
280
 *
281
 * @param object $event The event object
282
 * @return null
283
 * @access public
284
 */
285
	public function mas_viewonline_stat_block_query($event)
286
	{
287
		// Get Event Array `sql_ary`
288
		$sql_ary = $event['sql_ary'];
289
290
		// Add Query Details
291
		$temp_sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_vo_sb', '', 'u', 'user', '');
292
		$sql_ary['SELECT'] = $temp_sql_ary['SELECT'];
293
294
		// Assign sql_ary to event -> sql_ary
295
		$event['sql_ary'] = $sql_ary;
296
	}
297
298
299
300
/**
301
 * MAS ViewOnline Stat Block Avatar Template Setup
302
 *
303
 * @param object $event The event object
304
 * @return null
305
 * @access public
306
 */
307
	public function mas_viewonline_stat_block_template($event)
308
	{
309
		// Get Event Array `rowset` , `online_users` & `user_online_link`
310
		$rowset = $event['rowset'];
311
		$online_users = $event['online_users'];
312
		$user_online_link = $event['user_online_link'];
313
314
		if ($this->config['allow_avatar'] && $this->config['dark1_mas_vo_sb_av'])
315
		{
316
			foreach ($rowset as $row)
317
			{
318
				// Add avatar only for logged in User and not for Hidden User
319
				if ($row['user_id'] != ANONYMOUS && (!isset($online_users['hidden_users'][$row['user_id']]) || $this->auth->acl_get('u_viewonline') || $row['user_id'] === $this->user->data['user_id']))
320
				{
321
					// Get Avatar
322
					$avatar = $this->mas_func->mas_get_avatar('dark1_mas_vo_sb', 'user', $row);
323
					$username = $this->mas_func->mas_get_username_wrap($user_online_link[$row['user_id']], 'dark1_mas_vo_sb', $avatar, '');
324
					$user_online_link[$row['user_id']] = str_replace('div', 'span', $username);
325
				}
326
			}
327
		}
328
329
		// Assign user_online_link to event -> user_online_link
330
		$event['user_online_link'] = $user_online_link;
331
	}
332
333
334
335
/**
336
 * MAS ViewForum DisplayForums SQL Query Setup
337
 *
338
 * @param object $event The event object
339
 * @return null
340
 * @access public
341
 */
342
	public function mas_viewforum_displayforums_query($event)
343
	{
344
		// Get Event Array `sql_ary`
345
		$sql_ary = $event['sql_ary'];
346
347
		// Add Query Details
348
		$sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_vf_lp', 'f.forum_last_poster_id', 'ulp', 'forum_last_poster', ' AND forum_type <> ' . FORUM_CAT);
349
		$sql_ary = $this->mas_func->mas_online_sql_query($sql_ary, 'dark1_mas_vf_lp', 'f.forum_last_poster_id', 'slp', 'forum_last_poster', ' AND forum_type <> ' . FORUM_CAT);
350
351
		// Assign sql_ary to event -> sql_ary
352
		$event['sql_ary'] = $sql_ary;
353
	}
354
355
356
357
/**
358
 * MAS ViewForum DisplayForums Template Setup
359
 *
360
 * @param object $event The event object
361
 * @return null
362
 * @access public
363
 */
364
	public function mas_viewforum_displayforums_template($event)
365
	{
366
		// Get Event Array `row` & `forum_row`
367
		$row = $event['row'];
368
		$forum_row = $event['forum_row'];
369
370
		// Get Avatar
371
		$avatar = $this->mas_func->mas_get_avatar('dark1_mas_vf_lp', 'forum_last_poster', $row);
372
373
		// Get Online Status
374
		$online = $this->mas_func->mas_get_online('dark1_mas_vf_lp', 'forum_last_poster', $row);
375
376
		// Modify "LAST_POSTER_FULL"
377
		$forum_row['LAST_POSTER_FULL'] = $this->mas_func->mas_get_username_wrap($forum_row['LAST_POSTER_FULL'], 'dark1_mas_vf_lp', $avatar, $online);
378
379
		// Assign forum_row to event -> forum_row
380
		$event['forum_row'] = $forum_row;
381
	}
382
383
384
385
/**
386
 * MAS ViewForum SQL Query Setup
387
 *
388
 * @param object $event The event object
389
 * @return null
390
 * @access public
391
 */
392
	public function mas_viewforum_topic_query($event)
393
	{
394
		// Get Event Array `sql_array`
395
		$sql_array = $event['sql_array'];
396
397
		// Add Query Details
398
		$sql_array = $this->mas_func->mas_avatar_sql_query($sql_array, 'dark1_mas_vf_fp', 't.topic_poster', 'ufp', 'topic_first_poster', '');
399
		$sql_array = $this->mas_func->mas_online_sql_query($sql_array, 'dark1_mas_vf_fp', 't.topic_poster', 'sfp', 'topic_first_poster', '');
400
		$sql_array = $this->mas_func->mas_avatar_sql_query($sql_array, 'dark1_mas_vf_lp', 't.topic_last_poster_id', 'ulp', 'topic_last_poster', '');
401
		$sql_array = $this->mas_func->mas_online_sql_query($sql_array, 'dark1_mas_vf_lp', 't.topic_last_poster_id', 'slp', 'topic_last_poster', '');
402
403
		// Assign sql_ary to event -> sql_array
404
		$event['sql_array'] = $sql_array;
405
	}
406
407
408
409
/**
410
 * MAS ViewForum Template Setup
411
 *
412
 * @param object $event The event object
413
 * @return null
414
 * @access public
415
 */
416
	public function mas_viewforum_topic_template($event)
417
	{
418
		// Get Event Array `row` & `topic_row`
419
		$row = $event['row'];
420
		$topic_row = $event['topic_row'];
421
422
		// Get Both Avatar
423
		$avatar_first_poster = $this->mas_func->mas_get_avatar('dark1_mas_vf_fp', 'topic_first_poster', $row);
424
		$avatar_last_poster = $this->mas_func->mas_get_avatar('dark1_mas_vf_lp', 'topic_last_poster', $row);
425
426
		// Get Both Online Status
427
		$online_first_poster = $this->mas_func->mas_get_online('dark1_mas_vf_fp', 'topic_first_poster', $row);
428
		$online_last_poster = $this->mas_func->mas_get_online('dark1_mas_vf_lp', 'topic_last_poster', $row);
429
430
		// Modify Both "-X-_AUTHOR_FULL"
431
		$topic_row['TOPIC_AUTHOR_FULL'] = $this->mas_func->mas_get_username_wrap($topic_row['TOPIC_AUTHOR_FULL'], 'dark1_mas_vf_fp', $avatar_first_poster, $online_first_poster);
432
		$topic_row['LAST_POST_AUTHOR_FULL'] = $this->mas_func->mas_get_username_wrap($topic_row['LAST_POST_AUTHOR_FULL'], 'dark1_mas_vf_lp', $avatar_last_poster, $online_last_poster);
433
434
		// Assign topic_row to event -> topic_row
435
		$event['topic_row'] = $topic_row;
436
	}
437
438
439
440
/**
441
 * MAS Search Posts SQL Query Setup
442
 *
443
 * @param object $event The event object
444
 * @return null
445
 * @access public
446
 */
447
	public function mas_search_posts_query($event)
448
	{
449
		// Get Event Array `sql_array`
450
		$sql_array = $event['sql_array'];
451
452
		// Add Query Details
453
		$temp_sql_array = $this->mas_func->mas_avatar_sql_query($sql_array, 'dark1_mas_sh_up', '', 'u', 'user', '');
454
		$sql_array['SELECT'] = $temp_sql_array['SELECT'];
455
		$sql_array = $this->mas_func->mas_online_sql_query($sql_array, 'dark1_mas_sh_up', 'p.poster_id', 's', '', '');
456
457
		// Assign sql_array to event -> sql_array
458
		$event['sql_array'] = $sql_array;
459
	}
460
461
462
463
/**
464
 * MAS Search Topic SQL Query Setup
465
 *
466
 * @param object $event The event object
467
 * @return null
468
 * @access public
469
 */
470
	public function mas_search_topic_query($event)
471
	{
472
		// Temp Array
473
		$sql_ary = array(
474
			'SELECT'	=> '',
475
			'LEFT_JOIN'	=> array(),
476
		);
477
478
		// Add to Event Array `sql_select` & `sql_from`
479
		$sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_sh_fp', 't.topic_poster', 'ufp', 'topic_first_poster', '');
480
		$sql_ary = $this->mas_func->mas_online_sql_query($sql_ary, 'dark1_mas_sh_fp', 't.topic_poster', 'sfp', 'topic_first_poster', '');
481
		$sql_ary = $this->mas_func->mas_avatar_sql_query($sql_ary, 'dark1_mas_sh_lp', 't.topic_last_poster_id', 'ulp', 'topic_last_poster', '');
482
		$sql_ary = $this->mas_func->mas_online_sql_query($sql_ary, 'dark1_mas_sh_lp', 't.topic_last_poster_id', 'slp', 'topic_last_poster', '');
483
484
		// Add to Event Array `sql_select` & `sql_from`
485
		$temp_sql = $this->mas_func->mas_convert_sql($sql_ary);
486
		$event['sql_select'] .= $temp_sql['sql_select'];
487
		$event['sql_from'] .= $temp_sql['sql_from'];
488
	}
489
490
491
492
/**
493
 * MAS Search Topic Template Setup
494
 *
495
 * @param object $event The event object
496
 * @return null
497
 * @access public
498
 */
499
	public function mas_search_template($event)
500
	{
501
		// Get Event Array `row` & `topic_row`
502
		$row = $event['row'];
503
		$tpl_ary = $event['tpl_ary'];
504
505
		if ($event['show_results'] == 'posts')
506
		{
507
			// Get Avatar
508
			$avatar = $this->mas_func->mas_get_avatar('dark1_mas_sh_up', 'user', $row);
509
510
			// Get Online Status
511
			$online = $this->mas_func->mas_get_online('dark1_mas_sh_up', '', $row);
512
513
			// Modify "POST_AUTHOR_FULL"
514
			$tpl_ary['POST_AUTHOR_FULL'] = $this->mas_func->mas_get_username_wrap($tpl_ary['POST_AUTHOR_FULL'], 'dark1_mas_sh_up', $avatar, $online);
515
		}
516
		else
517
		{
518
			// Get Both Avatar
519
			$avatar_first_poster = $this->mas_func->mas_get_avatar('dark1_mas_sh_fp', 'topic_first_poster', $row);
520
			$avatar_last_poster = $this->mas_func->mas_get_avatar('dark1_mas_sh_lp', 'topic_last_poster', $row);
521
522
			// Get Both Online Status
523
			$online_first_poster = $this->mas_func->mas_get_online('dark1_mas_sh_fp', 'topic_first_poster', $row);
524
			$online_last_poster = $this->mas_func->mas_get_online('dark1_mas_sh_lp', 'topic_last_poster', $row);
525
526
			// Modify Both "-X-_AUTHOR_FULL"
527
			$tpl_ary['TOPIC_AUTHOR_FULL'] = $this->mas_func->mas_get_username_wrap($tpl_ary['TOPIC_AUTHOR_FULL'], 'dark1_mas_sh_fp', $avatar_first_poster, $online_first_poster);
528
			$tpl_ary['LAST_POST_AUTHOR_FULL'] = $this->mas_func->mas_get_username_wrap($tpl_ary['LAST_POST_AUTHOR_FULL'], 'dark1_mas_sh_lp', $avatar_last_poster, $online_last_poster);
529
		}
530
531
		// Assign tpl_ary to event -> tpl_ary
532
		$event['tpl_ary'] = $tpl_ary;
533
	}
534
535
}
536