Code Duplication    Length = 15-15 lines in 5 locations

Themes/default/Profile.template.php 5 locations

@@ 158-172 (lines=15) @@
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">
@@ 201-215 (lines=15) @@
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">';
@@ 268-282 (lines=15) @@
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 -->
@@ 432-446 (lines=15) @@
429
			</dl>';
430
431
	// Are there any custom profile fields for above the signature?
432
	if (!empty($context['print_custom_fields']['above_signature']))
433
	{
434
		$fields = '';
435
		foreach ($context['print_custom_fields']['above_signature'] as $field)
436
			if (!empty($field['output_html']))
437
				$fields .= '
438
					<li>' . $field['output_html'] . '</li>';
439
440
		if (!empty($fields))
441
			echo '
442
			<div class="custom_fields_above_signature">
443
				<ul class="nolist">', $fields, '
444
				</ul>
445
			</div>';
446
	}
447
448
	// Show the users signature.
449
	if ($context['signature_enabled'] && !empty($context['member']['signature']))
@@ 457-471 (lines=15) @@
454
			</div>';
455
456
	// Are there any custom profile fields for below the signature?
457
	if (!empty($context['print_custom_fields']['below_signature']))
458
	{
459
		$fields = '';
460
		foreach ($context['print_custom_fields']['below_signature'] as $field)
461
			if (!empty($field['output_html']))
462
				$fields .=  '
463
					<li>' . $field['output_html'] . '</li>';
464
465
		if (!empty($fields))
466
			echo '
467
			<div class="custom_fields_below_signature">
468
				<ul class="nolist">', $fields, '
469
				</ul>
470
			</div>';
471
	}
472
473
	echo '
474
		</div><!-- #detailedinfo -->