【Kareha】 Comma Thread Syntax? (26)

19 Name: Mr VacBob!JqK7T7zan. 2005-01-19 20:19 ID:g8vpanZy (Replies) [Del]

How did you implement /q? I'm working on it and I've thought of two ways:
* on every /q request, rescan the entire thread for anchors that would load the q parameter; this is slow even when it isn't being done in PHP.
* keep around a cache of what anchors every post requests; this isn't slow, but adds more data files which might annoy someone, and makes me wish for an actual database. Also, it can get corrupted and has to be updated every time someone posts and such.

21 Name: !WAHa.06x36 2005-01-20 07:48 ID:TAFsRkJX (Replies) [Del]

Some notes:

  • I add the parent post by hand to the start, and then scan, explicitly skipping the parent post which would otherwise match because of the javascript code for quoting. This has the effect of putting forward references after the parent post. I am not sure if this is the better behaviour or not.
  • The generalization to support replies-to-replies is easy to see: Make in_range() accept an array of post numbers to match against the range, and feed back the @posts array to it. This wouldn't catch forward references to replies, but maybe we can live without those.
  • If you don't want to catch forward references at all, start the scan from $num+1 instead of 1.

10 Name: Anonymous 2005-01-13 04:30 ID:BlJDif0u (Replies) [Del]

It's kinda annoying on the eyes to have that link there for every post, though. Maybe this "Replies" feature would better be fit in some external browser thing like http://wakaba.c3.cx/sup/kareha.pl/1104757670 ?

This thread has been closed. You cannot post in this thread any longer.