clarkwinkelmann Got it. That's cool. I don't think it's a deal breaker.
Flagrow Direct Links, links for login and new discussion
How can i find js - > dist - > source codes. Not dist I want to source javascript codes.
https://github.com/flagrow/direct-links/tree/0.2.0
Alshain no need to ask in every single place... Anyway that "mystery" is now solved via Discord.
For those who wanted to check out the beta 8 source code of the extension, you had to go through the tag because it was not correctly pushed to the master branch. I've corrected that and master now shows the latest beta 8 code as it should have.
@jordanjay29 can we get the incompatible
tag removed now that this has been updated to beta 8? (or rather properly tagged @clarkwinkelmann )
clarkwinkelmann Ralkage Whoopsies, didn't register that this was compatible now. Fixed.
jordanjay29 Yep I think I forgot to post here when it was updated. The issue I mentioned above was just on GitHub in master branch view, the extension was in fact compatible and could be installed in beta 8 since December
?title=,?content=, I would like to ask how to use this specific, can you give a complete example, for example, can you use such a link to post a new discussion?
- Edited
clarkwinkelmann Because I want to crawl the content of other websites and post to my own website, I need a path, and I have no solution yet.
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 ?
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)
- Edited
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_1default.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
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
010101 query string parameters are separated with &
. Path is separated with /
. Try /composer?title=test&content=test&tag=test
clarkwinkelmann I thought all the question marks looked weird. I need to stop doing this stuff at 2 / 3am.
- Edited
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.
010101 any javascript error in the browser console ?