iosmall those are query string parameters.

An (untested) example would be https:/example.com/composer?title=Hello%20World&content=Lorem%20Ipsum. If you generate the urls from some code, make sure you url-encode the content of the parameters.

You can also have a look at the video I made about creating this extension if you want to see it working (on the Clark writes code channel)

Depending how you're implementing your "crawling", if you have large amount of data it might not fit in the url. You could directly POST the content to the Flarum API to create discussions. Or write the crawler as an extension and directly insert to the database without going through the front-end ?

a month later

YES! exactly what I was looking for 🙂

  • [deleted]

  • Edited

When using /signup, I get "Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.", but there's nothing in the logs 🙁 /login and /composer work fine though ?

EDIT: Found this in the console - looks like there's some sort of conflict with the Google ReCAPTCHA extension

VM23:12 Uncaught ReferenceError: grecaptcha is not defined
    at e.r.configRecaptcha (forum-0b926498.js:586)
    at forum-0b926498.js:1
    at forum-0b926498.js:1
    at v (forum-0b926498.js:1)
    at Function.m.render (forum-0b926498.js:1)
    at forum-0b926498.js:1
    at v (forum-0b926498.js:1)
    at ut (forum-0b926498.js:1)
    at Function.m.redraw (forum-0b926498.js:1)
    at e.n.show (forum-0b926498.js:1)
    a month later

    Hi all. small issue for me. links like /login/, /signup/, /composer/ don't work
    i've made some little change 😀
    flagrow\direct-links\js\dist\forum.js
    line 362, i've added in the function

    flarum_app__WEBPACK_IMPORTED_MODULE_1___default.a.routes.flagrowDirectLinksLogin = {
    path: '/login/',
    component: _components_LoginPageWEBPACK_IMPORTED_MODULE_2["default"].component()
    };

    flarum_appWEBPACK_IMPORTED_MODULE_1_default.a.routes.flagrowDirectLinksSignup = {
    path: '/signup/',
    component: components_SignupPageWEBPACK_IMPORTED_MODULE_3["default"].component()
    };
    flarum_appWEBPACK_IMPORTED_MODULE_1
    default.a.routes.flagrowDirectLinksComposer = {
    path: '/composer/',
    component: _components_ComposerPageWEBPACK_IMPORTED_MODULE_4["default"].component()
    };``
    and in extend.php (flagrow vendor dir )

    `` ->route('/login/', 'flagrow-direct-links-login')
    ->route('/signup/', 'flagrow-direct-links-signup')
    ->route('/composer/', 'flagrow-direct-links-composer')
    added in the routes

      mrnemesys you shouldn't edit anything in the vendor folder as this can be reset by Composer next time you install or update something.

      Trailing slashes are not supported by design, because Flarum isn't using them. If you think this is a mistake, feel free to open an Issue or PR on GitHub so we can discuss it 😉

      If supporting urls ending with / is your concern, I'd recommend creating a rewrite rule that removes trailing slashes from all requests via an .htaccess, like https://github.com/phanan/htaccess#remove-trailing-slash

        a month later

        Is anyone using the query parameters option currently? I had it working a while ago., stopped using it, and now I'm trying to set it up again... the composer box opens, but the title, content, and tag isn't filled in.

        I tried:

        \composer?title=test?content=test?tag=test

          clarkwinkelmann I think something else is going on. Maybe a conflict with another plugin. If I figure it out I'll let you know. Even using this:

          /composer?title=test&content=test&tag=test

          The composer wants to load, because the opacity backdrop appears. But, no form appears. And my composer form works otherwise. Just not trying to do these shortcut URLs. I wonder if it could be another z-index issue? I say another because I've had z-index issues with a couple other extensions.

          Probably in some future version of Flarum, even if it's not until 1.1 or something, the z-indexes need to be tamed down. What I mean is, by default, I've seen Flarum z-indexes over "1000." I'm not so sure that's necessary. Z-indexes should be kept as low as possible to prevent from having to set a z-index at 999999 in the future.

          But, that's a little off topic and may have nothing to do with this. 🙂

            clarkwinkelmann No JavaScript errors. And the plot thickens... It works on desktop. This is only on my iPhone, in any browser on my phone (Chrome, Firefox, Safari). I tested my z-index theory since the .Composer element does have a z-index of 1020... but, increasing that didn't help. Oh well, not a huge deal for me right now.

              clarkwinkelmann Hi, just see your link for the htaccess tips ^^ thanks a lot...
              For editing the vendor dir, when you don't know how to do thinks, better do it bad and learn a bit than doing nothing 😉 , still learning 😂

              a month later
              • [deleted]

              [deleted] When using /signup, I get "Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.", but there's nothing in the logs 🙁 /login and /composer work fine though ?

              EDIT: Found this in the console - looks like there's some sort of conflict with the Google ReCAPTCHA extension

              VM23:12 Uncaught ReferenceError: grecaptcha is not defined
              at e.r.configRecaptcha (forum-0b926498.js:586)
              at forum-0b926498.js:1
              at forum-0b926498.js:1
              at v (forum-0b926498.js:1)
              at Function.m.render (forum-0b926498.js:1)
              at forum-0b926498.js:1
              at v (forum-0b926498.js:1)
              at ut (forum-0b926498.js:1)
              at Function.m.redraw (forum-0b926498.js:1)
              at e.n.show (forum-0b926498.js:1)

              Just wanted to circle back to this post, which doesn't seem to have been answered. I'd like to use this extension as I wanted to place links to /login and /signup on my site's main page, alas - it does not seem to work with fof/recaptcha with the message quoted. Can this be fixed so the two work together ?

                • [deleted]

                clarkwinkelmann Thanks for the lightspeed response ! Very much appreciated 🙂

                Is there any other "smart" way I can achieve the same objective ? I can't use another method posted on here, as the JS is not loaded by the domain where Flarum is installed. For example, main site is on https://mysite.io and flarum resides on https://discuss.mysite.io (not real links of course)...

                2 months later

                010101

                I had posted above in August saying I was unable to get this to fully work. Well, with a new Flarum installation it works just fine. 🎉

                  010101 do you still have recaptcha as well ? As far as I'm aware the underlying issue in captcha has not been solved yet.

                  EDIT: nevermind, it was someone else's issue.

                  Glad it's solved for you. If it happens again, I hope we can find more debugging info this time 😇

                    8 days later

                    And now this extension has an add-on! 🙂 A bookmarklet. Or, one day @clarkwinkelmann could maybe somehow add this to this extension. 😀 For example, it could work like this: After you install this extension a new page could be created in the admin with all the instructions for this extension, plus the code for this bookmarklet. Kind of like WordPress' Press This.

                    New bookmarklet code is here:
                    https://discuss.flarum.org/d/22200-quick-share-bookmarklet-direct-links-add-on