acf
This commit is contained in:
570
plugins/fields/acfupload/acfupload.php
Normal file
570
plugins/fields/acfupload/acfupload.php
Normal file
@ -0,0 +1,570 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use NRFramework\File;
|
||||
use NRFramework\Mimes;
|
||||
use NRFramework\Image;
|
||||
use NRFramework\Functions;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Form\Form;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Utility\Utility;
|
||||
|
||||
JLoader::register('ACF_Field', JPATH_PLUGINS . '/system/acf/helper/plugin.php');
|
||||
JLoader::register('ACFUploadHelper', __DIR__ . '/fields/uploadhelper.php');
|
||||
|
||||
if (!class_exists('ACF_Field'))
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage('Advanced Custom Fields System Plugin is missing', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
class PlgFieldsACFUpload extends ACF_Field
|
||||
{
|
||||
/**
|
||||
* The validation rule will be used to validate the field on saving
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $validate = 'acfrequired';
|
||||
|
||||
public function onUserAfterSave($user, $isnew, $success, $msg)
|
||||
{
|
||||
// Load Fields Component Helper class
|
||||
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
|
||||
|
||||
$fields = FieldsHelper::getFields('com_users.user', $user, true);
|
||||
|
||||
if (!$fields)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get the fields data
|
||||
$fieldsData = !empty($user['com_fields']) ? $user['com_fields'] : [];
|
||||
|
||||
$this->processFiles($fields, $fieldsData, (object) $user);
|
||||
}
|
||||
|
||||
public function onContentAfterSave($context, $item, $isNew, $data = [])
|
||||
{
|
||||
if (!is_array($data))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isset($data['com_fields']))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create correct context for category
|
||||
if ($context == 'com_categories.category')
|
||||
{
|
||||
$context = $item->get('extension') . '.categories';
|
||||
}
|
||||
|
||||
// Load Fields Component Helper class
|
||||
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
|
||||
|
||||
// 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'] : [];
|
||||
|
||||
$this->processFiles($fields, $fieldsData, $item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the files.
|
||||
*
|
||||
* Either duplicates the files or uploads them to final directory.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $fieldsData
|
||||
* @param object $item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function processFiles($fields = [], $fieldsData = [], $item = [])
|
||||
{
|
||||
if (!$fields || !$fieldsData || !$item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Whether we should clean up the temp folder at the end of this process
|
||||
$should_clean = false;
|
||||
|
||||
// Get the Fields Model
|
||||
if (!defined('nrJ4'))
|
||||
{
|
||||
$model = JModelLegacy::getInstance('Field', 'FieldsModel', ['ignore_request' => true]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$model = Factory::getApplication()->bootComponent('com_fields')->getMVCFactory()->createModel('Field', 'Administrator', ['ignore_request' => true]);
|
||||
}
|
||||
|
||||
// Cache subform fields
|
||||
$subform_fields = [];
|
||||
|
||||
// Loop over the fields
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$field_type = $field->type;
|
||||
|
||||
/**
|
||||
* Check whether a Gallery field is used within the Subform field.
|
||||
*/
|
||||
if ($field_type === 'subform')
|
||||
{
|
||||
$submitted_subform_value = array_key_exists($field->name, $fieldsData) ? $fieldsData[$field->name] : null;
|
||||
|
||||
// Ensure it has a value
|
||||
if (!$submitted_subform_value || !$subform_value = json_decode($field->rawvalue, true))
|
||||
{
|
||||
// Update subform field
|
||||
$model->setFieldValue($field->id, $item->id, json_encode([]));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$update = false;
|
||||
$is_subform_non_repeatable = false;
|
||||
|
||||
// Make non-repeatable subform fields a multi array so we can parse them
|
||||
if (Functions::startsWith(array_key_first($subform_value), 'field') && $field->fieldparams->get('repeat', '0') === '0')
|
||||
{
|
||||
$is_subform_non_repeatable = true;
|
||||
$subform_value = [$subform_value];
|
||||
}
|
||||
|
||||
foreach ($subform_value as $key => &$value)
|
||||
{
|
||||
foreach ($value as $_key => &$_value)
|
||||
{
|
||||
// Get Field ID
|
||||
$field_id = str_replace('field', '', $_key);
|
||||
|
||||
// Get Field by ID
|
||||
$subform_field = isset($subform_fields[$field_id]) ? $subform_fields[$field_id] : $model->getItem($field_id);
|
||||
|
||||
// Only proceed for this field type
|
||||
if ($subform_field->type !== $this->_name)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Cache field
|
||||
if (!isset($subform_fields[$field_id]))
|
||||
{
|
||||
$subformfields[$field_id] = $subform_field;
|
||||
}
|
||||
|
||||
|
||||
// Check if value can be json_decoded
|
||||
if (is_string($_value))
|
||||
{
|
||||
if ($decoded = json_decode($_value, true))
|
||||
{
|
||||
$_value = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
if (\ACF\Item::isCopying())
|
||||
{
|
||||
// Duplicate files
|
||||
ACFUploadHelper::duplicateFiles($_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We should run our cleanup routine at the end
|
||||
$should_clean = true;
|
||||
|
||||
// Move to final folder
|
||||
$_value = ACFUploadHelper::moveTempItemsToDestination($_value, $subform_field, $item);
|
||||
}
|
||||
|
||||
$update = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($update)
|
||||
{
|
||||
if ($is_subform_non_repeatable)
|
||||
{
|
||||
$subform_value = reset($subform_value);
|
||||
}
|
||||
|
||||
// Update subform field
|
||||
$model->setFieldValue($field->id, $item->id, json_encode($subform_value));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only proceed for this field type
|
||||
if ($field_type !== $this->_name)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Determine the value if it is available from the data
|
||||
$value = array_key_exists($field->name, $fieldsData) ? $fieldsData[$field->name] : null;
|
||||
|
||||
if (!$value)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if value can be json_decoded
|
||||
if (is_string($value))
|
||||
{
|
||||
if ($decoded = json_decode($value, true))
|
||||
{
|
||||
$value = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
if (\ACF\Item::isCopying())
|
||||
{
|
||||
// Duplicate files
|
||||
ACFUploadHelper::duplicateFiles($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We should run our cleanup routine at the end
|
||||
$should_clean = true;
|
||||
|
||||
// Move to final folder
|
||||
$value = ACFUploadHelper::moveTempItemsToDestination($value, $field, $item);
|
||||
}
|
||||
|
||||
// Setting the value for the field and the item
|
||||
$model->setFieldValue($field->id, $item->id, json_encode($value));
|
||||
}
|
||||
}
|
||||
|
||||
if ($should_clean)
|
||||
{
|
||||
// Clean old files from temp folder
|
||||
ACFUploadHelper::clean();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 Form $form The form.
|
||||
*
|
||||
* @return DOMElement
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
public function onCustomFieldsPrepareDom($field, DOMElement $parent, Joomla\CMS\Form\Form $form)
|
||||
{
|
||||
if (!$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form))
|
||||
{
|
||||
return $fieldNode;
|
||||
}
|
||||
|
||||
$this->attachEditModal();
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_acf/acf-backend.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_fields_acfupload/edit-modal.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
$fieldNode->setAttribute('field_id', $field->id);
|
||||
|
||||
return $fieldNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches the edit modal to the page.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function attachEditModal()
|
||||
{
|
||||
$form_source = new SimpleXMLElement('
|
||||
<form>
|
||||
<fieldset name="acfupload_edit_modal">
|
||||
<field name="" type="text"
|
||||
label="ACF_UPLOAD_TITLE"
|
||||
description="ACF_UPLOAD_TITLE_DESC"
|
||||
hint="ACF_UPLOAD_TITLE_HINT"
|
||||
class="acfupload_custom_title_value w-100"
|
||||
/>
|
||||
<field name="" type="textarea"
|
||||
label="ACF_UPLOAD_DESCRIPTION"
|
||||
description="ACF_UPLOAD_DESCRIPTION_DESC"
|
||||
hint="ACF_UPLOAD_DESCRIPTION_HINT"
|
||||
class="acfupload_custom_description_value w-100"
|
||||
rows="5"
|
||||
filter="safehtml"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
');
|
||||
|
||||
$form = Form::getInstance($this->_name, $form_source->asXML(), ['control' => $this->_name]);
|
||||
|
||||
$content =
|
||||
'<div class="acfupload-edit-modal-content">' .
|
||||
'<div class="acfupload-edit-modal-editing-item">' . Text::_('ACF_UPLOAD_CURRENTLY_EDITING_ITEM') . '</div>' .
|
||||
$form->renderFieldset('acfupload_edit_modal') .
|
||||
'</div>';
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'acfUploadItemEditModal', [
|
||||
'title' => Text::_('ACF_UPLOAD_EDIT_ITEM'),
|
||||
'modalWidth' => '40',
|
||||
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" data-dismiss="modal" aria-hidden="true">'. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button><button type="button" class="btn btn-success acf-upload-save-item" data-bs-dismiss="modal" data-dismiss="modal" aria-hidden="true">' . Text::_('JAPPLY') . '</button>'
|
||||
], $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* The form event. Load additional parameters when available into the field form.
|
||||
* Only when the type of the form is of interest.
|
||||
*
|
||||
* @param Form $form The form
|
||||
* @param stdClass $data The data
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
public function onContentPrepareForm(Joomla\CMS\Form\Form $form, $data)
|
||||
{
|
||||
// Make sure we are manipulating the right field.
|
||||
if (isset($data->type) && ($data->type != $this->_name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$result = parent::onContentPrepareForm($form, $data);
|
||||
|
||||
// Display the server's maximum upload size in the field's description
|
||||
$max_upload_size_str = HTMLHelper::_('number.bytes', Utility::getMaxUploadSize());
|
||||
$field_desc = $form->getFieldAttribute('max_file_size', 'description', null, 'fieldparams');
|
||||
$form->setFieldAttribute('max_file_size', 'description', Text::sprintf($field_desc, $max_upload_size_str), 'fieldparams');
|
||||
|
||||
// If the Fileinfo PHP extension is not installed, display a warning.
|
||||
if (!extension_loaded('fileinfo') || !function_exists('mime_content_type'))
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage(Text::_('ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING'), 'warning');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle AJAX endpoint
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onAjaxACFUpload()
|
||||
{
|
||||
if (!Session::checkToken('request'))
|
||||
{
|
||||
$this->uploadDie(Text::_('JINVALID_TOKEN'));
|
||||
}
|
||||
|
||||
$taskMethod = 'task' . ucfirst(Factory::getApplication()->input->get('task', 'upload'));
|
||||
|
||||
if (!method_exists($this, $taskMethod))
|
||||
{
|
||||
$this->uploadDie('Invalid endpoint');
|
||||
}
|
||||
|
||||
$this->$taskMethod();
|
||||
}
|
||||
|
||||
/**
|
||||
* The Upload task called by the AJAX hanler
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function taskUpload()
|
||||
{
|
||||
$input = Factory::getApplication()->input;
|
||||
|
||||
// Make sure we have a valid form and a field key
|
||||
if (!$field_id = $input->getInt('id'))
|
||||
{
|
||||
$this->uploadDie('ACF_UPLOAD_ERROR');
|
||||
}
|
||||
|
||||
// Get Upload Settings
|
||||
if (!$upload_field_settings = $this->getCustomFieldData($field_id))
|
||||
{
|
||||
$this->uploadDie('ACF_UPLOAD_ERROR_INVALID_FIELD');
|
||||
}
|
||||
|
||||
$allow_unsafe = $upload_field_settings->get('allow_unsafe', false);
|
||||
|
||||
// Make sure we have a valid file passed
|
||||
if (!$file = $input->files->get('file', null, ($allow_unsafe ? 'raw' : 'cmd')))
|
||||
{
|
||||
$this->uploadDie('ACF_UPLOAD_ERROR_INVALID_FILE');
|
||||
}
|
||||
|
||||
// In case we allow multiple uploads the file parameter is a 2 levels array.
|
||||
$first_property = array_pop($file);
|
||||
if (is_array($first_property))
|
||||
{
|
||||
$file = $first_property;
|
||||
}
|
||||
|
||||
// Upload temporarily to the default upload folder
|
||||
$allowed_types = $upload_field_settings->get('upload_types');
|
||||
|
||||
try {
|
||||
$randomize_filename = $upload_field_settings->get('randomize_filename', false);
|
||||
|
||||
$upload_folder = implode(DIRECTORY_SEPARATOR, [JPATH_ROOT, ACFUploadHelper::getTempFolder()]);
|
||||
|
||||
$uploaded_filename = File::upload($file, $upload_folder, $allowed_types, $allow_unsafe, $randomize_filename ? '' : null);
|
||||
$uploaded_filename = str_replace([JPATH_SITE, JPATH_ROOT], '', $uploaded_filename);
|
||||
|
||||
// Resize images
|
||||
if ($upload_field_settings->get('resize_images', false))
|
||||
{
|
||||
// Get file type
|
||||
$file_type = Mimes::detectFileType(JPATH_ROOT . $uploaded_filename);
|
||||
|
||||
// Allowed image file types
|
||||
$allowed_image_file_types = [
|
||||
'image/jpg',
|
||||
'image/jpeg',
|
||||
'image/pjpeg',
|
||||
'image/png',
|
||||
'image/x-png',
|
||||
'image/webp'
|
||||
];
|
||||
|
||||
// Ensure it is a valid image
|
||||
if (Mimes::check($allowed_image_file_types, $file_type))
|
||||
{
|
||||
// We require at least width or height to not be null
|
||||
$resize_width = $upload_field_settings->get('width', null);
|
||||
$resize_height = $upload_field_settings->get('height', null);
|
||||
if ($resize_width || $resize_height)
|
||||
{
|
||||
Image::resizeByWidthOrHeight(JPATH_ROOT . $uploaded_filename, $resize_width, $resize_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$response = [
|
||||
'file' => $uploaded_filename,
|
||||
'file_encode' => base64_encode($uploaded_filename),
|
||||
'url' => ACFUploadHelper::absURL($uploaded_filename)
|
||||
];
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
echo json_encode($response);
|
||||
|
||||
jexit();
|
||||
|
||||
} catch (\Throwable $th)
|
||||
{
|
||||
$this->uploadDie($th->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The delete task called by the AJAX hanlder
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function taskDelete()
|
||||
{
|
||||
// Make sure we have a valid file passed
|
||||
if (!$filename = Factory::getApplication()->input->get('file', '', 'BASE64'))
|
||||
{
|
||||
$this->uploadDie('ACF_UPLOAD_ERROR_INVALID_FILE');
|
||||
}
|
||||
|
||||
// Delete the uploaded file
|
||||
echo json_encode([
|
||||
'success' => ACFUploadHelper::deleteFile(base64_decode($filename))
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull Custom Field Data
|
||||
*
|
||||
* @param integer $id The Custom Field primary key
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
private function getCustomFieldData($id)
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query
|
||||
->select($db->quoteName(['fieldparams']))
|
||||
->from($db->quoteName('#__fields'))
|
||||
->where($db->quoteName('id') . ' = ' . $id)
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('acfupload'))
|
||||
->where($db->quoteName('state') . ' = 1');
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
if (!$result = $db->loadResult())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
return new Joomla\Registry\Registry($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* DropzoneJS detects errors based on the response error code.
|
||||
*
|
||||
* @param string $error_message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function uploadDie($error_message)
|
||||
{
|
||||
http_response_code('500');
|
||||
die(Text::_($error_message));
|
||||
}
|
||||
}
|
||||
26
plugins/fields/acfupload/acfupload.xml
Normal file
26
plugins/fields/acfupload/acfupload.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
|
||||
<name>ACF_UPLOAD</name>
|
||||
<description>ACF_UPLOAD_DESC</description>
|
||||
<author>Tassos Marinos</author>
|
||||
<creationDate>February 2019</creationDate>
|
||||
<copyright>Copyright (C) 2019 Tassos Marinos. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>info@tassos.gr</authorEmail>
|
||||
<authorUrl>www.tassos.gr</authorUrl>
|
||||
<version>1.0</version>
|
||||
<scriptfile>script.install.php</scriptfile>
|
||||
<files>
|
||||
<filename plugin="acfupload">acfupload.php</filename>
|
||||
<filename>script.install.helper.php</filename>
|
||||
<filename>version.php</filename>
|
||||
<folder>fields</folder>
|
||||
<folder>language</folder>
|
||||
<folder>params</folder>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
<media folder="media" destination="plg_fields_acfupload">
|
||||
<folder>js</folder>
|
||||
<folder>css</folder>
|
||||
</media>
|
||||
</extension>
|
||||
147
plugins/fields/acfupload/fields/acfupload.php
Normal file
147
plugins/fields/acfupload/fields/acfupload.php
Normal file
@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Form\Field\HiddenField;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Layout\FileLayout;
|
||||
use Joomla\Filesystem\Path;
|
||||
|
||||
class JFormFieldACFUpload extends HiddenField
|
||||
{
|
||||
/**
|
||||
* Method to get the field input markup for a generic list.
|
||||
* Use the multiple attribute to enable multiselect.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
if ($this->element['limit_files'] != 1)
|
||||
{
|
||||
HTMLHelper::script('plg_fields_acfupload/vendor/sortable.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
HTMLHelper::script('plg_fields_acfupload/vendor/dropzone.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_fields_acfupload/acfupload.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::stylesheet('plg_fields_acfupload/acfupload.css', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
// Add language strings used by script
|
||||
Text::script('ACF_UPLOAD_FILETOOBIG');
|
||||
Text::script('ACF_UPLOAD_INVALID_FILE');
|
||||
Text::script('ACF_UPLOAD_FALLBACK_MESSAGE');
|
||||
Text::script('ACF_UPLOAD_RESPONSE_ERROR');
|
||||
Text::script('ACF_UPLOAD_CANCEL_UPLOAD');
|
||||
Text::script('ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION');
|
||||
Text::script('ACF_UPLOAD_REMOVE_FILE');
|
||||
Text::script('ACF_UPLOAD_MAX_FILES_EXCEEDED');
|
||||
Text::script('ACF_UPLOAD_FILE_MISSING');
|
||||
Text::script('ACF_UPLOAD_REMOVE_FILE_CONFIRM');
|
||||
|
||||
// Render File Upload Field
|
||||
$data = [
|
||||
'id' => $this->id,
|
||||
'value' => $this->prepareValue(),
|
||||
'input_name' => $this->element['limit_files'] == 1 ? $this->name : $this->name . '[INDEX]',
|
||||
'required' => ((string) $this->element['required'] == 'true' ? true : false),
|
||||
'field_id' => $this->element['field_id'],
|
||||
'max_file_size' => $this->element['max_file_size'],
|
||||
'limit_files' => $this->element['limit_files'],
|
||||
'multiple' => $this->element['limit_files'] == 1 ? false : true,
|
||||
'upload_types' => $this->element['upload_types'],
|
||||
'disabled' => $this->disabled,
|
||||
'show_download_links' => isset($this->element['show_download_links']) && $this->element['show_download_links'] == 1 ? true : false,
|
||||
'base_url' => Uri::base() // AJAX endpoint works on both site and backend.
|
||||
];
|
||||
|
||||
$layout = new FileLayout('acfuploadlayout', __DIR__);
|
||||
return $layout->render($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the value.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function prepareValue()
|
||||
{
|
||||
if (empty($this->value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/uploadhelper.php';
|
||||
|
||||
$limit_files = (int) $this->element['limit_files'];
|
||||
|
||||
/**
|
||||
* This handles backwards compatibility
|
||||
*/
|
||||
$files = is_string($this->value) ? json_decode($this->value, true) ?? [['value' => $this->value]] : $this->value;
|
||||
|
||||
// Ensure its an array. If it was saved via a Subform field, it would return us an array of
|
||||
$files = json_decode(json_encode($files), true);
|
||||
|
||||
// Handle single file
|
||||
if ($limit_files === 1 && is_array($files))
|
||||
{
|
||||
if (isset($files['value']))
|
||||
{
|
||||
$files = [$files];
|
||||
}
|
||||
|
||||
$files = [reset($files)];
|
||||
}
|
||||
|
||||
if (!$files)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$return = [];
|
||||
|
||||
foreach ($files as $value)
|
||||
{
|
||||
if (!$value)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$file = isset($value['value']) ? $value['value'] : $value;
|
||||
$title = isset($value['title']) ? $value['title'] : '';
|
||||
$description = isset($value['description']) ? $value['description'] : '';
|
||||
|
||||
// Always use framework's pathinfo to fight issues with non latin characters.
|
||||
$filePathInfo = NRFramework\File::pathinfo($file);
|
||||
|
||||
$file_path = Path::clean(implode(DIRECTORY_SEPARATOR, [JPATH_ROOT, $file]));
|
||||
$exists = is_file($file_path);
|
||||
$file_size = $exists ? filesize($file_path) : 0;
|
||||
|
||||
$return[] = [
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'name' => $filePathInfo['basename'],
|
||||
'path' => $file,
|
||||
'encoded' => base64_encode($file),
|
||||
'url' => ACFUploadHelper::absURL($file_path),
|
||||
'size' => $file_size,
|
||||
'exists' => $exists
|
||||
];
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
79
plugins/fields/acfupload/fields/acfuploadlayout.php
Normal file
79
plugins/fields/acfupload/fields/acfuploadlayout.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$wrapper_class = '';
|
||||
if ($disabled)
|
||||
{
|
||||
$wrapper_class .= ' disabled';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($required) { ?>
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the File Upload field is required. -->
|
||||
<input type="hidden" required class="required" id="<?php echo str_replace('[]', '', $id); ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<div class="cfup-tmpl" style="display:none;">
|
||||
<div class="cfup-file">
|
||||
<div class="cfup-status"></div>
|
||||
<div class="cfup-details">
|
||||
<div class="cfup-name" data-dz-name></div>
|
||||
<div class="cfup-error"><div data-dz-errormessage></div></div>
|
||||
<div class="cfup-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
</div>
|
||||
<div class="cfup-right">
|
||||
<span class="cfup-size" data-dz-size></span>
|
||||
<span class="cfup-controls">
|
||||
<a href="#" class="acfupload-edit-item" data-bs-toggle="modal" data-bs-target="#acfUploadItemEditModal" data-toggle="modal" data-target="#acfUploadItemEditModal">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M9 39h2.2l22.15-22.15-2.2-2.2L9 36.8Zm30.7-24.3-6.4-6.4 2.1-2.1q.85-.85 2.1-.85t2.1.85l2.2 2.2q.85.85.85 2.1t-.85 2.1Zm-2.1 2.1L12.4 42H6v-6.4l25.2-25.2Zm-5.35-1.05-1.1-1.1 2.2 2.2Z"/></svg>
|
||||
</a>
|
||||
<?php if ($show_download_links) { ?>
|
||||
<a href="#" title="<?php echo Text::_('ACF_UPLOAD_VIEW_FILE') ?>" class="upload-link" target="_blank">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M22.5 34H14q-4.25 0-7.125-2.875T4 24q0-4.25 2.875-7.125T14 14h8.5v3H14q-3 0-5 2t-2 5q0 3 2 5t5 2h8.5Zm-6.25-8.5v-3h15.5v3ZM25.5 34v-3H34q3 0 5-2t2-5q0-3-2-5t-5-2h-8.5v-3H34q4.25 0 7.125 2.875T44 24q0 4.25-2.875 7.125T34 34Z"/></svg>
|
||||
</a>
|
||||
<a href="#" title="<?php echo Text::_('ACF_UPLOAD_DOWNLOAD_FILE') ?>" class="upload-link" download>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M11 40q-1.2 0-2.1-.9Q8 38.2 8 37v-7.15h3V37h26v-7.15h3V37q0 1.2-.9 2.1-.9.9-2.1.9Zm13-7.65-9.65-9.65 2.15-2.15 6 6V8h3v18.55l6-6 2.15 2.15Z"/></svg>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a href="#" class="acf_upload_delete" title="<?php echo Text::_('ACF_UPLOAD_DELETE_FILE') ?>" data-dz-remove>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M13.05 42q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.5H8v-3h9.4V6h13.2v1.5H40v3h-2.05V39q0 1.2-.9 2.1-.9.9-2.1.9Zm21.9-31.5h-21.9V39h21.9Zm-16.6 24.2h3V14.75h-3Zm8.3 0h3V14.75h-3Zm-13.6-24.2V39Z"/></svg>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" value="" name="" class="cfup-custom-title" />
|
||||
<input type="hidden" value="" name="" class="cfup-custom-description" />
|
||||
</div>
|
||||
</div>
|
||||
<div data-id="<?php echo $field_id ?>"
|
||||
data-inputname="<?php echo $input_name ?>"
|
||||
<?php if ($multiple) { echo 'data-multiple'; } ?>
|
||||
data-maxfilesize="<?php echo $max_file_size ?>"
|
||||
data-maxfiles="<?php echo $limit_files ?>"
|
||||
data-acceptedfiles="<?php echo $upload_types ?>"
|
||||
data-value='<?php echo ($value) ? htmlspecialchars(json_encode($value), ENT_QUOTES, 'UTF-8') : '' ?>'
|
||||
data-baseurl='<?php echo $base_url ?>'
|
||||
<?php if ($disabled): ?>
|
||||
data-disabled='<?php echo $disabled ?>'
|
||||
<?php endif; ?>
|
||||
class="acfupload<?php echo $wrapper_class; ?>">
|
||||
<div class="dz-message">
|
||||
<span><?php echo Text::_('ACF_UPLOAD_DRAG_AND_DROP_FILES') ?></span>
|
||||
<span class="acfupload-browse"><?php echo Text::_('ACF_UPLOAD_BROWSE') ?></span>
|
||||
</div>
|
||||
<div class="acfupload-items"></div>
|
||||
</div>
|
||||
339
plugins/fields/acfupload/fields/uploadhelper.php
Normal file
339
plugins/fields/acfupload/fields/uploadhelper.php
Normal file
@ -0,0 +1,339 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use NRFramework\File;
|
||||
use NRFramework\Functions;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\Filesystem\File as JoomlaFile;
|
||||
use Joomla\Filesystem\Path;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Upload Helper class mainly used by the FileUpload field
|
||||
*/
|
||||
class ACFUploadHelper
|
||||
{
|
||||
/**
|
||||
* How long the files can stay in the temp folder.
|
||||
*
|
||||
* After each save a clean up is run and all files older
|
||||
* than this value in days are removed.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private static $temp_files_cleanup_days = 1;
|
||||
|
||||
/**
|
||||
* Duplicates files.
|
||||
*
|
||||
* @param array $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function duplicateFiles(&$value = [])
|
||||
{
|
||||
if (!is_array($value) || !count($value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If it's a single file, make it an array
|
||||
if (!is_array(reset($value)))
|
||||
{
|
||||
$value = [$value];
|
||||
}
|
||||
|
||||
foreach ($value as &$val)
|
||||
{
|
||||
// Original file path
|
||||
$path = implode(DIRECTORY_SEPARATOR, [JPATH_SITE, $val['value']]);
|
||||
|
||||
// New file path
|
||||
$newPath = File::copy($path, $path);
|
||||
|
||||
$val['value'] = str_replace([JPATH_SITE, JPATH_ROOT], '', $newPath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves all given `tmp` items over to the destination folder.
|
||||
*
|
||||
* @param array $value
|
||||
* @param object $field
|
||||
* @param object $item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function moveTempItemsToDestination($value, $field, $item)
|
||||
{
|
||||
// Make field params use Registry
|
||||
if (!$field->fieldparams instanceof Registry)
|
||||
{
|
||||
$field->fieldparams = new Registry($field->fieldparams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the items for backwards compatibility
|
||||
*/
|
||||
$items = is_string($value) ? json_decode($value, true) ?? [['value' => $value]] : $value;
|
||||
|
||||
if (isset($items['value']))
|
||||
{
|
||||
$items = [$items];
|
||||
}
|
||||
|
||||
$limit_files = (int) $field->fieldparams->get('limit_files', 1);
|
||||
|
||||
// Handle single file
|
||||
if ($limit_files === 1 && is_array($items))
|
||||
{
|
||||
$items = [reset($items)];
|
||||
}
|
||||
|
||||
$ds = DIRECTORY_SEPARATOR;
|
||||
|
||||
$destination_folder = trim(ltrim($field->fieldparams->get('upload_folder'), $ds), $ds);
|
||||
|
||||
// Add field Smart Tags
|
||||
$field_custom_tags = [
|
||||
'id' => $field->id
|
||||
];
|
||||
|
||||
// Add item smart tags
|
||||
$custom_tags = [
|
||||
'id' => $item->id,
|
||||
'author_id' => isset($item->created_by) ? $item->created_by : '',
|
||||
'alias' => isset($item->alias) ? $item->alias : '',
|
||||
'cat_id' => isset($item->catid) ? $item->catid : '',
|
||||
'cat_alias' => isset($item->catid) ? self::getCategoryAlias($item->catid) : ''
|
||||
];
|
||||
|
||||
// Move all files from `tmp` folder over to the `upload folder`
|
||||
foreach ($items as $key => &$item)
|
||||
{
|
||||
$item_path = implode($ds, [JPATH_ROOT, ltrim($item['value'], $ds)]);
|
||||
if (!Functions::startsWith(ltrim($item['value'], $ds), self::getTempFolder()) || !file_exists($item_path))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Smart Tags Instance
|
||||
$st = new \NRFramework\SmartTags();
|
||||
|
||||
// Add field Smart Tags
|
||||
$st->add($field_custom_tags, 'acf.field.');
|
||||
|
||||
// Add item Smart Tags
|
||||
$st->add($custom_tags, 'acf.item.');
|
||||
|
||||
// Add file Smart Tags
|
||||
$source_file_info = File::pathinfo($item['value']);
|
||||
$source_basename = $source_file_info['basename'];
|
||||
$source_file_info['filename'] = $source_file_info['filename'];
|
||||
$source_file_info['basename'] = $source_basename;
|
||||
$source_file_info['extension'] = $source_file_info['extension'];
|
||||
$source_file_info['index'] = $key + 1;
|
||||
$source_file_info['total'] = count($items);
|
||||
|
||||
$st->add($source_file_info, 'acf.file.');
|
||||
|
||||
$_destination_folder = $st->replace($destination_folder);
|
||||
|
||||
$destination_file = implode($ds, [JPATH_ROOT, $_destination_folder]);
|
||||
|
||||
// Validate destination file by adding the extension at the end
|
||||
$destination_file_info = File::pathinfo($destination_file);
|
||||
if (!isset($destination_file_info['extension']))
|
||||
{
|
||||
$destination_file = implode($ds, [$destination_file_info['dirname'], $destination_file_info['basename'], $source_basename]);
|
||||
}
|
||||
|
||||
// Move item
|
||||
$destionation_path = File::move($item_path, $destination_file);
|
||||
|
||||
// Get relative path
|
||||
$relative_path = ltrim(rtrim(str_replace(JPATH_ROOT, '', $destionation_path), $ds), $ds);
|
||||
|
||||
// Update destination path
|
||||
$item['value'] = $relative_path;
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a category alias by its ID.
|
||||
*
|
||||
* @param int $cat_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function getCategoryAlias($cat_id = null)
|
||||
{
|
||||
if (!$cat_id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName('alias'))
|
||||
->from($db->quoteName('#__categories'))
|
||||
->where($db->quoteName('id') . ' = ' . (int) $cat_id);
|
||||
$db->setQuery($query);
|
||||
|
||||
return $db->loadResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an uploaded file
|
||||
*
|
||||
* @param string $filename The filename
|
||||
* @param string $upload_folder The uploaded folder
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function deleteFile($filename)
|
||||
{
|
||||
if (empty($filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$file = Path::clean(implode(DIRECTORY_SEPARATOR, [JPATH_ROOT, $filename]));
|
||||
|
||||
if (!is_file($file))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
return JoomlaFile::delete($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return absolute full URL of a path
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function absURL($path)
|
||||
{
|
||||
$path = str_replace([JPATH_SITE, JPATH_ROOT, Uri::root()], '', $path);
|
||||
$path = Path::clean($path);
|
||||
|
||||
// Convert Windows Path to Unix
|
||||
$path = str_replace('\\','/',$path);
|
||||
|
||||
$path = ltrim($path, '/');
|
||||
$path = Uri::root() . $path;
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a human readable file size in PHP:
|
||||
* Credits to: http://jeffreysambells.com/2012/10/25/human-readable-filesize-php
|
||||
*
|
||||
* @param integer $filename The file size in bytes
|
||||
* @param int $decimals
|
||||
*
|
||||
* @return string The human readable string
|
||||
*/
|
||||
public static function humanFilesize($bytes, $decimals = 2)
|
||||
{
|
||||
$size = ['B','KB','MB','GB','TB','PB','EB','ZB','YB'];
|
||||
$factor = floor((strlen($bytes) - 1) / 3);
|
||||
|
||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . @$size[$factor];
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans the temp folder.
|
||||
*
|
||||
* Removes any image that is 1 day or older.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function clean()
|
||||
{
|
||||
$temp_folder = self::getFullTempFolder();
|
||||
|
||||
if (!is_dir($temp_folder))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get images
|
||||
$files = array_diff(scandir($temp_folder), ['.', '..', '.DS_Store', 'index.html']);
|
||||
|
||||
$found = [];
|
||||
|
||||
foreach ($files as $key => $filename)
|
||||
{
|
||||
$file_path = implode(DIRECTORY_SEPARATOR, [$temp_folder, $filename]);
|
||||
|
||||
// Skip directories
|
||||
if (is_dir($file_path))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$diff_in_miliseconds = time() - filemtime($file_path);
|
||||
|
||||
// Skip the file if it's not old enough
|
||||
if ($diff_in_miliseconds < (60 * 60 * 24 * self::$temp_files_cleanup_days))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$found[] = $file_path;
|
||||
}
|
||||
|
||||
if (!$found)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete found old files
|
||||
foreach ($found as $file)
|
||||
{
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Full temp directory where images are uploaded
|
||||
* prior to them being saved in the final directory.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function getFullTempFolder()
|
||||
{
|
||||
return implode(DIRECTORY_SEPARATOR, [JPATH_ROOT, self::getTempFolder()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Temp folder where files are uploaded
|
||||
* prior to them being saved in the final directory.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public static function getTempFolder()
|
||||
{
|
||||
return implode(DIRECTORY_SEPARATOR, ['media', 'acfupload', 'tmp']);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Pujar arxiu"
|
||||
ACF_UPLOAD="camps - ACF Pujar arxiu"
|
||||
ACF_UPLOAD_DESC="Carrega qualsevol arxiu utilitzant un sistema drag&drop a l'administració que mostrarà l'arxiu pujat com un enllaç o imatge a la part pública."
|
||||
; ACF_UPLOAD_VALUE_DESC="Select file(s) to upload"
|
||||
ACF_UPLOAD_FOLDER="Carpeta de pujada"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Limit d'arxius"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Quants arxius es poden pujar? Escriu 0 per no limitar."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Pes màxim d'arxiu"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configura el pes d'arxiu màxim permès en megabytes. Escriu 0 per no limitar.<br><br>El màxim del teu servidor és: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Tipus d'arxiu permesos"
|
||||
; ACF_UPLOAD_TYPES_DESC="Enter comma separated list of allowed file types like: </b>.jpg, .gif, .png, .pdf<br><br>You may enter media types like: application/pdf, image/*, video/*<br><br>Or you can even mix both: application/*, .png, .jpg<br><br>Note: This is not fool-proof and can be tricked, please remember that there is always a danger in allowing users to upload files."
|
||||
ACF_UPLOAD_ERROR="Formulari o clau de camp invàlida"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="No es pot pujar l'arxiu"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Camp de pujada invàlid"
|
||||
; ACF_UPLOAD_ERROR_INVALID_FILE="This file seems unsafe or invalid and can't be uploaded."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Pots pujar %d arxius"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Arrossega els arxius aquí"
|
||||
ACF_UPLOAD_BROWSE="Navega"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Arxiu invpalid. Tipus d'arxiu permesos: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Falta l'arxiu. Intenta tornar a pujar-lo."
|
||||
ACF_UPLOAD_FOLDER_INVALID="El directori de pujada %s no existeix, o no s'hi pot escriure."
|
||||
ACF_UPLOAD_FILETOOBIG="L'arxiu pesa massa ({{filesize}}MB). Pes màxim: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="No pots pujar arxius d'aquest tipus."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="El teu navegador no suporta les pujades arrossegant."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "El servidor ha contestat amb el codi {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Cancel·lar pujada"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Estàs segur que vols cancel·lar aquesta pujada?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Eliminar arxiu"
|
||||
; ACF_UPLOAD_REMOVE_FILE_CONFIRM="Are you sure?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="No pots carregar més arxius."
|
||||
ACF_UPLOAD_RANDOMIZE="Aleatoritzar noms d'arxius"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Si està activat, s'afegirà un prefix aleatori al principi del nom d'arxiu pujat. Això ajuda a assegurar que els arxius existents amb el mateix nom mai no se sobreescriguin."
|
||||
ACF_UPLOAD_FILE_MISSING="Falta l'arxiu"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Forçar descàrrega"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Escull si descarregar l'arxiu en lloc de navegar a l'enllaç"
|
||||
ACF_UPLOAD_LINK_TEXT="Enllaçar text"
|
||||
; ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Disseny"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Estableix el disseny que s'utilitzarà per mostrar cada arxiu pujat a la part pública."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Disseny personalitzat"
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Enllaç"
|
||||
ACF_UPLOAD_IMAGE="Imatge"
|
||||
ACF_UPLOAD_CUSTOM="Personalitzat"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Pantalla pública"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Configuració de pujada d'arxius"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE="Allow Unsafe Files"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
; ACF_UPLOAD_VIEW_FILE="View file in a new tab"
|
||||
; ACF_UPLOAD_DOWNLOAD_FILE="Download file"
|
||||
; ACF_UPLOAD_DELETE_FILE="Delete file"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Show Downloads Links"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Enable to display download links for each uploaded file in the file uploader."
|
||||
; ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
; ACF_UPLOAD_TITLE="Title"
|
||||
; ACF_UPLOAD_TITLE_DESC="Define a title for this uploaded file."
|
||||
; ACF_UPLOAD_TITLE_HINT="Enter a title..."
|
||||
; ACF_UPLOAD_DESCRIPTION="Description"
|
||||
; ACF_UPLOAD_DESCRIPTION_DESC="Define a description for this uploaded file."
|
||||
; ACF_UPLOAD_DESCRIPTION_HINT="Enter a description..."
|
||||
; ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Currently editing item: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
; ACF_UPLOAD_EDIT_ITEM="Edit Item"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Fil upload"
|
||||
ACF_UPLOAD="Felter - ACF Fil upload"
|
||||
ACF_UPLOAD_DESC="Upload enhver fil ved at anvende træk og slip fil uploaderen i backend og vis de uploadede filer som et link eller som et billede i frontend."
|
||||
ACF_UPLOAD_VALUE_DESC="Vælg fil(er) til upload"
|
||||
ACF_UPLOAD_FOLDER="Upload mappe"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Filer grænse"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Hvor mange filer kan uploades? Angiv 0 for ingen grænse."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Filstørrelse grænse"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Konfigurer den maksimalt tilladte filstørrelse for hver uploadet fil i megabyte. Angiv 0 for ingen grænse. <br><br>Din servers maksimale upload størrelse er: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Tilladte filtyper"
|
||||
ACF_UPLOAD_TYPES_DESC="Angiv en kommasepareret liste med tilladte filtyper såsom: </b>.jpg, .gif, .png, .pdf<br><br>Du kan angive medietyper såsom: application/pdf, image/*, video/*<br><br>Eller du kan endda blande begge dele: application/*, .png, .jpg<br><br>Bemærk: Dette er ikke idiotsikret and kan snydes. Husk venligst at der altid er en fare i at lade brugere uploade filer."
|
||||
ACF_UPLOAD_ERROR="Ugyldig formular eller feltnøgle"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Kan ikke uploade fil"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Ugyldigt upload felt"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Denne fil virker usikker eller ugyldig og kan ikke uploades."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Du kan uploade op til %d filer"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Træk og slip filer her eller"
|
||||
ACF_UPLOAD_BROWSE="Gennemse"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Ugyldig fil. Tilladte filtyper: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Filen mangler. Prøv venligst at gen-upload den."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Upload mappen %s eksisterer ikke eller er ikke skrivbar"
|
||||
ACF_UPLOAD_FILETOOBIG="Filen er for stor ({{filesize}}MB). Maks filstørrelse: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="Du kan ikke uploade filer af denne type."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Din browser understøtter ikke træk og slip fil uploads."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Server svarede med koden {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Annuller upload"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Er du sikker på at du ønsker at annullere denne upload?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Fjern fil"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Er du sikker ?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Du kan ikke uploade flere filer."
|
||||
ACF_UPLOAD_RANDOMIZE="Randomiser filnavne"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Hvis aktiveret, så vil et tilfældigt præfiks blive tilføjet i starten af den uploadede fils navn. Dette hjælper med at sikre at eksisterende filer med det samme navn aldrig bliver overskrevet."
|
||||
ACF_UPLOAD_FILE_MISSING="Filen mangler is missing"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Gennemtving download"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Vælg om filen skal downloades i stedet for at navigere til linket"
|
||||
ACF_UPLOAD_LINK_TEXT="Linktekst"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Angiv en brugerdefineret link tekst. Hvis ingen angives, så vil filnavnet blive anvendt i stedet. Understøtter smart tags.<br><br><strong>Fil smart tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Layout"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Definer layoutet som vil blive anvendt til at vise hver uploadede fil i frontend."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Brugerdefineret layout"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Angiv et brugerdefineret HTML layout som vil blive anvendt til visning af hver uploadede fil i frontend. Understøtter smart tags.<br><br><strong>Fil smart tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Almindelige smart tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Link"
|
||||
ACF_UPLOAD_IMAGE="Billede"
|
||||
ACF_UPLOAD_CUSTOM="Brugerdefineret"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Frontend visningDisplay"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Fil upload indstillinger"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE="Tillad usikre filer"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE_DESC="Tillad upload af usikre filer.<br><br><b>En fil bliver betragtet som usikker når:</b><br>- Et null byte bliver fundet i filnavnet.<br>- Filendelsen er forbudt: .php, py etc.<br>- Der er et php tag i filindholdet.<br>- Det er et kort tag i filindholdet.<br>- Der er en forbudt udvidelse et sted i indholdet.<br><br>Denne indstilling beskytter dig også mod usikre filer inkluderet i komprimerede filer såsom zip, rar, tar e.t.c."
|
||||
ACF_UPLOAD_VIEW_FILE="Vis filen i en ny fane"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Download til"
|
||||
ACF_UPLOAD_DELETE_FILE="Slet fil"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Vis download links"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Aktiver at vise download links for hver uploadede fil i fil uploaderen."
|
||||
ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="PHP udvidelsen <b>fileinfo</b> er krævet for at gætte mime typen på de uploadede filer, men den er ikke installeret eller ikke indlæst. Kontakt venligst din host for at få den installeret."
|
||||
ACF_UPLOAD_TITLE="Titel"
|
||||
ACF_UPLOAD_TITLE_DESC="Definer en titel for den uploadede fil."
|
||||
ACF_UPLOAD_TITLE_HINT="Angiv en titel..."
|
||||
ACF_UPLOAD_DESCRIPTION="Beskrivelse"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Definer en beskrivelse for den uploadede fil."
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Angiv en beskrivelse..."
|
||||
ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Aktuelt redigere element: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Rediger element"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Datei hochladen"
|
||||
ACF_UPLOAD="Felder - ACF-Datei hochladen"
|
||||
ACF_UPLOAD_DESC="Laden Sie eine beliebige Datei mit einem Drag & Drop-Datei-Uploader im Backend hoch und zeigen Sie die hochgeladene Datei als Link oder Bild im Frontend an."
|
||||
; ACF_UPLOAD_VALUE_DESC="Select file(s) to upload"
|
||||
ACF_UPLOAD_FOLDER="Ordner hochladen"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Dateilimit"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Wie viele Dateien können hochgeladen werden? Geben Sie 0 für unbegrenzt ein."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Dateigrößenbeschränkung"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Konfigurieren Sie die maximal zulässige Größe für jede hochgeladene Datei in Megabyte. Geben Sie unbegrenzt 0 ein. <br> <br> Die maximale Upload-Größe Ihres Servers beträgt: <b>% s </b>."
|
||||
ACF_UPLOAD_TYPES="Zulässige Dateitypen"
|
||||
; ACF_UPLOAD_TYPES_DESC="Enter comma separated list of allowed file types like: </b>.jpg, .gif, .png, .pdf<br><br>You may enter media types like: application/pdf, image/*, video/*<br><br>Or you can even mix both: application/*, .png, .jpg<br><br>Note: This is not fool-proof and can be tricked, please remember that there is always a danger in allowing users to upload files."
|
||||
ACF_UPLOAD_ERROR="Ungültiger Formular- oder Feldschlüssel"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Datei kann nicht hochgeladen werden"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Ungültiges Upload-Feld"
|
||||
; ACF_UPLOAD_ERROR_INVALID_FILE="This file seems unsafe or invalid and can't be uploaded."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Sie können bis zu %d Dateien hochladen"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Dateien hierher ziehen und ablegen oder"
|
||||
ACF_UPLOAD_BROWSE="Durchsuchen"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Ungültige Datei. Zulässige Dateitypen: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Die Datei fehlt. Bitte versuchen Sie erneut, sie hochzuladen."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Der Upload-Ordner% s existiert nicht oder ist nicht beschreibbar"
|
||||
ACF_UPLOAD_FILETOOBIG="Die Datei ist zu groß ({{filesize}} MB). Maximale Dateigröße: {{maxFilesize}} MB."
|
||||
ACF_UPLOAD_INVALID_FILE="Sie können keine Dateien dieses Typs hochladen."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Ihr Browser unterstützt das Hochladen von Drag'n'Drop-Dateien nicht."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Server hat mit {{statusCode}} Code geantwortet."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Upload abbrechen"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Möchten Sie diesen Upload wirklich abbrechen?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Datei entfernen"
|
||||
; ACF_UPLOAD_REMOVE_FILE_CONFIRM="Are you sure?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Sie können keine weiteren Dateien hochladen."
|
||||
ACF_UPLOAD_RANDOMIZE="Dateinamen zufällig sortieren"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Wenn diese Option aktiviert ist, wird ein zufälliges Präfix an den Anfang des hochgeladenen Dateinamens angehängt. Dadurch wird sichergestellt, dass vorhandene Dateien mit demselben Namen niemals ersetzt werden."
|
||||
ACF_UPLOAD_FILE_MISSING="Datei fehlt"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Herunterladen erzwingen"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Wählen Sie aus, ob die Datei heruntergeladen werden soll, anstatt zum Link zu navigieren."
|
||||
ACF_UPLOAD_LINK_TEXT="Linktext"
|
||||
; ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Layout"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Definieren Sie das Layout, mit dem jede hochgeladene Datei im Front-End angezeigt wird."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Benutzerdefiniertes Layout"
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Link"
|
||||
ACF_UPLOAD_IMAGE="Bild"
|
||||
ACF_UPLOAD_CUSTOM="Benutzerdefiniert"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Frontend-Anzeige"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Einstellungen zum Hochladen von Dateien"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE="Allow Unsafe Files"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
; ACF_UPLOAD_VIEW_FILE="View file in a new tab"
|
||||
; ACF_UPLOAD_DOWNLOAD_FILE="Download file"
|
||||
; ACF_UPLOAD_DELETE_FILE="Delete file"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Show Downloads Links"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Enable to display download links for each uploaded file in the file uploader."
|
||||
; ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
; ACF_UPLOAD_TITLE="Title"
|
||||
; ACF_UPLOAD_TITLE_DESC="Define a title for this uploaded file."
|
||||
; ACF_UPLOAD_TITLE_HINT="Enter a title..."
|
||||
; ACF_UPLOAD_DESCRIPTION="Description"
|
||||
; ACF_UPLOAD_DESCRIPTION_DESC="Define a description for this uploaded file."
|
||||
; ACF_UPLOAD_DESCRIPTION_HINT="Enter a description..."
|
||||
; ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Currently editing item: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
; ACF_UPLOAD_EDIT_ITEM="Edit Item"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - File Upload"
|
||||
ACF_UPLOAD="Fields - ACF File Upload"
|
||||
ACF_UPLOAD_DESC="Upload any file using a drag & drop file uploader in the back-end and display the uploaded file as a link or image in the front-end."
|
||||
ACF_UPLOAD_VALUE_DESC="Select file(s) to upload"
|
||||
ACF_UPLOAD_FOLDER="Upload Folder"
|
||||
ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br /><br /><strong>Upload Smart Tags</strong><br />{acf.file.basename}<br />{acf.file.extension}<br />{acf.file.filename}<br />{acf.file.index}<br />{acf.file.total}<br /><br /><strong>Field Smart Tags</strong><br />{acf.field.id}<br /><br /><strong>Item Smart Tags</strong><br />{acf.item.id}<br />{acf.item.author_id}<br />{acf.item.alias}<br />{acf.item.cat_id}<br />{acf.item.cat_alias}<br /><br /><strong>Common Smart Tags</strong><br />{date}<br />{time}<br />{day}<br />{month}<br />{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Files Limit"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="How many files can be uploaded? Enter 0 for no limit."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="File Size Limit"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configure the maximum allowable size for each uploaded file in megabytes. Enter 0 for no limit. <br><br>Your server's maximum upload size is: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Allowed File Types"
|
||||
ACF_UPLOAD_TYPES_DESC="Enter comma separated list of allowed file types like: </b>.jpg, .gif, .png, .pdf<br><br>You may enter media types like: application/pdf, image/*, video/*<br><br>Or you can even mix both: application/*, .png, .jpg<br><br>Note: This is not fool-proof and can be tricked, please remember that there is always a danger in allowing users to upload files."
|
||||
ACF_UPLOAD_ERROR="Invalid form or field key"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Cannot upload file"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Invalid upload field"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="This file seems unsafe or invalid and can't be uploaded."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="You can upload up to %d files"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Drag and drop files here or"
|
||||
ACF_UPLOAD_BROWSE="Browse"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Invalid file. Allowed file types: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="File is missing. Please try to re-upload."
|
||||
ACF_UPLOAD_FOLDER_INVALID="The upload folder %s doesn't exist or is not writable"
|
||||
ACF_UPLOAD_FILETOOBIG="File is too big ({{filesize}}MB). Max filesize: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="You can't upload files of this type."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Your browser does not support drag'n'drop file uploads."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Server responded with {{statusCode}} code."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Cancel upload"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Are you sure you want to cancel this upload?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Remove file"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Are you sure?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="You can not upload any more files."
|
||||
ACF_UPLOAD_RANDOMIZE="Randomize File names"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="If enabled, a random prefix will be added to the beginning of the uploaded file name. This helps to ensure existing files with the same name never get replaced."
|
||||
ACF_UPLOAD_FILE_MISSING="File is missing"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Force Download"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Select whether to download the file instead of navigating to the link"
|
||||
ACF_UPLOAD_LINK_TEXT="Link Text"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Layout"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Define the layout that will be used to display each uploaded file in the front-end."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Custom Layout"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Link"
|
||||
ACF_UPLOAD_IMAGE="Image"
|
||||
ACF_UPLOAD_CUSTOM="Custom"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Front-end Display"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="File Upload Settings"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE="Allow Unsafe Files"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
ACF_UPLOAD_VIEW_FILE="View file in a new tab"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Download file"
|
||||
ACF_UPLOAD_DELETE_FILE="Delete file"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Show Downloads Links"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Enable to display download links for each uploaded file in the file uploader."
|
||||
ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
ACF_UPLOAD_TITLE="Title"
|
||||
ACF_UPLOAD_TITLE_DESC="Define a title for this uploaded file."
|
||||
ACF_UPLOAD_TITLE_HINT="Enter a title..."
|
||||
ACF_UPLOAD_DESCRIPTION="Description"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Define a description for this uploaded file."
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Enter a description..."
|
||||
ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Currently editing item: <strong class="acfupload-edit-modal-editing-item-name"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Edit Item"
|
||||
ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
ACF_UPLOAD_WIDTH="Width"
|
||||
ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
ACF_UPLOAD_HEIGHT="Height"
|
||||
ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,9 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
ACF_UPLOAD="Fields - ACF File Upload"
|
||||
ACF_UPLOAD_DESC="Upload any file using a drag & drop file uploader in the back-end and display the uploaded file as a link or image in the front-end."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Carga de Archivos"
|
||||
ACF_UPLOAD="Campos - ACF Subida de Archivos"
|
||||
ACF_UPLOAD_DESC="Cargue cualquier archivo usando un cargador de archivos de arrastrar y soltar en el back-end y muestre el archivo cargado como un enlace o imagen en el front-end."
|
||||
ACF_UPLOAD_VALUE_DESC="Seleccionar archivo(s) para cargar"
|
||||
ACF_UPLOAD_FOLDER="Cargar carpeta"
|
||||
ACF_UPLOAD_FOLDER_DESC="Ingrese la ruta relativa a la raíz de su espacio web donde se almacenarán los archivos cargados. Para cambiar el nombre de los archivos cargados, utilice las siguientes etiquetas inteligentes.<br><br><strong> Cargar etiquetas inteligentes</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Etiquetas inteligentes de campo</strong><br>{acf.field.id}<br><br><strong>Etiquetas inteligentes de elementos</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Etiquetas inteligentes comunes</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Límite de Archivos"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="¿Cuántos archivos se pueden subir? Ingrese 0 para no tener límite."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Límite de Tamaño de Archivo"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configure el tamaño máximo permitido para cada archivo subido en megabytes. Ingrese 0 para no tener límite. <br><br>El tamaño máximo de carga de su servidor es: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Tipos de Archivo Permitidos"
|
||||
ACF_UPLOAD_TYPES_DESC="Ingrese una lista separada por comas de tipos de archivos permitidos como: </b>.jpg, .gif, .png, .pdf<br><br>Puede ingresar tipos de medios como: application/pdf, image/*, video/*<br><br>O incluso puedes mezclar ambos: application/*, .png, .jpg<br><br>Nota: Esto no es infalible y se puede engañar, recuerde que siempre existe el peligro de permitir que los usuarios suban archivos."
|
||||
ACF_UPLOAD_ERROR="Formulario o clave de campo no válido"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="No se puede cargar el archivo"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Campo de subida no válido"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Este archivo parece inseguro o no válido y no se puede cargar."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Puedes subir hasta %d archivos"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Arrastra y suelta archivos aquí o"
|
||||
ACF_UPLOAD_BROWSE="Navegar"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Archivo inválido. Tipos de archivo permitidos:%s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Falta el archivo. Intente volver a cargarlo."
|
||||
ACF_UPLOAD_FOLDER_INVALID="La carpeta de carga %s no existe o no se puede escribir"
|
||||
ACF_UPLOAD_FILETOOBIG="El archivo es demasiado grande ({{filesize}}MB). Tamaño máximo de archivo: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="No puedes subir archivos de este tipo."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Su navegador no admite cargas de archivos de arrastrar y soltar."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "El servidor respondió con el código {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Cancelar subida"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="¿Estás seguro de que deseas cancelar esta subida?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Borrar archivo"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="¿Está usted seguro?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Usted no puede subir más archivos."
|
||||
ACF_UPLOAD_RANDOMIZE="Nombres de Archivos Aleatorios"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Si está habilitado, se agregará un prefijo aleatorio al comienzo del nombre del archivo cargado. Esto ayuda a garantizar que los archivos existentes con el mismo nombre nunca se reemplacen."
|
||||
ACF_UPLOAD_FILE_MISSING="Falta el archivo"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Forzar Descarga"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Seleccione si desea descargar el archivo en lugar de navegar hasta el enlace"
|
||||
ACF_UPLOAD_LINK_TEXT="Texto del Enlace"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Introduzca un texto de enlace personalizado. Si no se proporciona ninguno, se usará el nombre del archivo en su lugar. Admite etiquetas inteligentes.<br><br><strong>Etiquetas inteligentes de archivo:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Disposición"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Defina el diseño que se usará para mostrar cada archivo cargado en el front-end."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Diseño personalizado"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Establezca un diseño HTML personalizado que se usará para mostrar cada archivo cargado en el front-end. Admite etiquetas inteligentes.<br><br><strong>Etiquetas inteligentes de archivos:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Enlace"
|
||||
ACF_UPLOAD_IMAGE="Imagen"
|
||||
ACF_UPLOAD_CUSTOM="Personalizar"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Pantalla Frontal"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Configuración de Carga de Archivos"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE="Permitir archivos no seguros"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE_DESC="Permitir la carga de archivos no seguros.<br><br><b>Un archivo se considera inseguro cuando:</b><br>- Se encuentra un byte nulo en el nombre del archivo.<br>- La extensión de archivo está prohibida: .php, py, etc.<br>- Hay una etiqueta php en el contenido del archivo.<br>- Hay una etiqueta corta en el contenido del archivo.<br>- Hay una extensión prohibida en cualquier parte del contenido.<br><br>Esta opción también lo protege de archivos no seguros incluidos en archivos comprimidos como zip, rar, tar, etc."
|
||||
ACF_UPLOAD_VIEW_FILE="Ver archivo en una nueva pestaña"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Descargar archivo"
|
||||
ACF_UPLOAD_DELETE_FILE="Borrar archivo"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Mostrar Enlaces de Descargas"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Habilite para mostrar enlaces de descarga para cada archivo cargado en el cargador de archivos."
|
||||
ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="La extensión PHP <b>fileinfo</b>se requiere para adivinar el tipo mime de los archivos cargados, pero si no está instalado o no está cargado. Póngase en contacto con su host para instalarlo."
|
||||
ACF_UPLOAD_TITLE="Título"
|
||||
ACF_UPLOAD_TITLE_DESC="Defina un título para este archivo cargado."
|
||||
ACF_UPLOAD_TITLE_HINT="Introduzca un título..."
|
||||
ACF_UPLOAD_DESCRIPTION="Descripción"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Defina una descripción para este archivo cargado."
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Introduzca una descripción..."
|
||||
ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Elemento de edición actual: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Editar elemento"
|
||||
ACF_UPLOAD_RESIZE_IMAGES="Redimensionar Imágenes"
|
||||
ACF_UPLOAD_RESIZE_IMAGES_DESC="Habilite el cambio de tamaño de las imágenes a las dimensiones especificadas. <br>Las imágenes admitidas son jpg, jpeg, png, gif y webp. <br><br>Solo se cambiará el tamaño de las imágenes nuevas, las imágenes existentes se dejarán como están. <br>Cuando se cambia el tamaño de la imagen, no se crean imágenes adicionales. <br><br><strong>Escenarios útiles de cambio de tamaño</strong>: <br><strong>Cambiar tamaño por ancho</strong>: para cambiar el tamaño de las imágenes cargadas por ancho y mantener la relación de aspecto, establezca solo un ancho y deje la altura en blanco. <br><strong>Cambiar tamaño por altura:</strong> para cambiar el tamaño de las imágenes cargadas por altura y mantener la relación de aspecto, establezca solo una altura y deje ancho en blanco. <br><strong>Cambiar el tamaño por ancho y alto: </strong>para cambiar el tamaño de las imágenes cargadas a un ancho y alto específicos, así como recortar la imagen a estas dimensiones, establezca un ancho y un alto."
|
||||
ACF_UPLOAD_WIDTH="Width"
|
||||
ACF_UPLOAD_WIDTH_DESC="Ingrese el ancho en píxeles para redimensionar la imagen."
|
||||
ACF_UPLOAD_HEIGHT="Altura"
|
||||
ACF_UPLOAD_HEIGHT_DESC="Ingrese la altura en píxeles para redimensionar la imagen."
|
||||
@ -0,0 +1,9 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
ACF_UPLOAD="Campos - ACF Subida de Archivo"
|
||||
ACF_UPLOAD_DESC="Cargue cualquier archivo usando un cargador de archivos de arrastrar y soltar en el back-end y muestre el archivo cargado como un enlace o imagen en el front-end."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Téléversement de fichier"
|
||||
ACF_UPLOAD="Champs - ACF Téléversement de fichier"
|
||||
ACF_UPLOAD_DESC="Envoyer n'importe quel fichier par glisser-déposer dans l'administration et afficher le ficher en tant que lien ou image sur le site."
|
||||
ACF_UPLOAD_VALUE_DESC="Sélectionner le(s) fichier(s) à envoyer"
|
||||
ACF_UPLOAD_FOLDER="Dossier de destination"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Nb maximal de fichiers"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Combien de fichiers peuvent être transférés ? Saisir 0 pour ne pas limiter limite."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Limite de poids des fichiers"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configurer la taille maximale en mégaoctets autorisée pour chaque fichier. Saisir 0 pour ne pas limiter. <br><br>Le limite du serveur est : <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Types de fichiers autorisés"
|
||||
; ACF_UPLOAD_TYPES_DESC="Enter comma separated list of allowed file types like: </b>.jpg, .gif, .png, .pdf<br><br>You may enter media types like: application/pdf, image/*, video/*<br><br>Or you can even mix both: application/*, .png, .jpg<br><br>Note: This is not fool-proof and can be tricked, please remember that there is always a danger in allowing users to upload files."
|
||||
; ACF_UPLOAD_ERROR="Invalid form or field key"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Impossible d'envoyer le fichier"
|
||||
; ACF_UPLOAD_ERROR_INVALID_FIELD="Invalid upload field"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Ce fichier paraît suspect ou incorrect, il ne peut être envoyé."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Vous pouvez envoyer jusqu'à %d fichiers"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Glisser et déposer les fichier ici ou"
|
||||
ACF_UPLOAD_BROWSE="Parcourir"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Fichier non valide. Voici les types autorisés : %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Fichier manquant. Veuillez réessayer l'envoi."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Le dossier d'envoi %s n'existe pas ou n'a pas de droit d'écriture"
|
||||
ACF_UPLOAD_FILETOOBIG="Le fichier est trop volumineux ({{filesize}} Mo). La taille maximale est {{maxFilesize}} Mo."
|
||||
ACF_UPLOAD_INVALID_FILE="Vous ne pouvez pas envoyer de fichiers de ce type."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Votre navigateur ne supporte par l'envoi de fichiers par glisser-déposer."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Le serveur a répondu avec le code {{statusCode}}"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Annuler l'envoi"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Êtes-vous sûr de vouloir annuler cet envoi ?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Retirer le fichier"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Êtes-vous sûr ?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Vous ne pouvez plus envoyer de fichiers."
|
||||
; ACF_UPLOAD_RANDOMIZE="Randomize File names"
|
||||
; ACF_UPLOAD_RANDOMIZE_DESC="If enabled, a random prefix will be added to the beginning of the uploaded file name. This helps to ensure existing files with the same name never get replaced."
|
||||
ACF_UPLOAD_FILE_MISSING="Fichier manquant"
|
||||
; ACF_UPLOAD_FORCE_DOWNLOAD="Force Download"
|
||||
; ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Select whether to download the file instead of navigating to the link"
|
||||
ACF_UPLOAD_LINK_TEXT="Texte du lien"
|
||||
; ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
; ACF_UPLOAD_LAYOUT="Layout"
|
||||
; ACF_UPLOAD_LAYOUT_DESC="Define the layout that will be used to display each uploaded file in the front-end."
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT="Custom Layout"
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Lien"
|
||||
ACF_UPLOAD_IMAGE="Image"
|
||||
; ACF_UPLOAD_CUSTOM="Custom"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Affichage site"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Paramètres d'envoi du fichier"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE="Allow Unsafe Files"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
; ACF_UPLOAD_VIEW_FILE="View file in a new tab"
|
||||
; ACF_UPLOAD_DOWNLOAD_FILE="Download file"
|
||||
ACF_UPLOAD_DELETE_FILE="Supprimer le fichier"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Affiches les liens de téléchargement"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Enable to display download links for each uploaded file in the file uploader."
|
||||
; ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
ACF_UPLOAD_TITLE="Titre"
|
||||
ACF_UPLOAD_TITLE_DESC="Définir un titre pour ce fichier envoyé."
|
||||
ACF_UPLOAD_TITLE_HINT="Inscrire un titre..."
|
||||
ACF_UPLOAD_DESCRIPTION="Description"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Définir une description pour ce fichier envoyé."
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Inscrire une description..."
|
||||
ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Élément actuellement modifié : <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Modifier l'élément"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - caricamento file"
|
||||
ACF_UPLOAD="Campi - caricamento file ACF"
|
||||
ACF_UPLOAD_DESC="Carica qualsiasi file utilizzando un caricatore di file trascina e rilascia in amministrazione e visualizza il file caricato come collegamento o immagine nel front-end."
|
||||
ACF_UPLOAD_VALUE_DESC="Seleziona il(i) file da caricare"
|
||||
ACF_UPLOAD_FOLDER="Cartella di caricamento"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Limite file"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Quanti file possono essere caricati? Immettere 0 per nessun limite."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Limite dimensione file"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configura la dimensione massima consentita in megabyte per ogni file caricato. Inserisci 0 per nessun limite.<br><br>La dimensione massima di caricamento del tuo server è: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Tipi di file consentiti"
|
||||
ACF_UPLOAD_TYPES_DESC="Inserisci un elenco separato da virgole di tipi di file consentiti come: </b>.jpg, .gif, .png, .pdf<br><br>Puoi inserire tipi di file multimediali come: application/pdf, image/*, video/*<br><br>Oppure puoi anche combinare entrambi: application/*, .png, .jpg<br><br>Nota: questo non è infallibile e può essere ingannato, ricorda che c'è sempre un pericolo nel consentire agli utenti di caricare file."
|
||||
ACF_UPLOAD_ERROR="Modulo o chiave di campo non validi"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Non posso caricare file"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Campo di caricamento non valido"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Questo file sembra non sicuro o non valido e non può essere caricato."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Puoi caricare fino a %d file"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Trascina e rilascia file qui o"
|
||||
ACF_UPLOAD_BROWSE="Sfoglia"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="File non valido. Tipi di file consentiti: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Manca il file. Prova a ricaricarlo."
|
||||
ACF_UPLOAD_FOLDER_INVALID="La cartella di caricamento %s non esiste o non è scrivibile"
|
||||
ACF_UPLOAD_FILETOOBIG="Il file è troppo grande ({{filesize}}MB). Dimensione massima del file: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="Non puoi caricare file di questo tipo."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Il tuo browser non supporta il caricamento di file trascina e rilascia."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Il server ha risposto con il codice {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Cancella il caricamento"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Sei sicuro di voler annullare questo caricamento?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Elimina il file"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Sei sicuro?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Non puoi caricare altri file."
|
||||
ACF_UPLOAD_RANDOMIZE="Rendi casuali i nomi dei file"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Se abilitato, verrà aggiunto un prefisso casuale all'inizio del nome del file caricato. Ciò aiuta a garantire che i file esistenti con lo stesso nome non vengano mai sostituiti."
|
||||
ACF_UPLOAD_FILE_MISSING="Il file è mancante"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Scaricamento forzato"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Scegli se scaricare il file invece di navigare fino al collegamento"
|
||||
ACF_UPLOAD_LINK_TEXT="Testo collegamento"
|
||||
; ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Impaginazione"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Definisci l'impaginazione che verrà utilizzata per visualizzare ogni file caricato nel front-end."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Impaginazione personalizzata"
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Collegamento"
|
||||
ACF_UPLOAD_IMAGE="Immagine"
|
||||
ACF_UPLOAD_CUSTOM="Personalizzato"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Visualizzazione front-end"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Impostazioni di caricamento file"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE="Allow Unsafe Files"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
ACF_UPLOAD_VIEW_FILE="Visualizza il file in una nuova scheda"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Scarica file"
|
||||
ACF_UPLOAD_DELETE_FILE="Cancella il file"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Mostra link di scaricamento"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Abilita per visualizzare i link di download per ogni file caricato nel caricatore di file."
|
||||
; ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
; ACF_UPLOAD_TITLE="Title"
|
||||
; ACF_UPLOAD_TITLE_DESC="Define a title for this uploaded file."
|
||||
; ACF_UPLOAD_TITLE_HINT="Enter a title..."
|
||||
; ACF_UPLOAD_DESCRIPTION="Description"
|
||||
; ACF_UPLOAD_DESCRIPTION_DESC="Define a description for this uploaded file."
|
||||
; ACF_UPLOAD_DESCRIPTION_HINT="Enter a description..."
|
||||
; ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Currently editing item: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
; ACF_UPLOAD_EDIT_ITEM="Edit Item"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - File Upload"
|
||||
ACF_UPLOAD="Velden - ACF File Upload"
|
||||
ACF_UPLOAD_DESC="Upload elk bestand met een uploader voor slepen en neerzetten aan de back-end en geef het geüploade bestand weer als een link of afbeelding op de front-end."
|
||||
ACF_UPLOAD_VALUE_DESC="Selecteer te uploaden bestand(en)"
|
||||
ACF_UPLOAD_FOLDER="Upload Folder"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Bestandslimiet"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Hoeveel ĕstanden kunnen er worden geupload? Vul de 0 in voor ongelimiteerd"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Bestandsgrootte Limiet"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Configureer de maximaal toegestane grootte voor elk geüpload bestand in megabytes. Voer 0 in voor geen limiet. <br><br>De maximale uploadgrootte van jouw server is:<b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Toegestane Bestandstypen"
|
||||
ACF_UPLOAD_TYPES_DESC="Voer een door komma's gescheiden lijst met toegestane bestandstypen in zoals: </b>.jpg, .gif, .png, .pdf<br><br>Je kunt mediatypen invoeren zoals: application/pdf, image/*, video/*<br><br>Of je kunt zelfs beide mixen: application/*, . png, .jpg<br><br>Opmerking: dit is niet onfeilbaar en kan worden misleid. Houd er rekening mee dat er altijd een gevaar bestaat als gebruikers worden toegestaan bestanden te uploaden."
|
||||
ACF_UPLOAD_ERROR="Ongeldige formulier- of veldsleutel"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Kan bestand niet uploaden"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Ongeldig uploadveld"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Dit bestand lijkt onveilig of ongeldig en kan niet worden geüpload."
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Je kunt maximaal %d bestanden uploaden"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Sleep bestanden hierheen of"
|
||||
ACF_UPLOAD_BROWSE="Bladeren"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Ongeldig bestand. Toegestane bestandstypen zijn: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Bestand ontbreekt. Probeer het opnieuw"
|
||||
ACF_UPLOAD_FOLDER_INVALID="De uploadmap %s bestaat niet of is niet beschrijfbaar"
|
||||
ACF_UPLOAD_FILETOOBIG="Het bestand van ({{filesize}}MB) is te groot. Max bestandsgrootte is: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="Je kunt geen bestanden van dit type uploaden."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Je browser ondersteunt geen drag'n'drop voor het uploaden van bestanden."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "De Server reageerde met {{statusCode}} code."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Annuleer upload"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Weet je het zeker dat je deze upload wilt annuleren?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Verwijder bestand"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Weet je het zeker?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Je kunt geen bestanden meer uploaden"
|
||||
ACF_UPLOAD_RANDOMIZE="Maak bestandsnamen willekeurig"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Indien ingeschakeld, wordt een willekeurig voorvoegsel toegevoegd aan het begin van de geüploade bestandsnaam. Dit helpt ervoor te zorgen dat bestaande bestanden met dezelfde naam nooit worden vervangen."
|
||||
ACF_UPLOAD_FILE_MISSING="Bestand ontbreekt"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Forceer Download"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Selecteer of je het bestand wilt downloaden in plaats de link volgen"
|
||||
ACF_UPLOAD_LINK_TEXT="Link Tekst"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Voer een aangepaste linktekst in. Als er geen is opgegeven, wordt in plaats daarvan de bestandsnaam gebruikt. Ondersteunt Slimme Tags. <br><br><strong>Bestand Slimme Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Indeling"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Definieer de indeling die zal worden gebruikt om elk geüpload bestand aan de front-end weer te geven."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Aangepaste Indeling"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Stel een aangepaste HTML indeling in die wordt gebruikt om elk geüpload bestand in de front-end weer te geven. Ondersteunt slimme tags.<br><br><strong>Bestand Slimme Tags:</strong><br> {acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Normale Slimme Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Link"
|
||||
ACF_UPLOAD_IMAGE="Afbeelding"
|
||||
ACF_UPLOAD_CUSTOM="Aangepast"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Front-end Vertoning"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Bestandsupload Instellingen"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE="Sta onveilige bestanden toe"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE_DESC="Sta het uploaden van onveilige bestanden toe. <br><br><b>Een bestand wordt als onveilig beschouwd wanneer: </b><br>- Een null-byte wordt gevonden in de bestandsnaam. <br>- Bestandsextensie verboden is: .php, py enz. <br>- Er staat een php-tag in de bestandsinhoud. <br>- Er is een korte of slimme tag in de bestandsinhoud.<br>- Er is ergens in de inhoud een verboden extensie. <br><br>Deze optie beschermt je ook tegen onveilige bestanden in gecomprimeerde bestanden zoals zip, rar, tar enz."
|
||||
ACF_UPLOAD_VIEW_FILE="Bekijk het bestand in een nieuw tabblad"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Doanload bestand"
|
||||
ACF_UPLOAD_DELETE_FILE="Verwijder bestand"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Toon downloadlinks"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Schakel in om downloadlinks weer te geven voor elk geüpload bestand in de bestandsuploader."
|
||||
ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="De PHP-extensie <b>fileinfo</b> is vereist om het MIME-type van geüploade bestanden te raden, maar het is niet geïnstalleerd of niet geladen. Neem contact op met jouw host om het te installeren."
|
||||
ACF_UPLOAD_TITLE="Titel"
|
||||
ACF_UPLOAD_TITLE_DESC="Definieer een titel voor dit geüploade bestand."
|
||||
ACF_UPLOAD_TITLE_HINT="Voer een titel in..."
|
||||
ACF_UPLOAD_DESCRIPTION="Beschrijving"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Definieer een beschrijving voor dit geüploade bestand."
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Voer een beschrijving in..."
|
||||
ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Item dat momenteel wordt bewerkt: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Edit Item"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,52 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Загрузка файла"
|
||||
ACF_UPLOAD="Поля - Загрузка файла ACF"
|
||||
ACF_UPLOAD_DESC="Загрузите любой файл с помощью средства для перетаскивания файлов в серверной части и отобразите загруженный файл в виде ссылки или изображения в пользовательском интерфейсе."
|
||||
ACF_UPLOAD_FOLDER="Загрузить папку"
|
||||
ACF_UPLOAD_FOLDER_DESC="Введите путь относительно корня вашего веб-пространства, в котором будут храниться загруженные файлы. Убедитесь, что введенный путь доступен для записи, в противном случае загрузка файла завершится неудачей."
|
||||
ACF_UPLOAD_LIMIT_FILES="Ограничение файлов"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Сколько файлов может быть загружено? Введите 0 без ограничений."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Ограничение размера файла"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Настройте максимально допустимый размер каждого загружаемого файла в мегабайтах. Введите 0 без ограничений. <br> <br> Максимальный размер загрузки вашего сервера: <b>% s </ b>."
|
||||
ACF_UPLOAD_TYPES="Разрешенные типы файлов"
|
||||
ACF_UPLOAD_TYPES_DESC="Список разрешенных типов файлов через запятую. Оставьте пустым, чтобы принять все типы файлов. <br> <br> <b> Пример: </ b> .jpg, .gif, .png, .pdf <br> <br > Это не защищает от ошибок и может быть обманным путем, пожалуйста, помните, что всегда есть опасность позволить пользователям загружать файлы »"
|
||||
ACF_UPLOAD_ERROR="Неверный ключ формы или поля"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Невозможно загрузить файл"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Неверное поле загрузки"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Неверный или неподдерживаемый файл"
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Вы можете загрузить до %d файлов"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Перетащите файлы сюда или"
|
||||
ACF_UPLOAD_BROWSE="Просмотр"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Неверный файл. Разрешенные типы файлов: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Файл отсутствует. Пожалуйста, попробуйте заново загрузить."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Папка для загрузки% s не существует или недоступна для записи"
|
||||
ACF_UPLOAD_FILETOOBIG="Файл слишком большой ({{filesize}} МБ). Максимальный размер файла: {{maxFilesize}} МБ."
|
||||
ACF_UPLOAD_INVALID_FILE="Вы не можете загружать файлы этого типа."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Ваш браузер не поддерживает перетаскивание файлов загрузки."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Сервер ответил кодом {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Отменить загрузку"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Вы уверены, что хотите отменить загрузку?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Удалить файл"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Вы не можете больше загружать файлы."
|
||||
ACF_UPLOAD_RANDOMIZE="Рандомизировать имена файлов"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Если включено, случайный префикс будет добавлен в начало имени загружаемого файла. Это помогает гарантировать, что существующие файлы с одинаковыми именами никогда не будут заменены."
|
||||
ACF_UPLOAD_FILE_MISSING="Файл отсутствует"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Принудительная загрузка"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Выберите, загружать ли файл вместо перехода по ссылке"
|
||||
ACF_UPLOAD_LINK_TEXT="Текст ссылки"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Введите текст пользовательской ссылки. Если ничего не указано, вместо этого будет использоваться имя файла."
|
||||
ACF_UPLOAD_LAYOUT="Макет"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Определить макет, который будет использоваться для отображения каждого загруженного файла во внешнем интерфейсе."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Пользовательский макет"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Установить пользовательский макет HTML, который будет использоваться для отображения каждого загруженного файла в интерфейсе. <br> <br> <b> Доступные переменные </ b> <br> {site.url} <br> { file.name} <br> {file.path} <br> {file.url} {<br> file.size} <br> {file.ext}"
|
||||
ACF_UPLOAD_LINK="Ссылка"
|
||||
ACF_UPLOAD_IMAGE="Изображение"
|
||||
ACF_UPLOAD_CUSTOM="Пользовательский"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Внешний интерфейс"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Настройки загрузки файлов"
|
||||
@ -0,0 +1,76 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - File Upload"
|
||||
ACF_UPLOAD="Fält - ACF File Upload"
|
||||
ACF_UPLOAD_DESC="Ladda upp vilken fil som helst med hjälp av en dra-och-släpp filuppladdare i backend och visa den uppladdade filen som en länk eller bild i frontend."
|
||||
ACF_UPLOAD_VALUE_DESC="Välj fil(er) att ladda upp"
|
||||
ACF_UPLOAD_FOLDER="Uppladdningsmapp"
|
||||
; ACF_UPLOAD_FOLDER_DESC="Enter the path relative to the root of your webspace where the uploaded files will be stored. To rename uploaded files use the following Smart Tags.<br><br><strong>Upload Smart Tags</strong><br>{acf.file.basename}<br>{acf.file.extension}<br>{acf.file.filename}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Field Smart Tags</strong><br>{acf.field.id}<br><br><strong>Item Smart Tags</strong><br>{acf.item.id}<br>{acf.item.author_id}<br>{acf.item.alias}<br>{acf.item.cat_id}<br>{acf.item.cat_alias}<br><br><strong>Common Smart Tags</strong><br>{date}<br>{time}<br>{day}<br>{month}<br>{year}"
|
||||
ACF_UPLOAD_LIMIT_FILES="Filbegränsning"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Hur många filer kan laddas upp? Ange 0 för ingen begränsning."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Filstorlek gräns"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Ange den maximalt tillåtna storleken för varje uppladdad fil i megabytes. Ange 0 för ingen bwegränsning. <br><br>Din servers maximala uppladdningsstorlek är: <b>%s</b>."
|
||||
ACF_UPLOAD_TYPES="Tillåtna filtyper"
|
||||
; ACF_UPLOAD_TYPES_DESC="Enter comma separated list of allowed file types like: </b>.jpg, .gif, .png, .pdf<br><br>You may enter media types like: application/pdf, image/*, video/*<br><br>Or you can even mix both: application/*, .png, .jpg<br><br>Note: This is not fool-proof and can be tricked, please remember that there is always a danger in allowing users to upload files."
|
||||
ACF_UPLOAD_ERROR="Felaktigt formulär eller fältnyckel"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Kan inte ladda upp filen"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Felaktigt uppladdningsfält"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Den här filen verkar vara osäker eller felaktig och kan inte laddas upp"
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Du kan ladda upp max %d filer."
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Dra och släpp filer här eller"
|
||||
ACF_UPLOAD_BROWSE="Bläddra"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Felaktig fil. Tillåtna filtyper: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Filen saknas. Försök att ladda upp den igen."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Uppladdningsmappen %s finns inte eller så är den inte skrivbar."
|
||||
ACF_UPLOAD_FILETOOBIG="Filen är för stor ({{filesize}}MB). Max filstorlek: {{maxFilesize}}MB."
|
||||
ACF_UPLOAD_INVALID_FILE="Du kan inte ladda upp filer av den här typen."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Din webbläsare stöder inte dra-och-släpp pladdning av -filer."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Servern svarade med koden {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Avbryt uppladdning"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Är du säker på att du vill avbryta den här uppladdningen?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Ta bort fil"
|
||||
ACF_UPLOAD_REMOVE_FILE_CONFIRM="Är du säker?"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Du kan inte ladda upp fler filer."
|
||||
ACF_UPLOAD_RANDOMIZE="Slumpmässigt filnamn"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Om aktiverat, läggs ett slumpmässigt prefix till det uppladdade filnamnet. Detta hjälper till att säkerställa att befintliga filer med samma namn aldrig ersätts."
|
||||
ACF_UPLOAD_FILE_MISSING="Filen saknas"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Tvinga nedladdning"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Välj om du vill att filen ska laddas ner istället för att navigera till länken"
|
||||
ACF_UPLOAD_LINK_TEXT="Länktext"
|
||||
; ACF_UPLOAD_LINK_TEXT_DESC="Enter a custom link text. If none provided, the file name will be used instead. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}"
|
||||
ACF_UPLOAD_LAYOUT="Layout"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Definiera layouten som ska användas för att visa varje uppladdad fil i frontend."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Anpassad layout"
|
||||
; ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Set a custom HTML layout that will be used to display each uploaded file in the front-end. Supports Smart Tags.<br><br><strong>File Smart Tags:</strong><br>{acf.file.basename}<br>{acf.file.filename}<br>{acf.file.path}<br>{acf.file.url}<br>{acf.file.size}<br>{acf.file.extension}<br>{acf.file.title}<br>{acf.file.description}<br>{acf.file.index}<br>{acf.file.total}<br><br><strong>Common Smart Tags</strong><br>{site.url}"
|
||||
ACF_UPLOAD_LINK="Länk"
|
||||
ACF_UPLOAD_IMAGE="Bild"
|
||||
ACF_UPLOAD_CUSTOM="Anpassad"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Frontend visning"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Filuppladdning inställningar"
|
||||
ACF_UPLOAD_ALLOW_UNSAFE="Tillåt osäkra filer"
|
||||
; ACF_UPLOAD_ALLOW_UNSAFE_DESC="Allow the upload of unsafe files.<br><br><b>A file is considered unsafe when:</b><br>- A null byte is found in the file name.<br>- File extension is forbidden: .php, py etc.<br>- There's a php tag in file content.<br>- There's a short tag in file content.<br>- There's a forbidden extension anywhere in the content.<br><br>This option protects you also from unsafe files included in compressed files such as zip, rar, tar e.t.c."
|
||||
ACF_UPLOAD_VIEW_FILE="Visa filen i en ny flik"
|
||||
ACF_UPLOAD_DOWNLOAD_FILE="Ladda ner filen"
|
||||
ACF_UPLOAD_DELETE_FILE="Radera filen"
|
||||
ACF_UPLOAD_SHOW_DOWNLOAD_LINKS="Visa nedladdningslänkar"
|
||||
; ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC="Enable to display download links for each uploaded file in the file uploader."
|
||||
; ACF_UPLOAD_MIME_CONTENT_TYPE_MISSING="The PHP extension <b>fileinfo</b> is required to guess the mime type of uploaded files but it's not installed or not loaded. Please contact your host to install it."
|
||||
ACF_UPLOAD_TITLE="Titel"
|
||||
ACF_UPLOAD_TITLE_DESC="Definiera en titel för den här uppladdade filen"
|
||||
ACF_UPLOAD_TITLE_HINT="Skriv in en titel...."
|
||||
ACF_UPLOAD_DESCRIPTION="Beskrivning"
|
||||
ACF_UPLOAD_DESCRIPTION_DESC="Definiera en beskrivning för den här uppladdade filen"
|
||||
ACF_UPLOAD_DESCRIPTION_HINT="Lägg till en beskrivning..."
|
||||
; ACF_UPLOAD_CURRENTLY_EDITING_ITEM="Currently editing item: <strong class=\"acfupload-edit-modal-editing-item-name\"></strong>"
|
||||
ACF_UPLOAD_EDIT_ITEM="Redigera detta"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES="Resize Images"
|
||||
; ACF_UPLOAD_RESIZE_IMAGES_DESC="Enable to resize images to the specified dimensions.<br>Supported images are jpg, jpeg, png, gif, and webp.<br><br>Only new images will be resized, existing images are left as-is.<br>When the image is resized, no additional images are created.<br><br><strong>Helpful Resizing Scenarios</strong>:<br><strong>Resize by width:</strong> To resize uploaded images by width and keep aspect ratio, set only a width and leave height blank.<br><strong>Resize by height:</strong> To resize uploaded images by height and keep the aspect ratio, set only a height and leave width blank.<br><strong>Resize by width & height:</strong> To resize uploaded images to a specific width and height, as well as crop the image to these dimensions, set both a width and height."
|
||||
; ACF_UPLOAD_WIDTH="Width"
|
||||
; ACF_UPLOAD_WIDTH_DESC="Enter the width in pixels to resize the image to."
|
||||
; ACF_UPLOAD_HEIGHT="Height"
|
||||
; ACF_UPLOAD_HEIGHT_DESC="Enter the height in pixels to resize the image to."
|
||||
@ -0,0 +1,52 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFUPLOAD_LABEL="ACF - Завантаження файлів"
|
||||
ACF_UPLOAD="Поля - Завантаження файлів ACF"
|
||||
ACF_UPLOAD_DESC="Завантажте будь-який файл за допомогою завантажувача файлів перетягування на задній панелі та покажіть завантажений файл у вигляді посилання або зображення у передній частині."
|
||||
ACF_UPLOAD_FOLDER="Завантажити папку"
|
||||
ACF_UPLOAD_FOLDER_DESC="Введіть шлях відносно кореня вашого веб-простору, де зберігатимуться завантажені файли. Переконайтесь, що введений шлях написаний для запису, інакше завантаження файлу не вдасться."
|
||||
ACF_UPLOAD_LIMIT_FILES="Обмеження файлів"
|
||||
ACF_UPLOAD_LIMIT_FILES_DESC="Скільки файлів можна завантажити? Введіть 0 без обмежень."
|
||||
ACF_UPLOAD_MAX_FILE_SIZE="Обмеження розміру файлу"
|
||||
ACF_UPLOAD_MAX_FILE_SIZE_DESC="Налаштуйте максимально допустимий розмір для кожного завантаженого файлу в мегабайтах. Введіть 0 без обмежень. <br> <br> Максимальний розмір завантаження вашого сервера: <b>% s </b>."
|
||||
ACF_UPLOAD_TYPES="Дозволені типи файлів"
|
||||
ACF_UPLOAD_TYPES_DESC="Список розділених комами дозволених типів файлів. Залиште порожнім, щоб прийняти всі типи файлів. <br> <br> <b> Приклад: </b> .jpg, .gif, .png, .pdf <br> <br > Це не дурно, і їх можна обдурити, пам’ятайте, що завжди існує небезпека дозволити користувачам завантажувати файли. "
|
||||
ACF_UPLOAD_ERROR="Недійсна форма або ключ поля"
|
||||
ACF_UPLOAD_ERROR_CANNOT_UPLOAD_FILE="Неможливо завантажити файл"
|
||||
ACF_UPLOAD_ERROR_INVALID_FIELD="Неправильне поле для завантаження"
|
||||
ACF_UPLOAD_ERROR_INVALID_FILE="Недійсний або непідтримуваний файл"
|
||||
ACF_UPLOAD_MAX_FILES_LIMIT="Ви можете завантажити до %d файлів"
|
||||
ACF_UPLOAD_DRAG_AND_DROP_FILES="Перетягніть сюди файли або"
|
||||
ACF_UPLOAD_BROWSE="Переглянути"
|
||||
ACF_UPLOAD_INVALID_FILE_TYPE="Недійсний файл. Дозволені типи файлів: %s"
|
||||
ACF_UPLOAD_FILE_IS_MISSING="Файл відсутній. Будь ласка, спробуйте повторно завантажити."
|
||||
ACF_UPLOAD_FOLDER_INVALID="Папка для завантаження% s не існує або не піддається запису"
|
||||
ACF_UPLOAD_FILETOOBIG="Файл занадто великий ({{розмір файлів}} МБ). Максимальний розмір файлів: {{maxFilesize}} МБ."
|
||||
ACF_UPLOAD_INVALID_FILE="Ви не можете завантажувати файли такого типу."
|
||||
ACF_UPLOAD_FALLBACK_MESSAGE="Ваш браузер не підтримує перетягування файлів перетягування."
|
||||
ACF_UPLOAD_RESPONSE_ERROR = "Сервер відповів кодом {{statusCode}}."
|
||||
ACF_UPLOAD_CANCEL_UPLOAD="Скасувати завантаження"
|
||||
ACF_UPLOAD_CANCEL_UPLOAD_CONFIRMATION="Ви впевнені, що хочете скасувати це завантаження?"
|
||||
ACF_UPLOAD_REMOVE_FILE="Видалити файл"
|
||||
ACF_UPLOAD_MAX_FILES_EXCEEDED="Ви не можете завантажувати більше файлів."
|
||||
ACF_UPLOAD_RANDOMIZE="Випадкові імена файлів"
|
||||
ACF_UPLOAD_RANDOMIZE_DESC="Якщо увімкнено, до початку завантаженого імені файлу буде доданий випадковий префікс. Це допомагає гарантувати, що існуючі файли з тим самим іменем ніколи не замінюються."
|
||||
ACF_UPLOAD_FILE_MISSING="Файл відсутній"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD="Завантажити"
|
||||
ACF_UPLOAD_FORCE_DOWNLOAD_DESC="Виберіть, чи потрібно завантажити файл замість переходу до посилання"
|
||||
ACF_UPLOAD_LINK_TEXT="Текст посилання"
|
||||
ACF_UPLOAD_LINK_TEXT_DESC="Введіть власний текст посилання. Якщо такого не вказано, замість цього буде використано ім'я файлу."
|
||||
ACF_UPLOAD_LAYOUT="Макет"
|
||||
ACF_UPLOAD_LAYOUT_DESC="Визначте макет, який використовуватиметься для відображення кожного завантаженого файлу в передній частині."
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT="Спеціальний макет"
|
||||
ACF_UPLOAD_CUSTOM_LAYOUT_DESC="Встановити користувальницький макет HTML, який буде використовуватися для відображення кожного завантаженого файлу в передньому відділі. <br> <br> <b> Доступні змінні </b> | file.name} <br> {file.path} <br> {file.url} | {file.size} <br> {file.ext} "
|
||||
ACF_UPLOAD_LINK="Посилання"
|
||||
ACF_UPLOAD_IMAGE="Зображення"
|
||||
ACF_UPLOAD_CUSTOM="Спеціальні"
|
||||
ACF_UPLOAD_FRONTEND_DISPLAY="Передній дисплей"
|
||||
ACF_UPLOAD_FILE_UPLOAD_SETTINGS="Налаштування завантаження файлу"
|
||||
101
plugins/fields/acfupload/params/acfupload.xml
Normal file
101
plugins/fields/acfupload/params/acfupload.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fields name="fieldparams">
|
||||
<fieldset name="fieldparams">
|
||||
<field name="a" type="note" label="ACF_UPLOAD_FILE_UPLOAD_SETTINGS" />
|
||||
<field name="upload_folder" type="text"
|
||||
label="ACF_UPLOAD_FOLDER"
|
||||
description="ACF_UPLOAD_FOLDER_DESC"
|
||||
hint="media/acfupload"
|
||||
default="media/acfupload"
|
||||
class="input-xlarge"
|
||||
/>
|
||||
<field name="limit_files" type="number"
|
||||
label="ACF_UPLOAD_LIMIT_FILES"
|
||||
description="ACF_UPLOAD_LIMIT_FILES_DESC"
|
||||
class="input-small"
|
||||
default="1"
|
||||
min="0"
|
||||
/>
|
||||
<field name="max_file_size" type="nrnumber"
|
||||
label="ACF_UPLOAD_MAX_FILE_SIZE"
|
||||
description="ACF_UPLOAD_MAX_FILE_SIZE_DESC"
|
||||
class="input-small"
|
||||
addon="MB"
|
||||
min="0"
|
||||
default="0"
|
||||
hint="1"
|
||||
/>
|
||||
<field name="upload_types" type="text"
|
||||
label="ACF_UPLOAD_TYPES"
|
||||
description="ACF_UPLOAD_TYPES_DESC"
|
||||
hint=".jpg, .png, .gif"
|
||||
default=".jpg, .png, .gif"
|
||||
/>
|
||||
<field name="randomize_filename" type="nrtoggle"
|
||||
label="ACF_UPLOAD_RANDOMIZE"
|
||||
description="ACF_UPLOAD_RANDOMIZE_DESC"
|
||||
/>
|
||||
<field name="allow_unsafe" type="nrtoggle"
|
||||
label="ACF_UPLOAD_ALLOW_UNSAFE"
|
||||
description="ACF_UPLOAD_ALLOW_UNSAFE_DESC"
|
||||
/>
|
||||
<field name="show_download_links" type="nrtoggle"
|
||||
label="ACF_UPLOAD_SHOW_DOWNLOAD_LINKS"
|
||||
description="ACF_UPLOAD_SHOW_DOWNLOAD_LINKS_DESC"
|
||||
/>
|
||||
<field name="resize_images_note" type="note" label="ACF_UPLOAD_RESIZE_IMAGES" />
|
||||
<field name="resize_images" type="nrtoggle"
|
||||
label="ACF_UPLOAD_RESIZE_IMAGES"
|
||||
description="ACF_UPLOAD_RESIZE_IMAGES_DESC"
|
||||
/>
|
||||
<field name="width" type="nrnumber"
|
||||
label="ACF_UPLOAD_WIDTH"
|
||||
description="ACF_UPLOAD_WIDTH_DESC"
|
||||
min="1"
|
||||
addon="px"
|
||||
showon="resize_images:1"
|
||||
/>
|
||||
<field name="height" type="nrnumber"
|
||||
label="ACF_UPLOAD_HEIGHT"
|
||||
description="ACF_UPLOAD_HEIGHT_DESC"
|
||||
min="1"
|
||||
addon="px"
|
||||
showon="resize_images:1"
|
||||
/>
|
||||
|
||||
<field name="b" type="note" label="ACF_UPLOAD_FRONTEND_DISPLAY" />
|
||||
<field name="layout" type="list"
|
||||
label="ACF_UPLOAD_LAYOUT"
|
||||
description="ACF_UPLOAD_LAYOUT_DESC"
|
||||
default="link">
|
||||
<option value="link">ACF_UPLOAD_LINK</option>
|
||||
<option value="img">ACF_UPLOAD_IMAGE</option>
|
||||
<option value="custom">ACF_UPLOAD_CUSTOM</option>
|
||||
</field>
|
||||
<field name="link_text" type="text"
|
||||
label="ACF_UPLOAD_LINK_TEXT"
|
||||
description="ACF_UPLOAD_LINK_TEXT_DESC"
|
||||
hint="Download"
|
||||
showon="layout:link"
|
||||
/>
|
||||
<field name="force_download" type="nrtoggle"
|
||||
label="ACF_UPLOAD_FORCE_DOWNLOAD"
|
||||
description="ACF_UPLOAD_FORCE_DOWNLOAD_DESC"
|
||||
checked="true"
|
||||
showon="layout:link"
|
||||
/>
|
||||
<field name="custom_layout" type="editor"
|
||||
label="ACF_UPLOAD_CUSTOM_LAYOUT"
|
||||
description="ACF_UPLOAD_CUSTOM_LAYOUT_DESC"
|
||||
showon="layout:custom"
|
||||
editor="codemirror|none"
|
||||
class="span12"
|
||||
filter="raw"
|
||||
rows="5"
|
||||
default='<a download href="{acf.file.url}" title="Click to download">Download {acf.file.name}</a>'
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</form>
|
||||
|
||||
691
plugins/fields/acfupload/script.install.helper.php
Normal file
691
plugins/fields/acfupload/script.install.helper.php
Normal file
@ -0,0 +1,691 @@
|
||||
<?php
|
||||
/**
|
||||
* Installer Script Helper
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2016 Tassos Marinos All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Installer\Installer;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\Filesystem\File;
|
||||
use Joomla\Filesystem\Folder;
|
||||
|
||||
class PlgFieldsAcfuploadInstallerScriptHelper
|
||||
{
|
||||
public $name = '';
|
||||
public $alias = '';
|
||||
public $extname = '';
|
||||
public $extension_type = '';
|
||||
public $plugin_folder = 'system';
|
||||
public $module_position = 'status';
|
||||
public $client_id = 1;
|
||||
public $install_type = 'install';
|
||||
public $show_message = true;
|
||||
public $autopublish = true;
|
||||
public $db = null;
|
||||
public $app = null;
|
||||
public $installedVersion;
|
||||
|
||||
public function __construct(&$params)
|
||||
{
|
||||
$this->extname = $this->extname ?: $this->alias;
|
||||
$this->db = Factory::getDbo();
|
||||
$this->app = Factory::getApplication();
|
||||
$this->installedVersion = $this->getVersion($this->getInstalledXMLFile());
|
||||
}
|
||||
|
||||
/**
|
||||
* Preflight event
|
||||
*
|
||||
* @param string
|
||||
* @param JAdapterInstance
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function preflight($route, $adapter)
|
||||
{
|
||||
if (!in_array($route, array('install', 'update')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Factory::getLanguage()->load('plg_system_novaraininstaller', JPATH_PLUGINS . '/system/novaraininstaller');
|
||||
|
||||
if ($this->show_message && $this->isInstalled())
|
||||
{
|
||||
$this->install_type = 'update';
|
||||
}
|
||||
|
||||
if ($this->onBeforeInstall() === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Preflight event
|
||||
*
|
||||
* @param string
|
||||
* @param JAdapterInstance
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function postflight($route, $adapter)
|
||||
{
|
||||
Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, $this->getMainFolder());
|
||||
|
||||
if (!in_array($route, array('install', 'update')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->onAfterInstall() === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($route == 'install' && $this->autopublish)
|
||||
{
|
||||
$this->publishExtension();
|
||||
}
|
||||
|
||||
if ($this->show_message)
|
||||
{
|
||||
$this->addInstalledMessage();
|
||||
}
|
||||
|
||||
Factory::getCache()->clean('com_plugins');
|
||||
Factory::getCache()->clean('_system');
|
||||
}
|
||||
|
||||
public function isInstalled()
|
||||
{
|
||||
if (!is_file($this->getInstalledXMLFile()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$query = $this->db->getQuery(true)
|
||||
->select('extension_id')
|
||||
->from('#__extensions')
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote($this->extension_type))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName()));
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$result = $this->db->loadResult();
|
||||
|
||||
return empty($result) ? false : true;
|
||||
}
|
||||
|
||||
public function getMainFolder()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin' :
|
||||
return JPATH_SITE . '/plugins/' . $this->plugin_folder . '/' . $this->extname;
|
||||
|
||||
case 'component' :
|
||||
return JPATH_ADMINISTRATOR . '/components/com_' . $this->extname;
|
||||
|
||||
case 'module' :
|
||||
return JPATH_ADMINISTRATOR . '/modules/mod_' . $this->extname;
|
||||
|
||||
case 'library' :
|
||||
return JPATH_SITE . '/libraries/' . $this->extname;
|
||||
}
|
||||
}
|
||||
|
||||
public function getInstalledXMLFile()
|
||||
{
|
||||
return $this->getXMLFile($this->getMainFolder());
|
||||
}
|
||||
|
||||
public function getCurrentXMLFile()
|
||||
{
|
||||
return $this->getXMLFile(__DIR__);
|
||||
}
|
||||
|
||||
public function getXMLFile($folder)
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'module' :
|
||||
return $folder . '/mod_' . $this->extname . '.xml';
|
||||
default :
|
||||
return $folder . '/' . $this->extname . '.xml';
|
||||
}
|
||||
}
|
||||
|
||||
public function foldersExist($folders = array())
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
if (is_dir($folder))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function publishExtension()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin' :
|
||||
$this->publishPlugin();
|
||||
|
||||
case 'module' :
|
||||
$this->publishModule();
|
||||
}
|
||||
}
|
||||
|
||||
public function publishPlugin()
|
||||
{
|
||||
$query = $this->db->getQuery(true)
|
||||
->update('#__extensions')
|
||||
->set($this->db->quoteName('enabled') . ' = 1')
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->extname))
|
||||
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($this->plugin_folder));
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
|
||||
public function publishModule()
|
||||
{
|
||||
// Get module id
|
||||
$query = $this->db->getQuery(true)
|
||||
->select('id')
|
||||
->from('#__modules')
|
||||
->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname))
|
||||
->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id);
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$id = $this->db->loadResult();
|
||||
|
||||
if (!$id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// check if module is already in the modules_menu table (meaning is is already saved)
|
||||
$query->clear()
|
||||
->select('moduleid')
|
||||
->from('#__modules_menu')
|
||||
->where($this->db->quoteName('moduleid') . ' = ' . (int) $id);
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$exists = $this->db->loadResult();
|
||||
|
||||
if ($exists)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get highest ordering number in position
|
||||
$query->clear()
|
||||
->select('ordering')
|
||||
->from('#__modules')
|
||||
->where($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
|
||||
->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id)
|
||||
->order('ordering DESC');
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$ordering = $this->db->loadResult();
|
||||
$ordering++;
|
||||
|
||||
// publish module and set ordering number
|
||||
$query->clear()
|
||||
->update('#__modules')
|
||||
->set($this->db->quoteName('published') . ' = 1')
|
||||
->set($this->db->quoteName('ordering') . ' = ' . (int) $ordering)
|
||||
->set($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
|
||||
->where($this->db->quoteName('id') . ' = ' . (int) $id);
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
|
||||
// add module to the modules_menu table
|
||||
$query->clear()
|
||||
->insert('#__modules_menu')
|
||||
->columns(array($this->db->quoteName('moduleid'), $this->db->quoteName('menuid')))
|
||||
->values((int) $id . ', 0');
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
|
||||
public function addInstalledMessage()
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
Text::sprintf(
|
||||
Text::_($this->install_type == 'update' ? 'NRI_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' : 'NRI_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY'),
|
||||
'<strong>' . Text::_($this->name) . '</strong>',
|
||||
'<strong>' . $this->getVersion() . '</strong>',
|
||||
$this->getFullType()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getPrefix()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin';
|
||||
return Text::_('plg_' . strtolower($this->plugin_folder));
|
||||
|
||||
case 'component':
|
||||
return Text::_('com');
|
||||
|
||||
case 'module':
|
||||
return Text::_('mod');
|
||||
|
||||
case 'library':
|
||||
return Text::_('lib');
|
||||
|
||||
default:
|
||||
return $this->extension_type;
|
||||
}
|
||||
}
|
||||
|
||||
public function getElementName($type = null, $extname = null)
|
||||
{
|
||||
$type = is_null($type) ? $this->extension_type : $type;
|
||||
$extname = is_null($extname) ? $this->extname : $extname;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'component' :
|
||||
return 'com_' . $extname;
|
||||
|
||||
case 'module' :
|
||||
return 'mod_' . $extname;
|
||||
|
||||
case 'plugin' :
|
||||
default:
|
||||
return $extname;
|
||||
}
|
||||
}
|
||||
|
||||
public function getFullType()
|
||||
{
|
||||
return Text::_('NRI_' . strtoupper($this->getPrefix()));
|
||||
}
|
||||
|
||||
public function isPro()
|
||||
{
|
||||
$versionFile = __DIR__ . "/version.php";
|
||||
|
||||
// If version file does not exist we assume a PRO version
|
||||
if (!is_file($versionFile))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Load version file
|
||||
require_once $versionFile;
|
||||
return (bool) $NR_PRO;
|
||||
}
|
||||
|
||||
public function getVersion($file = '')
|
||||
{
|
||||
$file = $file ?: $this->getCurrentXMLFile();
|
||||
|
||||
if (!is_file($file))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$xml = Installer::parseXMLInstallFile($file);
|
||||
|
||||
if (!$xml || !isset($xml['version']))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return $xml['version'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks wether the extension can be installed or not
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canInstall()
|
||||
{
|
||||
// The extension is not installed yet. Accept Install.
|
||||
if (!$installed_version = $this->getVersion($this->getInstalledXMLFile()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Path to extension's version file
|
||||
$versionFile = $this->getMainFolder() . "/version.php";
|
||||
$NR_PRO = true;
|
||||
|
||||
// If version file does not exist we assume we have a PRO version installed
|
||||
if (file_exists($versionFile))
|
||||
{
|
||||
require_once($versionFile);
|
||||
}
|
||||
|
||||
// The free version is installed. Accept install.
|
||||
if (!(bool)$NR_PRO)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Current package is a PRO version. Accept install.
|
||||
if ($this->isPro())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// User is trying to update from PRO version to FREE. Do not accept install.
|
||||
Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, __DIR__);
|
||||
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
Text::_('NRI_ERROR_PRO_TO_FREE'), 'error'
|
||||
);
|
||||
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
html_entity_decode(
|
||||
Text::sprintf(
|
||||
'NRI_ERROR_UNINSTALL_FIRST',
|
||||
'<a href="http://www.tassos.gr/joomla-extensions/' . $this->getUrlAlias() . '" target="_blank">',
|
||||
'</a>',
|
||||
Text::_($this->name)
|
||||
)
|
||||
), 'error'
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL alias of the extension.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getUrlAlias()
|
||||
{
|
||||
$alias = $this->alias;
|
||||
|
||||
switch ($alias)
|
||||
{
|
||||
case 'smilepack':
|
||||
$alias = 'smile-pack';
|
||||
break;
|
||||
case 'convertforms':
|
||||
$alias = 'convert-forms';
|
||||
break;
|
||||
case 'rstbox':
|
||||
$alias = 'engagebox';
|
||||
break;
|
||||
case 'gsd':
|
||||
$alias = 'google-structured-data';
|
||||
break;
|
||||
}
|
||||
|
||||
// ACF
|
||||
if ($this->plugin_folder === 'fields' && ($alias === 'acf' || $this->startsWith($alias, 'acf')))
|
||||
{
|
||||
$alias = 'advanced-custom-fields';
|
||||
}
|
||||
|
||||
return $alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether string starts with substring.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $query
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function startsWith($string, $query)
|
||||
{
|
||||
return substr($string, 0, strlen($query)) === $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if current version is newer than the installed one
|
||||
* Used for Novarain Framework
|
||||
*
|
||||
* @return boolean [description]
|
||||
*/
|
||||
public function isNewer()
|
||||
{
|
||||
if (!$installed_version = $this->getVersion($this->getInstalledXMLFile()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$package_version = $this->getVersion();
|
||||
|
||||
return version_compare($installed_version, $package_version, '<=');
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method triggered before installation
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function onBeforeInstall()
|
||||
{
|
||||
if (!$this->canInstall())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method triggered after installation
|
||||
*/
|
||||
public function onAfterInstall()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete files
|
||||
*
|
||||
* @param array $folders
|
||||
*/
|
||||
public function deleteFiles($files = array())
|
||||
{
|
||||
foreach ($files as $key => $file)
|
||||
{
|
||||
if (!is_file($file))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
File::delete($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes folders
|
||||
*
|
||||
* @param array $folders
|
||||
*/
|
||||
public function deleteFolders($folders = array())
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
if (!is_dir($folder))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Folder::delete($folder);
|
||||
}
|
||||
}
|
||||
|
||||
public function dropIndex($table, $index)
|
||||
{
|
||||
$db = $this->db;
|
||||
|
||||
// Check if index exists first
|
||||
$query = 'SHOW INDEX FROM ' . $db->quoteName('#__' . $table) . ' WHERE KEY_NAME = ' . $db->quote($index);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
if (!$db->loadResult())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove index
|
||||
$query = 'ALTER TABLE ' . $db->quoteName('#__' . $table) . ' DROP INDEX ' . $db->quoteName($index);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
public function dropUnwantedTables($tables) {
|
||||
|
||||
if (!$tables) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($tables as $table) {
|
||||
$query = "DROP TABLE IF EXISTS #__".$this->db->escape($table);
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
public function dropUnwantedColumns($table, $columns) {
|
||||
|
||||
if (!$columns || !$table) {
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
|
||||
// Check if columns exists in database
|
||||
function qt($n) {
|
||||
return(Factory::getDBO()->quote($n));
|
||||
}
|
||||
|
||||
$query = 'SHOW COLUMNS FROM #__'.$table.' WHERE Field IN ('.implode(",", array_map("qt", $columns)).')';
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadColumn(0);
|
||||
|
||||
// Abort if we don't have any rows
|
||||
if (!$rows) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's remove the columns
|
||||
$q = "";
|
||||
foreach ($rows as $key => $column) {
|
||||
$comma = (($key+1) < count($rows)) ? "," : "";
|
||||
$q .= "drop ".$this->db->escape($column).$comma;
|
||||
}
|
||||
|
||||
$query = "alter table #__".$table." $q";
|
||||
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
public function fetch($table, $columns = "*", $where = null, $singlerow = false) {
|
||||
if (!$table) {
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query
|
||||
->select($columns)
|
||||
->from("#__$table");
|
||||
|
||||
if (isset($where)) {
|
||||
$query->where("$where");
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
return ($singlerow) ? $db->loadObject() : $db->loadObjectList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Novarain Framework
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function loadFramework()
|
||||
{
|
||||
if (is_file(JPATH_PLUGINS . '/system/nrframework/autoload.php'))
|
||||
{
|
||||
include_once JPATH_PLUGINS . '/system/nrframework/autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-orders plugin after passed array of plugins
|
||||
*
|
||||
* @param string $plugin Plugin element name
|
||||
* @param array $lowerPluginOrder Array of plugin element names
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function pluginOrderAfter($lowerPluginOrder)
|
||||
{
|
||||
|
||||
if (!is_array($lowerPluginOrder) || !count($lowerPluginOrder))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
|
||||
// Get plugins max order
|
||||
$query = $db->getQuery(true);
|
||||
$query
|
||||
->select($db->quoteName('b.ordering'))
|
||||
->from($db->quoteName('#__extensions', 'b'))
|
||||
->where($db->quoteName('b.element') . ' IN ("'.implode("\",\"",$lowerPluginOrder).'")')
|
||||
->order('b.ordering desc');
|
||||
|
||||
$db->setQuery($query);
|
||||
$maxOrder = $db->loadResult();
|
||||
|
||||
if (is_null($maxOrder))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get plugin details
|
||||
$query
|
||||
->clear()
|
||||
->select(array($db->quoteName('extension_id'), $db->quoteName('ordering')))
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote($this->alias));
|
||||
|
||||
$db->setQuery($query);
|
||||
$pluginInfo = $db->loadObject();
|
||||
|
||||
if (!isset($pluginInfo->ordering) || $pluginInfo->ordering > $maxOrder)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the new plugin order
|
||||
$object = new stdClass();
|
||||
$object->extension_id = $pluginInfo->extension_id;
|
||||
$object->ordering = ($maxOrder + 1);
|
||||
|
||||
try {
|
||||
$db->updateObject('#__extensions', $object, 'extension_id');
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
23
plugins/fields/acfupload/script.install.php
Normal file
23
plugins/fields/acfupload/script.install.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once __DIR__ . '/script.install.helper.php';
|
||||
|
||||
class PlgFieldsACFUploadInstallerScript extends PlgFieldsACFUploadInstallerScriptHelper
|
||||
{
|
||||
public $alias = 'acfupload';
|
||||
public $extension_type = 'plugin';
|
||||
public $plugin_folder = "fields";
|
||||
public $show_message = false;
|
||||
}
|
||||
141
plugins/fields/acfupload/tmpl/acfupload.php
Normal file
141
plugins/fields/acfupload/tmpl/acfupload.php
Normal file
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$value = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
require_once JPATH_SITE . '/plugins/fields/acfupload/fields/uploadhelper.php';
|
||||
|
||||
$limit_files = (int) $fieldParams->get('limit_files');
|
||||
|
||||
/**
|
||||
* This handles backwards compatibility
|
||||
*/
|
||||
$files = is_string($value) ? json_decode($value, true) ?? [['value' => $value]] : $value;
|
||||
|
||||
// Handle single file
|
||||
if ($limit_files === 1 && is_array($files))
|
||||
{
|
||||
if (isset($files['value']))
|
||||
{
|
||||
$files = [$files];
|
||||
}
|
||||
|
||||
$files = [reset($files)];
|
||||
}
|
||||
|
||||
$layout = $fieldParams->get('layout', 'link');
|
||||
$buffer = [];
|
||||
$total_files = count($files);
|
||||
|
||||
$index = 1;
|
||||
foreach ($files as $value)
|
||||
{
|
||||
// Make sure we have a value
|
||||
if (!$value)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$file = isset($value['value']) ? $value['value'] : $value;
|
||||
$title = isset($value['title']) && !empty($value['title']) ? $value['title'] : '';
|
||||
$description = isset($value['description']) && !empty($value['description']) ? html_entity_decode(urldecode($value['description'])) : '';
|
||||
|
||||
$file_url = ACFUploadHelper::absURL($file);
|
||||
|
||||
switch ($layout)
|
||||
{
|
||||
// Image
|
||||
case 'img':
|
||||
$item = '<img src="' . $file_url . '"/>';
|
||||
break;
|
||||
|
||||
// Custom Layout
|
||||
case 'custom':
|
||||
if (!$subject = $fieldParams->get('custom_layout'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the prefix "acf." to any "{file.*}" Smart Tags found
|
||||
$new_format = 'acf.file.';
|
||||
$subject = preg_replace('/{file\.([^}]*)}/', '{'.$new_format.'$1}', $subject);
|
||||
|
||||
$file_full_path = JPATH_SITE . '/' . $file;
|
||||
$exists = is_file($file_full_path);
|
||||
|
||||
// Always use framework's pathinfo to fight issues with non latin characters.
|
||||
$filePathInfo = NRFramework\File::pathinfo($file);
|
||||
|
||||
$st = new \NRFramework\SmartTags();
|
||||
|
||||
$file_tags = [
|
||||
'index' => $index,
|
||||
'total' => $total_files,
|
||||
'name' => $filePathInfo['basename'],
|
||||
'basename' => $filePathInfo['basename'],
|
||||
'filename' => $filePathInfo['filename'],
|
||||
'ext' => $filePathInfo['extension'],
|
||||
'extension' => $filePathInfo['extension'],
|
||||
'path' => $file,
|
||||
'url' => $file_url,
|
||||
'size' => $exists ? ACFUploadHelper::humanFilesize(filesize($file_full_path)) : 0,
|
||||
'title' => $title,
|
||||
'description' => nl2br($description)
|
||||
];
|
||||
$st->add($file_tags, 'acf.file.');
|
||||
|
||||
$item = $st->replace($subject);
|
||||
|
||||
break;
|
||||
|
||||
// Link
|
||||
default:
|
||||
$item = '<a href="' . $file_url . '"';
|
||||
|
||||
if ($fieldParams->get('force_download', true))
|
||||
{
|
||||
$item .= ' download';
|
||||
}
|
||||
|
||||
$link_text = $fieldParams->get('link_text', $file);
|
||||
|
||||
$st = new \NRFramework\SmartTags();
|
||||
|
||||
// Always use framework's pathinfo to fight issues with non latin characters.
|
||||
$filePathInfo = NRFramework\File::pathinfo($file);
|
||||
|
||||
$file_tags = [
|
||||
'index' => $index,
|
||||
'total' => $total_files,
|
||||
'basename' => $filePathInfo['basename'],
|
||||
'filename' => $filePathInfo['filename'],
|
||||
'extension' => $filePathInfo['extension'],
|
||||
'title' => $title,
|
||||
'description' => nl2br($description)
|
||||
];
|
||||
$st->add($file_tags, 'acf.file.');
|
||||
|
||||
$item .= '>' . $st->replace($link_text) . '</a>';
|
||||
break;
|
||||
}
|
||||
|
||||
$buffer[] = $layout === 'custom' ? $item : '<span class="acfup-item">' . $item . '</span>';
|
||||
|
||||
$index++;
|
||||
}
|
||||
|
||||
echo implode('', $buffer);
|
||||
16
plugins/fields/acfupload/version.php
Normal file
16
plugins/fields/acfupload/version.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted Access');
|
||||
$NR_PRO = "1";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user