News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Require to add subject in PM

Started by Adrek, July 11, 2012, 01:26:44 PM

Previous topic - Next topic

Adrek

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 ::)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

emanuele

Don't tell anyone, but a mean dev (unfortunately not me) removed the "(no subject)" from 2.1 a while ago! Shhh!!


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

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 ::)

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
$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];

REPLACE WITH
//$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];

FIND
$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];

REPLACE WITH
//$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];

FIND
$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];

REPLACE WITH
//$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];

FIND
$context['subject'] = $form_subject != '' ? $form_subject : $txt['no_subject'];

REPLACE WITH
//$context['subject'] = $form_subject != '' ? $form_subject : $txt['no_subject'];

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
$txt['no_subject'] = '(No subject)';

REPLACE WITH
$txt['no_subject'] = '';

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.
Michael Eshom
Christian Metal Fans

MadTogger

Quote from: Oldiesmann on October 31, 2012, 04:38:40 PM
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.


Sorry, I don't quite know what you mean by nothing to click on.

All I did was remove the standard (no subject) text from appearing in the subject field.

When there is no text in the subject field it is impossible to post or preview a message, so the sender has to enter their own subject, the software tells you there is an error.

Surely this process is just the same as the user having to first delete the (no subject) text and then type in their own subject text, or maybe I am losing the plot.

Regards..,

Advertisement: