first commit
This commit is contained in:
14
plugins/format_chooser/config/config.php
Normal file
14
plugins/format_chooser/config/config.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
# File formats that allow to be resized/reformatted
|
||||
$format_chooser_input_formats = array('TIF', 'TIFF', 'JPG', 'JPEG', 'PNG', 'GIF', 'BMP', 'PSD');
|
||||
# Available output formats
|
||||
$format_chooser_output_formats = array('JPG', 'TIF', 'PNG');
|
||||
# If no default output is chosen, the format of the resource is the default -- however, if the
|
||||
# format is not part of the specified output formats, the first output format will be chosen instead
|
||||
#$format_chooser_default_output_format = 'JPG';
|
||||
|
||||
# If non-empty allows you to change the color profile used for the download files
|
||||
# The empty string will be replaced with "remove profile", IOW you can disallow removing profiles.
|
||||
/*$format_chooser_profiles = array('' => '',
|
||||
'RGB' => 'iccprofiles/sRGB_IEC61966-2-1_black_scaled.icc',
|
||||
'CMYK' => 'iccprofiles/ISOcoated_v2_bas.icc');*/
|
9
plugins/format_chooser/format_chooser.yaml
Normal file
9
plugins/format_chooser/format_chooser.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
name : format_chooser
|
||||
title : Format Chooser
|
||||
author : Axel Dörfler
|
||||
version : 1.0
|
||||
desc : Allows you to choose different formats when downloading files which are generated on the fly.
|
||||
icon : fa fa-file-image
|
||||
config_url: /plugins/format_chooser/pages/setup.php
|
||||
category: Asset processing
|
||||
info_url: https://www.resourcespace.com/knowledge-base/plugins/format-chooser
|
207
plugins/format_chooser/hooks/all.php
Normal file
207
plugins/format_chooser/hooks/all.php
Normal file
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
|
||||
include_once __DIR__ . "/../include/utility.php";
|
||||
|
||||
function HookFormat_chooserAllGetdownloadurl($ref, $size, $ext, $page = 1, $alternative = -1, $usage = -1, $usagecomment = "")
|
||||
{
|
||||
global $baseurl_short,$imagemagick_preserve_profiles, $format_chooser_input_formats, $format_chooser_output_formats, $k;
|
||||
|
||||
// Check whether download file extension matches
|
||||
if(!in_array(strtoupper($ext),$format_chooser_output_formats))
|
||||
{return false;}
|
||||
|
||||
$url_qs = [
|
||||
'ref' => $ref,
|
||||
'size' => $size,
|
||||
'k' => $k,
|
||||
'ext' => $ext,
|
||||
'page' => $page,
|
||||
'alt' => $alternative,
|
||||
'usage' => $usage,
|
||||
'usagecomment' => $usagecomment,
|
||||
];
|
||||
$resource_data = get_resource_data($ref);
|
||||
|
||||
// Check whether original resource file extension matches
|
||||
$original_ext = $resource_data['file_extension'] ?? '';
|
||||
if(!in_array(strtoupper($original_ext),$format_chooser_input_formats))
|
||||
{return false;}
|
||||
|
||||
$profile = getval('profile' , null);
|
||||
if (!empty($profile)) {
|
||||
$url_qs['profile'] = $profile;
|
||||
} else {
|
||||
$path = get_resource_path($ref, true, $size, false, $ext, -1, $page, $size=="scr" && checkperm("w") && $alternative == -1, '', $alternative);
|
||||
// We can use the existing previews unless we need to preserve the colour profiles,
|
||||
// these are likely to have been removed from scr size and below.
|
||||
// Alternative files not being converted can also use the existing file
|
||||
if (
|
||||
file_exists($path)
|
||||
&& (
|
||||
!$imagemagick_preserve_profiles
|
||||
|| in_array($size, array("hpr", "lpr", ""))
|
||||
|| $alternative !== -1
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return generateURL($baseurl_short . 'plugins/format_chooser/pages/convert.php', $url_qs);
|
||||
}
|
||||
|
||||
// Following moved from collection_download to work for offline jobs
|
||||
|
||||
function HookFormat_chooserAllReplaceuseoriginal()
|
||||
{
|
||||
global $format_chooser_output_formats, $format_chooser_profiles, $lang, $use_zip_extension, $collection_download_tar, $collection_download_tar_option;
|
||||
|
||||
$disabled = '';
|
||||
$submitted = getval('submitted', null);
|
||||
if (!empty($submitted) || $collection_download_tar_option) {
|
||||
$disabled = ' disabled="disabled "';
|
||||
}
|
||||
$context = getval("ajax", '') !== "" ? "Modal" : "CentralSpace";
|
||||
# Replace the existing ajax_download() with our own that disables our widgets, too
|
||||
if ($use_zip_extension) {
|
||||
?><script>
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#tardownload').on('change', function(){
|
||||
if (this.value == 'off') {
|
||||
jQuery('#<?php echo escape($context); ?>_question_downloadformat').slideDown();
|
||||
jQuery('#<?php echo escape($context); ?>_downloadformat').prop('disabled', false);
|
||||
jQuery('#<?php echo escape($context); ?>_question_downloadprofile').slideDown();
|
||||
jQuery('#<?php echo escape($context); ?>_downloadprofile').prop('disabled', false);
|
||||
} else {
|
||||
jQuery('#<?php echo escape($context); ?>_question_downloadformat').slideUp();
|
||||
jQuery('#<?php echo escape($context); ?>_downloadformat').prop('disabled', 'disabled');
|
||||
jQuery('#<?php echo escape($context); ?>_question_downloadprofile').slideUp();
|
||||
jQuery('#<?php echo escape($context); ?>_downloadprofile').prop('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script><?php
|
||||
}
|
||||
|
||||
?><div class="Question" id="<?php echo escape($context); ?>_question_downloadformat">
|
||||
<input type=hidden name="useoriginal" value="yes" />
|
||||
<label for="<?php echo escape($context); ?>_downloadformat"><?php echo escape($lang["downloadformat"]); ?></label>
|
||||
<select name="ext" class="stdwidth" id="<?php echo escape($context); ?>_downloadformat" <?php echo $disabled ?>>
|
||||
<option value="" selected="selected"><?php echo escape($lang['format_chooser_keep_format']); ?></option>
|
||||
<?php
|
||||
foreach ($format_chooser_output_formats as $format)
|
||||
{
|
||||
?><option value="<?php echo $format ?>"><?php echo str_replace_formatted_placeholder("%extension", $format, $lang["field-fileextension"]) ?></option><?php
|
||||
}
|
||||
?></select>
|
||||
<div class="clearerleft"> </div></div><?php
|
||||
if (!empty($format_chooser_profiles))
|
||||
{
|
||||
?>
|
||||
<div class="Question" id="<?php echo escape($context); ?>_question_downloadprofile">
|
||||
<label for="profile"><?php echo escape($lang['format_chooser_choose_profile']); ?></label>
|
||||
<?php showProfileChooser('stdwidth', $disabled, $context) ?>
|
||||
<div class="clearerleft"> </div></div><?php
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function HookFormat_chooserAllSize_is_available($resource, $path, $size)
|
||||
{
|
||||
if (!supportsInputFormat($resource['file_extension']))
|
||||
{
|
||||
# Let the caller decide whether the file is available
|
||||
return false;
|
||||
}
|
||||
|
||||
$sizes = get_all_image_sizes();
|
||||
|
||||
# Filter out the largest one
|
||||
$maxSize = null;
|
||||
$maxWidth = 0;
|
||||
for ($n = 0; $n < count($sizes); $n++)
|
||||
{
|
||||
if ($maxWidth < (int)$sizes[$n]['width'])
|
||||
{
|
||||
$maxWidth = (int)$sizes[$n]['width'];
|
||||
$maxSize = $sizes[$n]['id'];
|
||||
}
|
||||
}
|
||||
return $size!=$maxSize;
|
||||
}
|
||||
|
||||
function HookFormat_chooserAllReplacedownloadextension($resource, $extension)
|
||||
{
|
||||
global $format_chooser_output_formats, $job_ext, $offline_job_in_progress;
|
||||
|
||||
$inputFormat = $resource['file_extension'];
|
||||
if (
|
||||
!supportsInputFormat($inputFormat)
|
||||
|| (!isset($job_ext) && $offline_job_in_progress)
|
||||
) {
|
||||
# Download the original file for this resource
|
||||
return $inputFormat;
|
||||
}
|
||||
|
||||
$reqext = (isset($job_ext) && $job_ext != "") ? $job_ext : getval("ext",getDefaultOutputFormat($inputFormat));
|
||||
$ext = strtoupper($reqext);
|
||||
if (empty($ext) || !in_array($ext, $format_chooser_output_formats))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return strtolower($ext);
|
||||
}
|
||||
|
||||
function HookFormat_chooserAllReplacedownloadfile($resource, $size, $ext,
|
||||
$fileExists)
|
||||
{
|
||||
|
||||
$original_resource_path = get_resource_path($resource['ref'], true, '', false, $resource['file_extension'], -1, 1, false, '', -1);
|
||||
|
||||
if (!supportsInputFormat($resource['file_extension']) || !file_exists($original_resource_path))
|
||||
{
|
||||
# Do not replace files we do not support and skip files that do not have an original file
|
||||
return false;
|
||||
}
|
||||
|
||||
$profile = getProfileFileName(getval('profile', null));
|
||||
if ($profile === null && $fileExists)
|
||||
{
|
||||
# Just serve the original file
|
||||
return false;
|
||||
}
|
||||
|
||||
$baseDirectory = get_temp_dir() . '/format_chooser';
|
||||
|
||||
if (!file_exists($baseDirectory))
|
||||
{
|
||||
mkdir($baseDirectory);
|
||||
}
|
||||
|
||||
$target = $baseDirectory . '/' . get_download_filename($resource['ref'],$size,-1,$ext);
|
||||
$format = getImageFormat($size);
|
||||
$width = (int)$format['width'];
|
||||
$height = (int)$format['height'];
|
||||
|
||||
set_time_limit(0);
|
||||
convertImage($resource, 1, -1, $target, $width, $height, $profile);
|
||||
if (!file_exists($target)) {
|
||||
return false;
|
||||
}
|
||||
return $target;
|
||||
}
|
||||
|
||||
function HookFormat_chooserAllCollection_download_modify_job($job_data=array())
|
||||
{
|
||||
$profile = getval("profile","");
|
||||
$ext = getval("ext","");
|
||||
if (trim($profile) !== "" || trim($ext) !== "") {
|
||||
// Add requested extension to offline job data
|
||||
$job_data["ext"] = $ext;
|
||||
$job_data["profile"] = $profile;
|
||||
return $job_data;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
190
plugins/format_chooser/hooks/view.php
Normal file
190
plugins/format_chooser/hooks/view.php
Normal file
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
function HookFormat_chooserViewAppend_to_download_filename_td(array $resource, string $ns)
|
||||
{
|
||||
if (failed_format_chooser_checks($resource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// IMPORTANT: the namespace variables (i.e. "ns") exist in both PHP and JS worlds and are generated
|
||||
// by render_resource_tools_size_download_options() which are then relied upon on the view page.
|
||||
?>
|
||||
<select id="<?php echo escape($ns); ?>format"><?php
|
||||
foreach ($GLOBALS['format_chooser_output_formats'] as $format) {
|
||||
echo render_dropdown_option(
|
||||
$format,
|
||||
str_replace_formatted_placeholder('%extension', $format, $GLOBALS['lang']['field-fileextension']),
|
||||
[],
|
||||
$format === getDefaultOutputFormat($resource['file_extension']) ? 'selected' : ''
|
||||
);
|
||||
}
|
||||
?></select>
|
||||
<?php
|
||||
showProfileChooser('', false, $ns);
|
||||
}
|
||||
|
||||
function HookFormat_chooserViewAppend_to_resource_tools_size_download_options_script(string $ns, array $allowed_sizes, array $resource)
|
||||
{
|
||||
if (failed_format_chooser_checks($resource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// IMPORTANT: Directly within Javascript world on the view page (via render_resource_tools_size_download_options())!
|
||||
|
||||
if (count($allowed_sizes) > 1) {
|
||||
// Size selector available
|
||||
?>
|
||||
jQuery('select#<?php echo escape($ns); ?>format').change(function() {
|
||||
const picker = jQuery('select#<?php echo escape($ns); ?>size');
|
||||
updateDownloadLink('<?php echo escape($ns); ?>', picker.val(), picker);
|
||||
});
|
||||
jQuery('select#<?php echo escape($ns); ?>profile').change(function() {
|
||||
const picker = jQuery('select#<?php echo escape($ns); ?>size');
|
||||
updateDownloadLink('<?php echo escape($ns); ?>', picker.val(), picker);
|
||||
});
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
// If only one size is available, there's no "size" to select from so ensure functions get called correctly to
|
||||
// the context.
|
||||
$selected_size = $allowed_sizes[array_key_first($allowed_sizes)]['id'];
|
||||
?>
|
||||
jQuery('select#<?php echo escape($ns); ?>format').change(function() {
|
||||
updateDownloadLink(
|
||||
'<?php echo escape($ns); ?>',
|
||||
'<?php echo escape($selected_size); ?>',
|
||||
jQuery('.Picker #<?php echo escape($ns); ?>sizeInfo')
|
||||
);
|
||||
});
|
||||
jQuery('select#<?php echo escape($ns); ?>profile').change(function() {
|
||||
updateDownloadLink(
|
||||
'<?php echo escape($ns); ?>',
|
||||
'<?php echo escape($selected_size); ?>',
|
||||
jQuery('.Picker #<?php echo escape($ns); ?>sizeInfo')
|
||||
);
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
||||
function HookFormat_chooserViewAppend_to_updateDownloadLink_js(array $resource)
|
||||
{
|
||||
global $baseurl;
|
||||
|
||||
if (failed_format_chooser_checks($resource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
IMPORTANT: Directly within Javascript world on the view page!
|
||||
|
||||
The logic will modify the "downloadlink" URL and inject the users' selection (format & profile) required by the
|
||||
plugin.
|
||||
|
||||
Use cases and URL placement (href/onclick attributes):
|
||||
- Download progress (normal download) - onclick=directDownload()
|
||||
- Request resource - href -> leave alone, no action required
|
||||
- Terms and Download usage - href -> the URL of interest is inside the "url" query string param.
|
||||
*/
|
||||
?>
|
||||
console.debug('HookFormat_chooserViewAppend_to_updateDownloadLink_js specific logic ...');
|
||||
const format = jQuery('select#' + ns + 'format').find(":selected").val().toLowerCase();
|
||||
const profile = jQuery('select#' + ns + 'profile').find(":selected").val();
|
||||
console.debug('HookFormat_chooserViewAppend_to_updateDownloadLink_js: format = %o', format);
|
||||
console.debug('HookFormat_chooserViewAppend_to_updateDownloadLink_js: profile = %o', profile);
|
||||
|
||||
// Example (final) regex (simplified): /^directDownload\('(https\:\/\/localhost\S*)', this\)$/m
|
||||
const direct_dld_regex = new RegExp("^directDownload\\('(<?php echo preg_quote(parse_url($baseurl, PHP_URL_SCHEME)); ?>\\:\\\/\\\/<?php echo preg_quote(parse_url($baseurl, PHP_URL_HOST)); ?>\\S*)', this\\)$", 'm');
|
||||
const dld_btn_onclick = download_btn.attr('onclick');
|
||||
const dld_btn_href = download_btn.attr('href');
|
||||
|
||||
if (dld_btn_href === '#' && direct_dld_regex.test(dld_btn_onclick)) {
|
||||
const orig_url = direct_dld_regex.exec(dld_btn_onclick)[1];
|
||||
let format_chooser_modified = new URL(orig_url);
|
||||
format_chooser_modified.searchParams.set('ext', format);
|
||||
if (profile) {
|
||||
format_chooser_modified.searchParams.set('profile', profile);
|
||||
}
|
||||
download_btn.attr('onclick', dld_btn_onclick.replace(orig_url, format_chooser_modified.toString()));
|
||||
} else if (
|
||||
dld_btn_href.startsWith('<?php echo "{$baseurl}/pages/download_usage.php"; ?>')
|
||||
|| dld_btn_href.startsWith('<?php echo "{$baseurl}/pages/terms.php"; ?>')
|
||||
) {
|
||||
const orig_url = new URL(dld_btn_href);
|
||||
let format_chooser_modified = new URL(dld_btn_href);
|
||||
let inner_url = new URL(orig_url.searchParams.get('url'));
|
||||
inner_url.searchParams.set('ext', format);
|
||||
if (profile) {
|
||||
inner_url.searchParams.set('profile', profile);
|
||||
}
|
||||
format_chooser_modified.searchParams.set('url', inner_url.toString());
|
||||
download_btn.prop('href', dld_btn_href.replace(orig_url, format_chooser_modified.toString()));
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
function HookFormat_chooserViewModifySizesArray ($resource, $sizes) : array|false
|
||||
{
|
||||
global $format_chooser_input_formats;
|
||||
if (in_array($resource['file_extension'], $format_chooser_input_formats) && !failed_format_chooser_checks($resource)) {
|
||||
return get_image_sizes($resource['ref'],false,$resource['file_extension'],false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function HookFormat_chooserViewModifyAllowed_Sizes ($resource, $sizes) : array|false
|
||||
{
|
||||
if (failed_format_chooser_checks($resource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
global $lang, $ffmpeg_supported_extensions;
|
||||
|
||||
$original_size = get_original_imagesize($resource['ref'], get_resource_path($resource['ref'], true, '', true, $resource['file_extension']));
|
||||
$original_width = $original_size[1];
|
||||
$original_height = $original_size[2];
|
||||
|
||||
$sizes_info = get_all_image_sizes();
|
||||
$preview_sizes = [];
|
||||
foreach ($sizes_info as $size_info) {
|
||||
$preview_sizes[$size_info['id']] = ['width' => $size_info['width'], 'height' => $size_info['height']];
|
||||
}
|
||||
|
||||
foreach ($sizes as $id => $size_data) {
|
||||
// File has not been generated for this size already so it will be missing data on the dimensions
|
||||
if($size_data['width'] == 0 && $size_data['height'] == 0) {
|
||||
if ($preview_sizes[$id]['width'] >= $original_width && $preview_sizes[$id]['height'] >= $original_height) {
|
||||
$sizes[$id]['width'] = $original_width;
|
||||
$sizes[$id]['height'] = $original_height;
|
||||
} else {
|
||||
$widthsf = $preview_sizes[$id]['width'] / $original_width;
|
||||
$heightsf = $preview_sizes[$id]['height'] / $original_height;
|
||||
$scale_factor = min($widthsf, $heightsf);
|
||||
$sizes[$id]['width'] = round($original_width * $scale_factor);
|
||||
$sizes[$id]['height'] = round($original_height * $scale_factor);
|
||||
}
|
||||
$mp = compute_megapixel($sizes[$id]['width'], $sizes[$id]['height']);
|
||||
$sizes[$id]['html']['size_info'] = "<p>{$sizes[$id]['width']} × {$sizes[$id]['height']} " . escape($lang['pixels']) . " ({$mp} " . escape($lang['megapixel-short']) . ")</p>";
|
||||
|
||||
if (!isset($resource['extension']) || !in_array(strtolower($resource['extension']), $ffmpeg_supported_extensions)) {
|
||||
compute_dpi($sizes[$id]['width'], $sizes[$id]['height'], $dpi, $dpi_unit, $dpi_w, $dpi_h);
|
||||
$sizes[$id]['html']['size_info'] .= sprintf(
|
||||
'<p>%1$s %2$s × %3$s %2$s %4$s %5$s %6$s</p>',
|
||||
(int) $dpi_w,
|
||||
escape($dpi_unit),
|
||||
(int) $dpi_h,
|
||||
escape($lang['at-resolution']),
|
||||
(int) $dpi,
|
||||
escape($lang['ppi'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sizes;
|
||||
}
|
||||
|
||||
function HookFormat_chooserViewModifycheckifexists() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
242
plugins/format_chooser/include/utility.php
Normal file
242
plugins/format_chooser/include/utility.php
Normal file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
|
||||
use Montala\ResourceSpace\CommandPlaceholderArg;
|
||||
|
||||
include_once dirname(__DIR__, 3) . '/include/image_processing.php';
|
||||
|
||||
/**
|
||||
* Returns the default output file format to use given an optional input format.
|
||||
*/
|
||||
function getDefaultOutputFormat($inputFormat = null)
|
||||
{
|
||||
global $format_chooser_default_output_format, $format_chooser_output_formats;
|
||||
|
||||
if (!empty($format_chooser_default_output_format)) {
|
||||
return $format_chooser_default_output_format;
|
||||
}
|
||||
|
||||
$inputFormat = strtoupper((string) $inputFormat);
|
||||
|
||||
# Use resource format by default if none given
|
||||
if (empty($inputFormat) || !in_array($inputFormat, $format_chooser_output_formats))
|
||||
{
|
||||
if (in_array('JPG', $format_chooser_output_formats)) {
|
||||
return 'JPG';
|
||||
}
|
||||
return $format_chooser_output_formats[0];
|
||||
}
|
||||
|
||||
return $inputFormat;
|
||||
}
|
||||
|
||||
function supportsInputFormat($inputFormat)
|
||||
{
|
||||
global $format_chooser_input_formats;
|
||||
$inputFormat = strtoupper((string) $inputFormat);
|
||||
return in_array($inputFormat, $format_chooser_input_formats);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size record from the database specified by its ID.
|
||||
*/
|
||||
function getImageFormat($size)
|
||||
{
|
||||
if (empty($size)) {
|
||||
return array('width' => 0, 'height' => 0);
|
||||
}
|
||||
|
||||
$sizes = get_all_image_sizes();
|
||||
$found_idx = array_search($size, array_column($sizes, 'id'));
|
||||
if($found_idx === false)
|
||||
{
|
||||
die('Unknown size: "' . escape($size) . '"');
|
||||
}
|
||||
|
||||
return [
|
||||
'width' => $sizes[$found_idx]['width'],
|
||||
'height' => $sizes[$found_idx]['height'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the file of the given resource to the new target file with the specified size. The
|
||||
* target file format is determined from the suffix of the target file.
|
||||
* The original colorspace of the image is retained. If $width and $height are zero, the image
|
||||
* keeps its original size.
|
||||
*/
|
||||
function convertImage($resource, $page, $alternative, $target, $width, $height, $profile)
|
||||
{
|
||||
global $exiftool_write, $exiftool_write_option, $username, $scramble_key, $preview_no_flatten_extensions;
|
||||
|
||||
$requested_extension = $resource['file_extension'];
|
||||
# If downloading alternative file, lookup its file extension before preparing resource path as it may differ from the resource.
|
||||
if ($alternative > 0)
|
||||
{
|
||||
$alt_file = get_alternative_file($resource['ref'], $alternative);
|
||||
$requested_extension = $alt_file['file_extension'];
|
||||
}
|
||||
|
||||
$originalPath = get_resource_path($resource['ref'], true, '', false, $requested_extension, -1, $page, false, '', $alternative);
|
||||
|
||||
if($exiftool_write && $exiftool_write_option)
|
||||
{
|
||||
$randstring=md5(rand() . microtime());
|
||||
$target_temp_id = $resource['ref'] . "_" . md5($username . $randstring . $scramble_key);
|
||||
$path = write_metadata($originalPath, $resource['ref'], "format_chooser/" . $target_temp_id);
|
||||
//$temp_path for removal later to assure not removing original path
|
||||
$temp_path = get_temp_dir(false,"format_chooser/" . $resource['ref'] . "_" . md5($username . $randstring . $scramble_key));
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = $originalPath;
|
||||
}
|
||||
|
||||
$transform_actions = [
|
||||
'tfactions' => [],
|
||||
'resize' => ['width' => $width, 'height' => $height],
|
||||
'auto_orient' => null,
|
||||
];
|
||||
|
||||
|
||||
// Preserve transparency like background for conversion from eps files (transparency is not supported in jpg file type).
|
||||
if ($resource['file_extension'] == "eps")
|
||||
{
|
||||
$transform_actions['transparent'] = '';
|
||||
}
|
||||
|
||||
// Handle alpha/ matte channels
|
||||
$target_extension = pathinfo($target, PATHINFO_EXTENSION);
|
||||
if(!in_array(strtolower($target_extension), $preview_no_flatten_extensions))
|
||||
{
|
||||
$transform_actions['background'] = 'white';
|
||||
}
|
||||
|
||||
if($profile === '')
|
||||
{
|
||||
$transform_actions['profile'][] = ['strip' => true, 'path' => '*'];
|
||||
}
|
||||
elseif(!empty($profile))
|
||||
{
|
||||
// Find out if the image does already have a profile
|
||||
$identify = get_utility_path("im-identify");
|
||||
$info = run_command(
|
||||
"{$identify} -verbose path",
|
||||
false,
|
||||
[
|
||||
'path' => new CommandPlaceholderArg($path, 'is_valid_rs_path'),
|
||||
]
|
||||
);
|
||||
|
||||
$basePath = dirname(__FILE__, 4) . '/';
|
||||
if(preg_match("/Profile-icc:/", $info) != 1)
|
||||
{
|
||||
$transform_actions['profile'][] = ['strip' => false, 'path' => $basePath . 'iccprofiles/sRGB_IEC61966-2-1_black_scaled.icc'];
|
||||
}
|
||||
|
||||
$transform_actions['profile'][] = ['strip' => false, 'path' => $basePath . $profile];
|
||||
}
|
||||
|
||||
$transform_actions = array_merge($transform_actions, transform_apply_icc_profile($resource['ref'], $originalPath));
|
||||
|
||||
if (!transform_file($path, $target, $transform_actions)) {
|
||||
debug('Unable to transform file!');
|
||||
return false;
|
||||
}
|
||||
|
||||
//remove temp once completed
|
||||
if(isset($temp_path))
|
||||
{
|
||||
rcRmdir($temp_path);
|
||||
}
|
||||
}
|
||||
|
||||
function sendFile($filename, string $download_filename, $usage = -1, $usagecomment = "")
|
||||
{
|
||||
$suffix = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
|
||||
global $baseurl, $username, $scramble_key, $exiftool_write;
|
||||
|
||||
list($resource_ref, $download_key) = explode('_', pathinfo($filename, PATHINFO_FILENAME));
|
||||
$user_downloads_path = sprintf('%s/%s_%s.%s',
|
||||
get_temp_dir(false, 'user_downloads'),
|
||||
$resource_ref,
|
||||
md5($username . $download_key . $scramble_key),
|
||||
$suffix
|
||||
);
|
||||
copy($filename, $user_downloads_path);
|
||||
|
||||
$user_download_url = generateURL(
|
||||
$baseurl . '/pages/download.php',
|
||||
[
|
||||
'userfile' => pathinfo($filename, PATHINFO_BASENAME),
|
||||
'filename' => strip_extension($download_filename, false),
|
||||
'usage' => $usage,
|
||||
'usagecomment' => $usagecomment,
|
||||
'k' => getval('k', ''),
|
||||
'ref' => getval('ref', ''),
|
||||
'exif_write' => ($exiftool_write ? 'true' : '')
|
||||
]
|
||||
);
|
||||
redirect($user_download_url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show colour profile selector based on $format_chooser_profiles config
|
||||
*
|
||||
* @param string $class CSS class for select
|
||||
* @param string $disabledtext Text to disable and hide inputs
|
||||
* @param string $ns Select ID
|
||||
*
|
||||
*/
|
||||
function showProfileChooser(string $class = '', string $disabledtext = '', string $ns = ''): void
|
||||
{
|
||||
global $format_chooser_profiles, $lang;
|
||||
|
||||
if (empty($format_chooser_profiles)) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<select
|
||||
name="profile"
|
||||
id="<?php echo escape($ns); ?>_downloadprofile"
|
||||
<?php if (!empty($class)) {
|
||||
echo ' class="' . escape($class) . '"';
|
||||
}
|
||||
echo escape($disabledtext) ; ?>
|
||||
>
|
||||
<option value="" selected="selected"><?php echo escape($lang['format_chooser_keep_profile']); ?></option><?php
|
||||
$index = 0;
|
||||
foreach (array_keys($format_chooser_profiles) as $name) {
|
||||
if (empty($name)) {
|
||||
$name = $lang['format_chooser_remove_profile'];
|
||||
}
|
||||
?><option value="<?php echo $index++ ?>"><?php echo escape(i18n_get_translated($name)); ?></option><?php
|
||||
} ?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
|
||||
function getProfileFileName($profile)
|
||||
{
|
||||
global $format_chooser_profiles;
|
||||
|
||||
if ($profile !== null && !empty($format_chooser_profiles))
|
||||
{
|
||||
$profiles = array_values($format_chooser_profiles);
|
||||
return $profiles[intval($profile)];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to run determine if the plugin should take effect.
|
||||
* @param array $resource Resource data
|
||||
*/
|
||||
function failed_format_chooser_checks(array $resource): bool
|
||||
{
|
||||
return $resource['has_image'] !== RESOURCE_PREVIEWS_ALL
|
||||
|| !$GLOBALS['download_multisize']
|
||||
|| $GLOBALS['save_as']
|
||||
|| !supportsInputFormat($resource['file_extension'])
|
||||
|| !file_exists(get_resource_path($resource['ref'], true, '', false, $resource['file_extension']));
|
||||
}
|
18
plugins/format_chooser/languages/ar.php
Normal file
18
plugins/format_chooser/languages/ar.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='مُختار تنسيق الملفات';
|
||||
$lang["format_chooser_configuration"]='تكوين اختيار تنسيق الملفات';
|
||||
$lang["format_chooser_output_formats"]='تنسيقات الإخراج (أنواع الصور فقط)';
|
||||
$lang["format_chooser_input_formats"]='تنسيقات الإدخال (أنواع الصور فقط)';
|
||||
$lang["format_chooser_keep_format"]='لا تغير';
|
||||
$lang["format_chooser_original_size"]='الدقة الأصلية';
|
||||
$lang["format_chooser_choose_profile"]='اختر ملف الألوان المناسب';
|
||||
$lang["format_chooser_keep_profile"]='الحفاظ على الملف الشخصي';
|
||||
$lang["format_chooser_remove_profile"]='إزالة الملف الشخصي';
|
||||
$lang["downloadformat"]='تنسيق التحميل';
|
||||
$lang["are_available-2"]='سيتم تحويلها';
|
||||
$lang["are_available-1"]='سيتم تحويلها';
|
||||
$lang["are_available-0"]='سيتم تحويلها';
|
||||
$lang["plugin-format_chooser-title"]='محدد التنسيق';
|
||||
$lang["plugin-format_chooser-desc"]='يسمح لك باختيار تنسيقات مختلفة عند تنزيل الملفات التي يتم إنشاؤها في الحال.';
|
16
plugins/format_chooser/languages/bn.php
Normal file
16
plugins/format_chooser/languages/bn.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='ফরম্যাট নির্বাচনকারী';
|
||||
$lang["format_chooser_configuration"]='ফরম্যাট চয়নকারী কনফিগারেশন';
|
||||
$lang["format_chooser_output_formats"]='আউটপুট ফরম্যাট (শুধুমাত্র চিত্রের ধরন)';
|
||||
$lang["format_chooser_input_formats"]='ইনপুট ফরম্যাট (শুধুমাত্র চিত্রের ধরন)';
|
||||
$lang["format_chooser_keep_format"]='পরিবর্তন করবেন না';
|
||||
$lang["format_chooser_original_size"]='মূল রেজোলিউশন';
|
||||
$lang["format_chooser_choose_profile"]='রঙ প্রোফাইল নির্বাচন করুন';
|
||||
$lang["format_chooser_keep_profile"]='প্রোফাইল রাখুন';
|
||||
$lang["format_chooser_remove_profile"]='প্রোফাইল সরান';
|
||||
$lang["downloadformat"]='ডাউনলোড ফরম্যাট';
|
||||
$lang["are_available-2"]='রূপান্তরিত হবে';
|
||||
$lang["are_available-1"]='রূপান্তরিত হবে';
|
||||
$lang["are_available-0"]='রূপান্তরিত হবে';
|
18
plugins/format_chooser/languages/ca.php
Normal file
18
plugins/format_chooser/languages/ca.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Selector de format';
|
||||
$lang["format_chooser_configuration"]='Configuració del selector de format';
|
||||
$lang["format_chooser_output_formats"]='Formats de sortida (només tipus d\'imatge)';
|
||||
$lang["format_chooser_input_formats"]='Formats d\'entrada (només tipus d\'imatge)';
|
||||
$lang["format_chooser_keep_format"]='No canviïs';
|
||||
$lang["format_chooser_original_size"]='Resolució original';
|
||||
$lang["format_chooser_choose_profile"]='Tria el perfil de color';
|
||||
$lang["format_chooser_keep_profile"]='Mantenir perfil';
|
||||
$lang["format_chooser_remove_profile"]='Eliminar perfil';
|
||||
$lang["downloadformat"]='Format de descàrrega';
|
||||
$lang["are_available-2"]='serà convertit';
|
||||
$lang["are_available-1"]='serà convertit';
|
||||
$lang["are_available-0"]='serà convertit';
|
||||
$lang["plugin-format_chooser-title"]='Selector de format';
|
||||
$lang["plugin-format_chooser-desc"]='Et permet triar diferents formats quan descarregues fitxers que es generen al moment.';
|
18
plugins/format_chooser/languages/cs.php
Normal file
18
plugins/format_chooser/languages/cs.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Výběr formátu';
|
||||
$lang["format_chooser_configuration"]='Konfigurace výběru formátu';
|
||||
$lang["format_chooser_output_formats"]='Výstupní formáty (pouze typy obrázků)';
|
||||
$lang["format_chooser_input_formats"]='Vstupní formáty (pouze typy obrázků)';
|
||||
$lang["format_chooser_keep_format"]='Neměňte';
|
||||
$lang["format_chooser_original_size"]='Původní rozlišení';
|
||||
$lang["format_chooser_choose_profile"]='Vyberte barevný profil';
|
||||
$lang["format_chooser_keep_profile"]='Udržovat profil';
|
||||
$lang["format_chooser_remove_profile"]='Odstranit profil';
|
||||
$lang["downloadformat"]='Formát stahování';
|
||||
$lang["are_available-2"]='bude převedeno';
|
||||
$lang["are_available-1"]='bude převedeno';
|
||||
$lang["are_available-0"]='bude převedeno';
|
||||
$lang["plugin-format_chooser-title"]='Výběr formátu';
|
||||
$lang["plugin-format_chooser-desc"]='Umožňuje vám vybrat různé formáty při stahování souborů, které jsou generovány za běhu.';
|
16
plugins/format_chooser/languages/cy.php
Normal file
16
plugins/format_chooser/languages/cy.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Dewisydd fformat';
|
||||
$lang["format_chooser_configuration"]='Gosodiad dewis fformat';
|
||||
$lang["format_chooser_output_formats"]='Fformatau allbwn (Mathau delwedd yn unig)';
|
||||
$lang["format_chooser_input_formats"]='Fformatau mewnbwn (Mathau delwedd yn unig)';
|
||||
$lang["format_chooser_keep_format"]='Peidiwch â newid';
|
||||
$lang["format_chooser_original_size"]='Cyfeiriad gwreiddiol';
|
||||
$lang["format_chooser_choose_profile"]='Dewiswch broffil lliw';
|
||||
$lang["format_chooser_keep_profile"]='Cadwch broffil';
|
||||
$lang["format_chooser_remove_profile"]='Dileu proffil';
|
||||
$lang["downloadformat"]='Fformat lawrlwytho';
|
||||
$lang["are_available-2"]='bydd yn cael ei drosi';
|
||||
$lang["are_available-1"]='bydd yn cael ei drosi';
|
||||
$lang["are_available-0"]='bydd yn cael ei drosi';
|
18
plugins/format_chooser/languages/da.php
Normal file
18
plugins/format_chooser/languages/da.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Formatvælger';
|
||||
$lang["format_chooser_configuration"]='Konfiguration af formatvælgeren';
|
||||
$lang["format_chooser_output_formats"]='Outputformater (kun billedtyper)';
|
||||
$lang["format_chooser_input_formats"]='Indtastningsformater (kun billedtyper)';
|
||||
$lang["format_chooser_keep_format"]='Må ikke ændres';
|
||||
$lang["format_chooser_original_size"]='Original opløsning';
|
||||
$lang["format_chooser_choose_profile"]='Vælg farveprofil';
|
||||
$lang["format_chooser_keep_profile"]='Behold profil';
|
||||
$lang["format_chooser_remove_profile"]='Fjern profil';
|
||||
$lang["downloadformat"]='Downloadformat';
|
||||
$lang["are_available-2"]='vil blive konverteret';
|
||||
$lang["are_available-1"]='vil blive konverteret';
|
||||
$lang["are_available-0"]='vil blive konverteret';
|
||||
$lang["plugin-format_chooser-title"]='Formatvælger';
|
||||
$lang["plugin-format_chooser-desc"]='Giver dig mulighed for at vælge forskellige formater, når du downloader filer, som genereres med det samme.';
|
20
plugins/format_chooser/languages/de.php
Normal file
20
plugins/format_chooser/languages/de.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
# Deutsch
|
||||
|
||||
$lang['format_chooser'] = 'Formatauswahl';
|
||||
$lang['format_chooser_configuration'] = 'Konfiguration für die Formatauswahl';
|
||||
$lang['format_chooser_output_formats'] = 'Ausgabeformate';
|
||||
$lang['format_chooser_input_formats'] = 'Eingabeformate';
|
||||
$lang['format_chooser_keep_format'] = 'Nicht ändern';
|
||||
$lang['format_chooser_original_size'] = 'Originalauflösung';
|
||||
$lang['format_chooser_choose_profile'] = 'Farbprofil wählen';
|
||||
$lang['format_chooser_keep_profile'] = 'Profil behalten';
|
||||
$lang['format_chooser_remove_profile'] = 'Profil entfernen';
|
||||
$lang['downloadformat'] = 'Download-Format';
|
||||
|
||||
# Overwrite existing strings (we always download all files)
|
||||
$lang['are_available-0'] = $lang['are_available-2'] = 'werden konvertiert';
|
||||
$lang['are_available-1'] = 'wird konvertiert';
|
||||
|
||||
$lang["plugin-format_chooser-title"]='Format-Auswahl';
|
||||
$lang["plugin-format_chooser-desc"]='Ermöglicht es Ihnen, beim Herunterladen von Dateien verschiedene Formate auszuwählen, die dynamisch erstellt werden.';
|
18
plugins/format_chooser/languages/el.php
Normal file
18
plugins/format_chooser/languages/el.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Επιλογέας μορφής (Format chooser)';
|
||||
$lang["format_chooser_configuration"]='Διαμόρφωση επιλογέα μορφής';
|
||||
$lang["format_chooser_output_formats"]='Μορφές εξόδου (Μόνο τύποι εικόνων)';
|
||||
$lang["format_chooser_input_formats"]='Μορφές εισόδου (Μόνο τύποι εικόνων)';
|
||||
$lang["format_chooser_keep_format"]='Μην αλλάζετε';
|
||||
$lang["format_chooser_original_size"]='Αρχική ανάλυση';
|
||||
$lang["format_chooser_choose_profile"]='Επιλέξτε το προφίλ χρωμάτων';
|
||||
$lang["format_chooser_keep_profile"]='Διατηρήστε το προφίλ';
|
||||
$lang["format_chooser_remove_profile"]='Διαγραφή προφίλ';
|
||||
$lang["downloadformat"]='Μορφή λήψης';
|
||||
$lang["are_available-2"]='θα μετατραπεί';
|
||||
$lang["are_available-1"]='θα μετατραπεί';
|
||||
$lang["are_available-0"]='θα μετατραπεί';
|
||||
$lang["plugin-format_chooser-title"]='Επιλογέας Μορφής';
|
||||
$lang["plugin-format_chooser-desc"]='Σας επιτρέπει να επιλέξετε διαφορετικές μορφές κατά τη λήψη αρχείων που δημιουργούνται άμεσα.';
|
16
plugins/format_chooser/languages/en.php
Normal file
16
plugins/format_chooser/languages/en.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
# English
|
||||
|
||||
$lang['format_chooser'] = 'Format chooser';
|
||||
$lang['format_chooser_configuration'] = 'Format chooser configuration';
|
||||
$lang['format_chooser_output_formats'] = 'Output formats (Image types only)';
|
||||
$lang['format_chooser_input_formats'] = 'Input formats (Image types only)';
|
||||
$lang['format_chooser_keep_format'] = 'Do not change';
|
||||
$lang['format_chooser_original_size'] = 'Original resolution';
|
||||
$lang['format_chooser_choose_profile'] = 'Choose color profile';
|
||||
$lang['format_chooser_keep_profile'] = 'Keep profile';
|
||||
$lang['format_chooser_remove_profile'] = 'Remove profile';
|
||||
$lang['downloadformat'] = 'Download format';
|
||||
|
||||
# Overwrite existing strings (we always download all files)
|
||||
$lang['are_available-0'] = $lang['are_available-1'] = $lang['are_available-2'] = 'will be converted';
|
18
plugins/format_chooser/languages/es-AR.php
Normal file
18
plugins/format_chooser/languages/es-AR.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Selector de formato';
|
||||
$lang["format_chooser_configuration"]='Configuración del selector de formato';
|
||||
$lang["format_chooser_output_formats"]='Formatos de salida (solo tipos de imagen)';
|
||||
$lang["format_chooser_input_formats"]='Formatos de entrada (solo tipos de imagen)';
|
||||
$lang["format_chooser_keep_format"]='No cambiar';
|
||||
$lang["format_chooser_original_size"]='Resolución original';
|
||||
$lang["format_chooser_choose_profile"]='Seleccionar perfil de color';
|
||||
$lang["format_chooser_keep_profile"]='Mantener perfil';
|
||||
$lang["format_chooser_remove_profile"]='Eliminar perfil';
|
||||
$lang["downloadformat"]='Formato de descarga';
|
||||
$lang["are_available-2"]='será convertido/a';
|
||||
$lang["are_available-1"]='será convertido/a';
|
||||
$lang["are_available-0"]='será convertido/a';
|
||||
$lang["plugin-format_chooser-title"]='Selector de Formato';
|
||||
$lang["plugin-format_chooser-desc"]='Te permite elegir diferentes formatos al descargar archivos que se generan al instante.';
|
18
plugins/format_chooser/languages/es.php
Normal file
18
plugins/format_chooser/languages/es.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Selector de formato';
|
||||
$lang["format_chooser_configuration"]='Configuración del selector de formato';
|
||||
$lang["format_chooser_output_formats"]='Formatos de salida (solo tipos de imagen)';
|
||||
$lang["format_chooser_input_formats"]='Formatos de entrada (solo tipos de imagen)';
|
||||
$lang["format_chooser_keep_format"]='No cambiar';
|
||||
$lang["format_chooser_original_size"]='Resolución original';
|
||||
$lang["format_chooser_choose_profile"]='Seleccionar perfil de color';
|
||||
$lang["format_chooser_keep_profile"]='Mantener perfil';
|
||||
$lang["format_chooser_remove_profile"]='Eliminar perfil';
|
||||
$lang["downloadformat"]='Formato de descarga';
|
||||
$lang["are_available-2"]='será convertido';
|
||||
$lang["are_available-1"]='será convertido';
|
||||
$lang["are_available-0"]='será convertido';
|
||||
$lang["plugin-format_chooser-title"]='Selector de Formato';
|
||||
$lang["plugin-format_chooser-desc"]='Te permite elegir diferentes formatos al descargar archivos que se generan al instante.';
|
16
plugins/format_chooser/languages/fa.php
Normal file
16
plugins/format_chooser/languages/fa.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='انتخابگر فرمت';
|
||||
$lang["format_chooser_configuration"]='پیکربندی انتخابگر فرمت';
|
||||
$lang["format_chooser_output_formats"]='فرمتهای خروجی (فقط انواع تصویر)';
|
||||
$lang["format_chooser_input_formats"]='فرمتهای ورودی (فقط انواع تصویر)';
|
||||
$lang["format_chooser_keep_format"]='تغییر ندهید';
|
||||
$lang["format_chooser_original_size"]='وضوح اصلی';
|
||||
$lang["format_chooser_choose_profile"]='انتخاب پروفایل رنگ';
|
||||
$lang["format_chooser_keep_profile"]='نگه داشتن پروفایل';
|
||||
$lang["format_chooser_remove_profile"]='حذف پروفایل';
|
||||
$lang["downloadformat"]='فرمت دانلود';
|
||||
$lang["are_available-2"]='تبدیل خواهد شد';
|
||||
$lang["are_available-1"]='تبدیل خواهد شد';
|
||||
$lang["are_available-0"]='تبدیل خواهد شد';
|
18
plugins/format_chooser/languages/fi.php
Normal file
18
plugins/format_chooser/languages/fi.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Muodon valitsin';
|
||||
$lang["format_chooser_configuration"]='Muodon valitsimen asetukset';
|
||||
$lang["format_chooser_output_formats"]='Tulostusmuodot (vain kuvatyypit)';
|
||||
$lang["format_chooser_input_formats"]='Syöttömuodot (vain kuvatyypit)';
|
||||
$lang["format_chooser_keep_format"]='Älä muuta';
|
||||
$lang["format_chooser_original_size"]='Alkuperäinen resoluutio';
|
||||
$lang["format_chooser_choose_profile"]='Valitse väriprofiili';
|
||||
$lang["format_chooser_keep_profile"]='Säilytä profiili';
|
||||
$lang["format_chooser_remove_profile"]='Poista profiili';
|
||||
$lang["downloadformat"]='Latausmuoto';
|
||||
$lang["are_available-2"]='muutetaan';
|
||||
$lang["are_available-1"]='muutetaan';
|
||||
$lang["are_available-0"]='muutetaan';
|
||||
$lang["plugin-format_chooser-title"]='Muodon valitsin';
|
||||
$lang["plugin-format_chooser-desc"]='Mahdollistaa erilaisten tiedostomuotojen valitsemisen ladattaessa tiedostoja, jotka luodaan lennossa.';
|
18
plugins/format_chooser/languages/fr.php
Normal file
18
plugins/format_chooser/languages/fr.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Sélecteur de format';
|
||||
$lang["format_chooser_configuration"]='Configuration du sélecteur de format';
|
||||
$lang["format_chooser_output_formats"]='Formats de sortie (Types d\'images uniquement)';
|
||||
$lang["format_chooser_input_formats"]='Formats d\'entrée (Types d\'images uniquement)';
|
||||
$lang["format_chooser_keep_format"]='Ne pas modifier';
|
||||
$lang["format_chooser_original_size"]='Résolution originale';
|
||||
$lang["format_chooser_choose_profile"]='Choisir le profil de couleur';
|
||||
$lang["format_chooser_keep_profile"]='Conserver le profil';
|
||||
$lang["format_chooser_remove_profile"]='Supprimer le profil';
|
||||
$lang["downloadformat"]='Format de téléchargement';
|
||||
$lang["are_available-2"]='sera converti';
|
||||
$lang["are_available-1"]='sera converti';
|
||||
$lang["are_available-0"]='sera converti';
|
||||
$lang["plugin-format_chooser-title"]='Sélecteur de format';
|
||||
$lang["plugin-format_chooser-desc"]='Vous permet de choisir différents formats lors du téléchargement de fichiers qui sont générés à la volée.';
|
18
plugins/format_chooser/languages/hi.php
Normal file
18
plugins/format_chooser/languages/hi.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='प्रारूप चयनकर्ता';
|
||||
$lang["format_chooser_configuration"]='प्रारूप चयनकर्ता विन्यास';
|
||||
$lang["format_chooser_output_formats"]='आउटपुट प्रारूप (केवल छवि प्रकार)';
|
||||
$lang["format_chooser_input_formats"]='इनपुट प्रारूप (केवल छवि प्रकार)';
|
||||
$lang["format_chooser_keep_format"]='परिवर्तन न करें';
|
||||
$lang["format_chooser_original_size"]='मूल संकल्प';
|
||||
$lang["format_chooser_choose_profile"]='रंग प्रोफ़ाइल चुनें';
|
||||
$lang["format_chooser_keep_profile"]='प्रोफ़ाइल बनाए रखें';
|
||||
$lang["format_chooser_remove_profile"]='प्रोफ़ाइल हटाएं';
|
||||
$lang["downloadformat"]='डाउनलोड प्रारूप';
|
||||
$lang["are_available-2"]='परिवर्तित किया जाएगा';
|
||||
$lang["are_available-1"]='परिवर्तित किया जाएगा';
|
||||
$lang["are_available-0"]='परिवर्तित किया जाएगा';
|
||||
$lang["plugin-format_chooser-title"]='प्रारूप चयनकर्ता';
|
||||
$lang["plugin-format_chooser-desc"]='यह आपको फ़ाइलों को डाउनलोड करते समय विभिन्न प्रारूप चुनने की अनुमति देता है जो तुरंत उत्पन्न होते हैं।';
|
18
plugins/format_chooser/languages/hr.php
Normal file
18
plugins/format_chooser/languages/hr.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Odabirnik formata';
|
||||
$lang["format_chooser_configuration"]='Konfiguracija odabira formata';
|
||||
$lang["format_chooser_output_formats"]='Izlazni formati (samo vrste slika)';
|
||||
$lang["format_chooser_input_formats"]='Ulazni formati (samo vrste slika)';
|
||||
$lang["format_chooser_keep_format"]='Nemoj mijenjati';
|
||||
$lang["format_chooser_original_size"]='Izvorna razlučivost';
|
||||
$lang["format_chooser_choose_profile"]='Odaberite profil boje';
|
||||
$lang["format_chooser_keep_profile"]='Držati profil';
|
||||
$lang["format_chooser_remove_profile"]='Ukloni profil';
|
||||
$lang["downloadformat"]='Preuzmi format';
|
||||
$lang["are_available-2"]='bit će pretvoreno';
|
||||
$lang["are_available-1"]='bit će pretvoreno';
|
||||
$lang["are_available-0"]='bit će pretvoreno';
|
||||
$lang["plugin-format_chooser-title"]='Izbornik formata';
|
||||
$lang["plugin-format_chooser-desc"]='Omogućuje vam odabir različitih formata prilikom preuzimanja datoteka koje se generiraju u hodu.';
|
16
plugins/format_chooser/languages/hu.php
Normal file
16
plugins/format_chooser/languages/hu.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"] = 'Formátum választó';
|
||||
$lang["format_chooser_configuration"] = 'Formátválasztó konfiguráció';
|
||||
$lang["format_chooser_output_formats"] = 'Kimeneti formátumok (Csak képtípusok)';
|
||||
$lang["format_chooser_input_formats"] = 'Bemeneti formátumok (Csak képtípusok)';
|
||||
$lang["format_chooser_keep_format"] = 'Ne változtass!';
|
||||
$lang["format_chooser_original_size"] = 'Eredeti felbontás';
|
||||
$lang["format_chooser_choose_profile"] = 'Válassza ki a színprofilt';
|
||||
$lang["format_chooser_keep_profile"] = 'Profil megőrzése';
|
||||
$lang["format_chooser_remove_profile"] = 'Profil eltávolítása';
|
||||
$lang["downloadformat"] = 'Letöltési formátum';
|
||||
$lang["are_available-2"] = 'át lesz alakítva';
|
||||
$lang["are_available-1"] = 'át lesz alakítva';
|
||||
$lang["are_available-0"] = 'át lesz alakítva';
|
18
plugins/format_chooser/languages/id.php
Normal file
18
plugins/format_chooser/languages/id.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Pemilih Format';
|
||||
$lang["format_chooser_configuration"]='Konfigurasi pemilih format';
|
||||
$lang["format_chooser_output_formats"]='Format output (Hanya jenis gambar)';
|
||||
$lang["format_chooser_input_formats"]='Format masukan (Hanya jenis gambar)';
|
||||
$lang["format_chooser_keep_format"]='Jangan mengubah';
|
||||
$lang["format_chooser_original_size"]='Resolusi asli';
|
||||
$lang["format_chooser_choose_profile"]='Pilih profil warna';
|
||||
$lang["format_chooser_keep_profile"]='Simpan profil';
|
||||
$lang["format_chooser_remove_profile"]='Hapus profil';
|
||||
$lang["downloadformat"]='Format unduhan';
|
||||
$lang["are_available-2"]='akan diubah';
|
||||
$lang["are_available-1"]='akan diubah';
|
||||
$lang["are_available-0"]='akan diubah';
|
||||
$lang["plugin-format_chooser-title"]='Pemilih Format';
|
||||
$lang["plugin-format_chooser-desc"]='Memungkinkan Anda memilih format berbeda saat mengunduh file yang dihasilkan secara instan.';
|
18
plugins/format_chooser/languages/it.php
Normal file
18
plugins/format_chooser/languages/it.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Selettore di formato';
|
||||
$lang["format_chooser_configuration"]='Configurazione del selettore di formato';
|
||||
$lang["format_chooser_output_formats"]='Formati di output (Solo tipi di immagine)';
|
||||
$lang["format_chooser_input_formats"]='Formati di input (Solo tipi di immagine)';
|
||||
$lang["format_chooser_keep_format"]='Non modificare';
|
||||
$lang["format_chooser_original_size"]='Risoluzione originale';
|
||||
$lang["format_chooser_choose_profile"]='Scegli il profilo colore';
|
||||
$lang["format_chooser_keep_profile"]='Mantenere il profilo';
|
||||
$lang["format_chooser_remove_profile"]='Rimuovi profilo';
|
||||
$lang["downloadformat"]='Formato di download';
|
||||
$lang["are_available-2"]='sarà convertito';
|
||||
$lang["are_available-1"]='sarà convertito';
|
||||
$lang["are_available-0"]='sarà convertito';
|
||||
$lang["plugin-format_chooser-title"]='Selezionatore di Formato';
|
||||
$lang["plugin-format_chooser-desc"]='Ti consente di scegliere diversi formati durante il download dei file che vengono generati al volo.';
|
18
plugins/format_chooser/languages/jp.php
Normal file
18
plugins/format_chooser/languages/jp.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='フォーマット選択ツール';
|
||||
$lang["format_chooser_configuration"]='フォーマット選択設定';
|
||||
$lang["format_chooser_output_formats"]='出力形式(画像形式のみ)';
|
||||
$lang["format_chooser_input_formats"]='入力形式(画像形式のみ)';
|
||||
$lang["format_chooser_keep_format"]='変更しないでください。';
|
||||
$lang["format_chooser_original_size"]='元の解像度';
|
||||
$lang["format_chooser_choose_profile"]='カラープロファイルを選択してください。';
|
||||
$lang["format_chooser_keep_profile"]='プロファイルを保持する';
|
||||
$lang["format_chooser_remove_profile"]='プロフィールを削除する';
|
||||
$lang["downloadformat"]='ダウンロード形式';
|
||||
$lang["are_available-2"]='変換されます。';
|
||||
$lang["are_available-1"]='変換されます。';
|
||||
$lang["are_available-0"]='変換されます。';
|
||||
$lang["plugin-format_chooser-title"]='フォーマット選択ツール';
|
||||
$lang["plugin-format_chooser-desc"]='ファイルをダウンロードする際に、オンザフライで生成される異なる形式を選択できます。';
|
18
plugins/format_chooser/languages/ko.php
Normal file
18
plugins/format_chooser/languages/ko.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='형식 선택기';
|
||||
$lang["format_chooser_configuration"]='형식 선택기 구성';
|
||||
$lang["format_chooser_output_formats"]='출력 형식 (이미지 유형만 해당)';
|
||||
$lang["format_chooser_input_formats"]='입력 형식 (이미지 유형만)';
|
||||
$lang["format_chooser_keep_format"]='변경하지 마십시오';
|
||||
$lang["format_chooser_original_size"]='원본 해상도';
|
||||
$lang["format_chooser_choose_profile"]='색상 프로필 선택';
|
||||
$lang["format_chooser_keep_profile"]='프로필 유지';
|
||||
$lang["format_chooser_remove_profile"]='프로필 제거';
|
||||
$lang["downloadformat"]='다운로드 형식';
|
||||
$lang["are_available-2"]='변환됩니다';
|
||||
$lang["are_available-1"]='변환됩니다';
|
||||
$lang["are_available-0"]='변환됩니다';
|
||||
$lang["plugin-format_chooser-title"]='형식 선택기';
|
||||
$lang["plugin-format_chooser-desc"]='파일을 다운로드할 때 실시간으로 생성되는 다양한 형식을 선택할 수 있습니다.';
|
18
plugins/format_chooser/languages/nl.php
Normal file
18
plugins/format_chooser/languages/nl.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Bestandsindeling kiezer';
|
||||
$lang["format_chooser_configuration"]='Indeling kiezer configuratie';
|
||||
$lang["format_chooser_output_formats"]='Uitvoerformaten (alleen afbeeldingstypen)';
|
||||
$lang["format_chooser_input_formats"]='Invoerformaten (alleen afbeeldingstypen)';
|
||||
$lang["format_chooser_keep_format"]='Niet wijzigen';
|
||||
$lang["format_chooser_original_size"]='Originele resolutie';
|
||||
$lang["format_chooser_choose_profile"]='Kies kleurprofiel';
|
||||
$lang["format_chooser_keep_profile"]='Behoud profiel';
|
||||
$lang["format_chooser_remove_profile"]='Verwijder profiel';
|
||||
$lang["downloadformat"]='Download formaat';
|
||||
$lang["are_available-2"]='zal worden geconverteerd';
|
||||
$lang["are_available-1"]='zal worden geconverteerd';
|
||||
$lang["are_available-0"]='zal worden geconverteerd';
|
||||
$lang["plugin-format_chooser-title"]='Formaat Kiezer';
|
||||
$lang["plugin-format_chooser-desc"]='Hiermee kunt u verschillende formaten kiezen bij het downloaden van bestanden die direct worden gegenereerd.';
|
18
plugins/format_chooser/languages/no.php
Normal file
18
plugins/format_chooser/languages/no.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Formatvelger';
|
||||
$lang["format_chooser_configuration"]='Konfigurasjon av formatvelger';
|
||||
$lang["format_chooser_output_formats"]='Utgangsformater (kun bildeformater)';
|
||||
$lang["format_chooser_input_formats"]='Inndataformater (kun bildeformater)';
|
||||
$lang["format_chooser_keep_format"]='Ikke endre';
|
||||
$lang["format_chooser_original_size"]='Opprinnelig oppløsning';
|
||||
$lang["format_chooser_choose_profile"]='Velg fargeprofil';
|
||||
$lang["format_chooser_keep_profile"]='Behold profil';
|
||||
$lang["format_chooser_remove_profile"]='Fjern profil';
|
||||
$lang["downloadformat"]='Nedlastingsformat';
|
||||
$lang["are_available-2"]='vil bli konvertert';
|
||||
$lang["are_available-1"]='vil bli konvertert';
|
||||
$lang["are_available-0"]='vil bli konvertert';
|
||||
$lang["plugin-format_chooser-title"]='Formatvelger';
|
||||
$lang["plugin-format_chooser-desc"]='Lar deg velge forskjellige formater når du laster ned filer som genereres på farten.';
|
16
plugins/format_chooser/languages/pa.php
Normal file
16
plugins/format_chooser/languages/pa.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='ਫਾਰਮੈਟ ਚੁਣਨ ਵਾਲਾ';
|
||||
$lang["format_chooser_configuration"]='ਫਾਰਮੈਟ ਚੁਣਨ ਵਾਲਾ ਸੰਰਚਨਾ';
|
||||
$lang["format_chooser_output_formats"]='ਆਉਟਪੁੱਟ ਫਾਰਮੈਟ (ਕੇਵਲ ਚਿੱਤਰ ਕਿਸਮਾਂ)';
|
||||
$lang["format_chooser_input_formats"]='ਇਨਪੁਟ ਫਾਰਮੈਟ (ਕੇਵਲ ਚਿੱਤਰ ਪ੍ਰਕਾਰ)';
|
||||
$lang["format_chooser_keep_format"]='ਬਦਲੋ ਨਹੀਂ';
|
||||
$lang["format_chooser_original_size"]='ਮੂਲ ਰੈਜ਼ੋਲੂਸ਼ਨ';
|
||||
$lang["format_chooser_choose_profile"]='ਰੰਗ ਪ੍ਰੋਫਾਈਲ ਚੁਣੋ';
|
||||
$lang["format_chooser_keep_profile"]='ਪ੍ਰੋਫਾਈਲ ਰੱਖੋ';
|
||||
$lang["format_chooser_remove_profile"]='ਪ੍ਰੋਫਾਈਲ ਹਟਾਓ';
|
||||
$lang["downloadformat"]='ਡਾਊਨਲੋਡ ਫਾਰਮੈਟ';
|
||||
$lang["are_available-2"]='ਤਬਦੀਲ ਕੀਤਾ ਜਾਵੇਗਾ';
|
||||
$lang["are_available-1"]='ਤਬਦੀਲ ਕੀਤਾ ਜਾਵੇਗਾ';
|
||||
$lang["are_available-0"]='ਤਬਦੀਲ ਕੀਤਾ ਜਾਵੇਗਾ';
|
18
plugins/format_chooser/languages/pl.php
Normal file
18
plugins/format_chooser/languages/pl.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Wybieracz formatu';
|
||||
$lang["format_chooser_configuration"]='Konfiguracja wyboru formatu';
|
||||
$lang["format_chooser_output_formats"]='Formaty wyjściowe (tylko typy obrazów)';
|
||||
$lang["format_chooser_input_formats"]='Formaty wejściowe (tylko typy obrazów)';
|
||||
$lang["format_chooser_keep_format"]='Nie zmieniaj';
|
||||
$lang["format_chooser_original_size"]='Oryginalna rozdzielczość';
|
||||
$lang["format_chooser_choose_profile"]='Wybierz profil kolorów';
|
||||
$lang["format_chooser_keep_profile"]='Zachowaj profil';
|
||||
$lang["format_chooser_remove_profile"]='Usuń profil';
|
||||
$lang["downloadformat"]='Format pobierania';
|
||||
$lang["are_available-2"]='zostanie przekonwertowane';
|
||||
$lang["are_available-1"]='zostanie przekonwertowane';
|
||||
$lang["are_available-0"]='zostanie przekonwertowane';
|
||||
$lang["plugin-format_chooser-title"]='Wybór Formatu';
|
||||
$lang["plugin-format_chooser-desc"]='Pozwala wybrać różne formaty podczas pobierania plików, które są generowane na bieżąco.';
|
18
plugins/format_chooser/languages/pt-BR.php
Normal file
18
plugins/format_chooser/languages/pt-BR.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Seletor de formato';
|
||||
$lang["format_chooser_configuration"]='Configuração do seletor de formato';
|
||||
$lang["format_chooser_output_formats"]='Formatos de saída (apenas tipos de imagem)';
|
||||
$lang["format_chooser_input_formats"]='Formatos de entrada (Somente tipos de imagem)';
|
||||
$lang["format_chooser_keep_format"]='Não alterar';
|
||||
$lang["format_chooser_original_size"]='Resolução original';
|
||||
$lang["format_chooser_choose_profile"]='Escolher perfil de cor';
|
||||
$lang["format_chooser_keep_profile"]='Manter perfil';
|
||||
$lang["format_chooser_remove_profile"]='Remover perfil';
|
||||
$lang["downloadformat"]='Formato de download';
|
||||
$lang["are_available-2"]='será convertido';
|
||||
$lang["are_available-1"]='será convertido';
|
||||
$lang["are_available-0"]='será convertido';
|
||||
$lang["plugin-format_chooser-title"]='Escolhedor de Formato';
|
||||
$lang["plugin-format_chooser-desc"]='Permite escolher diferentes formatos ao baixar arquivos que são gerados dinamicamente.';
|
18
plugins/format_chooser/languages/pt.php
Normal file
18
plugins/format_chooser/languages/pt.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Seletor de formato';
|
||||
$lang["format_chooser_configuration"]='Configuração do seletor de formato';
|
||||
$lang["format_chooser_output_formats"]='Formatos de saída (apenas tipos de imagem)';
|
||||
$lang["format_chooser_input_formats"]='Formatos de entrada (apenas tipos de imagem)';
|
||||
$lang["format_chooser_keep_format"]='Não alterar';
|
||||
$lang["format_chooser_original_size"]='Resolução original';
|
||||
$lang["format_chooser_choose_profile"]='Escolher perfil de cor';
|
||||
$lang["format_chooser_keep_profile"]='Manter perfil';
|
||||
$lang["format_chooser_remove_profile"]='Remover perfil';
|
||||
$lang["downloadformat"]='Formato de download';
|
||||
$lang["are_available-2"]='será convertido';
|
||||
$lang["are_available-1"]='será convertido';
|
||||
$lang["are_available-0"]='será convertido';
|
||||
$lang["plugin-format_chooser-title"]='Escolhedor de Formato';
|
||||
$lang["plugin-format_chooser-desc"]='Permite escolher diferentes formatos ao baixar arquivos que são gerados dinamicamente.';
|
18
plugins/format_chooser/languages/ro.php
Normal file
18
plugins/format_chooser/languages/ro.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Alegător de format';
|
||||
$lang["format_chooser_configuration"]='Configurarea selectorului de format';
|
||||
$lang["format_chooser_output_formats"]='Formate de ieșire (numai tipuri de imagini)';
|
||||
$lang["format_chooser_input_formats"]='Formate de intrare (numai tipuri de imagini)';
|
||||
$lang["format_chooser_keep_format"]='Nu schimbați';
|
||||
$lang["format_chooser_original_size"]='Rezoluția originală';
|
||||
$lang["format_chooser_choose_profile"]='Alegeți profilul de culoare';
|
||||
$lang["format_chooser_keep_profile"]='Păstrează profilul';
|
||||
$lang["format_chooser_remove_profile"]='Eliminare profil';
|
||||
$lang["downloadformat"]='Format de descărcare';
|
||||
$lang["are_available-2"]='va fi convertit';
|
||||
$lang["are_available-1"]='va fi convertit';
|
||||
$lang["are_available-0"]='va fi convertit';
|
||||
$lang["plugin-format_chooser-title"]='Alegător de format';
|
||||
$lang["plugin-format_chooser-desc"]='Vă permite să alegeți formate diferite atunci când descărcați fișiere care sunt generate pe loc.';
|
18
plugins/format_chooser/languages/ru.php
Normal file
18
plugins/format_chooser/languages/ru.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Выбор формата';
|
||||
$lang["format_chooser_configuration"]='Конфигурация выбора формата';
|
||||
$lang["format_chooser_output_formats"]='Форматы вывода (только типы изображений)';
|
||||
$lang["format_chooser_input_formats"]='Форматы ввода (только типы изображений)';
|
||||
$lang["format_chooser_keep_format"]='Не изменять';
|
||||
$lang["format_chooser_original_size"]='Оригинальное разрешение';
|
||||
$lang["format_chooser_choose_profile"]='Выберите профиль цвета';
|
||||
$lang["format_chooser_keep_profile"]='Сохранить профиль';
|
||||
$lang["format_chooser_remove_profile"]='Удалить профиль';
|
||||
$lang["downloadformat"]='Формат загрузки';
|
||||
$lang["are_available-2"]='будет преобразовано';
|
||||
$lang["are_available-1"]='будет преобразовано';
|
||||
$lang["are_available-0"]='будет преобразовано';
|
||||
$lang["plugin-format_chooser-title"]='Выбор формата';
|
||||
$lang["plugin-format_chooser-desc"]='Позволяет выбрать различные форматы при загрузке файлов, которые генерируются на лету.';
|
18
plugins/format_chooser/languages/sk.php
Normal file
18
plugins/format_chooser/languages/sk.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Výber formátu';
|
||||
$lang["format_chooser_configuration"]='Konfigurácia výberu formátu';
|
||||
$lang["format_chooser_output_formats"]='Výstupné formáty (len typy obrázkov)';
|
||||
$lang["format_chooser_input_formats"]='Vstupné formáty (len typy obrázkov)';
|
||||
$lang["format_chooser_keep_format"]='Nemeniť';
|
||||
$lang["format_chooser_original_size"]='Pôvodné rozlíšenie';
|
||||
$lang["format_chooser_choose_profile"]='Vyberte farebný profil';
|
||||
$lang["format_chooser_keep_profile"]='Zachovať profil';
|
||||
$lang["format_chooser_remove_profile"]='Odstrániť profil';
|
||||
$lang["downloadformat"]='Formát na stiahnutie';
|
||||
$lang["are_available-2"]='bude konvertované';
|
||||
$lang["are_available-1"]='bude konvertované';
|
||||
$lang["are_available-0"]='bude konvertované';
|
||||
$lang["plugin-format_chooser-title"]='Izbirnik formata';
|
||||
$lang["plugin-format_chooser-desc"]='Omogoča izbiro različnih formatov pri prenosu datotek, ki se ustvarijo sproti.';
|
23
plugins/format_chooser/languages/sv.php
Normal file
23
plugins/format_chooser/languages/sv.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
# Swedish
|
||||
# Language File for the Format Chooser Plugin
|
||||
# Updated by Henrik Frizén 20131023 for svn r4994
|
||||
# -------
|
||||
#
|
||||
#
|
||||
$lang['format_chooser'] = 'Formatväljare';
|
||||
$lang['format_chooser_configuration'] = 'Formatväljare – inställningar';
|
||||
$lang['format_chooser_output_formats'] = 'Utdataformat';
|
||||
$lang['format_chooser_input_formats'] = 'Indataformat';
|
||||
$lang['format_chooser_original_size'] = 'Originalupplösning';
|
||||
$lang['downloadformat'] = 'Hämtningsformat';
|
||||
|
||||
$lang["format_chooser_keep_format"]='Ändra inte';
|
||||
$lang["format_chooser_choose_profile"]='Välj färgprofil';
|
||||
$lang["format_chooser_keep_profile"]='Behåll profil';
|
||||
$lang["format_chooser_remove_profile"]='Ta bort profil';
|
||||
$lang["are_available-2"]='kommer att konverteras';
|
||||
$lang["are_available-1"]='kommer att konverteras';
|
||||
$lang["are_available-0"]='kommer att konverteras';
|
||||
$lang["plugin-format_chooser-title"]='Formatväljare';
|
||||
$lang["plugin-format_chooser-desc"]='Gör att du kan välja olika format när du laddar ner filer som genereras direkt.';
|
16
plugins/format_chooser/languages/sw.php
Normal file
16
plugins/format_chooser/languages/sw.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Kichagua muundo';
|
||||
$lang["format_chooser_configuration"]='Usanidi wa chaguo la muundo';
|
||||
$lang["format_chooser_output_formats"]='Umbizo za matokeo (Aina za picha pekee)';
|
||||
$lang["format_chooser_input_formats"]='Umbizo za ingizo (Aina za picha pekee)';
|
||||
$lang["format_chooser_keep_format"]='Usibadilishe';
|
||||
$lang["format_chooser_original_size"]='Azimio la asili';
|
||||
$lang["format_chooser_choose_profile"]='Chagua wasifu wa rangi';
|
||||
$lang["format_chooser_keep_profile"]='Hifadhi wasifu';
|
||||
$lang["format_chooser_remove_profile"]='Ondoa wasifu';
|
||||
$lang["downloadformat"]='Umbizo wa kupakua';
|
||||
$lang["are_available-2"]='itabadilishwa';
|
||||
$lang["are_available-1"]='itabadilishwa';
|
||||
$lang["are_available-0"]='itabadilishwa';
|
16
plugins/format_chooser/languages/th.php
Normal file
16
plugins/format_chooser/languages/th.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='ตัวเลือกฟอร์แมต';
|
||||
$lang["format_chooser_configuration"]='การตั้งค่าตัวเลือกฟอร์แมต';
|
||||
$lang["format_chooser_output_formats"]='รูปแบบการส่งออก (เฉพาะประเภทภาพ)';
|
||||
$lang["format_chooser_input_formats"]='รูปแบบการนำเข้า (เฉพาะประเภทภาพ)';
|
||||
$lang["format_chooser_keep_format"]='อย่าเปลี่ยนแปลง';
|
||||
$lang["format_chooser_original_size"]='ความละเอียดต้นฉบับ';
|
||||
$lang["format_chooser_choose_profile"]='เลือกโปรไฟล์สี';
|
||||
$lang["format_chooser_keep_profile"]='เก็บโปรไฟล์';
|
||||
$lang["format_chooser_remove_profile"]='ลบโปรไฟล์';
|
||||
$lang["downloadformat"]='รูปแบบการดาวน์โหลด';
|
||||
$lang["are_available-2"]='จะถูกแปลง';
|
||||
$lang["are_available-1"]='จะถูกแปลง';
|
||||
$lang["are_available-0"]='จะถูกแปลง';
|
18
plugins/format_chooser/languages/tr.php
Normal file
18
plugins/format_chooser/languages/tr.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Format seçici';
|
||||
$lang["format_chooser_configuration"]='Biçim seçici yapılandırması';
|
||||
$lang["format_chooser_output_formats"]='Çıktı formatları (Yalnızca resim türleri)';
|
||||
$lang["format_chooser_input_formats"]='Girdi formatları (Yalnızca resim türleri)';
|
||||
$lang["format_chooser_keep_format"]='Değiştirmeyin';
|
||||
$lang["format_chooser_original_size"]='Orijinal çözünürlük';
|
||||
$lang["format_chooser_choose_profile"]='Renk profilini seç';
|
||||
$lang["format_chooser_keep_profile"]='Profili koru';
|
||||
$lang["format_chooser_remove_profile"]='Profili kaldır';
|
||||
$lang["downloadformat"]='İndirme formatı';
|
||||
$lang["are_available-2"]='dönüştürülecek';
|
||||
$lang["are_available-1"]='dönüştürülecek';
|
||||
$lang["are_available-0"]='dönüştürülecek';
|
||||
$lang["plugin-format_chooser-title"]='Format Seçici';
|
||||
$lang["plugin-format_chooser-desc"]='Dosyaları indirirken anında oluşturulan farklı formatları seçmenize olanak tanır.';
|
16
plugins/format_chooser/languages/uk.php
Normal file
16
plugins/format_chooser/languages/uk.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='Вибір формату';
|
||||
$lang["format_chooser_configuration"]='Конфігурація вибору формату';
|
||||
$lang["format_chooser_output_formats"]='Формати виводу (лише типи зображень)';
|
||||
$lang["format_chooser_input_formats"]='Формати введення (лише типи зображень)';
|
||||
$lang["format_chooser_keep_format"]='Не змінювати';
|
||||
$lang["format_chooser_original_size"]='Оригінальна роздільна здатність';
|
||||
$lang["format_chooser_choose_profile"]='Виберіть колірний профіль';
|
||||
$lang["format_chooser_keep_profile"]='Зберегти профіль';
|
||||
$lang["format_chooser_remove_profile"]='Видалити профіль';
|
||||
$lang["downloadformat"]='Формат завантаження';
|
||||
$lang["are_available-2"]='буде перетворено';
|
||||
$lang["are_available-1"]='буде перетворено';
|
||||
$lang["are_available-0"]='буде перетворено';
|
16
plugins/format_chooser/languages/ur.php
Normal file
16
plugins/format_chooser/languages/ur.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='فارمیٹ منتخب کرنے والا';
|
||||
$lang["format_chooser_configuration"]='فارمیٹ منتخب کرنے کی تشکیل';
|
||||
$lang["format_chooser_output_formats"]='آؤٹ پٹ فارمیٹس (صرف تصویری اقسام)';
|
||||
$lang["format_chooser_input_formats"]='ان پٹ فارمیٹس (صرف تصویری اقسام)';
|
||||
$lang["format_chooser_keep_format"]='تبدیل نہ کریں';
|
||||
$lang["format_chooser_original_size"]='اصل قرارداد';
|
||||
$lang["format_chooser_choose_profile"]='رنگ پروفائل منتخب کریں';
|
||||
$lang["format_chooser_keep_profile"]='پروفائل محفوظ رکھیں';
|
||||
$lang["format_chooser_remove_profile"]='پروفائل ہٹائیں';
|
||||
$lang["downloadformat"]='ڈاؤن لوڈ فارمیٹ';
|
||||
$lang["are_available-2"]='تبدیل کیا جائے گا';
|
||||
$lang["are_available-1"]='تبدیل کیا جائے گا';
|
||||
$lang["are_available-0"]='تبدیل کیا جائے گا';
|
16
plugins/format_chooser/languages/vi.php
Normal file
16
plugins/format_chooser/languages/vi.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"] = 'Trình chọn định dạng';
|
||||
$lang["format_chooser_configuration"] = 'Cấu hình lựa chọn định dạng';
|
||||
$lang["format_chooser_output_formats"] = 'Định dạng đầu ra (Chỉ loại hình ảnh)';
|
||||
$lang["format_chooser_input_formats"] = 'Định dạng đầu vào (Chỉ loại hình ảnh)';
|
||||
$lang["format_chooser_keep_format"] = 'Không thay đổi';
|
||||
$lang["format_chooser_original_size"] = 'Độ phân giải gốc';
|
||||
$lang["format_chooser_choose_profile"] = 'Chọn hồ sơ màu';
|
||||
$lang["format_chooser_keep_profile"] = 'Giữ hồ sơ';
|
||||
$lang["format_chooser_remove_profile"] = 'Xóa hồ sơ';
|
||||
$lang["downloadformat"] = 'Định dạng tải xuống';
|
||||
$lang["are_available-2"] = 'sẽ được chuyển đổi';
|
||||
$lang["are_available-1"] = 'sẽ được chuyển đổi';
|
||||
$lang["are_available-0"] = 'sẽ được chuyển đổi';
|
18
plugins/format_chooser/languages/zh-CN.php
Normal file
18
plugins/format_chooser/languages/zh-CN.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["format_chooser"]='格式选择器';
|
||||
$lang["format_chooser_configuration"]='格式选择器配置';
|
||||
$lang["format_chooser_output_formats"]='输出格式(仅限图像类型)';
|
||||
$lang["format_chooser_input_formats"]='输入格式(仅限图像类型)';
|
||||
$lang["format_chooser_keep_format"]='请勿更改。';
|
||||
$lang["format_chooser_original_size"]='原始分辨率';
|
||||
$lang["format_chooser_choose_profile"]='选择颜色配置文件。';
|
||||
$lang["format_chooser_keep_profile"]='保留个人资料';
|
||||
$lang["format_chooser_remove_profile"]='删除个人资料';
|
||||
$lang["downloadformat"]='下载格式';
|
||||
$lang["are_available-2"]='将被转换';
|
||||
$lang["are_available-1"]='将被转换';
|
||||
$lang["are_available-0"]='将被转换';
|
||||
$lang["plugin-format_chooser-title"]='格式选择器';
|
||||
$lang["plugin-format_chooser-desc"]='允许您在下载文件时选择不同的格式,这些格式是即时生成的。';
|
68
plugins/format_chooser/pages/convert.php
Normal file
68
plugins/format_chooser/pages/convert.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
include '../../../include/boot.php';
|
||||
include_once __DIR__ . "/../include/utility.php";
|
||||
|
||||
$k=getval("k","");
|
||||
$ref = getval('ref', 0, true);
|
||||
$size = getval('size', '');
|
||||
$page = getval('page', 1, true);
|
||||
$alternative = getval('alt', -1, true);
|
||||
$usage = getval('usage', "-1");
|
||||
$usagecomment=getval('usagecomment',"");
|
||||
|
||||
$resource = get_resource_data($ref);
|
||||
$width = getval('width', 0, true);
|
||||
$height = getval('height', 0, true);
|
||||
|
||||
if('' == $k || !check_access_key($ref, $k)) //Check if available through external share
|
||||
{
|
||||
include __DIR__ . '/../../../include/authenticate.php';
|
||||
}
|
||||
|
||||
// Permissions check
|
||||
$allowed = resource_download_allowed($ref, $size, $resource['resource_type'], $alternative);
|
||||
debug("PLUGINS/FORMAT_CHOOSER/PAGES/CONVERT.PHP: \$allowed = " . ($allowed ? 'TRUE' : 'FALSE'));
|
||||
|
||||
if(!$allowed || $ref <= 0)
|
||||
{
|
||||
debug("PLUGINS/FORMAT_CHOOSER/PAGES/CONVERT.PHP: Permission denied!");
|
||||
# This download is not allowed. How did the user get here?
|
||||
exit('Permission denied');
|
||||
}
|
||||
|
||||
if ($width == 0 && $height == 0)
|
||||
{
|
||||
$format = getImageFormat($size);
|
||||
$width = (int)$format['width'];
|
||||
$height = (int)$format['height'];
|
||||
}
|
||||
|
||||
$ext = getval('ext', getDefaultOutputFormat());
|
||||
if(is_banned_extension($ext))
|
||||
{
|
||||
$error_extension = str_replace('[filetype]',$ext,$lang['error_upload_invalid_file']);
|
||||
error_alert($error_extension, true);
|
||||
exit();
|
||||
}
|
||||
$profile = getProfileFileName(getval('profile', null));
|
||||
|
||||
$target = sprintf('%s/%s_%s.%s',
|
||||
get_temp_dir(false, 'format_chooser' . $scramble_key),
|
||||
$ref,
|
||||
md5($username . date('Ymd', time()) . $scramble_key),
|
||||
$ext
|
||||
);
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
convertImage($resource, $page, $alternative, $target, $width, $height, $profile);
|
||||
|
||||
daily_stat('Resource download', $ref);
|
||||
resource_log($ref, LOG_CODE_DOWNLOADED, 0, $lang['format_chooser'] . ' ' . $usagecomment, '', $size, $usage);
|
||||
|
||||
if(file_exists($target))
|
||||
{
|
||||
sendFile($target, get_download_filename($ref, $size, $alternative, $ext), $usage, $usagecomment);
|
||||
unlink($target);
|
||||
}
|
25
plugins/format_chooser/pages/setup.php
Normal file
25
plugins/format_chooser/pages/setup.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
include '../../../include/boot.php';
|
||||
include '../../../include/authenticate.php';
|
||||
|
||||
if (!checkperm('a')) {
|
||||
exit($lang['error-permissiondenied']);
|
||||
}
|
||||
|
||||
// Specify the name of this plugin, the heading to display for the page.
|
||||
$plugin_name = 'format_chooser';
|
||||
if(!in_array($plugin_name, $plugins))
|
||||
{plugin_activate_for_setup($plugin_name);}
|
||||
$page_heading = $lang['format_chooser_configuration'];
|
||||
|
||||
// Build the config page
|
||||
$page_def[] = config_add_text_list_input('format_chooser_input_formats', $lang['format_chooser_input_formats']);
|
||||
$page_def[] = config_add_text_list_input('format_chooser_output_formats', $lang['format_chooser_output_formats']);
|
||||
|
||||
config_gen_setup_post($page_def, $plugin_name);
|
||||
include '../../../include/header.php';
|
||||
config_gen_setup_html($page_def, $plugin_name, null, $page_heading);
|
||||
echo '<p>Please consult config.php directly in order to change the color profile settings.</p>';
|
||||
|
||||
include '../../../include/footer.php';
|
Reference in New Issue
Block a user