#121 Plugin "SensitiveContent" messes up proportion in attachments

닫힘
aab4 년 전을 오픈 · 12개의 코멘트
aab 코멘트됨, 4 년 전

I had it activated since... i don't remember. Attachments in the two nodes i administer were showing with no proportion; through setconfig.php i managed to show them a bit better. Disabling the plugin brings everything back to normal.

I had it activated since... i don't remember. Attachments in the two nodes i administer were showing with no proportion; through setconfig.php i managed to show them *a bit* better. Disabling the plugin brings everything back to normal.
someonewithpc 코멘트됨, 4 년 전
협업자

Wait, all attachments were affected by this plugin?

Wait, all attachments were affected by this plugin?
aab 코멘트됨, 4 년 전
포스터

Yes, both nodes showed that behaviour on all attachments.

Yes, both nodes showed that behaviour on all attachments.
someonewithpc 코멘트됨, 4 년 전
협업자

@aab my latest commit should fix this issue, but I don't really have a way to test it

@aab my latest commit should fix this issue, but I don't really have a way to test it
aab 코멘트됨, 4 년 전
포스터

I've just tried on one of the nodes; as soon as the plugin is activated, proportion is gone.

I've just tried on one of the nodes; as soon as the plugin is activated, proportion is gone.
someonewithpc 코멘트됨, 4 년 전
협업자

What do you mean by proportion? I might be misunderstanding you

What do you mean by proportion? I might be misunderstanding you
aab 코멘트됨, 4 년 전
포스터

Ok, i'll try to explain better with images.

Now, the one without is specially distorted, as i I had to change width and height thumbnails with setconfig in order to "fix" it: most of thumbnails fit in 600x90, as they are links, and not images like this. (Edit)Ah, and it doesn't depend on the theme used.

Ok, i'll try to explain better with images. Now, the one without is specially distorted, as i I had to change width and height thumbnails with setconfig in order to "fix" it: most of thumbnails fit in 600x90, as they are links, and not images like this. (Edit)Ah, and it doesn't depend on the theme used.
Diogo Cordeiro 코멘트됨, 4 년 전
소유자
Fixed with https://notabug.org/diogo/gnu-social/commit/9b587ae4a3f9e2e6f9ec2f496f631d7aaf045417 as seen in https://social.hackersatporto.com/conversation/5622#notice-11624
diogo 4 년 전가 Close
aab 코멘트됨, 4 년 전
포스터

Ok, sorry to reopen this, just a couple of things:

  • In the new README, this is the example:

