Code Duplication    Length = 4-14 lines in 18 locations

Themes/default/PersonalMessage.template.php 9 locations

@@ 226-239 (lines=14) @@
223
				<div class="poster">';
224
225
			// Are there any custom fields above the member name?
226
			if (!empty($message['custom_fields']['above_member']))
227
			{
228
				echo '
229
					<div class="custom_fields_above_member">
230
						<ul class="nolist">';
231
232
				foreach ($message['custom_fields']['above_member'] as $custom)
233
					echo '
234
							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
235
236
				echo '
237
						</ul>
238
					</div>';
239
			}
240
241
			echo '
242
					<h4>
@@ 251-254 (lines=4) @@
248
						<span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>';
249
250
			// Custom fields BEFORE the username?
251
			if (!empty($message['custom_fields']['before_member']))
252
				foreach ($message['custom_fields']['before_member'] as $custom)
253
					echo '
254
						<span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>';
255
256
			// Show a link to the member's profile.
257
			echo '
@@ 261-264 (lines=4) @@
258
				', $message['member']['link'];
259
260
				// Custom fields AFTER the username?
261
				if (!empty($message['custom_fields']['after_member']))
262
					foreach ($message['custom_fields']['after_member'] as $custom)
263
						echo '
264
						<span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>';
265
266
			echo '
267
					</h4>';
@@ 280-283 (lines=4) @@
277
						</li>';
278
279
			// Are there any custom fields below the avatar?
280
			if (!empty($message['custom_fields']['below_avatar']))
281
				foreach ($message['custom_fields']['below_avatar'] as $custom)
282
					echo '
283
						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
284
285
			if (!$message['member']['is_guest'])
286
				echo '
@@ 317-330 (lines=14) @@
314
						<li class="blurb">', $message['member']['blurb'], '</li>';
315
316
				// Any custom fields to show as icons?
317
				if (!empty($message['custom_fields']['icons']))
318
				{
319
					echo '
320
						<li class="im_icons">
321
							<ol>';
322
323
					foreach ($message['custom_fields']['icons'] as $custom)
324
						echo '
325
								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
326
327
					echo '
328
							</ol>
329
						</li>';
330
				}
331
332
				// Show the IP to this user for this post - because you can moderate?
333
				if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
@@ 386-389 (lines=4) @@
383
				}
384
385
				// Any custom fields for standard placement?
386
				if (!empty($message['custom_fields']['standard']))
387
					foreach ($message['custom_fields']['standard'] as $custom)
388
						echo '
389
						<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
390
391
				// Are we showing the warning status?
392
				if ($message['member']['can_see_warning'])
@@ 397-400 (lines=4) @@
394
						<li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<span class="generic_icons warning_', $message['member']['warning_status'], '"></span>', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
395
396
				// Are there any custom fields to show at the bottom of the poster info?
397
				if (!empty($message['custom_fields']['bottom_poster']))
398
					foreach ($message['custom_fields']['bottom_poster'] as $custom)
399
						echo '
400
						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
401
			}
402
403
			// Done with the information about the poster... on to the post itself.
@@ 493-506 (lines=14) @@
490
						</div><!-- .under_message -->';
491
492
			// Are there any custom profile fields for above the signature?
493
			if (!empty($message['custom_fields']['above_signature']))
494
			{
495
				echo '
496
						<div class="custom_fields_above_signature">
497
							<ul class="nolist">';
498
499
				foreach ($message['custom_fields']['above_signature'] as $custom)
500
					echo '
501
								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
502
503
				echo '
504
							</ul>
505
						</div>';
506
			}
507
508
			// Show the member's signature?
509
			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
@@ 516-529 (lines=14) @@
513
						</div>';
514
515
			// Are there any custom profile fields for below the signature?
516
			if (!empty($message['custom_fields']['below_signature']))
517
			{
518
				echo '
519
						<div class="custom_fields_below_signature">
520
							<ul class="nolist">';
521
522
				foreach ($message['custom_fields']['below_signature'] as $custom)
523
					echo '
524
								<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
525
526
				echo '
527
							</ul>
528
						</div>';
529
			}
530
531
			// Add an extra line at the bottom if we have labels enabled.
