The Legendary Next Update (365)

265 Name: !WAHa.06x36 : 2005-10-23 14:24 ID:Heaven [Del]

All right, code updated again. This time, some experimenting! I've implemented a tentative system for changing markup types. This needs a bunch of testing, of course, so here's the test thread link once again: http://wakaba.c3.cx/sup/kareha.pl/1099697376/

Thoughts and comments are welcome. I'm still trying to figure out how exactly to do this.

There's a bunch of other changes and fixes too, so mention if anything breaks, as usual. Also, shift-reload!

230 Name: Anonymous 2005-10-21 18:43 ID:Heaven [Del]

I think it'd be a better idea to have some kind of load-balancing/distributed server cluster approach, like what dmpk2k was working on for Wakaba.

200 Name:   2005-10-20 18:28 ID:Heaven [Del]

>>191

Thanks for reminding me that I need to fix the CSS for the captcha!

208 Name: Anonymous 2005-10-21 13:46 ID:cRmds2wO [Del]

Recapping, here are the things I'd like to see in the final release:

  • better configuration of date and time (with optional timezone offsets), parsing certain characters for individual elements (ie, yyyy/MM/dd(D) hh:mm:ss -5:00:00) and also accepting numerical inputs for fixed dates and times (Eternal September)
  • config.pl parameter to permasage after a certain thread filesize/total number of characters has been reached
  • change the no-ID-on-email option to no-ID-on-sage
  • no EMAIL_ID parameter (most if not everyone uses "Heaven" anyway, and if they really want to change it they can easily find the string in kareha.pl)

Some nitpicky template adjustments to mode_message in order to more closely resemble 0ch (see http://f17.aaa.livedoor.jp/~zerotest/jikken and http://0ch.mine.nu/jikken):

  • multi-page links (1-, 101-, 201-, etc) at the top of subpages
  • red, bold thread filesize indicator near the bottom of subpages
  • "read all later posts" link just below the filesize indicator
  • non-bolded post numbers
  • colons before dates
  • colons before names (thread subpages only)
  • colons after thread position number in main page thread list
  • smaller and (at least for Pseud0ch) black and bolded title in "Create new thread" box

243 Name:   2005-10-22 10:54 ID:Heaven [Del]

If you want to have a look at what the code actually does to dig out flaws, here is the current version:

sub sanitize_html($%)
{
my ($html,%tags)=@_;
my (@stack,$clean);
my $entity_re=qr/&(?!\#[0-9]+;|\#x[0-9a-fA-F]+;|amp;)/;

while($html=~/(?:([^<]+)|<([^<>]*)>?)/g)
{
my ($text,$tag)=($1,$2);

if($text)
{
$text=~s/$entity_re/&amp;/g;
$text=~s/>/&gt;/g;
$clean.=$text;
}
else
{
if($tag=~m!^\s*(/?)\s*([a-z0-9_:\-\.]+)(?:\s+(.*?)|)\s*(/?)\s*$!si)
{
my ($closing,$name,$args,$implicit)=($1,lc($2),$3,$4);

if($tags{$name})
{
if($closing)
{
if(grep { $_ eq $name } @stack)
{
my $entry;

do {
$entry=pop @stack;
$clean.="</$entry>";
} until $entry eq $name;
}
}
else
{
my %args;

$args=~s/\s/ /sg;

while($args=~/([a-z0-9_:\-\.]+)(?:\s*=\s*(?:'([^']*?)'|"([^"]*?)"|['"]?([^'" ]*))|)/gi)
{
my ($arg,$value)=(lc($1),defined($2)?$2:defined($3)?$3:$4);
$value=$arg unless defined($value);

my $type=$tags{$name}{args}{$arg};

if($type)
{
my $passes=1;

if($type=~/url/i) { $passes=0 unless $value=~/(?:^$protocol_re:|^[^:]+$)/ }
if($type=~/number/i) { $passes=0 unless $value=~/^[0-9]+$/ }

if($passes)
{
$value=~s/$entity_re/&amp;/g;

if($value=~/"/) { $value="'$value'" }
else { $value="\"$value\"" }

$args{$arg}=$value;
}
}
}

my $cleanargs=join " ",map { "$_=$args{$_}" } keys %args;

$implicit="/" if($tags{$name}{empty});

push @stack,$name unless $implicit;

$clean.="<$name";
$clean.=" $cleanargs" if $cleanargs;
$clean.=" $implicit" if $implicit;
$clean.=">";
}
}
}
}
}

