MyBB Community Forums

Full Version: [DONE!]Restricted signature image size and restricted amount of images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I will see whether I can reproduce this.
Do I understand it well that when you click "Install & Activate", it is going to the list of installed plugins but the text remains "Install & Activate"?
Must have something to do with the function that is called to check whether the plugin is installed.


OK, I found the cause. It was a fossile from the first version.
I changed the zip file, only the php file in /inc/plugins has been changed.
(2015-08-02, 08:08 AM)Ad Bakker Wrote: [ -> ]I will see whether I can reproduce this.
Do I understand it well that when you click "Install & Activate", it is going to the list of installed plugins but the text remains "Install & Activate"?
Must have something to do with the function that is called to check whether the plugin is installed.


OK, I found the cause. It was a fossile from the first version.
I changed the zip file, only the php file in /inc/plugins has been changed.
Hi

Could you possibly also add a file size limit to the images in the signatures per group?  Toungue
(2015-08-02, 09:38 AM)Archangel777 Wrote: [ -> ]Could you possibly also add a file size limit to the images in the signatures per group?

In principle, this can be done of course. For large boards it may be important to limit speed reduction by so much information in signatures. For very large boards it is even questionable whether it is not better to have no images in signatures at all. It is not for nothing that MyBB offers the possibility to ban images from signatures completely.

It is interesting to see how images in signatures are handled. This does not deviate from the handling of images in posts. There they are reduced (if necessary) to a size such that they fit in the message frame. This size reduction is pure software controlled, and the reduced images are not stored. The size is only important for the amount of information that is transferred over the internet, and that is only dependent on the original size of the images not of the reduced size.

This method is different from how for instance avatars are treated. The originals for avatars may also deviate from the size in which they are shown. But in this case the images are downloaded, reduced to the size of avatars and then stored in the special directory uploads/avatars. The advantage is that the amount of data that needs to be transferred with every displayed post is much less, the disadvantage is that you must create a special directory to store the images which requires disk space.

The "avatar method" could in principle also be used for images in signatures. But the disadvantage is that when a member is promoted to a group that allows larger images in signatures, the existing images do not "grow" with the promotion. They keep their size until the signature is changed and new pictures are loaded.
(2015-08-02, 10:40 AM)Ad Bakker Wrote: [ -> ]
(2015-08-02, 09:38 AM)Archangel777 Wrote: [ -> ]Could you possibly also add a file size limit to the images in the signatures per group?

In principle, this can be done of course. For large boards it may be important to limit speed reduction by so much information in signatures. For very large boards it is even questionable whether it is not better to have no images in signatures at all. It is not for nothing that MyBB offers the possibility to ban images from signatures completely.

It is interesting to see how images in signatures are handled. This does not deviate from the handling of images in posts. There they are reduced (if necessary) to a size such that they fit in the message frame. This size reduction is pure software controlled, and the reduced images are not stored. The size is only important for the amount of information that is transferred over the internet, and that is only dependent on the original size of the images not of the reduced size.

This method is different from how for instance avatars are treated. The originals for avatars may also deviate from the size in which they are shown. But in this case the images are downloaded, reduced to the size of avatars and then stored in the special directory uploads/avatars. The advantage is that the amount of data that needs to be transferred with every displayed post is much less, the disadvantage is that you must create a special directory to store the images which requires disk space.

The "avatar method" could in principle also be used for images in signatures. But the disadvantage is that when a member is promoted to a group that allows larger images in signatures, the existing images do not "grow" with the promotion. They keep their size until the signature is changed and new pictures are loaded.

Hi

I think you misunderstood me  Blush

Can you just add a filesize limit for signature images per group to the plugin you made for signature images? It would be nice to give donators a say 200KB size limit and a normal user a 80KB size limit fro signature images  Smile

The avatar images is a thing all on it's own Smile
(2015-08-02, 11:54 AM)Archangel777 Wrote: [ -> ]The avatar images is a thing all on it's own Smile

I understand that, I used it only as an example of how you can store images as compared to the way this is done for signatures.

Such a size limit could be set. The only question is what to do when an image is too large. I think the best way would be to give only the link to that image and to display a message that the image cannot be displayed.
(2015-08-02, 12:05 PM)Ad Bakker Wrote: [ -> ]
(2015-08-02, 11:54 AM)Archangel777 Wrote: [ -> ]The avatar images is a thing all on it's own Smile

I understand that, I used it only as an example of how you can store images as compared to the way this is done for signatures.

Such a size limit could be set. The only question is what to do when an image is too large. I think the best way would be to give only the link to that image and to display a message that the image cannot be displayed.

Perhaps a javascript warning could pop up to tell the user that he/she needs to adjust the size of the image?  Big Grin
(2015-08-02, 01:09 PM)Archangel777 Wrote: [ -> ]Perhaps a javascript warning could pop up to tell the user that he/she needs to adjust the size of the image?  Big Grin
And you were thinking that this is a piece of cake, of course Huh . Now this gave the necessary troubles in combination with MyBB. Read my experiences here, I could solve it but cetainly not without the necessary help!!!

But, at the end there is a new version attached with maximum file size of images. Please not that it are 3 files now, because there is an additional english language file (oudside the admin section).

Leave a note here when there are troubles. Also a note when everythings runs smoothly is appreciated.
(2015-08-03, 08:49 PM)Ad Bakker Wrote: [ -> ]
(2015-08-02, 01:09 PM)Archangel777 Wrote: [ -> ]Perhaps a javascript warning could pop up to tell the user that he/she needs to adjust the size of the image?  Big Grin
And you were thinking that this is a piece of cake, of course Huh . Now this gave the necessary troubles in combination with MyBB. Read my experiences here, I could solve it but cetainly not without the necessary help!!!

But, at the end there is a new version attached with maximum file size of images. Please not that it are 3 files now, because there is an additional english language file (oudside the admin section).

Leave a note here when there are troubles. Also a note when everythings runs smoothly is appreciated.

You sir, are a king  Big Grin

There is a mistake in the settings for the images. You duplicated image size instead of adding image height. See attached screenshot  Toungue

[attachment=34783]

Thank you for the effort you are putting into this BTW. You should start to add a paypal donate button to your plugins Smile

Have you managed to check the image height setting? Smile
I just get links to imgur surrounded in the [image] code, but when I go to the Admin Cp and edit users signature it turns into pictures
(2015-08-05, 03:37 AM)Non anonymous Wrote: [ -> ]I just get links to imgur surrounded in the [image] code, but when I go to the Admin Cp and edit users signature it turns into pictures

I see something strange there too, I will have a look.

It took some time, because I discovered that my test forum on which I test new plugins was somewhat out of balance. I cleaned it but when I tried to make a complete fresh install I encountered some problems with authorities.

At the end I still have a clean working install. What the problem with me was that the setting:

AdminCP (Settings) -> Profile Options -> Allow [img] Code in Signatures

was not good, it stood on No, and should of course be Yes.

Now I have images in the signatures again!!!


I also corrected the text errors, and replaced the attachment in post #17. The plugin file and the admin language file have been changed.
Pages: 1 2 3