Deleted posts & post counts (ugh) (6)

1 Name: G : 2006-02-15 11:15 ID:lyRqWzW1 [Del]

Correct me if I'm wrong: Using Kareha, if I delete a post, the default behavior is to remove the post invisibly. There's also a way to leave a 'deleted by' message, maybe.

That's great, but the post still seems to be there, just empty and not shown. They still count towards a thread's post count for displaying replies, for example. I'm thinking of a situation in which these invisible posts result in no replies being shown for the threads.

Can this be worked around? Either by changing the script not to count the invisible, deleted posts; or by modifying the deletion process to tracelessly remove posts?

Apologies in advance if this makes no sense, or is completely wrong.

2 Name: !WAHa.06x36 : 2006-02-15 15:53 ID:5tvRpgMj [Del]

What message or lack of message is left behind depends on the template. The futaba-style template silently removes posts, the 2ch-style one leaves a message.

It might be possible to work around the empty posts when counting how many posts to show, but it's sort of hairy to do and I don't see it as a big enough problem in practice to put in the effort to work around it. If anyone else wants to fix it for me, go ahead.

3 Name: G : 2006-02-15 17:51 ID:BfUP0dAx [Del]

Okay, well, I'm going to see if I can do it. I'll take a look, but one question, first:
Does one of those methods seem immediately easier or better?
I'm not a rock-star, and getting acquainted with the code will probably take me even longer than hacking in one or the other. If it were you, which would you try for?

4 Name: G : 2006-02-17 22:42 ID:lyRqWzW1 [Del]

Okay. So, it might make sense to add a 'REALLY_DELETE_POST' setting in Although, at least in the case that the deleted template is simply blank, I do consider the current behavior to be sort of a bug.

Anyways, yeah. Then in delete_post, at the end in the conditional unless ($fileonly), have an extra 'if (REALLY_DELETE_POST) {write_thread_with_skip($thread, $postnum);}

My plan is to have a new write_thread() that will skip a specific post, and thus essentially delete it. The name of the function could reflect that, maybe... Huh.

Anyways, write_thread_with_skip($$) will be just like write_thread($), but for one section. The line "push @page,map { get_post_text($thread,$_) } 1..$$thread{postcount};" should be broken up into two parts, one for all the threads before the thread we want to delete, and one for after.

I can't figure that stuff out, though, so I put it in a for loop. Frown. It's almost working, or else I'd just post my code. I thought if a competent person looked at this, they'd either know how to do it right or know what I'm doing wrong. Perl seems like some good stuff, but it's a little confusing at first.

5 Name: G : 2006-02-17 22:47 ID:lyRqWzW1 [Del]

And, uh, then I guess you'd still have to fix the post #'s and post count, too. Baby steps.

6 Name: !WAHa.06x36 : 2006-02-18 07:23 ID:Heaven [Del]


That's the main problem, because the post number appears in several places, and there's no way to know where exactly since there might be just about any template in use. It's a side effect of keeping everything pre-rendered in flat files...

I don't think actually removing posts is going to get you anywhere, it's probably better to try and fix the abbreviation code to ignore empty posts, if it really bothers you.

Name: Link:
Leave these fields empty (spam trap):
More options...