Users have to enter a unique (sic) post subject. Can't be the same as the topic title
I got this idea when reading this topic by Improfane on phpbb.com - Got me thinking that maybe there are some forums out there that may benefit from this snippet, so I thought I'd write it up. Very simple, just takes 1 small addition of code in posting.php
What it does is check to see if the post subject matches the topic title. If they are the same, the post will not be submitted until it differs. This will not affect editing the 1st post in a topic. Checks are made when replying to a topic and quoting a post.
# #-----[ OPEN ]------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------ #
// Parse subject
# #-----[ FIND ]------------------------------------------ #
$error[] = $user->lang['EMPTY_SUBJECT']; }
# #-----[ AFTER ADD ]------------------------------------------ #
if (!$refresh && ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && !$post_data['topic_first_post_id'] == $post_id))) { if ($post_data['post_subject'] == $post_data['topic_title']) { $error[] = "Please use a post subject that is not the same as the topic title"; } }