Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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 (Darkly)
  • No Skin
Collapse

Welcome to The Pitch Zone

  1. Home
  2. Comments & Feedback
  3. Decklist and card viewer plugin

Decklist and card viewer plugin

Scheduled Pinned Locked Moved Comments & Feedback
14 Posts 3 Posters 388 Views
  • 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.
  • komfyrionK Offline
    komfyrionK Offline
    komfyrion
    wrote on last edited by
    #1

    It would be really cool to have a plugin that lets us hover a card name to see the card. Uploading card images manually is a bit of a chore. This has existed in Magic forums for some time, so I'm sure there's lots of existing projects to draw inspiration from.

    Additionally, I think it is a good idea to be able to post and see decklists directly in the forum rather than only having hotlinks to other sites such as Fabrary.net. Of course there's nothing stopping anyone from just posting a list as plain text currently, but it's unlikely that people will want to do that when you get card previews and other benefits in deck builders.

    One of my motivations for this is that Fabrary decks often get modified, made private or deleted, but forum posts could preserve a more accurate representation of what was actually being discussed at the time, like an archive. I would suggest, perhaps, that such a decklist plugin could take in a fabrary link, and when you post your comment it will contain a static version of that decklist (with card previews on hover using the card preview plugin). The link to Fabrary could still be attached for those who want to click through and see more details in there.

    1 Reply Last reply
    1
    • U_MageU Offline
      U_MageU Offline
      U_Mage
      wrote on last edited by
      #2

      Definitely some features I can look into at some point

      1 Reply Last reply
      1
      • komfyrionK Offline
        komfyrionK Offline
        komfyrion
        wrote on last edited by
        #3

        It seems AutoCardAnywhere supports Flesh & Blood as well, now, which is nice

        1 Reply Last reply
        0
        • komfyrionK Offline
          komfyrionK Offline
          komfyrion
          wrote on last edited by
          #4

          AutoCardAnywhere seems broken for FaB, but it's best to have a built in feature in the forum itself anyway. I'll take a stab at making such a plugin.

          1 Reply Last reply
          0
          • U_MageU Offline
            U_MageU Offline
            U_Mage
            wrote on last edited by
            #5

            just saying in case you missed it somehow, this is built on nodebb and they have a plugin template here https://github.com/NodeBB/nodebb-plugin-quickstart

            1 Reply Last reply
            0
            • komfyrionK Offline
              komfyrionK Offline
              komfyrion
              wrote on last edited by
              #6

              I picked up on that, yep.

              1 Reply Last reply
              1
              • komfyrionK Offline
                komfyrionK Offline
                komfyrion
                wrote on last edited by
                #7

                @u_mage Here's the first version. Give it a try!
                https://github.com/braaar/nodebb-plugin-fab-cards

                1 Reply Last reply
                3
                • U_MageU Offline
                  U_MageU Offline
                  U_Mage
                  wrote on last edited by
                  #8

                  Fyendal's Spring TunicFyendal's Spring Tunic

                  1 Reply Last reply
                  2
                  • U_MageU Offline
                    U_MageU Offline
                    U_Mage
                    wrote on last edited by U_Mage
                    #9

                    ah, ok thought it was broken but it just fetches when the page loads, I envisioned it a bit different but it's working

                    1 Reply Last reply
                    1
                    • komfyrionK Offline
                      komfyrionK Offline
                      komfyrion
                      wrote on last edited by
                      #10

                      My initial idea was to implement a server side functionality that would filter upon posting and insert HTML card embeds. I got it a rough draft of that working with a filter hook.
                      The problem was that I couldn't see a way to make it not look weird if you would try to edit a post that had cards embedded. Ideally I would have wanted another hook that would essentially strip away the card embeds when you hit edit, but I found no such hook. Could be it exists. The edit hooks that exist seem to apply once you click save in the editor? I would maybe like to ask about that. Maybe they could add a hook for this.

                      I was also worried that the embedded card markup in the actual post content would look awful if consumed outside of this site via federation. At least the embeds would have to be something that's not annoying to read on the other end, like a normal hyperlink. In that case I suppose the client side script in here could then only take care of inserting the images on hover, which would be a lot simpler and more performant.

                      1 Reply Last reply
                      2
                      • komfyrionK Offline
                        komfyrionK Offline
                        komfyrion
                        wrote on last edited by komfyrion
                        #11

                        Regardless, the CSS could use some tweaking. It's a bit janky in terms of where the image appears in the viewport, especially on mobile.

                        And support for specifying the colour of a card would be nice.

                        To Be Continued...

                        1 Reply Last reply
                        2
                        • komfyrionK Offline
                          komfyrionK Offline
                          komfyrion
                          wrote on last edited by
                          #12

                          Oh my! I just found out how this can be done server side! We don't need a separate edit hook, we just use filter:parse.post

                          1 Reply Last reply
                          2
                          • S Offline
                            S Offline
                            Sawyer
                            wrote last edited by
                            #13

                            have to say the plugin is really sick, well done!

                            1 Reply Last reply
                            2
                            • komfyrionK Offline
                              komfyrionK Offline
                              komfyrion
                              wrote last edited by
                              #14

                              Thanks! 8char

                              1 Reply Last reply
                              0
                              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.
                              Powered by NodeBB Contributors
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups