12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- ---
- title: Plugin "SensitiveContent" messes up proportion in attachments
- author: notabug.org/aab
- time: Sat, 04 Apr 2020 21:03:08 UTC
- status: closed
- ---
- author: notabug.org
- time: Sat, 04 Apr 2020 21:03:08 UTC
- content: -----
- 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.
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 16:21:19 UTC
- content: -----
- Wait, all attachments were affected by this plugin?
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 16:46:53 UTC
- content: -----
- Yes, both nodes showed that behaviour on all attachments.
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 16:55:13 UTC
- content: -----
- @aab my latest commit should fix this issue, but I don't really have a way to test it
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 17:04:04 UTC
- content: -----
- I've just tried on one of the nodes; as soon as the plugin is activated, proportion is gone.
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 17:23:20 UTC
- content: -----
- What do you mean by proportion? I might be misunderstanding you
- -----
- author: notabug.org
- time: Mon, 06 Apr 2020 17:39:54 UTC
- content: -----
- 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.
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 02:35:27 UTC
- content: -----
- Fixed with https://notabug.org/diogo/gnu-social/commit/9b587ae4a3f9e2e6f9ec2f496f631d7aaf045417 as seen in https://social.hackersatporto.com/conversation/5622#notice-11624
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 09:44:45 UTC
- content: -----
- 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?
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 12:56:13 UTC
- content: -----
- 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
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 13:25:37 UTC
- content: -----
- 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 | +-----------+----------+-------+ ````
- -----
- author: notabug.org
- time: Fri, 10 Jul 2020 08:13:36 UTC
- content: -----
- 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?
- -----
|