my $entry;
while($entry=pop @stack) { $clean.="</$entry>" }

return $clean;
}

208 Name: Anonymous 2005-10-21 13:46 ID:cRmds2wO [Del]

Recapping, here are the things I'd like to see in the final release:

  • better configuration of date and time (with optional timezone offsets), parsing certain characters for individual elements (ie, yyyy/MM/dd(D) hh:mm:ss -5:00:00) and also accepting numerical inputs for fixed dates and times (Eternal September)
  • config.pl parameter to permasage after a certain thread filesize/total number of characters has been reached
  • change the no-ID-on-email option to no-ID-on-sage
  • no EMAIL_ID parameter (most if not everyone uses "Heaven" anyway, and if they really want to change it they can easily find the string in kareha.pl)

Some nitpicky template adjustments to mode_message in order to more closely resemble 0ch (see http://f17.aaa.livedoor.jp/~zerotest/jikken and http://0ch.mine.nu/jikken):

  • multi-page links (1-, 101-, 201-, etc) at the top of subpages
  • red, bold thread filesize indicator near the bottom of subpages
  • "read all later posts" link just below the filesize indicator
  • non-bolded post numbers
  • colons before dates
  • colons before names (thread subpages only)
  • colons after thread position number in main page thread list
  • smaller and (at least for Pseud0ch) black and bolded title in "Create new thread" box

338 Name: Anonymous : 2005-10-27 05:06 ID:Heaven [Del]

> I don't understand the argument for OH NO ANOTHER BUTTON MY WHOLE LIFE IS RUINNED crowd

It's all a design & layout question. I'd like to have the interface reduced to what is absolutely neccessary, esp. since I do not think many people really want to even bother or bother very often with the whole markup question.

> The replacement will be an option to select the default markup for a board, which makes much more sense overall.

I agree, this seems to make the most sense. I understand the "More options..." will not be showing up on boards with fixed settings, so I'll shut my mouth from now on. Apologies to all who I've been bothering.

12 Name: test 2005-10-13 02:11 ID:Heaven [Del]

>>10
Exactly, but considering a lot of people can't make heads from tails in config.pl, how about a saner default?

>>11
That's true, but if least-popular threads are set to be deleted, instead of oldest-first, you don't have to guess.

134 Name: Anonymous 2005-10-18 17:37 ID:EoLJTz7L [Del]

How about a function to replace an inappropriate image with a standard image? (aka HelloKitty.gif)

259 Name: coda 2005-10-22 15:01 ID:1jzeBBcT [Del]

the text

c < d

causes a <d> tag to be opened, which is not on the list, and therefore all the text until the next tag will be deleted. a better behavior in this case would be to just convert that < to &lt;. you even ought to do this for

a < b

too, despite the fact that b is a valid tag, because who the hell leaves the closing angle bracket out of their HTML tag?

creating the correct regexes for this is an exercise left to the reader.

208 Name: Anonymous 2005-10-21 13:46 ID:cRmds2wO [Del]

Recapping, here are the things I'd like to see in the final release:

  • better configuration of date and time (with optional timezone offsets), parsing certain characters for individual elements (ie, yyyy/MM/dd(D) hh:mm:ss -5:00:00) and also accepting numerical inputs for fixed dates and times (Eternal September)
  • config.pl parameter to permasage after a certain thread filesize/total number of characters has been reached
  • change the no-ID-on-email option to no-ID-on-sage
  • no EMAIL_ID parameter (most if not everyone uses "Heaven" anyway, and if they really want to change it they can easily find the string in kareha.pl)

Some nitpicky template adjustments to mode_message in order to more closely resemble 0ch (see http://f17.aaa.livedoor.jp/~zerotest/jikken and http://0ch.mine.nu/jikken):

  • multi-page links (1-, 101-, 201-, etc) at the top of subpages
  • red, bold thread filesize indicator near the bottom of subpages
  • "read all later posts" link just below the filesize indicator
  • non-bolded post numbers
  • colons before dates
  • colons before names (thread subpages only)
  • colons after thread position number in main page thread list
  • smaller and (at least for Pseud0ch) black and bolded title in "Create new thread" box

307 Name: dmpk2k!hinhT6kz2E : 2005-10-24 15:21 ID:Heaven [Del]

> It's a link, it screams "Click me!".

There's something to be said about obsessive-compulsive... >.>;

334 Name: Anonymous : 2005-10-26 20:38 ID:y5Ya7L3/ [Del]

Suggestion / Request

Making "More options..." an option in the configs.

Seems sensible, when you already have the ability to turn off WakabaMark as a board admin. Also, it will make me stop whining (a bit).

346 Name: Anonymous : 2005-10-27 16:36 ID:+jQxeHvJ [Del]

http://wakaba.c3.cx/sup/kareha.pl/1114201493/l50

Or use some sort of filter to replace them characters with underscores on upload.
This offcourse for files that keep their original filename.

108 Name: 34.75.33.65.cfl.res.rr.com 2005-10-17 19:51 ID:Heaven [Del]

I thought fusianasan was supposed to be a mod-only function to weed out bad posters. And what would be the difference between revealing the persons's IP and his ISP's domain?

>>99
I didn't mean to include Forcenick in there, sorry.
Adding to that, however, how about forced sage for specificed IPs? It'd make for a great slogan: Remember kids, tripcodes and aging are privileges, not rights!

298 Name: !WAHa.06x36 : 2005-10-23 20:54 ID:Heaven [Del]

Currently, pruning by age is measured from the time of the newest post in the thread, so it wouldn't really work. I'm not sure if this is the best behaviour or not, but it seems it makes more sense to kill threads nobody cares about than to kill slow-moving threads just because they get old.

79 Name: Anonymous 2005-10-17 09:16 ID:Heaven [Del]

>>n74,76

It's good for referencing replies, too.

The "always show the first post" behaviour is sort of confusing at first. It seems more intrusive than useful.

20 Name: !WAHa.06x36 2005-10-13 12:03 ID:gBva8ggI [Del]

>>19

I can't reproduce this on Firefox 1.0.4 nor Safari on the Mac, but that ancient Firebird had a similar problem (but even worse).

Anyone else? Try post with a | in your name.

345 Name: Anonymous : 2005-10-27 10:50 ID:Heaven [Del]

>>344 orz

260 Name: Anonymous 2005-10-22 16:20 ID:Heaven [Del]

This is the obligatory encoding test ... in <code>

 ㋋㏡
ゔ〲〰 ゔ〲〲〰〰 ゔ〲〰 ゔ〲〰 ゔ〲〰ゔ 〲〰ゔ 〲〰ゔ〲〲〰ゔゔ
〳〵ヷヷヷヷ〰〰〰〳〵ヷヷヷヷ〰〰〰〳〵ヷヷヷヷ〰〰〰
(♛ฺД)(*゜∀゜)~♡ℳฺℴฺℯฺ❤ℒฺℴฺνℯฺ..._〆(゜▽゜*)㌰㌰ ㍉㍍㌧㌔㌶㍊㌣㌦
㌀㌁㌂㌃㌄㌅㌆㌇㌈㌉㌊㌋㌌☠ฺ ☠ฺ ☠ฺ ☠ฺ ☠ฺ ☠ฺ ☠ฺ ☠ฺ ☠ฺ
☼♭♬♫♨♩♧♦♥♤♣♢♠♡♐ฺ♑ฺ♒ฺ♓ฺ ♔ฺ♕ฺ ♖

ฺ ♗ฺ♘ฺ♙ฺ♚ฺ♛ฺ♜ฺ♝(・∀・)/ヾ~~╋┓!㋦㋸㋭°

|壁|」゜ρ゜)」 ノ ヽ``~ 力㋦㋸㋭°
     / ⌒ヽ  
   / ´_ゝ`) I am sorry、 the β α κ α kopipe couldn't be carried out・・・
  |     /
   | /|  |
  // |  |
 U   .U  

340 Name: Anonymous : 2005-10-27 08:57 ID:Heaven (Image: 1010x554 png, 80 kb) [Del]

src/1130425040482.png: 1010x554, 80 kb

>>336
IMO minimalist web applications like Kareha should only focus on core content/functionality and leave the inconsequential presentation options up to browser extensions so that each user can tweak them to his whim. That's why I was pushing to offload the CSS selector to an extension.

>>337
Here's a better example, I think. Even if we can't remove the excessive side borders, is there a way to at least have rounded corners?

On formatting options: I think >>338 fails to understand that leaving the formatting options up to each individual user is a good thing by all means. Besides, they are absolutely necessary to the interface and core functionality, just like the Name and URL fields are. Preview functionality, on the other hand, should be implemented in an extension.

I think the issue that people have with the formatting options is that we don't have a Japanese counterpart to blindly model it after. Since we're going at this on our own, nobody is quite sure how it should be done. I'd like to see how it turns out on mode_image (if you feel the need to include it at all). :)

194 Name: Anonymous 2005-10-20 12:12 ID:Heaven [Del]

> Why?

I am not the user who initiated this parition but I find them to be triggered far too often.

> On another note, why have I seen partition instead of petition multiple times?

An old imageboard meme. Don't ask!

318 Name: Anonymous : 2005-10-25 17:35 ID:Heaven [Del]

style:none plz!

286 Name: Anonymous : 2005-10-23 19:13 ID:Heaven [Del]

> The error page in mode_message should more closely resemble that of 0ch (complete with "ERROR!" title).

Signed. And the style selector on the error page is pretty useless.

156 Name: Anonymous 2005-10-19 13:55 ID:Heaven [Del]

>>154 YOUdqn!

78 Name:   2005-10-17 09:13 ID:Heaven [Del]

>>70

?

> Personally, I find the reverse order listing, as well as the random order listing, to be a bit silly & useless.

Well, no, duh, that's the point. They're jokes.

> The only useful bonus feature here seems to be the comma range seperator, but it seems even in that case there is not much benefit to it (saves 1-3 links in the average case that it is needed, which is rare to begin with).

On the contrary, it's very useful when referring someone to a specific discussion in a thread where several discussions are going on, since you can make a link that only shows the relevant posts. Not just on the board but when linking to threads elsewhere.

344 Name: !WAHa.06x36 : 2005-10-27 10:34 ID:SjmelPTB [Del]

>>343

"When they shouldn't be?" They've always been bolded.

105 Name:   2005-10-17 15:17 ID:Heaven [Del]

>>103

Noted.

157 Name:   2005-10-19 14:11 ID:gBva8ggI [Del]

>>153

http://en.wikipedia.org/wiki/Public_Domain

It means anyone can do whatever they want with it. They can't claim copyright, though, since they didn't create it in the first place. They can modify it an claim copyright on their modifications, at least as long as they're significant enough, but that doesn't affect existing works in the public domain.

> This is kinda what I had pushed for earlier in >>52. I think that separating the sage (aka, "don't bump"), fusianasan (aka, "show IP"), and ID:Heaven (aka, "no ID") functions from any particular post elements in the main scripts would be ideal for implementing Kareha in systems where inputting a certain string to trigger these functions is not intuitive (ie, every board outside of the 2ch/Futaba family). These trigger strings (S_DONTBUMP, S_SHOWIP, S_NOID) and their assignment to a certain form field input could be instead implemented individually in each template.

There's no obvious way to do this, since there has to be code that specifically checks a field and takes certain actions long before the template comes into play. It'd take some sort of plugin system to implement it, and I don't think that's quite called for.

Also >>154 is Kami.

262 Name: Anonymous 2005-10-22 16:46 ID:Heaven [Del]

"page top" is better imho

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