SamSuka
Touhou-Project.com
Touhou-Project.com

patreon


The tail end

Hey all, hope you’ve been well. I don’t have anything too exciting to report since the last time I wrote about the large archiving overhaul. Nonetheless, there are quite a few odds and ends that have been taken care of that I figure are worth mentioning.

For starters, the roughly biennial event that is a new Debian release happened earlier this month. This mature Linux operating system is what THP uses on its server. I have a lot of feelings about Debian, not all of them good, but it’s fair to say that it’s an overall reliable and stable OS. There’s nothing too exciting in the latest “Bullseye” release in terms of new features and possibilities but the update process was more or less painless this time around and it only took me a minimal bit of preparation to upgrade THP to the latest release.

Sure, the emphasis on “stability” means that things like HTTP/3 (via nginx) or even the latest (read: a year old) PHP version are not available. In our use case, it doesn’t make that big of a difference. Yes, these are shiny new toys that I wanted to play around with but it’s not that big of a deal. If I can be bothered, I might pull some backported (newer packages added to the stale “stable” via a special repository) packages here and there but I’m not in much of a rush. By the time that the next version of Debian rolls around, in a couple of years, I’ll likely have to contend with even newer versions of packages so tackling things right away makes for twice the work.

Continuing with server-side things, I’ve also renewed our domain for two more years. Prices are rising for .com domains at the registrar I use so I figured that I’d add one more than one year before punting the decision whether or not to change providers down the line. Likewise, the fairly unexciting task of renewing the site’s certificates (TLS that allows connecting to the site via https and helps with user privacy) was also something I did while I was at it. Sadly, because of our hosting situation, it’s something I have to do more or less manually every now and again but I hope to automate sometime in the future.

I haven’t had the time or focus to do much in the way of expansive new things but I did see to fixing a few minor bugs and typos wherever I happened to see them. Additionally, a few of the minor features that had been originally envisioned to be included in the user portion of new changes have been worked in. No, they’re not really that important. But still worth a quick mention.

As you can see in the screenshot above, the page switcher was simplified and made to omit elements if there are many threads. While not exactly a really difficult refinement to make, rejiggering page elements and their various classes (and any scripts that attach to classes, ids etc) can be a little time-consuming as it’s always possible to accidentally break something. I opted to a switch for a client-side model for creating the necessary line breaks because otherwise the complexity would increase in the list served to clients as I’d have to put in various conditionals for edge cases to get a consistent amount of visible breaks. Much easier to filter elements and return when modulus whatever is matched even if it makes for a slight bit of spaghetti.

There is a wholly new feature that would be noticeable to users: the addition of an option in the misc section of the settings that fetches titles for youtube links. It was originally meant for all sorts of links but… we don’t really post many on THP that aren’t youtube and not every website has a public API that can be used for the correspondent calls. The system as implemented is not the best code quality as it’s been left open for possible future expandability.

This implementation is, however, privacy-respecting. I made it a point to only use various invidious instances and their API for requests. Quick summary: invidious is a project that allows people to self-host privacy-enhanced instances of youtube. In other words, it’s possible to see youtube content without giving any data to google. THP makes all the requests to a rotating amount of instances, meaning that user IPs and other data is never shared with third parties. Furthermore, successful responses are cached locally, meaning that it’s usually not necessary to query an invidious instance more than once; THP’s serves the stored data instead of querying again.

This was something I wanted to add to the site for a while (and had been half-coded in the user scripts for about a year) but it didn’t make sense to add it if the structure of pages were wildly different or would be changed in the future. As the archives are now homogenized and I don’t need any special scripts or rules now to have things just work, it made sense to finish up this feature.

Finally, the last random bit of work that I managed to squeeze in pertains to bumping old threads. Basically, no longer possible. I didn’t want to discriminate threads solely on the last time they were bumped so it was important to have an up-to-date register of all current story threads. The overhauls a few months ago were a necessary first step as were the recent ones dealing with database things and archival. There’s a slight grace period for older threads to be open (like when a new one is made and coexists) but, after a while, an error will be generated whenever someone tries to post. In the case of the ‘lastest’ thread, following a period of inactivity, only the author will be able to revive it and bump it. Otherwise users are asked to create discussion/comment threads elsewhere.

There’s more that I wanted to do, especially in regards to spam, but I didn’t have enough time or resources to get around to all that. I’m not sure what exactly I’ll be doing in the coming month but I hope to progress with the various improvements to the user experience that I’ve had planned for a while (and had to be put on the backburner due to the changes to the archive). At any rate, I hope you continue to enjoy the site and the small quality-of-life changes here and there.

Until next time, take it easy.


More Creators