SamuZai
Touhou-Project.com
Touhou-Project.com

patreon


Shikigami tails work in parallel

Hey all, hope you’re doing alright. While there’s a lot on the horizon to come, I thought that I’d talk about some of the other work I was doing in parallel to the story list overhaul and other things completed since.

Let’s start with a nice quality-of-life improvement. If you’ve ever browsed especially old, archived, threads on a phone or similar you may have noticed that they didn’t look as nice as things archived recently (or live threads for that matter). It’s always tricky to change anything about these old threads as they’re static HTML and so I can’t just regenerate them as I could “current” threads to a new template. So I have to run scripts conservatively to modify text, hoping not to accidentally change anything else about them while also having ambiguous-enough patterns to match various cases.

Add to that that old pages are formatted with different HTML elements (tables, ew) and relied on other behavior and getting a consistent look isn’t simple to do.

My solution tried to avoid being too invasive. I can’t get rid of all the old strict-XHTMLformatting via scripting. Likewise, editing hundreds of entries in each of thousands of files was out of the question. So I banked on modern web browsers accepting mixed standards and instead inserted a new style sheet link into each document and a meta tag that specifies the size of the viewport. The former provides a “good enough” illusion of consistency with a few lines of CSS in a separate file while the latter makes sure that phones attempt to scale things correctly. Overall, works pretty well and should make reading THP easier on all devices.

I also took the time to change up a few of the functions already present in THP’s code. The ‘limit post width’ option got rewritten and ought to have way more consistently-formatted results. I still want to do more with it, perhaps adding a button to trigger it on a page whenever but that’ll have to wait. Likewise, I made some changes to how images are expanded and replaced. There’s all sorts of small fixes like that.

You may ask, “Why didn’t you just do the story list stuff at once?” and well, the simple reason is that sometimes it’s easier to change tacks to do what you can when you’re stuck. Or feel drained. And, also, sometimes it’s just outright necessary.

That brings us to something else that got a change: the internals of the ban/moderation system. There had been an annoying uptick of spam in the preceding months; the spam wasn’t ubiquitous but it was beginning to get through filters with enough consistency. So, off I went analyzing the various weak points of the site and what I could do without compromising the user experience.

The most obvious thing to add was a specialized spam filter for file names. We’d had that for words (which works fairly decently) as well as a hash-based system for images but with specific communities or bots posting, it proved necessary to also check for file names. Sure, random file names and complex patterns will still get through but the more low-effort spam gets caught just fine.

Another automatic thing that got added was a honeypot of sorts for random bots. A dedicated spammer would likely figure it out but machines auto-filling information or relying on certain common web functions will almost certainly get tripped up. I won’t go into too much detail but this is the sort of thing that will not affect the vast majority of regular users either.

Lastly, I also analyzed the flaws in our captcha system. And boy, there are many! I couldn’t do much about that as of yet (and I couldn’t find a good standalone replacement) but did come to the realization that normal interactions that depend on javascript can also trip up bots well enough to stop a lot of spam. This is definitely an area that will need more work in the future but isn’t critically urgent for the time being.

Aside from all that, there’s been miscellaneous adjustments and bug fixes as per usual. There’s a lot that still needs to be done about the story list, and I’ll talk about that in the future, but I think I’ll continue to work on non-storylist things in the short term. There’s a lot of work that I’ve been putting off and new features that I’d like to see on the site. I’m also going to use the opportunity that you’re all very welcome to give me feedback and make requests for things you’d like to see. You can do so either here in the comments, on discord or on the site itself.

I’ll keep you all appraised as I get to work. Until then, take it easy!


More Creators