# vBulletin Emojis

**URL:** https://meta.discourse.org/t/vbulletin-emojis/22214
**Category:** Plugin
**Created:** [2014年十一月16日 17:13 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214 "2014-11-16T17:13:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2014年十一月16日 17:13 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/1 "2014-11-16T17:13:45Z")

</div>

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](https://github.com/cpradio/vb_emoji)

![](https://global.discourse-cdn.com/meta/original/3X/3/6/36539fed50f2f55c4f50b9f0c6c181c2a43d9cec.png)

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2014年十二月15日 22:44 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/2 "2014-12-15T22:44:38Z")

</div>

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

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

- custom Emoji support

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2014年十二月15日 22:48 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/3 "2014-12-15T22:48:58Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2014年十二月15日 22:50 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/4 "2014-12-15T22:50:09Z")

</div>

Well, these vb ones don’t really fit in _anywhere_ in my opinion 😉

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2014年十二月15日 22:58 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/5 "2014-12-15T22:58:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2014年十二月15日 23:06 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/6 "2014-12-15T23:06:08Z")

</div>

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

![](https://global.discourse-cdn.com/meta/original/3X/6/c/6c393cb6cac19039535266ce08a7bff7dbc91fa8.gif)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2014年十二月16日 00:04 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/7 "2014-12-16T00:04:43Z")

</div>

> [@codinghorror](#):
>
> Just know, @cpradio, that I will always think of you as my

I always did consider myself a ![](https://global.discourse-cdn.com/meta/original/3X/1/5/15bff317ff6559496e9f03b0f0181cbf1b07234f.gif) 😆

Too much? ![](https://global.discourse-cdn.com/meta/original/3X/9/6/969614b35039e7d9de96d946a318d63efcf274c7.gif)

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [2014年十二月16日 02:00 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/8 "2014-12-16T02:00:41Z")

</div>

Hahahahahaha. This was too good to just like.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [2014年十二月16日 20:05 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/9 "2014-12-16T20:05:36Z")

</div>

> [@cpradio](#):
>
> Too much? ![](https://global.discourse-cdn.com/meta/original/3X/9/6/969614b35039e7d9de96d946a318d63efcf274c7.gif)

![](https://global.discourse-cdn.com/meta/original/3X/2/8/28c1226d493076761a44ddc7fba954951126917f.gif)

---

<div class="post-metadata">

### Author: ![Hifihedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hifihedgehog/32/140207_2.png) [@Hifihedgehog](https://meta.discourse.org/u/Hifihedgehog)
#### Post date: [2020年四月4日 13:35 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/10 "2020-04-04T13:35:32Z")

</div>

公共公告：该插件在过去几周内因 Discourse 最新版本 2.5.0.beta2 的发布而出现故障。再见了，vBulletin 表情符号。认识你真好。:’(

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [2020年四月5日 13:56 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/11 "2020-04-05T13:56:36Z")

</div>

插件可以更新。该插件因一项支持创建新表情符号组的新功能而失效，但我们仍可通过插件注册新的表情符号。

> <https://github.com/discourse/discourse/commit/0996c3b7b36c37c3b478985da6e968f54dc4835c>
>
> Note: DBHelper would fail with a sql syntax error on columns like "group".
> 
> Co…-authored-by: Jarek Radosz \<jradosz@gmail.com\>

我认为我们只需在 plugin.rb 文件中添加一个元素，类似如下内容：

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

```

这样应该就能恢复正常运行了。

---

<div class="post-metadata">

### Author: ![Hifihedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hifihedgehog/32/140207_2.png) [@Hifihedgehog](https://meta.discourse.org/u/Hifihedgehog)
#### Post date: [2020年四月6日 18:05 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/12 "2020-04-06T18:05:04Z")

</div>

谢谢，@Steven。我看到@cpradio 最近 3 天还在论坛活跃。如果一周内他没有回复，我是否可以（在明确注明出处的前提下）根据你上面提到的修复方案 fork 他的插件？

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [2020年四月6日 18:55 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/13 "2020-04-06T18:55:55Z")

</div>

这个修复似乎还不够，我们需要添加一些 clear\_cache 命令，但我目前还不太清楚具体如何实现。我会进一步研究这个问题。

我也不介意维护它，因为我有一个类似的插件，所以当有变更时，我可以进行分组升级。

---

<div class="post-metadata">

### Author: ![Hifihedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hifihedgehog/32/140207_2.png) [@Hifihedgehog](https://meta.discourse.org/u/Hifihedgehog)
#### Post date: [2020年四月6日 19:24 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/14 "2020-04-06T19:24:18Z")

</div>

听起来是个好主意！非常感谢！

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2020年四月8日 02:10 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/15 "2020-04-08T02:10:58Z")

</div>

@Steven，如果你愿意，我可以把你添加到现有仓库的贡献者列表中。我很乐意分担责任。遗憾的是，我还需要一段时间才能重新搭建好 Discourse 的开发环境，很抱歉，由于一直没时间使用，我暂时已经放弃了之前的配置。

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [2020年四月8日 11:25 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/16 "2020-04-08T11:25:29Z")

</div>

这对我来说没问题，我的 GitHub 账号是 iunctis

我还没找到让 emoji 插件正常工作的解决方案，缺少清除缓存的正确命令。

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2020年四月8日 13:14 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/17 "2020-04-08T13:14:37Z")

</div>

已发送邀请给你。如果还有其他想邀请的人，请告诉我。我昨晚很晚才把机器重新组装好，但只完成了 Discourse 的干净安装。我计划今晚（如果时间允许）再查看一下，最坏的情况是明晚。

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2020年四月8日 20:50 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/18 "2020-04-08T20:50:11Z")

</div>

这很奇怪，可能不是插件本身的问题。当我在 Discourse 的全新安装中添加我的插件并执行重建时，会出现以下错误：

```plaintext
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，有什么想法吗？为什么找不到这个常量？它似乎正在错误的命名空间中查找。

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [2020年四月8日 20:58 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/19 "2020-04-08T20:58:34Z")

</div>

我觉得，如果你把所有的 `register_emoji` 调用都包裹在一个 `after_initialize` 块中，效果会很好。

 ![Screenshot 2020-04-08 at 22.57.38](https://global.discourse-cdn.com/meta/original/3X/e/9/e996b1d562416c6361bb23f58222f46b77523f88.png)

这对你来说可行吗？

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2020年四月8日 21:11 UTC](https://meta.discourse.org/t/vbulletin-emojis/22214/20 "2020-04-08T21:11:02Z")

</div>

确实有效！谢谢！

[下一頁](https://meta.discourse.org/t/vbulletin-emojis/22214.md?page=2)
