Real time Duplicate title check

On my website there are a lot of authors and they are all writing about italian ‘scene’ so sometimes it happens that two of them write the same post or use same title so what I’m looking for is a way to prevent duplicated posts using title comparison.
Something like here on stackexchange or that is Built in vBullettin and Data Life Engine.
Is there any tutorial, example or even one of you who can help me achieve this?

1 Answer
1

You can hook 'save_post' or 'wp_insert_post' (both executed the same in wp_insert_post()) to check for autosaves and notify the author(s) accordingly. The checks that I would do would be to check that the author of the autosave (aka, revision) and the new autosave are not the same, check that the post title is the same and that the content is SIMILAR, to do it right (enterprise strength) you’d need a decent algorithm, probably based on the counts of words or something like that, to do it quick you can just use strpos() and check if one contains the other. If you need example code, provide as many specifics on the implementation (in a comment) as you can and I’ll write it up for you.

Leave a Comment