Popravki angleskih prevodov v editorju (upload slike, url)

This commit is contained in:
pero1203 2021-02-11 09:52:23 +01:00
parent e836df9779
commit 5a16e43ff0
3 changed files with 39 additions and 17 deletions

23
composer.lock generated
View File

@ -379,27 +379,28 @@
}, },
{ {
"name": "maxmind-db/reader", "name": "maxmind-db/reader",
"version": "v1.9.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
"reference": "9ee9ba9ee287b119e9f5a8e8dbfea0b49647cec4" "reference": "07f84d969cfc527ce49388558a366ad376f1f35c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/9ee9ba9ee287b119e9f5a8e8dbfea0b49647cec4", "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/07f84d969cfc527ce49388558a366ad376f1f35c",
"reference": "9ee9ba9ee287b119e9f5a8e8dbfea0b49647cec4", "reference": "07f84d969cfc527ce49388558a366ad376f1f35c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2" "php": ">=7.2"
}, },
"conflict": { "conflict": {
"ext-maxminddb": "<1.9.0,>=2.0.0" "ext-maxminddb": "<1.10.0,>=2.0.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "*", "friendsofphp/php-cs-fixer": "*",
"php-coveralls/php-coveralls": "^2.1", "php-coveralls/php-coveralls": "^2.1",
"phpstan/phpstan": "*",
"phpunit/phpcov": ">=6.0.0", "phpunit/phpcov": ">=6.0.0",
"phpunit/phpunit": ">=8.0.0,<10.0.0", "phpunit/phpunit": ">=8.0.0,<10.0.0",
"squizlabs/php_codesniffer": "3.*" "squizlabs/php_codesniffer": "3.*"
@ -435,7 +436,7 @@
"geolocation", "geolocation",
"maxmind" "maxmind"
], ],
"time": "2021-01-07 21:15:29" "time": "2021-02-09 17:52:47"
}, },
{ {
"name": "maxmind/web-service-common", "name": "maxmind/web-service-common",
@ -1020,16 +1021,16 @@
}, },
{ {
"name": "stripe/stripe-php", "name": "stripe/stripe-php",
"version": "v7.69.0", "version": "v7.72.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/stripe/stripe-php.git", "url": "https://github.com/stripe/stripe-php.git",
"reference": "6716cbc4ebf8cba7d45374a059c7c6e5bf53277d" "reference": "e502d1e97ec7857038d2131ded3134af964a55c5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/6716cbc4ebf8cba7d45374a059c7c6e5bf53277d", "url": "https://api.github.com/repos/stripe/stripe-php/zipball/e502d1e97ec7857038d2131ded3134af964a55c5",
"reference": "6716cbc4ebf8cba7d45374a059c7c6e5bf53277d", "reference": "e502d1e97ec7857038d2131ded3134af964a55c5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1073,7 +1074,7 @@
"payment processing", "payment processing",
"stripe" "stripe"
], ],
"time": "2021-01-22 03:21:13" "time": "2021-02-09 03:22:51"
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",

View File

