What's new
[XB] User Message Styles

[XB] User Message Styles [Paid] 2.0.3

No permission to buy ($40.00)

Painbaker

Administrator
Painbaker submitted a new resource:

[XB] User Message Styles - Create and Manage Predefined Message Styles for Users

This add-on allows creation of customizable message/post styles that users can either select for free or purchase.

Features​

  • 🎨 Customizable Styles
    • Create custom styles with CSS rules and background images (with opacity control).
    • Group styles into categories for easy organization.
  • ⏳ Time-Limited Access
    • Set expiration dates for styles to limit usage or purchase period.
  • 💳 Payment Integration
    • ...

Read more about this resource...
 
Does this have support for GIFs? I'm trying to upload animated avatar frames and they keep coming out as static.
 
By chance would you know the cause of this? Could it be a problem with compression?

View attachment 2597



Supposed to look like the one below.
I suppose the issue is related to the GIF optimizations that are enabled by default in XF Imagick driver.

Since some time ago, one of these (deconstruction) has been officially not recommended for use:

Deconstruct - report areas of frame differences​

The traditional way in ImageMagick to optimize an animation, making the result smaller and faster to download and animate, is to "-deconstruct" its "-coalesce" form. This is no longer recommended. Instead you use should use the General GIF Optimizer. This operator will take a coalesced sequence of images (the animation frames as they actually appear when displayed), and compare the second and later images with that of the previous image. It then replaces that image with the smallest rectangular area of the pixels that had changed. Any pixel change, will count, regardless of if it is a color change (overlay) or cleared (erased). This is quite simple, and for a typical Overlay Animations will generate an optimal Frame Optimization for that animation. An Overlay Animations animation however only use a 'None' dispose method only. For example lets take the coalesce previous animation we generated above, which happens to form a Overlay Animation, and run it though the "-deconstruct" operator.

At least in my setup, removing these lines solves the problem:

XF\Image\Imagick.php

PHP:
case IMAGETYPE_GIF:
                if (is_callable([$this->imagick, 'optimizeimagelayers']))
                {
                    $optimized = @$this->imagick->optimizeimagelayers();
                    if ($optimized instanceof \Imagick)
                    {
                        $this->imagick = $optimized;
                    }

                    //$deconstructed = @$this->imagick->deconstructImages();
                    //if ($deconstructed instanceof \Imagick)
                    //{
                    //    $this->imagick = $deconstructed;
                    //}
                }
                $success = $this->imagick->setImageFormat('gif');
                break;
 
I suppose the issue is related to the GIF optimizations that are enabled by default in XF Imagick driver.

Since some time ago, one of these (deconstruction) has been officially not recommended for use:



At least in my setup, removing these lines solves the problem:

XF\Image\Imagick.php

PHP:
case IMAGETYPE_GIF:
                if (is_callable([$this->imagick, 'optimizeimagelayers']))
                {
                    $optimized = @$this->imagick->optimizeimagelayers();
                    if ($optimized instanceof \Imagick)
                    {
                        $this->imagick = $optimized;
                    }

                    //$deconstructed = @$this->imagick->deconstructImages();
                    //if ($deconstructed instanceof \Imagick)
                    //{
                    //    $this->imagick = $deconstructed;
                    //}
                }
                $success = $this->imagick->setImageFormat('gif');
                break;

Do you think a bypass could be an option for a URL to the image?
 
Do you think a bypass could be an option for a URL to the image?
No

This is a bit hardcoded in XF to fix with class extension.

A workaround is to comment out these lines or force Imagick not to perform deconstruction (for example, by rotating the image a few degrees).

I reported this here:

 
Thank you, that seemed to work!

Could you add a permission based override to be able to use all styles regardless of user criteria?

Edit: Also, sort button doesn't seem to be working on my end.

Yeah, getting this server error log
Code:
ErrorException: Template error: [E_USER_WARNING] Template admin:ozzmodz_ups_style_sort is unknown src/XF/Template/Templater.php:781
 
Last edited:
No

This is a bit hardcoded in XF to fix with class extension.

A workaround is to comment out these lines or force Imagick not to perform deconstruction (for example, by rotating the image a few degrees).

I reported this here:


I would ask you to please reconsider allowing a URL path to the image. Upload and URL path are both needed IMO.

I would like to use animated PNG's, but XF's image handler cannot process them, so they come out as static. I can upload them to my server just fine, and could link to them.

Here for example...

GIF's can be uploaded, but converting .apng to .gif doesn't transfer all the frames so the animations come slow/lagging or don't come out at all.

Edit:
I had the idea of just manually uploading the image to the data directory where they are stored. Rename image to a .jpg and replace the current image in the data directory.
https://altboards.com/data/ozzmodz/userprofilestyles/avatar/5.jpg

That works, but when the actual image on the page appears, it's static. Links to this: https://altboards.com/data/ozzmodz/userprofilestyles/avatar/5.jpg?1750862702

I guess there is still image handling done in the background.
 
Last edited:
I would ask you to please reconsider allowing a URL path to the image. Upload and URL path are both needed IMO.

I would like to use animated PNG's, but XF's image handler cannot process them, so they come out as static. I can upload them to my server just fine, and could link to them.

Here for example...

GIF's can be uploaded, but converting .apng to .gif doesn't transfer all the frames so the animations come slow/lagging or don't come out at all.

Edit:
I had the idea of just manually uploading the image to the data directory where they are stored. Rename image to a .jpg and replace the current image in the data directory.
https://altboards.com/data/ozzmodz/userprofilestyles/avatar/5.jpg

That works, but when the actual image on the page appears, it's static. Links to this: https://altboards.com/data/ozzmodz/userprofilestyles/avatar/5.jpg?1750862702

I guess there is still image handling done in the background.
This add-on was designed with potential future features in mind that require server-side image processing. Storing images as assets or external URLs would make this impossible.

APNG support can be added to the add-on, but it requires Imagick and ffmpeg to be installed on the server
 
This add-on was designed with potential future features in mind that require server-side image processing. Storing images as assets or external URLs would make this impossible.

APNG support can be added to the add-on, but it requires Imagick and ffmpeg to be installed on the server

Fair enough. I appreciate you taking the time to explain your thought process.

If you could add APNG support down the road, that would be amazing. Thank you.
 
Back
Top