Custom Emoji feature requests

A couple of requests:

  • The ability to rename custom emojis
  • A separate class for built-in emojis and custom emojis. I have several custom emojis that are bigger than the normal emoji size and are non-squared dimensions. If I remove the height and width limitations via CSS so that the custom emojis display correctly, the built-in emojis become very large. It would be nice to be able to style custom and built-in separately.
6 лайков

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!

Я также был бы признателен за возможность переименовывать пользовательские эмодзи. (В настоящее время для их переименования необходимо снова загружать их заново)

2 лайка

Ещё одно замечание — для контекста: я переименовывал некоторые пользовательские эмодзи, так как не понял, что у них те же имена, что и у стандартных эмодзи, из-за чего они их перезаписывали (например, :bear:). Поэтому я хотел добавить префикс ко всем именам пользовательских эмодзи. Я снова загрузил их, чтобы изменить имена и включить префиксы.

Для тех эмодзи, чьи предыдущие имена не совпадали ни с одним стандартным эмодзи, все случаи использования этих эмодзи теперь отображаются просто как :emoji_name:.

Было бы полезно, если бы функция переименования эмодзи также обновляла их имена во всех местах, где они ранее использовались.

Извините за всплытие старой темы. Несколько вещей, которые я заметил, экспериментируя с загрузкой пользовательских эмодзи:

Функция «перетаскивания» (drag and drop) кажется нерабочей (Ubuntu, браузер Brave) — вместо загрузки она открывает изображение в новой вкладке. Это происходит как с SVG, так и с PNG. В последний раз, когда я использовал эту функцию несколько лет назад (та же ОС, тот же браузер), она работала корректно.

Кроме того, окно выбора файлов, которое появляется при нажатии кнопки «Choose Files», кажется «кастомизированным», вероятно, чтобы показывать только подходящие типы файлов. По умолчанию отображаются только PNG, но пользовательские эмодзи также работают с иконками SVG и JPG. Это кажется довольно простой правкой, но я не смог понять, где в коде Discourse осуществляется эта кастомизация окна выбора файлов.

3 лайка

Я не могу переименовать ни один из них без удаления и повторной загрузки.

Было бы здорово иметь возможность быстро редактировать пользовательское имя.

Я знаю, что на других форумах это обычно возможно.

4 лайка