in reply to Don't allow duplicate posts with the same title
One of the major problems with checking for "same post from same user" is that you have not taken into account anonymous monks. I wrote* a bulletin board (in Perl, naturally) and this is how I determine whether a post is a duplicate: if the previous post has the same title, and is from the same IP, it is marked as a duplicate and the person is encouraged to change the title if, indeed, they want to post it and it is not a duplicate.
This approach may not be ideal here, in a place where new posts can appear very quickly, but it's one way to do it. For this site, I think that using a combination of lastnode_id, IP, and title would be best: if all three match, consider it a duplicate post, no matter how long it has been. Having the lastnode_id addresses Ozymandius' concern, as long as you reply to the person, and not to the top node (which is what you should do). Having the IP addresses the issue of 2 different anonymous monks being able to post replies to the same post, with the same title. As a final perk, you could have a simple "yes, I really want to post this" checkbox along with duplicate post message.
In summary:
$IP = $ENV{'REMOTE_ADDR'}; ## Yes, there are caveats here... $lastpost = $lastpost{$IP}; ## Stored in a database ## ($lastpost is a hashref) if ( $user eq $lastpost->{"USER"} and $Q::lastnode_id == $lastpost->{"LASTNODE"} and $Q::node eq $lastpost->{"NODE"} and !$Q::PostAnywayCheckbox ) { &DoubledPost; }
*Wrote or "am writing"
Perl scripts: artwork that never
Assents to be done.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE (tilly) 2: Don't allow duplicate posts with the same title
by tilly (Archbishop) on Sep 21, 2000 at 06:21 UTC | |
by turnstep (Parson) on Sep 21, 2000 at 16:04 UTC | |
by tilly (Archbishop) on Sep 21, 2000 at 16:14 UTC |