Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Discourse
  3. Link (emoji) assets to app/data

Link (emoji) assets to app/data

Scheduled Pinned Locked Moved Discourse
9 Posts 4 Posters 767 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mononym
    wrote on last edited by mononym
    #1

    Hello. I would like to incude the following emoji set in my Discourse instance: https://mutant.tech/ (or more: twemoji | openmoji). And remove the existing ones as well.

    There's a folder which holds the included emoji sets at app/code/public/images/emoji/. Is it possible to link this folder to an emoji folder under app/data/ in order to add custom sets ?

    Is that even possible without a change in the Discourse package ?

    Thx

    1 Reply Last reply
    2
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      Yes, seems doable. First we need to get this Discourse 3.5 update through.

      M 1 Reply Last reply
      2
      • girishG girish

        Yes, seems doable. First we need to get this Discourse 3.5 update through.

        M Offline
        M Offline
        mononym
        wrote on last edited by
        #3

        @girish The update to v3.5 went perfect, thanks for the work !

        Looking forward to adding the custom emojis 😉

        1 Reply Last reply
        1
        • J Offline
          J Offline
          joseph
          Staff
          wrote on last edited by
          #4

          https://meta.discourse.org/t/configure-custom-emoji/23365 works well for me.

          M 1 Reply Last reply
          0
          • J joseph

            https://meta.discourse.org/t/configure-custom-emoji/23365 works well for me.

            M Offline
            M Offline
            mononym
            wrote on last edited by
            #5

            @joseph thanks for looking into this. I was trying to follow that guide but stoped short because I wanted to remove the existing emojis from my site and then upload an entire pack of emojis. If I understand well, deleting existing emojis is not possible in the interface and upload is only for 10 emojis at the time.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mononym
              wrote on last edited by
              #6

              I forgot to precise that the idea was that the new emoji set would replace the already existing/used emoji on the site. If I understand well, the keywords like :heart: would be linked to a new image. A HTML rebuild would then replace the visuals in all the site posts.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mononym
                wrote last edited by
                #7

                @joseph

                My first attempt is to replace the 6 standard reaction emojis manually with custom images from within the Discourse admin UI. One has to set the name heart, +1, etc. before uploading the file. The new images show up as reactions, but now, the original set is not coherent anymore as 6 images differ in style.

                Second try is to upload the new emoji with a different name and set the new emoji as the 6 reaction choices. That works at first but then the reaction plugin refers to the original set when displaying the bundled reactions under a post.

                I went back to the first option but I think the best solution here is still to be able to remove and replace the different emoji folders in app/data/.

                M 1 Reply Last reply
                0
                • M mononym

                  @joseph

                  My first attempt is to replace the 6 standard reaction emojis manually with custom images from within the Discourse admin UI. One has to set the name heart, +1, etc. before uploading the file. The new images show up as reactions, but now, the original set is not coherent anymore as 6 images differ in style.

                  Second try is to upload the new emoji with a different name and set the new emoji as the 6 reaction choices. That works at first but then the reaction plugin refers to the original set when displaying the bundled reactions under a post.

                  I went back to the first option but I think the best solution here is still to be able to remove and replace the different emoji folders in app/data/.

                  M Offline
                  M Offline
                  mononym
                  wrote last edited by
                  #8

                  @mononym said in Link (emoji) assets to app/data:

                  replace the 6 standard reaction emojis manually with custom images from within the Discourse admin UI. One has to set the name heart, +1, etc. before uploading the file. The new images show up as reactions, but now, the original set is not coherent anymore as 6 images differ in style.

                  Once done the steps above, I thought that it is all set. Now, I discovered that there are many more emoji present in quick access at least inside the chat interface. @staff would it be possible to move the app/code/public/images/emoji/ into app/data/.../emoji so that one could remove entire emoji sets or to make customization at the source please ? 🙏

                  1 Reply Last reply
                  1
                  • jamesJ Offline
                    jamesJ Offline
                    james
                    Staff
                    wrote last edited by
                    #9

                    Hello @mononym
                    I have looked into this feature request for the @discourse app.
                    Unfortunately just tinkering with the emoji files directly does not work as flawlessly as thought.
                    This will result in broken images, wrong displayed emojis and even @discourse crashing when starting the app.

                    A fully custom emoji set in @discourse can only be achieved with a custom plugin.
                    An example would be: https://github.com/cpradio/discourse-plugin-vb-emoticons
                    Which then can be configured to be used in the @discourse Emoji settings.


                    But there is a somewhat silver lining.
                    Discourse offers the configuration option to set a custom emoji URL.
                    With that you can specify a URL that holds custom emoji images.

                    The external URL folder structure and file names must follow a template: https://github.com/discourse/discourse-emojis/tree/main/dist/emoji emoji set and must include all emoji image files. Otherwise, they will get displayed as broken images in the post and emoji picker.
                    You can download these folders and files and upload them to e.g. a @lamp app.
                    I have done so and placed the folders in /app/data/public/images/emoji
                    In @discourse I have configured the setting External emoji URL to https://lamp.cloudron.dev/images/emoji and I have set the Emoji Set to Noto Emoji.
                    In the @lamp app I have replaced the xray.png and x_ray.png in the noto folder with a custom PNG, but the file name must be xray.png and x_ray.png to replace the xray emoji.

                    Which then gets displayed correctly in the post and the emoji picker:
                    5dd1d0c9-6085-46ee-b85a-4db03614a5f8-image.png

                    1 Reply Last reply
                    1
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search