@ -6,11 +6,15 @@
//spremenljivka za ID elementa od txtUrl //spremenljivka za ID elementa od txtUrl
var urlsrc = ''; var urlsrc = '';
// Jezik za image uploader
var lang = 'sl';
CKEDITOR.editorConfig = function (config) { CKEDITOR.editorConfig = function (config) {
//config.language = 'sl'; //config.language = 'sl';
config.skin = 'moonocolor'; config.skin = 'moonocolor';
lang = config.language;
config.toolbar = [ config.toolbar = [
{name: 'document', items: ['Source', '-']}, {name: 'document', items: ['Source', '-']},
{name: 'clipboard', items: ['PasteText','RemoveFormat', 'Undo', 'Redo', 'Scayt']}, {name: 'clipboard', items: ['PasteText','RemoveFormat', 'Undo', 'Redo', 'Scayt']},
@ -114,6 +118,13 @@ CKEDITOR.editorConfig = function (config) {
config. shiftEnterMode = CKEDITOR.ENTER_P; config. shiftEnterMode = CKEDITOR.ENTER_P;
config.pasteFromWordRemoveStyles = true; config.pasteFromWordRemoveStyles = true;
config.keystrokes = [[CKEDITOR.ALT + 84 /*T*/, 'abbr' ]]; config.keystrokes = [[CKEDITOR.ALT + 84 /*T*/, 'abbr' ]];
// Ne vem kje se to drugace lahko nastavi, potem naredimo kar tako:)
if(lang == 'en')
config.image_previewText = "Image preview.";
else
config.image_previewText = "Predogled slike.";
} }
CKEDITOR.on('instanceReady', function() { CKEDITOR.on('instanceReady', function() {
@ -149,7 +160,7 @@ CKEDITOR.on('dialogDefinition', function (ev) {
type: 'html', type: 'html',
id: 'uploadSlikeEnka', id: 'uploadSlikeEnka',
label: 'Naloži sliko', label: 'Naloži sliko',
html: '<div style="display: block; float: left; width: 100%; height: 40px; clear: both;"><iframe src="/editors/ckeditor_4_4/uploader/EnkaUploader.php?image=1&url=' + urlsrc + '" style="width: 350px; height: 50px; border: none; overflow: hidden;" border="0" frameborder="0"></iframe></div>' html: '<div style="display: block; float: left; width: 100%; height: 40px; clear: both;"><iframe src="/editors/ckeditor_4_4/uploader/EnkaUploader.php?image=1&url='+urlsrc+'&lang='+lang+'" style="width: 350px; height: 50px; border: none; overflow: hidden;" border="0" frameborder="0"></iframe></div>'
}, },
'txtAlt' 'txtAlt'
); );
@ -168,7 +179,7 @@ CKEDITOR.on('dialogDefinition', function (ev) {
type: 'html', type: 'html',
id: 'uploadDatotekeEnka', id: 'uploadDatotekeEnka',
label: 'Naloži datoteko', label: 'Naloži datoteko',
html: '<div style="display: block; float: left; width: 100%; height: 40px; clear: both;"><iframe src="/editors/ckeditor_4_4/uploader/EnkaUploader.php?url=' + urlsrc + '" style="width: 350px; height: 50px; border: none; overflow: hidden;" border="0" frameborder="0"></iframe></div>' html: '<div style="display: block; float: left; width: 100%; height: 40px; clear: both;"><iframe src="/editors/ckeditor_4_4/uploader/EnkaUploader.php?url='+urlsrc+'&lang='+lang+'" style="width: 350px; height: 50px; border: none; overflow: hidden;" border="0" frameborder="0"></iframe></div>'
} }
); );
} }

View File

@ -5,9 +5,21 @@
<?php <?php
include_once($_SERVER['DOCUMENT_ROOT'] . '/function.php');
// Ce imamo v GET-u lang naložimo jezikovno datoteko
if(isset($_GET['lang'])){
$language = ($_GET['lang'] == 'en') ? '2' : '1';
$file = '../../../lang/'.$language.'.php';
include($file);
}
//Prikaže možnost za IMAGE UPLOAD //Prikaže možnost za IMAGE UPLOAD
if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1)) { if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1)) {
include_once($_SERVER['DOCUMENT_ROOT'] . '/function.php');
if (isset($_GET['error']) && $_GET['error'] == 1) if (isset($_GET['error']) && $_GET['error'] == 1)
echo "<strong style='font-family: Arial; font-size: 12px; color: red; font-weight: bold;'>" . $lang['upload_img_exe'] . "</strong>"; echo "<strong style='font-family: Arial; font-size: 12px; color: red; font-weight: bold;'>" . $lang['upload_img_exe'] . "</strong>";
?> ?>
@ -26,7 +38,6 @@ if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1)
<!-- <script type="text/javascript" src="upload.js"></script>--> <!-- <script type="text/javascript" src="upload.js"></script>-->
<?php <?php
}elseif (!isset ($_POST['posted']) && (!isset ($_GET['image']) || $_GET['image'] != "1")) { }elseif (!isset ($_POST['posted']) && (!isset ($_GET['image']) || $_GET['image'] != "1")) {
include_once($_SERVER['DOCUMENT_ROOT'] . '/function.php');
?> ?>
<body style="margin-top: 0px; top: 0px; margin-left: 0px; left: 0px; padding-top: 0px;"> <body style="margin-top: 0px; top: 0px; margin-left: 0px; left: 0px; padding-top: 0px;">
<form name="uploader" method="post" enctype="multipart/form-data" <form name="uploader" method="post" enctype="multipart/form-data"
@ -40,7 +51,7 @@ if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1)
</form> </form>
<?php <?php
}elseif ($_POST['type'] == "file") { }elseif ($_POST['type'] == "file") {
include_once($_SERVER['DOCUMENT_ROOT'] . '/function.php');
if (isset ($_FILES['editorDatoteka']['name'])) { if (isset ($_FILES['editorDatoteka']['name'])) {
$ime = preg_replace ("/[^a-zA-Z0-9_\.\-]/", "", $_FILES['editorDatoteka']['name']); $ime = preg_replace ("/[^a-zA-Z0-9_\.\-]/", "", $_FILES['editorDatoteka']['name']);
if (strpos (strtolower ($ime), ".exe")!==false || strpos (strtolower ($ime), ".bat")!==false || strpos (strtolower ($ime), ".com")!==false || if (strpos (strtolower ($ime), ".exe")!==false || strpos (strtolower ($ime), ".bat")!==false || strpos (strtolower ($ime), ".com")!==false ||
@ -74,7 +85,6 @@ if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1)
// //
// IMG HANDLER // IMG HANDLER
// //
include_once($_SERVER['DOCUMENT_ROOT'] . '/function.php');
include_once('upload_class.php'); include_once('upload_class.php');
include_once('imageresizer.class.php'); include_once('imageresizer.class.php');