Creating a custom Reactions sprite sheet

Creating a custom Reactions sprite sheet

Just a couple questions....

First, when you wrote:

The important bit
When using 64px images, the first image in the sprite sheet has position values of 0, 0, the next one 0, -64, then 0, -192, then 0, -256, and so on in multiples of 64.

Shouldn't it be:

The important bit
When using 64px images, the first image in the sprite sheet has position values of 0, 0, the next one 0, -64, then 0, -128, then 0, -192, and so on in multiples of 64.

Second Question....

How does xenforo know which reaction to replace, is it based on Title?

replacment.webp

If the default "WOW" is:
  • title: Wow
  • display order: 400
  • url: sprite_sheet_emojione.png
  • Sprite position: -96

And I wanted to replace the image, which fields need to stay the same for the software to recognize that it is replacing the WOW image?

For example, can I use this is the new WOW is 5th on my list?
  • Title: WOW
  • display order: 500
  • url: my_reactions.png
  • Sprite position: -128
Thanks.
 
The sprite position values denote which image is used from the sprite sheet.

So if the WOW image is currently 4th on the default sprite sheet, and I want to replace that image with a new one, then my sprite sheet needs to have my new WOW image also in the 4th position? Is that what you're saying?

Thanks.
 
I can't find any info about a cache for this and I don't see anything that seems applicable under /admin.php?tools/rebuild.

I uploaded a custom sprite sheet and if I give it a unique name it works, but if I name it the same as the default one, and rename the default one first, it doesn't seem to read the new one.

I'm giving it the default name so that I don't have to change the "Image replacement URL" for all the other ones. And I'm trying to use a single sprite sheet since that's the whole point of sprite sheets I think. But they don't seem affected by renaming the default sprite sheet either. They all seem to be cached.

Edit: I can verify this by unchecking "Enable CSS sprite mode with the following parameters", and it shows the whole (old) sprite.

Not sure if this is related, but when I "open image in new tab" the URL shows as data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 and the image doesn't display.
 
Last edited:
Back
Top Bottom