Code Duplication    Length = 4-14 lines in 14 locations

Themes/default/PersonalMessage.template.php 7 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>
@@ 268-271 (lines=4) @@
265
				</li>';
266
267
		// Are there any custom fields below the avatar?
268
		if (!empty($message['custom_fields']['below_avatar']))
269
			foreach ($message['custom_fields']['below_avatar'] as $custom)
270
				echo '
271
				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
272
273
			if (!$message['member']['is_guest'])
274
				echo '
@@ 305-318 (lines=14) @@
302
				<li class="blurb">', $message['member']['blurb'], '</li>';
303
304
				// Any custom fields to show as icons?
305
				if (!empty($message['custom_fields']['icons']))
306
				{
307
					echo '
308
				<li class="im_icons">
309
					<ol>';
310
311
					foreach ($message['custom_fields']['icons'] as $custom)
312
						echo '
313
						<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
314
315
					echo '
316
					</ol>
317
				</li>';
318
				}
319
320
		// Show the IP to this user for this post - because you can moderate?
321
		if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip']))
@@ 368-371 (lines=4) @@
365
				}
366
367
				// Any custom fields for standard placement?
368
				if (!empty($message['custom_fields']['standard']))
369
					foreach ($message['custom_fields']['standard'] as $custom)
370
						echo '
371
				<li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>';
372
373
				// Are we showing the warning status?
374
				if ($message['member']['can_see_warning'])
@@ 379-382 (lines=4) @@
376
				<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>';
377
378
				// Are there any custom fields to show at the bottom of the poster info?
379
				if (!empty($message['custom_fields']['bottom_poster']))
380
					foreach ($message['custom_fields']['bottom_poster'] as $custom)
381
						echo '
382
				<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
383
			}
384
385
			// Done with the information about the poster... on to the post itself.
@@ 473-486 (lines=14) @@
470
				</div>';
471
472
			// Are there any custom profile fields for above the signature?
473
			if (!empty($message['custom_fields']['above_signature']))
474
			{
475
				echo '
476
					<div class="custom_fields_above_signature">
477
						<ul class="nolist">';
478
479
				foreach ($message['custom_fields']['above_signature'] as $custom)
480
					echo '
481
							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
482
483
				echo '
484
						</ul>
485
					</div>';
486
			}
487
488
			// Show the member's signature?
489
			if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
@@ 494-507 (lines=14) @@
491
				<div class="signature">', $message['member']['signature'], '</div>';
492
493
			// Are there any custom profile fields for below the signature?
494
			if (!empty($message['custom_fields']['below_signature']))
495
			{
496
				echo '
497
					<div class="custom_fields_below_signature">
498
						<ul class="nolist">';
499
500
				foreach ($message['custom_fields']['below_signature'] as $custom)
501
					echo '
502
							<li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>';
503
504
				echo '
505
						</ul>
506
					</div>';
507
			}
508
509
			// Add an extra line at the bottom if we have labels enabled.
510
			if ($context['folder'] != 'sent' && !empty($context['currently_using_labels']) && $context['display_mode'] != 2)

Themes/default/Display.template.php 7 locations

@@ 481-494 (lines=14) @@
478
						<div class="poster">';
479
480
	// Are there any custom fields above the member name?
481
	if (!empty($message['custom_fields']['above_member']))
482
	{
483
		echo '
484
							<div class="custom_fields_above_member">
485
								<ul class="nolist">';
486
487
		foreach ($message['custom_fields']['above_member'] as $custom)
488
			echo '
489
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
490
491
		echo '
492
								</ul>
493
							</div>';
494
	}
495
496
	echo '
497
									<h4>';
@@ 522-525 (lines=4) @@
519
								</li>';
520
521
	// Are there any custom fields below the avatar?
522
	if (!empty($message['custom_fields']['below_avatar']))
523
		foreach ($message['custom_fields']['below_avatar'] as $custom)
524
			echo '
525
								<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
526
527
	// Show the post group icons, but not for guests.
528
	if (!$message['member']['is_guest'])
@@ 562-575 (lines=14) @@
559
								<li class="blurb">', $message['member']['blurb'], '</li>';
560
561
		// Any custom fields to show as icons?
562
		if (!empty($message['custom_fields']['icons']))
563
		{
564
			echo '
565
								<li class="im_icons">
566
									<ol>';
567
568
			foreach ($message['custom_fields']['icons'] as $custom)
569
				echo '
570
										<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
571
572
			echo '
573
									</ol>
574
								</li>';
575
		}
576
577
		// Show the website and email address buttons.
578
		if ($message['member']['show_profile_buttons'])
@@ 605-608 (lines=4) @@
602
		}
603
604
		// Any custom fields for standard placement?
605
		if (!empty($message['custom_fields']['standard']))
606
			foreach ($message['custom_fields']['standard'] as $custom)
607
				echo '
608
								<li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>';
609
610
	}
611
	// Otherwise, show the guest's email.
@@ 643-646 (lines=4) @@
640
								<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>';
641
642
	// Are there any custom fields to show at the bottom of the poster info?
643
	if (!empty($message['custom_fields']['bottom_poster']))
644
		foreach ($message['custom_fields']['bottom_poster'] as $custom)
645
			echo '
646
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
647
648
	// Poster info ends.
649
	echo '
@@ 925-938 (lines=14) @@
922
						<div class="moderatorbar">';
923
924
	// Are there any custom profile fields for above the signature?
925
	if (!empty($message['custom_fields']['above_signature']))
926
	{
927
		echo '
928
							<div class="custom_fields_above_signature">
929
								<ul class="nolist">';
930
931
		foreach ($message['custom_fields']['above_signature'] as $custom)
932
			echo '
933
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
934
935
		echo '
936
								</ul>
937
							</div>';
938
	}
939
940
	// Show the member's signature?
941
	if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
@@ 947-960 (lines=14) @@
944
945
946
	// Are there any custom profile fields for below the signature?
947
	if (!empty($message['custom_fields']['below_signature']))
948
	{
949
		echo '
950
							<div class="custom_fields_below_signature">
951
								<ul class="nolist">';
952
953
		foreach ($message['custom_fields']['below_signature'] as $custom)
954
			echo '
955
									<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
956
957
		echo '
958
								</ul>
959
							</div>';
960
	}
961
962
	echo '
963
						</div>