addPlugin('SensitiveContent', ['hideforvisitors' => true]

But it does not work unless i write

addPlugin('SensitiveContent', ['hideforvisitors' => true]);

  • Appart from that, i keep having distorted images with the plugin. I know it has been fixed, and i know why they keep being distorted: before i knew this plugin was responsible, i used setconfig.php to give thumbnails a fixed measure of 600x90. I've tried restoring them to the default value, 450x600:

https://khp.ignorelist.com/conversation/206812#notice-426573

Is there any way to set this to "auto" (or something like that), so the thumbnails get the proportion they need?

Ok, sorry to reopen this, just a couple of things: - In the new README, this is the example: <code> addPlugin('SensitiveContent', ['hideforvisitors' => true] </code> But it does not work unless i write <code> addPlugin('SensitiveContent', ['hideforvisitors' => true]); </code> - Appart from that, i keep having distorted images with the plugin. I know it has been fixed, and i know why they keep being distorted: before i knew this plugin was responsible, i used setconfig.php to give thumbnails a fixed measure of 600x90. I've tried restoring them to the default value, 450x600: https://khp.ignorelist.com/conversation/206812#notice-426573 Is there any way to set this to "auto" (or something like that), so the thumbnails get the proportion they need?
Diogo Cordeiro 코멘트됨, 4 년 전
소유자

Fixed the README.

run ./scripts/clean_thumbnails.php

Relevant settings concerning thumbs: https://notabug.org/diogo/gnu-social/src/nightly/lib/util/default.php#L285-L289

  • crop: Crop to the given dimensions (not preserving aspect ratio)
  • maxsize: width and height won't be larger than this value (just re-read the code and, I don't think this setting was needed at all, it would be more helpful if it was an actual max size for a thumb file or smth...)
  • width: Max width
  • height: Max height
  • upscale: Whether to allow a thumb to acquire greater dimensions than its original file or not
Fixed the README. run `./scripts/clean_thumbnails.php` Relevant settings concerning thumbs: https://notabug.org/diogo/gnu-social/src/nightly/lib/util/default.php#L285-L289 - `crop`: Crop to the given dimensions (not preserving aspect ratio) - `maxsize`: width and height won't be larger than this value (just re-read the code and, I don't think this setting was needed at all, it would be more helpful if it was an actual max size for a thumb file or smth...) - `width`: Max width - `height`: Max height - `upscale`: Whether to allow a thumb to acquire greater dimensions than its original file or not
aab 코멘트됨, 4 년 전
포스터

It seems i got it just like the default values:

thumbnail            dir                  '/var/www/html/file/thumb'
thumbnail            path                 NULL
thumbnail            server               NULL
thumbnail            crop                 'false'
thumbnail            maxsize              1000
thumbnail            width                '450'
thumbnail            height               '600'
thumbnail            upscale              'false'
thumbnail            animated             'false'

The only difference i can see is that "dir" is defined.

I've executed clean_thumbnails, but there has been no change.

Just in case, i've looked in db, everything seems fine...

MariaDB [gnusocial]> select * from config where section = 'thumbnail';
+-----------+----------+-------+
| section   | setting  | value |
+-----------+----------+-------+
| thumbnail | animated | false |
| thumbnail | crop     | false |
| thumbnail | height   | 600   |
| thumbnail | upscale  | false |
| thumbnail | width    | 450   |
+-----------+----------+-------+
It seems i got it just like the default values: ```` thumbnail dir '/var/www/html/file/thumb' thumbnail path NULL thumbnail server NULL thumbnail crop 'false' thumbnail maxsize 1000 thumbnail width '450' thumbnail height '600' thumbnail upscale 'false' thumbnail animated 'false' ```` The only difference i can see is that "dir" is defined. I've executed clean_thumbnails, but there has been no change. Just in case, i've looked in db, everything seems fine... ````sh MariaDB [gnusocial]> select * from config where section = 'thumbnail'; +-----------+----------+-------+ | section | setting | value | +-----------+----------+-------+ | thumbnail | animated | false | | thumbnail | crop | false | | thumbnail | height | 600 | | thumbnail | upscale | false | | thumbnail | width | 450 | +-----------+----------+-------+ ````
aab 코멘트됨, 4 년 전
포스터

I've checked the plugin today after all this time, i'm afraid there's still disproportion in images: https://gnusocial.net/conversation/4963984#notice-8172421

setconfig.php -a | grep thumbnail gives

thumbnail            dir                  '/var/www/gnusocial/file/thumb'
thumbnail            path                 NULL
thumbnail            server               NULL
thumbnail            crop                 'false'
thumbnail            maxsize              1000
thumbnail            width                450
thumbnail            height               '600'
thumbnail            upscale              'false'
thumbnail            animated             'false'
thumbnail            file_quota           '2097152'
thumbnail            process_links        'true'
thumbnail            show_thumbs          'true'
MariaDB [gnusocial]> select * from config where section = 'thumbnail';
+-----------+---------------+---------+
| section   | setting       | value   |
+-----------+---------------+---------+
| thumbnail | animated      | false   |
| thumbnail | crop          | false   |
| thumbnail | file_quota    | 2097152 |
| thumbnail | height        | 600     |
| thumbnail | process_links | true    |
| thumbnail | show_thumbs   | true    |
| thumbnail | upscale       | false   |
+-----------+---------------+---------+

I've also run clean_thumbnails. Anything else i'm missing?

I've checked the plugin today after all this time, i'm afraid there's still disproportion in images: https://gnusocial.net/conversation/4963984#notice-8172421 setconfig.php -a | grep thumbnail gives ```` thumbnail dir '/var/www/gnusocial/file/thumb' thumbnail path NULL thumbnail server NULL thumbnail crop 'false' thumbnail maxsize 1000 thumbnail width 450 thumbnail height '600' thumbnail upscale 'false' thumbnail animated 'false' thumbnail file_quota '2097152' thumbnail process_links 'true' thumbnail show_thumbs 'true' ```` ```` MariaDB [gnusocial]> select * from config where section = 'thumbnail'; +-----------+---------------+---------+ | section | setting | value | +-----------+---------------+---------+ | thumbnail | animated | false | | thumbnail | crop | false | | thumbnail | file_quota | 2097152 | | thumbnail | height | 600 | | thumbnail | process_links | true | | thumbnail | show_thumbs | true | | thumbnail | upscale | false | +-----------+---------------+---------+ ```` I've also run clean_thumbnails. Anything else i'm missing?
aab 코멘트됨, 3 년 전
포스터

Fixed with "php scripts/setconfig.php thumbnail crop 0"

Fixed with "php scripts/setconfig.php thumbnail crop 0"
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 3명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.