532
			if ($context['folder'] != 'sent' && !empty($context['currently_using_labels']) && $context['display_mode'] != 2)

Themes/default/Display.template.php 9 locations

@@ 485-498 (lines=14) @@
482
						<div class="poster">';
483
484
	// Are there any custom fields above the member name?
485
	if (!empty($message['custom_fields']['above_member']))
486
	{
487
		echo '
488
							<div class="custom_fields_above_member">
489
								<ul class="nolist">';
490
491
		foreach ($message['custom_fields']['above_member'] as $custom)
492
			echo '
493
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
494
495
		echo '
496
								</ul>
497
							</div>';
498
	}
499
500
	echo '
501
							<h4>';
@@ 509-512 (lines=4) @@
506
								', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>', $context['can_send_pm'] ? '</a>' : '';
507
508
	// Custom fields BEFORE the username?
509
	if (!empty($message['custom_fields']['before_member']))
510
		foreach ($message['custom_fields']['before_member'] as $custom)
511
			echo '
512
								<span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>';
513
514
	// Show a link to the member's profile.
515
	echo '
@@ 519-522 (lines=4) @@
516
								', $message['member']['link'];
517
518
	// Custom fields AFTER the username?
519
	if (!empty($message['custom_fields']['after_member']))
520
		foreach ($message['custom_fields']['after_member'] as $custom)
521
			echo '
522
								<span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>';
523
524
	// Begin display of user info
525
	echo '
@@ 537-540 (lines=4) @@
534
								</li>';
535
536
	// Are there any custom fields below the avatar?
537
	if (!empty($message['custom_fields']['below_avatar']))
538
		foreach ($message['custom_fields']['below_avatar'] as $custom)
539
			echo '
540
								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
541
542
	// Show the post group icons, but not for guests.
543
	if (!$message['member']['is_guest'])
@@ 577-590 (lines=14) @@
574
								<li class="blurb">', $message['member']['blurb'], '</li>';
575
576
		// Any custom fields to show as icons?
577
		if (!empty($message['custom_fields']['icons']))
578
		{
579
			echo '
580
								<li class="im_icons">
581
									<ol>';
582
583
			foreach ($message['custom_fields']['icons'] as $custom)
584
				echo '
585
										<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
586
587
			echo '
588
									</ol>
589
								</li>';
590
		}
591
592
		// Show the website and email address buttons.
593
		if ($message['member']['show_profile_buttons'])
@@ 620-623 (lines=4) @@
617
		}
618
619
		// Any custom fields for standard placement?
620
		if (!empty($message['custom_fields']['standard']))
621
			foreach ($message['custom_fields']['standard'] as $custom)
622
				echo '
623
								<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
624
625
	}
626
	// Otherwise, show the guest's email.
@@ 668-671 (lines=4) @@
665
								</li>';
666
667
	// Are there any custom fields to show at the bottom of the poster info?
668
	if (!empty($message['custom_fields']['bottom_poster']))
669
		foreach ($message['custom_fields']['bottom_poster'] as $custom)
670
			echo '
671
								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
672
673
	// Poster info ends.
674
	echo '
@@ 965-978 (lines=14) @@
962
						<div class="moderatorbar">';
963
964
	// Are there any custom profile fields for above the signature?
965
	if (!empty($message['custom_fields']['above_signature']))
966
	{
967
		echo '
968
							<div class="custom_fields_above_signature">
969
								<ul class="nolist">';
970
971
		foreach ($message['custom_fields']['above_signature'] as $custom)
972
			echo '
973
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
974
975
		echo '
976
								</ul>
977
							</div>';
978
	}
979
980
	// Show the member's signature?
981
	if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
@@ 989-1002 (lines=14) @@
986
987
988
	// Are there any custom profile fields for below the signature?
989
	if (!empty($message['custom_fields']['below_signature']))
990
	{
991
		echo '
992
							<div class="custom_fields_below_signature">
993
								<ul class="nolist">';
994
995
		foreach ($message['custom_fields']['below_signature'] as $custom)
996
			echo '
997
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
998
999
		echo '
1000
								</ul>
1001
							</div>';
1002
	}
1003
1004
	echo '
1005
						</div><!-- .moderatorbar -->