vBulletin Emojis

AI-generated summary

In a discussion about the vBulletin Emojis plugin for Discourse, cpradio introduces a plugin to revive classic vBulletin-style emojis — many animated — which coexist with modern Emojione sets without conflict. codinghorror notes that Discourse 1.2 will support custom emoji from Apple, Google, and Twitter, but cpradio argues the vB emojis have a nostalgic, distinct aesthetic that doesn’t fit modern styles. Humor ensues, including playful jabs and emoji-laden replies codinghorror and cpradio. Later, users report the plugin is broken in recent Discourse versions (e.g., 2.5.0.beta2) Hifihedgehog. Steven explains the breakage stems from new emoji group features, suggesting a fix via register_emoji in plugin code, but notes caching issues remain unresolved. cpradio offers to add Steven as a contributor to the repo. Debugging reveals a NameError: uninitialized constant Plugin::Instance::Emoji cpradio, which j.jaffeux resolves by wrapping register_emoji in an after_initialize block — a fix cpradio confirms works. sunjam asks whether to import all emojis directly or split into separate plugins; tom1984 questions if native custom emoji now support animation, noting they’ve worked well for 20+ years. Steven confirms some GIFs work, and tom1984 shares success using built-in custom emoji with CSS resizing for proper aspect ratios, citing meta.discourse.org.

For anyone who wants to relive the old days of vBulletin and bring back those emojis, have a look at the following plugin (and yes, several of them are animated)

Oh, and they do not interfere with the existing emojione emoticons, as these are all prefixed with ‘vb-’
https://github.com/cpradio/vb_emoji

A big thanks goes out to @eviltrout for his emoji extender!

18 лайков

Just a reminder that in the 1.2 release there will be:

  • choice of Emoji class from Google, Apple, Twitter, EmojiOne

  • custom Emoji support

1 лайк

Yes, that looks really neat (btw). The vB ones really don’t fit in with the Google/Apple/Twitter… ones, so I see this still being the easiest way to quickly bring in the vB emoticons, but I do like the progress that was made here within Discourse.

Well, these vb ones don’t really fit in anywhere in my opinion :wink:

2 лайка

Well aware of that. As you are aware that the opinions of others are the existing ones don’t really fit in anywhere.. So the opinions are mutual across both sides. I personally don’t care enough one way over another, I simply created the plugin as 1) a test to get used to the plugin framework, and 2) because I know our forum specifically wants it.

2 лайка

I am just kidding. Just know, @cpradio, that I will always think of you as my

6 лайков

I always did consider myself a :laughing:

Too much?

3 лайка

Hahahahahaha. This was too good to just like.

2 лайка

2 лайка

PSA: За последние несколько недель этот плагин перестал работать с последним выпуском Discourse 2.5.0.beta2. Прощай, прощайте, смайлики vbulletin. Было приятно вас знать. :cry:

2 лайка

Плагин можно обновить. Плагин сломан из-за новой замечательной функции, позволяющей создавать новые группы эмодзи, но мы всё ещё можем регистрировать новые эмодзи через плагин.

Я думаю, нам нужно будет просто добавить элемент в файл plugin.rb, что-то вроде этого:

register_emoji "doh", "/plugins/discourse-plugin-vb-emoticons/images/doh.gif", "vbulletin"

И всё должно снова заработать.

5 лайков

Спасибо, @Steven. Я вижу, что @cpradio всё ещё активен на форуме, последний раз заходил 3 дня назад. Если он не ответит в течение недели, будет ли это нормально, если я форкну его плагин (с надлежащим указанием авторства), используя исправление, которое вы упомянули выше?

1 лайк

Этого исправления, похоже, недостаточно — нужно добавить команду clear_cache, но пока я не совсем понимаю, как это сделать. Я разберусь.

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

2 лайка

Звучит как план! Я ценю это.

1 лайк

@Steven, если хочешь, я могу добавить тебя как соавтора в существующий репозиторий. Мне будет очень приятно разделить с тобой ответственность. К сожалению, мне потребуется время, чтобы снова настроить среду разработки для Discourse, так как у меня не было времени заниматься этим, и я пока отложил свои настройки.

2 лайка

Меня это устраивает, мой аккаунт GitHub — iunctis

Пока не нашёл решения для работы плагинов с эмодзи, не хватает правильных команд для очистки кэша

2 лайка

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

3 лайка

Это странно и, возможно, проблема не в самом плагине. Когда я делаю пересборку на чистой установке Discourse с моим плагином, я получаю следующую ошибку:

Caused by:
NameError: uninitialized constant Plugin::Instance::Emoji
/var/www/discourse/lib/plugin/instance.rb:482:in `register_emoji'
/var/www/discourse/plugins/discourse-plugin-vb-emoticons/plugin.rb:12:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:526:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:526:in `activate!'
lib/discourse.rb:224:in `block in activate_plugins!'
lib/discourse.rb:221:in `each'
lib/discourse.rb:221:in `activate_plugins!'
/var/www/discourse/config/application.rb:280:in `block in <class:Application>'
/var/www/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/var/www/discourse/config/application.rb:279:in `<class:Application>'
/var/www/discourse/config/application.rb:62:in `<module:Discourse>'
/var/www/discourse/config/application.rb:61:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

Обратите внимание на первые две строки:

NameError: uninitialized constant Plugin::Instance::Emoji
/var/www/discourse/lib/plugin/instance.rb:482:in `register_emoji'

@j.jaffeux, есть ли у вас идеи, почему он не может найти константу? Похоже, что поиск ведётся в неправильном пространстве имён.

3 лайка

Думаю, это сработает отлично, если вы обернете все вызовы register_emoji в блок after_initialize

Вы можете это сделать?

6 лайков

Действительно, это работает! Спасибо!

3 лайка