Franz
Yeah, so I give up for today.
I have three two big issues right now:
- There are dynamically generated script snippets, especially the one which does this:
babelHelpers._extends(app, HUGEJSON)
And I don't know how to generate them myself in the Django template yet, so I have to do with a hardcoded version of this particular snippet right now.
I couldn't sleep so I worked on 1. I can use the Flarum API to inject /api/forum where HUGEJSON is expected but that isn't enough. It's about half as long as what is rendered by Flarum itself there.
Whatever is expected at that point as a data array is something I need the Flarum API to return or an idea by you guys how I could change this JS-snippet to work without a prerendered data array.
2. There are CORS-issues when clicking on a specific discussion. You can see an error message in an upper post of mine. I tried a lot of nginx-fiddling but couldn't manage anything proper. I'm not even sure if this is solvable by configuring nginx alone.
Ok so I needed to add:
if($request_method = OPTIONS) { return 204; }
and then it worked. I could even post an answer to the topic and it looks like everything works.
so f*cking happy
- When clicking on a discussion it loads some AJAX stuff but doesn't really change the page. The URL changes though, which is bad for me. If someone would refresh this URL now the Django URL config will throw an error because the URL is out of Django scope. Either I find out about all URL routes and add them to the Django URL config and try to do something with it or we find a way to turn that off completely and just let AJAX do its job, because everything works as is, without the necessity to change the URL.
I need to work on other stuff for the next few days now. Hopefully you guys see that I am serious in working on this and provide me some help with my questions, so I can continue this endeavor ?. Will wait for accumulation of helpful info then. Till next week ?.