kuopassa:
I think the best arrangement would be to have a small plugin that makes using Ajax a query to database when user has typed the title. So when the title is written, the plugin would give a message to the user warning that "this title already exists" or something like that.
That's a nice idea, but if you introduce some Ajax tools, keep in mind it will go out of miniBB's
free software concepts :)
tom322:
It's also important to determine what is a 'duplicated title' - it could be either exactly the same (make sure to ignore special characters, numbers, and letter capitalization in this case) or similar. If similar, a function to check in % how similar it is may be needed. I'd suggest a similar to avoid users adding some 'Lol' or 'Thanks' to the title.
Yes... that could add more "
principles" to this add-on.
I'm out of the office at the moment, but as I remember, mySQL has a possibility to search by similar text, still a special column type should be introduced for this. Type "
mysql similar text" to search, and you will find lots of dedicated results.
Here, the most important question is what you would consider as "
duplicated'? If you're about just
exact phrases or words, then it could be a simple implementation (but it's easy to tweak on the user's end then, just adding comma or one extra char...). If you're about something what mySQL could provide by
similarity, then it's more complicated.
Anyway, it's definitely not about
a single line code added to bb_func_pthread.php as you propose. And it shouldn't be added to bb_func_pthread.php, in general, it could be coded at the add-on's level.
It's not an easy add-on, in general, because it needs more coding than you might expect...