File manager - Edit - /home/capoccitel/www/wp-admin/fields.tar
Back
index.html 0000705 00000000037 15242100704 0006532 0 ustar 00 <!DOCTYPE html><title></title> scripts.php 0000705 00000036417 15242100704 0006750 0 ustar 00 <?php /** * @package Author * @author Joomla Bamboo * @website www.joomlabamboo.com * @email design@joomlabamboo.com * @copyright Copyright (c) 2013 Joomla Bamboo. All rights reserved. * @license GNU General Public License version 2 or later **/ // no direct access defined('_JEXEC') or die('Restricted access'); /** * Form Field class for the Joomla Framework. * * @package Mod_zensocial * @subpackage Form * @since 1.6 */ class JFormFieldScripts extends JFormField { protected $type = 'scripts'; protected function getInput() { $document = JFactory::getDocument(); $root = JURI::root(); if (version_compare(JVERSION, '3.0', '<')) { $document->addScript(''.$root.'modules/mod_zensocial/js/admin/jquery-1.8.3.min.js'); $document->addScript(''.$root.'modules/mod_zensocial/js/admin/jquery.noconflict.js'); } else { } $document->addScript(''.$root.'modules/mod_skillset/js/jquery.circliful.min.js'); ob_start();?> <!-- Container for preview in admin --> <div id="skills-demo" style="width:90%"></div> <div style="clear:both"></div> <!-- Colour inspiration --> <div id="help-panel" class="panel" <h3>You can click on an item to change it's color.</h3> <p class="pull-right" style="margin-top: -4px">Need some colour inspiration? <a class="btn btn-success" style="margin:0 0 8px 20px" href="https://kuler.adobe.com/explore/most-popular/?time=month">Visit Kuler</a> </p> </div> <!-- Add a new skill button --> <a class="new-skill btn btn-success" style="margin: 30px 0" >Add a new skill</a> <!-- Container for the skills --> <div id="skills-field"></div> <div id="holder"></div> <script type="text/javascript"> jQuery(document).ready(function() { // Set values and load demo setvalues(); if(jQuery("label[for='jform_params_display0']").hasClass('active')) { triggerdemo(); } if(jQuery("label[for='jform_params_display1']").hasClass('active')) { countupdemo(); } if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } // Toggle demos on click jQuery('#jform_params_display').click(function() { if(jQuery("label[for='jform_params_display0']").hasClass('active')) { triggerdemo(); } if(jQuery("label[for='jform_params_display1']").hasClass('active')) { countupdemo(); } if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } }); // Make sure values are set when user hits save jQuery("button").on('click', function() { getvalues(); }); // The template for creatinmg the inputs var skillform = '<fieldset><input type="text" class="skill input-large" placeholder="Type your skill…"><br /><br /><input class="skill-level input-large" type="text" placeholder="Type your skill level"><input class="color" type="text" value="#e67e22,#d35400"><br /><br /><a class="remove-skill btn btn-danger">Remove skill</a><br /><br /><br /><br /><div style="border-bottom:1px solid #eee;margin-bottom: 30px;"></div></fieldset>'; // A a new skillset jQuery(".new-skill").on('click', function() { jQuery("#skills-field").prepend(skillform); return false; }); // Remove a skillset jQuery(".remove-skill").live('click', function() { jQuery(this).parent().remove(); getvalues(); if(jQuery("label[for='jform_params_display0']").hasClass('active')) { triggerdemo(); } if(jQuery("label[for='jform_params_display1']").hasClass('active')) { countupdemo(); } if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } return false; }); // Get values on blur jQuery( "#skills-field input" ).live('blur', function() { getvalues(); if(jQuery("label[for='jform_params_display0']").hasClass('active')) { triggerdemo(); } if(jQuery("label[for='jform_params_display1']").hasClass('active')) { countupdemo(); } if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } }); // Fade in colour wheel // Get the skill and corresponding skill info we just activated jQuery('#skills-demo .zen-skillbar,#skills-demo .skill-circle').live('click', function() { jQuery('#skills-demo .zen-skillbar,#skills-demo .skill-circle').removeClass('active').addClass('inactive'); jQuery(this).removeClass('inactive').addClass('active'); jQuery('.minicolors').fadeIn(); var index = jQuery( "#skills-demo .zen-skillbar,#skills-demo .skill-circle" ).index( this ) + 1; jQuery('#skills-field fieldset').removeClass('active'); jQuery('#skills-field fieldset:nth-child('+index+')').addClass('active'); }); // On bind - live is deprecated in J1.9 + jQuery('#jform_params_color').live('bind', function() { getcolors() getvalues(); if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } }); // On Blur jQuery('#jform_params_color').live('blur', function() { getcolors() getvalues(); if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } }); // On click jQuery('.minicolors span').live('click', function() { getcolors() getvalues(); if(jQuery("label[for='jform_params_display2']").hasClass('active')) { circulardemo(); } }); function setvalues() { jQuery('#skills-demo').empty(); var skills = jQuery('#jform_params_skills').val(); skills = skills.split('|'); jQuery(skills).each(function( key, value) { if(value !=="") { var items = value.split(','); jQuery("#skills-field").append( '<fieldset><input type="text" class="skill input-large" placeholder="Type your skill…" value="'+ items[0] + '"><br /><br /><input class="skill-level input-large" type="text" placeholder="Type your skill level" value="' + items[1] + '"><input class="color" type="text" value="' + items[2] + ',' + items[3] + '"><br /><br /><a class="remove-skill btn btn-danger">Remove skill</a><br /><br /><br /><br /><div style="border-bottom:1px solid #eee;margin-bottom: 30px;"></div></fieldset>'); } }); } function getcolors() { var currentcolor = jQuery('#jform_params_color').val(); var darker = ColorLuminance(currentcolor, -0.1) jQuery('#skills-demo .active .zen-skillbar-bar').css({'background-color':currentcolor}); jQuery('#skills-demo .active .zen-skillbar-title').css({'background-color':darker}); jQuery('#skills-demo .zen-skillbar').removeClass('active').removeClass('inactive'); jQuery('fieldset.active .color').val(currentcolor + ','+ darker); // Circular jQuery('#skills-demo .skill-circle.active').attr('data-fgcolor', currentcolor); jQuery('.minicolors').fadeOut(); } function triggerdemo() { if(jQuery('.zen-skillbar').length) { jQuery('#help-panel').fadeIn(); } jQuery('#skills-demo').empty(); var skills = jQuery('#jform_params_skills').val(); if (skills.indexOf("%") >= 0) { alert('Please just add a whole number here without a % sign.'); return; } skills = skills.split('|'); jQuery(skills).each(function( key, value) { if(value !=="") { var items = value.split(','); jQuery("#skills-demo").append('<div class="zen-skillbar clearfix " data-percent="'+ items[1] + '%"><div class="zen-skillbar-title" style="background: '+ items[3]+'"><span>'+ items[0] + '</span></div><div class="zen-skillbar-bar" style="background:'+ items[2]+'"></div><div class="zen-skill-bar-percent">'+ items[1] + '%</div></div> <!-- End Skill Bar -->'); } }); // Animate the bar jQuery('.zen-skillbar').each(function(){ jQuery(this).find('.zen-skillbar-bar').animate({ width:jQuery(this).attr('data-percent') },3000); }); } function countupdemo() { jQuery('#help-panel').fadeOut(); jQuery('#skills-demo').empty(); var skills = jQuery('#jform_params_skills').val(); if (skills.indexOf("%") >= 0) { alert('Count up values need to be in whole numbers and not percentages.'); return; } skills = skills.split('|'); jQuery(skills).each(function( key, value) { if(value !=="") { var items = value.split(','); total = items[1]; jQuery('#skills-demo').append('<div id="count-' + key + '" class="skill-count-item skill-count-item' + key +'"><h2></h2><p><strong>' + items[0] + '</strong></p></div>'); countup('#count-' + key + ' h2', total); } }); } function circulardemo() { jQuery('#skills-demo').empty(); var skills = jQuery('#jform_params_skills').val(); if (skills.indexOf("%") >= 0) { alert('Please just add a whole number here without a % sign.'); return; } skills = skills.split('|'); jQuery(skills).each(function( key, value) { if(value !=="") { var items = value.split(','); jQuery("#skills-demo").append('<div id="skill-' + key + '" class="zen-skillcircle skill-count-item skill-count-item' + key +' skill-circle" data-dimension="250" data-text="' + items[1] +'%" data-info="" data-width="6" data-fontsize="38" data-percent="' + items[1] +'" data-fgcolor="'+items[2]+'" data-bgcolor="#fafafa" data-fill="#fff"></div>'); // Animate the bar jQuery("#skill-" + key).circliful(); jQuery("#skill-" + key).append('<p>' + items[0] +'</p>'); } }); if(jQuery('.zen-skillcircle').length) { jQuery('#help-panel').fadeIn(); } } function getvalues() { jQuery('#holder').html(''); jQuery( "#skills-field input" ).each(function( index ) { var input = jQuery(this).val(); jQuery('#holder').append(input); if(jQuery(this).hasClass('skill')) { jQuery('#holder').append(','); } if(jQuery(this).hasClass('skill-level')) { jQuery('#holder').append(','); } if(jQuery(this).hasClass('color')) { jQuery('#holder').append('|'); } }); jQuery('#jform_params_skills').val(jQuery('#holder').html()); } function ColorLuminance(hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; } function countup(element, total) { var current = 0; var finish = total; var miliseconds = 1000; var rate = 1; total = total.replace(''); if(current == 0) { var counter = setInterval(function(){ if(current >= finish) clearInterval(counter); jQuery(element).text(current); current = parseInt(current) + parseInt(rate); }, miliseconds / (finish / rate)); } }; }); </script> <!-- I know this isnt valid but prob wont matter too much --> <style> .panel { display: none; padding: 15px; background: #fafafa; color: #666; font-weight: 300; border: 1px solid #e5e5e5; border-radius: 4px; } .minicolors, input.color, #jform_params_skills, #jform_params_skills-lbl, #holder { display: none; } .zen-skillbar { position:relative; display:block; margin-bottom:15px; width:100%; background:#eee; height:35px; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; -webkit-transition:0.4s linear; -moz-transition:0.4s linear; -ms-transition:0.4s linear; -o-transition:0.4s linear; transition:0.4s linear; -webkit-transition-property:width, background-color; -moz-transition-property:width, background-color; -ms-transition-property:width, background-color; -o-transition-property:width, background-color; transition-property:width, background-color; cursor: pointer; } .zen-skillbar.active { opacity: 1; } .zen-skillbar.inactive { opacity: 0.6; } .zen-skillbar-title { position:absolute; top:0; left:0; opacity: 1.0; width:110px; font-weight:bold; font-size:13px; color:#ffffff; background:#6adcfa; -webkit-border-top-left-radius:3px; -webkit-border-bottom-left-radius:4px; -moz-border-radius-topleft:3px; -moz-border-radius-bottomleft:3px; border-top-left-radius:3px; border-bottom-left-radius:3px; } .zen-skillbar-title span { display:block; background:rgba(0, 0, 0, 0.1); padding:0 20px; height:35px; line-height:35px; -webkit-border-top-left-radius:3px; -webkit-border-bottom-left-radius:3px; -moz-border-radius-topleft:3px; -moz-border-radius-bottomleft:3px; border-top-left-radius:3px; border-bottom-left-radius:3px; } .zen-skillbar-bar { height:35px; width:0px; background:#6adcfa; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; } .zen-skill-bar-percent { position:absolute; right:10px; top:0; font-size:11px; height:35px; line-height:35px; color:#ffffff; color:rgba(0, 0, 0, 0.4);} /* --- Skill Count --*/ .skill-count-item { float: left; margin-left: 2%; text-align: center; } .skill-count-item0 { margin-left: 0; } .skill-count-items-1 { width: 100%; margin: 0; } .skill-count-items-2 { width: 48%; } .skill-count-items-3 { width: 31%; } .skill-count-items-4 { width: 23%; } @media screen and (max-width:620px) { .skill-count-item { width: 100%; margin: 0; } } /* -- Circle --*/ .circliful { position: relative; } .circle-text, .circle-info, .circle-text-half, .circle-info-half { width: 100%; position: absolute; text-align: center; display: inline-block; left: 0; cursor: pointer; } .circle-info, .circle-info-half { color: #999; } .circliful .fa { margin: -10px 3px 0 3px; position: relative; bottom: 4px; } </style> <?php return ob_get_clean(); } } user/tmpl/user.php 0000705 00000001230 15242222517 0010161 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)); user/user.php 0000705 00000002004 15242222517 0007205 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); } } user/user.xml 0000705 00000001422 15242222517 0007221 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/params/user.xml 0000705 00000000600 15242222517 0010501 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> url/tmpl/url.php 0000705 00000001042 15242222517 0007632 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.URL * * @copyright (C) 2016 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; } $attributes = ''; if (!JUri::isInternal($value)) { $attributes = ' rel="nofollow noopener noreferrer" target="_blank"'; } echo sprintf('<a href="%s"%s>%s</a>', htmlspecialchars($value), $attributes, htmlspecialchars($value) ); url/url.php 0000705 00000002144 15242222517 0006662 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.URL * * @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 URL Plugin * * @since 3.7.0 */ class PlgFieldsUrl 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('validate', 'url'); if (! $fieldNode->getAttribute('relative')) { $fieldNode->removeAttribute('relative'); } return $fieldNode; } } url/url.xml 0000705 00000003205 15242222517 0006672 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_url</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_URL_XML_DESCRIPTION</description> <files> <filename plugin="url">url.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_url.ini</language> <language tag="en-GB">en-GB.plg_fields_url.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="schemes" type="list" label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL" description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC" multiple="true" > <option value="http">HTTP</option> <option value="https">HTTPS</option> <option value="ftp">FTP</option> <option value="ftps">FTPS</option> <option value="file">FILE</option> <option value="mailto">MAILTO</option> </field> <field name="relative" type="radio" label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL" description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC" class="btn-group btn-group-yesno" default="1" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> url/params/url.xml 0000705 00000001560 15242222517 0010157 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="schemes" type="list" label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL" description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC" multiple="true" > <option value="http">HTTP</option> <option value="https">HTTPS</option> <option value="ftp">FTP</option> <option value="ftps">FTPS</option> <option value="file">FILE</option> <option value="mailto">MAILTO</option> </field> <field name="relative" type="list" label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL" description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> mediajce/mediajce.xml 0000705 00000003277 15242222517 0010601 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.8" group="fields" method="upgrade"> <name>plg_fields_mediajce</name> <version>2.8.3</version> <creationDate>15-01-2020</creationDate> <author>Ryan Demmer</author> <authorEmail>info@joomlacontenteditor.net</authorEmail> <authorUrl>https://www.joomlacontenteditor.net</authorUrl> <copyright>Copyright (C) 2006 - 2020 Ryan Demmer. All rights reserved</copyright> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <description>PLG_FIELDS_MEDIAJCE_XML_DESCRIPTION</description> <files folder="plugins/fields/mediajce"> <filename plugin="mediajce">mediajce.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages folder="administrator/language/en-GB"> <language tag="en-GB">en-GB.plg_fields_mediajce.ini</language> <language tag="en-GB">en-GB.plg_fields_mediajce.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="mediatype" type="combo" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_DESC" > <option value="images">images</option> <option value="files">files</option> </field> <field name="media_class" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_DESC" /> <field name="media_description" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_DESC" /> </fieldset> </fields> </config> </extension> mediajce/mediajce.php 0000705 00000001435 15242222517 0010562 0 ustar 00 <?php /** * @package JCE.Plugin * @subpackage Fields.Media_Jce * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2020 Ryan Demmer. All rights reserved. * @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); JForm::addFieldPath(JPATH_PLUGINS . '/system/jce/fields'); /** * Fields MediaJce Plugin * * @since 2.6.27 */ class PlgFieldsMediaJce extends FieldsPlugin { public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); return $fieldNode; } } mediajce/tmpl/mediajce.php 0000705 00000003515 15242222517 0011537 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.MediaJce * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2020 Ryan Demmer. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.filesystem.path'); if ($field->value == '') { return; } $data = json_decode($field->value); if (!$data) { $data = (object) array('src' => $field->value, 'alt' => ''); } $class = (string) $fieldParams->get('media_class', ''); $type = (string) $fieldParams->get('mediatype', 'images'); $text = (string) $fieldParams->get('media_description', ''); if ($class) { $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } if ($text) { $text = htmlentities($text, ENT_COMPAT, 'UTF-8', true); } $value = (array) $data->src; $buffer = ''; $element = '<img src="%s"%s alt="%s" />'; if ($type !== "images") { $element = '<a href="%s"%s>%s</a>'; } else { $text = $data->alt; } foreach ($value as $path) { if (!$path) { continue; } // remove some common characters $path = preg_replace('#[\+\\\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]#', '', $path); // trim $path = trim($path); // check for valid path after clean if (!$path) { continue; } // clean path $path = JPath::clean($path); // create full path $fullpath = JPATH_SITE . '/' . trim($path, '/'); // check path is valid if (!is_file($fullpath)) { continue; } // set text as basename if not an image if (!$text && $type !== "images") { $text = basename($path); } $buffer .= sprintf($element, htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class, $text ); } echo $buffer; mediajce/params/mediajce.xml 0000705 00000001430 15242222517 0012051 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="mediatype" type="combo" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIATYPE_DESC" > <option value="images">images</option> <option value="files">files</option> </field> <field name="media_class" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_CLASS_DESC" /> <field name="media_description" type="text" label="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_LABEL" description="PLG_FIELDS_MEDIAJCE_PARAMS_MEDIA_DESCRIPTION_DESC" /> </fieldset> </fields> </form> textarea/params/textarea.xml 0000705 00000002671 15242222517 0012211 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="rows" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC" filter="integer" size="5" /> <field name="cols" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC" filter="integer" size="5" /> <field name="maxlength" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC" filter="integer" /> <field name="filter" type="list" label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </form> textarea/textarea.php 0000705 00000000704 15242222517 0010710 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Textarea * * @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 Textarea Plugin * * @since 3.7.0 */ class PlgFieldsTextarea extends FieldsPlugin { } textarea/textarea.xml 0000705 00000004423 15242222517 0010723 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_textarea</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_TEXTAREA_XML_DESCRIPTION</description> <files> <filename plugin="textarea">textarea.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_textarea.ini</language> <language tag="en-GB">en-GB.plg_fields_textarea.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="rows" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC" default="10" filter="integer" size="5" /> <field name="cols" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC" default="10" filter="integer" size="5" /> <field name="maxlength" type="number" label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC" filter="integer" /> <field name="filter" type="list" label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </config> </extension> textarea/tmpl/textarea.php 0000705 00000000550 15242222517 0011663 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Textarea * * @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; } echo JHtml::_('content.prepare', $value); color/color.php 0000705 00000002011 15242222517 0007503 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Color * * @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 Color Plugin * * @since 3.7.0 */ class PlgFieldsColor 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('validate', 'color'); return $fieldNode; } } color/color.xml 0000705 00000001430 15242222517 0007520 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_color</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_COLOR_XML_DESCRIPTION</description> <files> <filename plugin="color">color.php</filename> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_color.ini</language> <language tag="en-GB">en-GB.plg_fields_color.sys.ini</language> </languages> </extension> color/tmpl/color.php 0000705 00000000623 15242222517 0010466 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Color * * @copyright (C) 2016 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; } if (is_array($value)) { $value = implode(', ', $value); } echo htmlentities($value); radio/tmpl/radio.php 0000705 00000001124 15242222517 0010423 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Radio * * @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(); $options = $this->getOptionsFromField($field); foreach ($options as $optionValue => $optionText) { if (in_array((string) $optionValue, $value)) { $texts[] = JText::_($optionText); } } echo htmlentities(implode(', ', $texts)); radio/radio.xml 0000705 00000003011 15242222517 0007455 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_radio</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_RADIO_XML_DESCRIPTION</description> <files> <filename plugin="radio">radio.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_radio.ini</language> <language tag="en-GB">en-GB.plg_fields_radio.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="options" type="subform" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> radio/radio.php 0000705 00000000703 15242222517 0007451 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Radio * * @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.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Radio Plugin * * @since 3.7.0 */ class PlgFieldsRadio extends FieldsListPlugin { } radio/params/radio.xml 0000705 00000001777 15242222517 0010761 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="options" type="subform" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> <fields name="params"> <fieldset name="basic"> <field name="class" type="textarea" label="COM_FIELDS_FIELD_CLASS_LABEL" description="COM_FIELDS_FIELD_CLASS_DESC" class="input-xxlarge" size="40" default="btn-group" /> </fieldset> </fields> </form> text/tmpl/text.php 0000705 00000000622 15242222517 0010201 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Text * * @copyright (C) 2016 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; } if (is_array($value)) { $value = implode(', ', $value); } echo htmlentities($value); text/params/text.xml 0000705 00000002055 15242222517 0010523 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> <field name="maxlength" type="number" label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC" filter="integer" /> </fieldset> </fields> </form> text/text.xml 0000705 00000003473 15242222517 0007245 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_text</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_TEXT_XML_DESCRIPTION</description> <files> <filename plugin="text">text.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_text.ini</language> <language tag="en-GB">en-GB.plg_fields_text.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> <field name="maxlength" type="number" label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL" description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC" filter="integer" /> </fieldset> </fields> </config> </extension> text/text.php 0000705 00000000670 15242222517 0007230 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Text * * @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 Text Plugin * * @since 3.7.0 */ class PlgFieldsText extends FieldsPlugin { } sql/params/sql.xml 0000705 00000001223 15242222517 0010145 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="query" type="textarea" label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL" description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC" filter="raw" rows="10" required="true" /> <field name="multiple" type="list" label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> sql/sql.xml 0000705 00000002643 15242222517 0006671 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_sql</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_SQL_XML_DESCRIPTION</description> <files> <filename plugin="sql">sql.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_sql.ini</language> <language tag="en-GB">en-GB.plg_fields_sql.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="query" type="textarea" label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL" description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC" rows="10" filter="raw" required="true" /> <field name="multiple" type="radio" label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> sql/sql.php 0000705 00000003516 15242222517 0006660 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Sql * * @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.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Sql Plugin * * @since 3.7.0 */ class PlgFieldsSql extends FieldsListPlugin { /** * 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('value_field', 'text'); $fieldNode->setAttribute('key_field', 'value'); return $fieldNode; } /** * The save event. * * @param string $context The context * @param JTable $item The table * @param boolean $isNew Is new item * @param array $data The validated data * * @return boolean * * @since 3.7.0 */ public function onContentBeforeSave($context, $item, $isNew, $data = array()) { // Only work on new SQL fields if ($context != 'com_fields.field' || !isset($item->type) || $item->type != 'sql') { return true; } // If we are not a super admin, don't let the user create or update a SQL field if (!JAccess::getAssetRules(1)->allow('core.admin', JFactory::getUser()->getAuthorisedGroups())) { $item->setError(JText::_('PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE')); return false; } return true; } } sql/tmpl/sql.php 0000705 00000001754 15242222517 0007636 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Sql * * @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; } $db = JFactory::getDbo(); $value = (array) $value; $condition = ''; foreach ($value as $v) { if (!$v) { continue; } $condition .= ', ' . $db->q($v); } $query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' having value in (' . trim($condition, ',') . ')'); try { $items = $db->loadObjectlist(); } catch (Exception $e) { // If the query failed, we fetch all elements $db->setQuery($query); $items = $db->loadObjectlist(); } $texts = array(); foreach ($items as $item) { if (in_array($item->value, $value)) { $texts[] = $item->text; } } echo htmlentities(implode(', ', $texts)); calendar/calendar.xml 0000705 00000001504 15242222517 0010610 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_calendar</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_CALENDAR_XML_DESCRIPTION</description> <files> <filename plugin="calendar">calendar.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_calendar.ini</language> <language tag="en-GB">en-GB.plg_fields_calendar.sys.ini</language> </languages> </extension> calendar/calendar.php 0000705 00000002361 15242222517 0010601 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Calendar * * @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 Calendar Plugin * * @since 3.7.0 */ class PlgFieldsCalendar 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } // Set filter to user UTC $fieldNode->setAttribute('filter', 'USER_UTC'); // Set field to use translated formats $fieldNode->setAttribute('translateformat', '1'); $fieldNode->setAttribute('showtime', $field->fieldparams->get('showtime', 0) ? 'true' : 'false'); return $fieldNode; } } calendar/tmpl/calendar.php 0000705 00000001044 15242222517 0011552 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Calendar * * @copyright (C) 2016 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; } if (is_array($value)) { $value = implode(', ', $value); } $formatString = $field->fieldparams->get('showtime', 0) ? 'DATE_FORMAT_LC5' : 'DATE_FORMAT_LC4'; echo htmlentities(JHtml::_('date', $value, JText::_($formatString))); calendar/params/calendar.xml 0000705 00000000720 15242222517 0012072 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="showtime" type="radio" label="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_LABEL" description="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> editor/params/editor.xml 0000705 00000002746 15242222517 0011336 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="buttons" type="list" label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="hide" type="plugins" label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL" description="JGLOBAL_SELECT_SOME_OPTIONS" folder="editors-xtd" multiple="true" /> <field name="width" type="text" label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC" size="5" /> <field name="height" type="text" label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC" size="5" /> <field name="filter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> </field> </fieldset> </fields> </form> editor/tmpl/editor.php 0000705 00000000546 15242222517 0011012 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Editor * * @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; } echo JHtml::_('content.prepare', $value); editor/editor.xml 0000705 00000004501 15242222517 0010042 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_editor</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_EDITOR_XML_DESCRIPTION</description> <files> <filename plugin="editor">editor.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_editor.ini</language> <language tag="en-GB">en-GB.plg_fields_editor.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="buttons" type="radio" label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="hide" type="plugins" label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL" description="JGLOBAL_SELECT_SOME_OPTIONS" folder="editors-xtd" multiple="true" /> <field name="width" type="text" label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC" default="100%" size="5" /> <field name="height" type="text" label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC" default="250px" size="5" /> <field name="filter" type="list" label="PLG_FIELDS_EDITOR_PARAMS_FILTER_LABEL" description="PLG_FIELDS_EDITOR_PARAMS_FILTER_DESC" class="btn-group" default="JComponentHelper::filterText" validate="options" > <option value="0">JNO</option> <option value="raw">JLIB_FILTER_PARAMS_RAW</option> <option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> </field> </fieldset> </fields> </config> </extension> editor/editor.php 0000705 00000002271 15242222517 0010033 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Editor * * @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 Editor Plugin * * @since 3.7.0 */ class PlgFieldsEditor 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('buttons', $field->fieldparams->get('buttons', $this->params->get('buttons', 0)) ? 'true' : 'false'); $fieldNode->setAttribute('hide', implode(',', $field->fieldparams->get('hide', array()))); return $fieldNode; } } usergrouplist/tmpl/usergrouplist.php 0000705 00000001245 15242222517 0014111 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Usergrouplist * * @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; } JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php'); $value = (array) $value; $texts = array(); $groups = UsersHelper::getGroups(); foreach ($groups as $group) { if (in_array($group->value, $value)) { $texts[] = htmlentities(trim($group->text, '- ')); } } echo htmlentities(implode(', ', $texts)); usergrouplist/params/usergrouplist.xml 0000705 00000000735 15242222517 0014434 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </form> usergrouplist/usergrouplist.php 0000705 00000000723 15242222517 0013135 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Usergrouplist * * @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 Usergrouplist Plugin * * @since 3.7.0 */ class PlgFieldsUsergrouplist extends FieldsPlugin { } usergrouplist/usergrouplist.xml 0000705 00000002440 15242222517 0013144 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_usergrouplist</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_USERGROUPLIST_XML_DESCRIPTION</description> <files> <filename plugin="usergrouplist">usergrouplist.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_usergrouplist.ini</language> <language tag="en-GB">en-GB.plg_fields_usergrouplist.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> </config> </extension> integer/params/integer.xml 0000705 00000002010 15242222517 0011634 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="first" type="number" label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC" filter="integer" size="5" /> <field name="last" type="number" label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC" filter="integer" size="5" /> <field name="step" type="number" label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC" filter="integer" size="5" /> </fieldset> </fields> </form> integer/integer.xml 0000705 00000003564 15242222517 0010370 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_integer</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_INTEGER_XML_DESCRIPTION</description> <files> <filename plugin="integer">integer.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_integer.ini</language> <language tag="en-GB">en-GB.plg_fields_integer.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="first" type="number" label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC" default="1" filter="integer" size="5" /> <field name="last" type="number" label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC" default="100" filter="integer" size="5" /> <field name="step" type="number" label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL" description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC" default="1" filter="integer" size="5" /> </fieldset> </fields> </config> </extension> integer/integer.php 0000705 00000000701 15242222517 0010345 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Integer * * @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 Integer Plugin * * @since 3.7.0 */ class PlgFieldsInteger extends FieldsPlugin { } integer/tmpl/integer.php 0000705 00000000675 15242222517 0011333 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Integer * * @copyright (C) 2016 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; } if (is_array($value)) { $value = implode(', ', array_map('intval', $value)); } else { $value = (int) $value; } echo $value; media/params/media.xml 0000705 00000001720 15242222517 0010707 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" recursive="true" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option> <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </form> media/media.php 0000705 00000002014 15242222517 0007410 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Media * * @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 Media Plugin * * @since 3.7.0 */ class PlgFieldsMedia 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('hide_default', 'true'); return $fieldNode; } } media/media.xml 0000705 00000003350 15242222517 0007425 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_media</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_MEDIA_XML_DESCRIPTION</description> <files> <filename plugin="media">media.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_media.ini</language> <language tag="en-GB">en-GB.plg_fields_media.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" recursive="true" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC" class="btn-group" default="tooltip" > <option value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option> <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </config> </extension> media/tmpl/media.php 0000705 00000001230 15242222517 0010363 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Media * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if ($field->value == '') { return; } $class = $fieldParams->get('image_class'); if ($class) { $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } $value = (array) $field->value; $buffer = ''; foreach ($value as $path) { if (!$path) { continue; } $buffer .= sprintf('<img src="%s"%s>', htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } echo $buffer; list/params/list.xml 0000705 00000002043 15242222517 0010476 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="multiple" type="list" label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="options" type="subform" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </form> list/list.xml 0000705 00000003426 15242222517 0007221 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_list</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_LIST_XML_DESCRIPTION</description> <files> <filename plugin="list">list.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_fields_list.ini</language> <language tag="en-GB">en-GB.plg_fields_list.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="multiple" type="radio" label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="options" type="subform" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> list/list.php 0000705 00000002040 15242222517 0007177 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @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.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields list Plugin * * @since 3.7.0 */ class PlgFieldsList extends FieldsListPlugin { /** * Prepares the field * * @param string $context The context. * @param stdclass $item The item. * @param stdclass $field The field. * * @return object * * @since 3.9.2 */ public function onCustomFieldsPrepareField($context, $item, $field) { // Check if the field should be processed if (!$this->isTypeSupported($field->type)) { return; } // The field's rawvalue should be an array if (!is_array($field->rawvalue)) { $field->rawvalue = (array) $field->rawvalue; } return parent::onCustomFieldsPrepareField($context, $item, $field); } } list/tmpl/list.php 0000705 00000001130 15242222517 0010152 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @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; $fieldValue = $field->value; if ($fieldValue == '') { return; } $fieldValue = (array) $fieldValue; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $value => $name) { if (in_array((string) $value, $fieldValue)) { $texts[] = JText::_($name); } } echo htmlentities(implode(', ', $texts)); checkboxes/tmpl/checkboxes.php 0000705 00000001166 15242222517 0012471 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Checkboxes * * @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; $fieldValue = $field->value; if ($fieldValue === '' || $fieldValue === null) { return; } $fieldValue = (array) $fieldValue; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $value => $name) { if (in_array((string) $value, $fieldValue)) { $texts[] = JText::_($name); } } echo htmlentities(implode(', ', $texts)); checkboxes/checkboxes.xml 0000705 00000003073 15242222517 0011525 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_checkboxes</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_CHECKBOXES_XML_DESCRIPTION</description> <files> <filename plugin="checkboxes">checkboxes.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_checkboxes.ini</language> <language tag="en-GB">en-GB.plg_fields_checkboxes.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="options" type="subform" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </config> </extension> checkboxes/checkboxes.php 0000705 00000000722 15242222517 0011512 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Checkboxes * * @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.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields Checkboxes Plugin * * @since 3.7.0 */ class PlgFieldsCheckboxes extends FieldsListPlugin { } checkboxes/params/checkboxes.xml 0000705 00000001373 15242222517 0013011 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="options" type="subform" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL" description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC" layout="joomla.form.field.subform.repeatable-table" icon="list" multiple="true" > <form hidden="true" name="list_templates_modal" repeat="true"> <field name="name" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL" size="30" /> <field name="value" type="text" label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL" size="30" /> </form> </field> </fieldset> </fields> </form> imagelist/tmpl/imagelist.php 0000705 00000001711 15242222517 0012165 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @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; if ($field->value == '') { return; } $class = $fieldParams->get('image_class'); if ($class) { // space before, so if no class sprintf below works $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } $value = (array) $field->value; $buffer = ''; foreach ($value as $path) { if (!$path || $path == '-1') { continue; } if ($fieldParams->get('directory', '/') !== '/') { $buffer .= sprintf('<img src="images/%s/%s"%s>', $fieldParams->get('directory'), htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } else { $buffer .= sprintf('<img src="images/%s"%s>', htmlentities($path, ENT_COMPAT, 'UTF-8', true), $class ); } } echo $buffer; imagelist/params/imagelist.xml 0000705 00000002011 15242222517 0012477 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="directory" type="folderlist" label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" hide_default="true" recursive="true" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="/">/</option> </field> <field name="multiple" type="list" label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC" filter="integer" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </form> imagelist/imagelist.xml 0000705 00000003436 15242222517 0011230 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.7.0" group="fields" method="upgrade"> <name>plg_fields_imagelist</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_IMAGELIST_XML_DESCRIPTION</description> <files> <filename plugin="imagelist">imagelist.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">en-GB.plg_fields_imagelist.ini</language> <language tag="en-GB">en-GB.plg_fields_imagelist.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="directory" type="folderlist" label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC" directory="images" hide_none="true" hide_default="true" recursive="true" default="/" > <option value="/">/</option> </field> <field name="multiple" type="radio" label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC" class="btn-group btn-group-yesno" default="0" filter="integer" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL" description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC" size="40" /> </fieldset> </fields> </config> </extension> imagelist/imagelist.php 0000705 00000002165 15242222517 0011215 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @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 Imagelist Plugin * * @since 3.7.0 */ class PlgFieldsImagelist 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) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('hide_default', 'true'); $fieldNode->setAttribute('directory', '/images/' . $fieldNode->getAttribute('directory')); return $fieldNode; } } repeatable/tmpl/repeatable.php 0000705 00000001077 15242222517 0012446 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Repeatable * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $fieldValue = $field->value; if ($fieldValue === '') { return; } // Get the values $fieldValues = json_decode($fieldValue, true); if (empty($fieldValues)) { return; } $html = '<ul>'; foreach ($fieldValues as $value) { $html .= '<li>' . implode(', ', $value) . '</li>'; } $html .= '</ul>'; echo $html; repeatable/repeatable.xml 0000705 00000001556 15242222517 0011505 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?> <extension type="plugin" version="3.8.0" group="fields" method="upgrade"> <name>plg_fields_repeatable</name> <author>Joomla! Project</author> <creationDate>April 2018</creationDate> <copyright>(C) 2018 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.9.0</version> <description>PLG_FIELDS_REPEATABLE_XML_DESCRIPTION</description> <files> <filename plugin="repeatable">repeatable.php</filename> <folder>params</folder> <folder>tmpl</folder> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.plg_fields_repeatable.ini</language> <language tag="en-GB">en-GB/en-GB.plg_fields_repeatable.sys.ini</language> </languages> </extension> repeatable/repeatable.php 0000705 00000007333 15242222517 0011473 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Repeatable * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ use Joomla\CMS\MVC\Model\BaseDatabaseModel; defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR); /** * Repeatable plugin. * * @since 3.9.0 */ class PlgFieldsRepeatable 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.9.0 */ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $readonly = false; if (!FieldsHelper::canEditFieldValue($field)) { $readonly = true; } $fieldNode->setAttribute('type', 'subform'); $fieldNode->setAttribute('multiple', 'true'); $fieldNode->setAttribute('layout', 'joomla.form.field.subform.repeatable-table'); // Build the form source $fieldsXml = new SimpleXMLElement('<form/>'); $fields = $fieldsXml->addChild('fields'); // Get the form settings $formFields = $field->fieldparams->get('fields'); // Add the fields to the form foreach ($formFields as $index => $formField) { $child = $fields->addChild('field'); $child->addAttribute('name', $formField->fieldname); $child->addAttribute('type', $formField->fieldtype); $child->addAttribute('readonly', $readonly); if (isset($formField->fieldfilter)) { $child->addAttribute('filter', $formField->fieldfilter); } } $fieldNode->setAttribute('formsource', $fieldsXml->asXML()); // Return the node return $fieldNode; } /** * The save event. * * @param string $context The context * @param JTable $item The article data * @param boolean $isNew Is new item * @param array $data The validated data * * @return boolean * * @since 3.9.0 */ public function onContentAfterSave($context, $item, $isNew, $data = array()) { // Create correct context for category if ($context == 'com_categories.category') { $context = $item->get('extension') . '.categories'; // Set the catid on the category to get only the fields which belong to this category $item->set('catid', $item->get('id')); } // Check the context $parts = FieldsHelper::extract($context, $item); if (!$parts) { return true; } // Compile the right context for the fields $context = $parts[0] . '.' . $parts[1]; // Loading the fields $fields = FieldsHelper::getFields($context, $item); if (!$fields) { return true; } // Get the fields data $fieldsData = !empty($data['com_fields']) ? $data['com_fields'] : array(); // Loading the model /** @var FieldsModelField $model */ $model = BaseDatabaseModel::getInstance('Field', 'FieldsModel', array('ignore_request' => true)); // Loop over the fields foreach ($fields as $field) { // Find the field of this type repeatable if ($field->type !== $this->_name) { continue; } // Determine the value if it is available from the data $value = key_exists($field->name, $fieldsData) ? $fieldsData[$field->name] : null; // Handle json encoded values if (!is_array($value)) { $value = json_decode($value, true); } // Setting the value for the field and the item $model->setFieldValue($field->id, $item->get('id'), json_encode($value)); } return true; } } repeatable/params/repeatable.xml 0000705 00000004710 15242222517 0012763 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="fields" type="subform" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_DESC" multiple="true"> <form> <fields> <fieldset> <field name="fieldname" type="text" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_DESC" required="true" /> <field name="fieldtype" type="list" label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_LABEL" description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_DESC" > <option value="editor">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_EDITOR</option> <option value="media">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_MEDIA</option> <option value="number">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_NUMBER</option> <option value="text">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXT</option> <option value="textarea">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXTAREA</option> </field> <field name="fieldfilter" type="list" label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL" description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC" class="btn-group" validate="options" showon="fieldtype!:media,number" > <option value="0">JNO</option> <option showon="fieldtype:editor,text,textarea" value="raw">JLIB_FILTER_PARAMS_RAW</option> <option showon="fieldtype:editor,text,textarea" value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option> <option showon="fieldtype:editor,text,textarea" value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option> <option showon="fieldtype:text,textarea" value="alnum">JLIB_FILTER_PARAMS_ALNUM</option> <option showon="fieldtype:text,textarea" value="integer">JLIB_FILTER_PARAMS_INTEGER</option> <option showon="fieldtype:text,textarea" value="float">JLIB_FILTER_PARAMS_FLOAT</option> <option showon="fieldtype:text,textarea" value="tel">JLIB_FILTER_PARAMS_TEL</option> </field> </fieldset> </fields> </form> </field> </fieldset> </fields> </form>
| ver. 1.6 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings