Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/user.tar
Назад
tmpl/user.php 0000604 00000001230 15245530522 0007202 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.User * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $value = (array) $value; $texts = array(); foreach ($value as $userId) { if (!$userId) { continue; } $user = JFactory::getUser($userId); if ($user) { // Use the Username $texts[] = $user->name; continue; } // Fallback and add the User ID if we get no JUser Object $texts[] = $userId; } echo htmlentities(implode(', ', $texts)); params/user.xml 0000604 00000000600 15245530522 0007522 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <field name="default_value" type="user" label="PLG_FIELDS_USER_DEFAULT_VALUE_LABEL" description="PLG_FIELDS_USER_DEFAULT_VALUE_DESC" /> <fields name="params" label="COM_FIELDS_FIELD_BASIC_LABEL"> <fieldset name="basic"> <field name="show_on" type="hidden" filter="unset" /> </fieldset> </fields> </form> user.xml 0000604 00000001422 15245530522 0006242 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_user</name> <author>Joomla! Project</author> <creationDate>March 2016</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_FIELDS_USER_XML_DESCRIPTION</description> <files> <filename plugin="user">user.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_user.ini</language> <language tag="en-GB">en-GB.plg_fields_user.sys.ini</language> </languages> </extension> user.php 0000604 00000002004 15245530522 0006226 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.User * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Fields User Plugin * * @since 3.7.0 */ class PlgFieldsUser extends FieldsPlugin { /** * Transforms the field into a DOM XML element and appends it as a child on the given parent. * * @param stdClass $field The field. * @param DOMElement $parent The field node parent. * @param JForm $form The form. * * @return DOMElement * * @since 3.7.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { if (JFactory::getApplication()->isClient('site')) { // The user field is not working on the front end return; } return parent::onCustomFieldsPrepareDom($field, $parent, $form); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка