• Extensions
  • FriendsOfFlarum Mason, the discussion custom fields builder

Failed to load resource: the server responded with a status of 404 (Not Found)
mithril.js:2062 Uncaught TypeError: this.$(...).sortable is not a function
at n.a.config (MasonFieldsPane.js:20)
at Object.e.attrs.config (Component.js:113)
at mithril.js:447
at mithril.js:1353
at g (mithril.js:189)
at Function.m.render (mithril.js:1353)
at mithril.js:1567
at g (mithril.js:189)
at ut (mithril.js:1563)
at Function.m.redraw (mithril.js:1547)

I'm not sure if the two issues are related.

The sortable javascript issue might actually be present since beta 9. We will have to update it similar to what was done in https://github.com/flarum/tags/pull/62

I'll add the incompatible tag for now. We'll need to move this extension to FriendsOfFlarum and update it.

    a month later
    a month later

    troymccann you mean on the discussion page, not in the discussion composer ?

    It should be doable because the code is already inserting into the post body anyway https://github.com/FriendsOfFlarum/mason/blob/master/js/src/forum/addFieldsOnDiscussionPost.js

    But I think you might also be able to achieve it with some custom CSS.

    Not sure if it's worth an addition to the extension. But you can of course fork and make your changes.

    5 days later

    How can we specialize a mason field for a special tag?

    For example;

    When user opened a post in Gaming tag, mason will ask him/her for "In-game Username". However, in other tags there is no field will show as "In-game Username"

    @clarkwinkelmann

      Chenzy there's no such feature at this time.

      There was some talk to crowd-fund its development but I didn't have much time to look into it the last few months.

      It would be very nice to create god tier community @clarkwinkelmann

      If you want to improve it one day. Please let me know about it. 😄

      4 days later

      I am trying to integrate an application system with my forum. The custom fields show on every category and not just a specific one, the applications tag that is. Can you please add an option in the settings of the fields to only allow certain fields to show up on a specific tag. I hope you understand what I mean by this.

      Edit: Just saw the other posts above this, this is another reason the limit to a specific tag feature needs to be added.

        4 months later

        Now that the extension(mason) has become incompatible and faces certain responsive issues (as discussed in this PR), here's a workaround through which I overcome those.

        Issue: I needed two custom(mandatory) fields along with every discussion threads. After installing this extension, I inserted those two required fields from Admin Dashboard. The problem was the alignment and responsiveness of 'Composer Box'(box used to start the discussion) on both desktop and mobile view. It misaligned those custom fields along with everything that comes after title. Mainly:

        • On desktop, default height of the Composer box is somewhat low and so everyone will have to resize it for the first time.
        • On mobiles (much more serious issue), you can't find anything after second custom field, i.e content area and other formatting options on the composer.

        Solution: Since the available PR was made 2+ years back, it was around 20 commits behind the current master branch. So the only way-out was to mess with core css and js. Here's what I did:

        • For adjusting the composer height on desktop, I inserted this JS in 'Custom Header' on Admin> Appearance page:

          <script>if (!localStorage.getItem("composerHeight")) { localStorage.setItem("composerHeight", 317);
           }</script>

          Here, I fixed the height at 317 pixels because I need only 2 fields that are aligned in parallel. (you may change it accordinly)
          Note: I'm targeting a crowd with less users on tablets. So if you want tablet compatibility, you may have to add some additional JS for adjusting the height in case of tablet users.
          Also, don't forget to clear your localstorage memory in browser before testing the change.

        • For adjusting the alignment issues in mobile view, I tried changing some core CSS. We need to edit a minified css file located @ yourdomain.com/assets/forum-somerandomnumber.css. Go to 13th line and search for :
          .Composer:not(.minimized). Now in its declaration box, change height:350px !important; to height:auto !important;. This solves the issue by displaying every elements of composer without considering other stylings.

        Hope this will help you to have a temporary workaround on these existing responsive issues. I don't endorse this method and so do it on your own risk. Let's wait for an update from someone, in which all these are properly addressed.

        2 months later
        8 days later

        Hi everybody, I wrote an update to this powerful extension with a feature a lot of people have asked for –

        UntrustableRus specific tag ... > Chenzy Gaming tag...

        pyxxl I just wish that this extension had the option to limit fields to specific tags.

        – the ability to turn fields on/off for specific Tags. It's still very much beta but it works well on my dev installs. Before I do the final polish, though, if anyone needs this feature right away they can grab a copy of my version at Github.

        @clarkwinkelmann I forked and renamed it Mason Plus for dev purposes so I could run both versions, but let me know if you want me to submit it as a PR to the original.

        At the very least being able to tweak an existing extension has taught me a lot about how Flarum works inside and out. Also, as someone who's asked a lot of questions around here, it's nice to be able to contribute something back to the community. Here's a quick video explaining the new features:

          10 days later

          bgkurt hmm, you should be able to download it via github and install it in your /packages folder right away without Composer. I have to figure out how to make it an official extension so that you can install more easily with Composer. Give me a day or two to release it that way.

            20 days later

            raafirivero I have to figure out how to make it an official extension so that you can install more easily with Composer. Give me a day or two to release it that way.

            Updates on this?

            13 days later