GuestNo new alerts

Patch 11

- Updates99
My update topics are a little sporadic (some updates get them, some don't), but I'd like to note down what I've been upto for the past week or so with Gosora.
This is a development diary post of sorts, so it might still be a few days or so before Patch 11 is released.

I've largely refactored the update system, so there may be issues with updates from pre patch 9 Gosora. You might want to update to Patch 9, and then, to Patch 11.
Or if you know how lastSchema.json works, then you might be able to hack around the problems.

The new or not so new update system, it really wasn't a too big change, breaks the reliance on lastSchema.json.

If you've been poking around the update code, then you know that it copies the previous state of schema.json to lastSchema.json before downloading the schema.json for the newest version of Gosora, and then, checks lastSchema.json for how many patches it needs to run.

This system works. But, it's a little brittle. Particularly for people like me who like to just run all the commands manually, for a variety of reasons, e.g. if not all the patches were installed quite how they should have been.

The new update system however keeps track of the last patch it installed in the database, there's still a bit of room for improvement here, but it means that you can just run the git commands followed by the patcher without worrying about lastSchema.json

This may also come in useful for things like Docker Deployment which may be on the horizon, although I will need to draw up a more concrete plan for that.

I have also cleaned up the user interface for editing topics in Nox, so you won't see weird padding where there shouldn't be any or any odd artifacts.
I might add a WYSIWYG at some point like Trumboyg in Cosora, although I'll have to weight my options on which editor is the most appropriate for Nox.

I have added the reltime template function, so instead of things like: `title="{{abstime .CreatedAt}}">{{.RelativeCreatedAt}}` and `topic.RelativeCreatedAt = common.RelativeTime(topic.CreatedAt)`

You will instead have: `title="{{abstime .CreatedAt}}">{{reltime .CreatedAt}}`

This should make things a little more flexible for theme developers who might want to use relative times in certain spots without writing Go code for it or to cut use of them without paying the same cost as if they used them.

Another thing I've done is made so that if you click on the relative times on the topic lists and forum pages, then it should take you to the last post in that topic rather than just the last page.

I've also done a bit of work to hopefully unify some things in the qgen query backend, cleaned various bits of code up, and added some new methods.

I could list those here, but there are really too many things to list. You will be able to see them in the changelog soon enough anyway.

One thing to note however is that all of the client side templates should work again, e.g. the live topic list, now that I fixed some issues in the generator, although I haven't had an opportunity to test them yet.

Lastly, but still a work in progress, I'm adding an attachment manager to topics, so you can remove and upload attachments after creating the topic. This is the main blocker for releasing this.

This shouldn't take too long, but I don't have an estimate on it. Maybe a day? Or two? I'm not quite sure.
And don't worry about the failing build, it's fixed in a later commit 😉

One thing I should probably mention is that I've fixed a performance issue for guests where data was being loaded which they didn't need, so you should get some small improvements there.