Code Duplication    Length = 15-16 lines in 5 locations

Themes/default/Profile.template.php 5 locations

@@ 158-173 (lines=16) @@
155
		<div id="basicinfo">';
156
157
	// Are there any custom profile fields for above the name?
158
	if (!empty($context['print_custom_fields']['above_member']))
159
	{
160
		$fields = '';
161
		foreach ($context['print_custom_fields']['above_member'] as $field)
162
			if (!empty($field['output_html']))
163
				$fields .= '
164
					<li>' . $field['output_html'] . '</li>';
165
166
		if (!empty($fields))
167
			echo '
168
			<div class="custom_fields_above_name">
169
				<ul>', $fields, '
170
				</ul>
171
			</div>';
172
	}
173
174
	echo '
175
			<div class="username clear">
176
				<h4>';
@@ 201-216 (lines=16) @@
198
			', $context['member']['avatar']['image'];
199
200
	// Are there any custom profile fields for below the avatar?
201
	if (!empty($context['print_custom_fields']['below_avatar']))
202
	{
203
		$fields = '';
204
		foreach ($context['print_custom_fields']['below_avatar'] as $field)
205
			if (!empty($field['output_html']))
206
				$fields .= '
207
					<li>' . $field['output_html'] . '</li>';
208
209
		if (!empty($fields))
210
			echo '
211
			<div class="custom_fields_below_avatar">
212
				<ul>', $fields, '
213
				</ul>
214
			</div>';
215
	}
216
217
	echo '
218
			<ul class="icon_fields clear">';
219
@@ 268-283 (lines=16) @@
265
			<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '" class="infolinks">', $txt['statPanel'], '</a>';
266
267
	// Are there any custom profile fields for bottom?
268
	if (!empty($context['print_custom_fields']['bottom_poster']))
269
	{
270
		$fields = '';
271
		foreach ($context['print_custom_fields']['bottom_poster'] as $field)
272
			if (!empty($field['output_html']))
273
				$fields .= '
274
					<li>' . $field['output_html'] . '</li>';
275
276
		if (!empty($fields))
277
			echo '
278
			<div class="custom_fields_bottom">
279
				<ul class="nolist">', $fields, '
280
				</ul>
281
			</div>';
282
	}
283
284
	echo '
285
		</div><!-- #basicinfo -->
286
@@ 434-448 (lines=15) @@
431
			</dl>';
432
433
	// Are there any custom profile fields for above the signature?
434
	if (!empty($context['print_custom_fields']['above_signature']))
435
	{
436
		$fields = '';
437
		foreach ($context['print_custom_fields']['above_signature'] as $field)
438
			if (!empty($field['output_html']))
439
				$fields .= '
440
					<li>' . $field['output_html'] . '</li>';
441
442
		if (!empty($fields))
443
			echo '
444
			<div class="custom_fields_above_signature">
445
				<ul class="nolist">', $fields, '
446
				</ul>
447
			</div>';
448
	}
449
450
	// Show the users signature.
451
	if ($context['signature_enabled'] && !empty($context['member']['signature']))
@@ 459-473 (lines=15) @@
456
			</div>';
457
458
	// Are there any custom profile fields for below the signature?
459
	if (!empty($context['print_custom_fields']['below_signature']))
460
	{
461
		$fields = '';
462
		foreach ($context['print_custom_fields']['below_signature'] as $field)
463
			if (!empty($field['output_html']))
464
				$fields .=  '
465
					<li>' . $field['output_html'] . '</li>';
466
467
		if (!empty($fields))
468
			echo '
469
			<div class="custom_fields_below_signature">
470
				<ul class="nolist">', $fields, '
471
				</ul>
472
			</div>';
473
	}
474
475
	echo '
476
		</div><!-- #detailedinfo -->