Skip to content

Commit 940b2c3

Browse files
committed
v1.4.0-b1
1 parent 214fe91 commit 940b2c3

File tree

9 files changed

+43
-21
lines changed

9 files changed

+43
-21
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ This extension can change the image size and/or the image file size. It rotate i
2727
- [Post - upload attachments](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/imgupload/en/imgupload_upload_en.jpg)
2828

2929
## Requirements
30-
- phpBB 3.2.4 or higher
31-
- php 7.1 or higher
30+
- phpBB 3.3.0 or higher
31+
- php 7.2 or higher
3232
- php ImageMagick library installed
3333

3434
## Compatible with
@@ -54,6 +54,12 @@ For full functionality "Maximum avatar file size" in "ACP" > "Board configuratio
5454

5555
## Changelog
5656

57+
### v1.4.0 (21-12-2023)
58+
- Revised JS code
59+
- Fixed JS code in ACP don't work with radio buttons
60+
- Added security measures for Ajax request
61+
- Changed error handling for missing thumbnail file to a warning message
62+
5763
### v1.3.2 (13-12-2023)
5864
- Fixed error when upload none image file
5965
- Fixed upload aborts sporadically with large files

imcger/imgupload/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ This extension can change the image size and/or the image file size. It rotate i
2727
- [Post - upload attachments](https://raw.githubusercontent.com/IMC-GER/images/main/screenshots/imgupload/en/imgupload_upload_en.jpg)
2828

2929
## Requirements
30-
- phpBB 3.2.4 or higher
31-
- php 7.1 or higher
30+
- phpBB 3.3.0 or higher
31+
- php 7.2 or higher
3232
- php ImageMagick library installed
3333

3434
## Compatible with
@@ -54,6 +54,12 @@ For full functionality "Maximum avatar file size" in "ACP" > "Board configuratio
5454

5555
## Changelog
5656

57+
### v1.4.0 (21-12-2023)
58+
- Revised JS code
59+
- Fixed JS code in ACP don't work with radio buttons
60+
- Added security measures for Ajax request
61+
- Changed error handling for missing thumbnail file to a warning message
62+
5763
### v1.3.2 (13-12-2023)
5864
- Fixed error when upload none image file
5965
- Fixed upload aborts sporadically with large files

imcger/imgupload/adm/style/acp_imgupload.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
/*
2-
Image upload use ImageMagick
3-
------------------------------------- */
1+
/**
2+
* Image upload use ImageMagick
3+
* An extension for the phpBB Forum Software package.
4+
*
5+
* @copyright (c) 2022, Thorsten Ahlers
6+
* @license GNU General Public License, version 2 (GPL-2.0)
7+
*/
48

59
$('input[name=img_create_thumbnail]').on('change', function () {
610
if ($('input[name=img_create_thumbnail]:checked').last().val() == 1) {
@@ -13,4 +17,3 @@ $('input[name=img_create_thumbnail]').on('change', function () {
1317
});
1418

1519
$('input[name=imcger_imgupload_image_inline]').trigger('change');
16-

imcger/imgupload/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"type": "phpbb-extension",
44
"description": "Using ImageMagick php librarie for resize image attachments and creating thumbnails.",
55
"homepage": "https://github.com/IMC-GER/phpBB-Image-upload-use-ImageMagick/tags",
6-
"version": "1.3.2",
7-
"time": "2023-12-13",
6+
"version": "1.4.0",
7+
"time": "2023-12-21",
88
"license": "GPL-2.0-only",
99
"authors": [
1010
{
@@ -20,14 +20,14 @@
2020
],
2121
"require": {
2222
"php": ">=7.1.0",
23-
"phpbb/phpbb": "^3.2.4",
23+
"phpbb/phpbb": "^3.3.0",
2424
"composer/installers": "~1.0",
2525
"ext-imagick": "*"
2626
},
2727
"extra": {
2828
"display-name": "Image upload use ImageMagick",
2929
"soft-require": {
30-
"phpbb/phpbb": "^3.2.4"
30+
"phpbb/phpbb": "^3.3.0"
3131
},
3232
"version-check": {
3333
"host": "raw.githubusercontent.com",

imcger/imgupload/ext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ class ext extends \phpbb\extension\base
2020
protected $ext_name = 'imgupload';
2121

2222
/** @var min phpBB version */
23-
protected $phpbb_min_version = '3.2.4';
23+
protected $phpbb_min_version = '3.3.0';
2424

2525
/** @var max phpBB version (>= query) */
2626
protected $phpbb_max_version = '4.0.0';
2727

2828
/** @var min PHP version */
29-
protected $php_min_version = '7.1.0';
29+
protected $php_min_version = '7.1.3';
3030

3131
/** @var max PHP version (>= query) */
32-
protected $php_max_version = '8.3.0';
32+
protected $php_max_version = '8.4.0';
3333

3434
/**
3535
* Check the minimum and maximum requirements.
@@ -66,7 +66,7 @@ public function is_enableable()
6666
$error_message += [$language->lang('IMCGER_REQUIRE_PHP', $this->php_min_version, $this->php_max_version, PHP_VERSION),];
6767
}
6868

69-
// When phpBB v3.2 use trigger_error() for message output. For v3.1 return false.
69+
// When phpBB v3.2 use trigger_error() for message output.
7070
if (phpbb_version_compare(PHPBB_VERSION, '3.3.0', '<') && !empty($error_message))
7171
{
7272
$message = implode('<br>', $error_message);

imcger/imgupload/language/de/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// Language pack author
4141
'ACP_IMCGER_LANG_DESC' => 'Deutsch (Du)',
42-
'ACP_IMCGER_LANG_EXT_VER' => '1.2.1',
42+
'ACP_IMCGER_LANG_EXT_VER' => '1.4.0',
4343
'ACP_IMCGER_LANG_AUTHOR' => 'IMC-Ger',
4444

4545
// Messages

imcger/imgupload/language/de_x_sie/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// Language pack author
4141
'ACP_IMCGER_LANG_DESC' => 'Deutsch (Sie)',
42-
'ACP_IMCGER_LANG_EXT_VER' => '1.2.1',
42+
'ACP_IMCGER_LANG_EXT_VER' => '1.4.0',
4343
'ACP_IMCGER_LANG_AUTHOR' => 'IMC-Ger',
4444

4545
// Messages

imcger/imgupload/language/en/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// Language pack author
4141
'ACP_IMCGER_LANG_DESC' => 'British English',
42-
'ACP_IMCGER_LANG_EXT_VER' => '1.2.1',
42+
'ACP_IMCGER_LANG_EXT_VER' => '1.4.0',
4343
'ACP_IMCGER_LANG_AUTHOR' => 'IMC-Ger',
4444

4545
// Messages

imcger/imgupload/styles/all/template/event/overall_footer_body_after.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
{#
2+
Image upload use ImageMagick
3+
An extension for the phpBB Forum Software package.
4+
5+
@copyright (c) 2022, Thorsten Ahlers
6+
@license GNU General Public License, version 2 (GPL-2.0)
7+
#}
18
{% if S_SHOW_ATTACH_BOX and FILTERS %}
29
{% INCLUDECSS '@imcger_imgupload/imgupload.css' %}
310
<script>
@@ -67,7 +74,7 @@
6774
return parseInt(b.attach_id) - parseInt(a.attach_id);
6875
});
6976

70-
// Replace [attachment=index] with [attachment=imc-ger]
77+
// Set marker at attachment thats rotated
7178
let messageText = $('#message').val(),
7279
regex = new RegExp('\\[attachment=' + index + '\\]', 'gm');
7380

@@ -78,7 +85,7 @@
7885
phpbb.plupload.updateBbcode('removal', index);
7986
phpbb.plupload.updateBbcode('add', 0);
8087

81-
// Replace [attachment=imc-ger] with [attachment=0]
88+
// Replace attachment marker to index 0
8289
messageText = $('#message').val();
8390
messageText = messageText.replace(/\[attachment=imc-ger\]/gm, '[attachment=0]');
8491

0 commit comments

Comments
 (0)