SMF Development > Applied or Declined Requests
Require to add subject in PM
phantomm:
Why in Private messages subject is not required? By default it has (No subject) title.
Now if someone writes new PM, he takes time to explain everything in it, and doesn't have time to change subject? I don't even read those messages...
I think that subject in PM should be required, without default content.
It is the same if I would add in this topic (No subject). Would you even open it?
I know that I would just scroll down to next topic... but it's just me ::)
emanuele:
Don't tell anyone, but a mean dev (unfortunately not me) removed the "(no subject)" from 2.1 a while ago! Shhh!!
MadTogger:
--- Quote from: phantomm on July 11, 2012, 01:26:44 PM ---Why in Private messages subject is not required? By default it has (No subject) title.
Now if someone writes new PM, he takes time to explain everything in it, and doesn't have time to change subject? I don't even read those messages...
I think that subject in PM should be required, without default content.
It is the same if I would add in this topic (No subject). Would you even open it?
I know that I would just scroll down to next topic... but it's just me ::)
--- End quote ---
Hi,
I didn't like the way that Private Messages could be posted without a subject apart from the default (no subject).
Here's my solution.
Find the file PersonalMessage.php.
FIND
--- Code: ---$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];
--- End code ---
REPLACE WITH
--- Code: ---//$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];
--- End code ---
FIND
--- Code: ---$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];
--- End code ---
REPLACE WITH
--- Code: ---//$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];
--- End code ---
FIND
--- Code: ---$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];
--- End code ---
REPLACE WITH
--- Code: ---//$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];
--- End code ---
FIND
--- Code: ---$context['subject'] = $form_subject != '' ? $form_subject : $txt['no_subject'];
--- End code ---
REPLACE WITH
--- Code: ---//$context['subject'] = $form_subject != '' ? $form_subject : $txt['no_subject'];
--- End code ---
There is probably an easier and tidier way to do this but it seems to work.
Regards..,
MadTogger:
Forget what I posted above, I have come up with a much simpler way to achieve the same result.
in Themes/default/languages find the file index.english.php, or the same for your own set language.
FIND
--- Code: ---$txt['no_subject'] = '(No subject)';
--- End code ---
REPLACE WITH
--- Code: ---$txt['no_subject'] = '';
--- End code ---
Now the subject field is not populated with any text as standard and the software checks for a valid subject upon hitting the Preview or Post button.
Regards..,
Oldiesmann:
There's just one minor problem with that. If you don't have the PM view set to "all at once", then there will be nothing to click on in your inbox to actually view that message once it isn't the most recent one.
Navigation
[0] Message Index
[#] Next page
Go to full version