自定义表情符号功能请求

几个请求:

  • 能够重命名自定义表情符号
  • 为内置表情符号和自定义表情符号分别设置不同的类。我有几个自定义表情符号比普通表情符号大,并且是非正方形的。如果我通过 CSS 删除高度和宽度限制,以便自定义表情符号正确显示,那么内置表情符号会变得非常大。如果能够分别设置自定义表情符号和内置表情符号的样式,那就太好了。
3 个赞

Hmm, if they deviate from the Emoji standards, they are no longer Emoji. So this is an odd request. “Change Emoji so they aren’t like Emoji!”

Renaming seems reasonable though.

So adding a class to distinguish custom from default is out… then could we have a section where we can load custom GIFs that our board commonly uses? like facebook’s GIF keyboard?

Well, when you say it like that… it does sound easier. Not sure though, @zogstrip would need to comment.

2 个赞

In theory you can use the ReplyGIF to accomplish this goal.

If you didn’t want to utilize the GIFs from ReplyGIF the plugin already supports you changing it to use a different URL.

You would have to support the API that ReplyGIF already offers though, including the response structure.

So at a minimum you would have to have endpoints for


###example.com/replies
Provides a json array of strings

example: ["category", “category2”, “category3”]


###example.com/tags
Provides a json array of strings

example: ["tag", “tag2”, “tag3”]


###example.com/gifs
Provides a json array of images and their details

example:

[
  { file => "example.com/i/filename1", tags => "comma separated list of tags", caption => "caption of image1" },
  { file => "example.com/i/filename2", tags => "comma separated list of tags", caption => "caption of image2" }
]

###example.com/i/filename
Returns the image for filename


###example.com/thumbnail/filename
Returns the thumbnail for filename


###example.com/gifs?reply=category
Returns a list of images and their details (see above) in a given category


###example.com/gifs?tag-operator=and&tag=tags
Returns a list of images and their details (see above) that have each tag provided (comma separated)


###example.com/gifs?reply=category&tag-operator=and&tag=tags
Returns a list of images and their details (see above) that are in a specific category and have each tag provided (comma separated)


Granted, you could set it up so /replies, /tags return a single item, and thus the querystring parts become moot. So the only thing you’d have to do is ensure the /gifs endpoint returns all of the GIFs you want to support.

3 个赞

IN :arrow_down:

4 个赞

Awesome! Thank you so much!

我也希望能够重命名自定义表情符号。(目前需要重新上传才能重命名)

另外还有一点——为了方便理解,我当时正在重命名一些自定义表情符号,因为我没有意识到它们与默认表情符号的名称相同,并且它们覆盖了默认表情符号。(例如::bear:)所以我想为所有自定义表情符号名称添加一个前缀。我重新上传了它们,以便更改名称以包含前缀。

对于以前名称与任何默认表情符号名称不相同的表情符号,所有使用该表情符号的地方现在都只显示为:emoji_name:

如果表情符号重命名功能也能更新之前使用过该表情符号的地方的名称,那将非常有帮助。

抱歉打扰了旧帖子。最近在尝试上传自定义表情符号时,我注意到几件事:

“拖放”功能似乎已损坏(Ubuntu、Brave 浏览器)- 它会在新标签页中打开图像,而不是上传。SVG 和 PNG 似乎都存在此问题。上次使用此功能(几年前,同一操作系统、同一浏览器)时,它运行正常。

此外,单击“选择文件”按钮时创建的文件浏览器是“自定义的”,大概是为了只显示合适的文件类型。默认情况下,它只显示 PNG,但自定义表情符号也支持 SVG 和 JPG 图标。这似乎是一个相当小的修复,但我无法弄清楚 Discourse 代码库中进行文件浏览器自定义的位置。

2 个赞