[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_contact 6 * 7 * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\HTML\HTMLHelper; 14 use Joomla\CMS\Language\Text; 15 use Joomla\CMS\Plugin\PluginHelper; 16 use Joomla\CMS\String\PunycodeHelper; 17 18 ?> 19 <?php if (PluginHelper::isEnabled('user', 'profile')) : 20 $fields = $this->item->profile->getFieldset('profile'); ?> 21 <div class="com-contact__profile contact-profile" id="users-profile-custom"> 22 <dl class="dl-horizontal"> 23 <?php foreach ($fields as $profile) : 24 if ($profile->value) : 25 echo '<dt>' . $profile->label . '</dt>'; 26 $profile->text = htmlspecialchars($profile->value, ENT_COMPAT, 'UTF-8'); 27 28 switch ($profile->id) : 29 case 'profile_website': 30 $v_http = substr($profile->value, 0, 4); 31 32 if ($v_http === 'http') : 33 echo '<dd><a href="' . $profile->text . '">' . PunycodeHelper::urlToUTF8($profile->text) . '</a></dd>'; 34 else : 35 echo '<dd><a href="http://' . $profile->text . '">' . PunycodeHelper::urlToUTF8($profile->text) . '</a></dd>'; 36 endif; 37 break; 38 39 case 'profile_dob': 40 echo '<dd>' . HTMLHelper::_('date', $profile->text, Text::_('DATE_FORMAT_LC4'), false) . '</dd>'; 41 break; 42 43 default: 44 echo '<dd>' . $profile->text . '</dd>'; 45 break; 46 endswitch; 47 endif; 48 endforeach; ?> 49 </dl> 50 </div> 51 <?php endif; ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |