Advertisement:

Author Topic: Require to add subject in PM  (Read 4404 times)

Offline Adrek

  • Sophist Member
  • *****
  • Posts: 1,093
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Adrek.pl
Require to add subject in PM
« 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 ::)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Require to add subject in PM
« Reply #1 on: July 11, 2012, 02:54:51 PM »
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

  • Guest
Re: Require to add subject in PM
« Reply #2 on: October 30, 2012, 05:51:12 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
Code: [Select]
$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];
REPLACE WITH
Code: [Select]
//$subject['subject'] = $subject['subject'] == '' ? $txt['no_subject'] : $subject['subject'];
FIND
Code: [Select]
$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];
REPLACE WITH
Code: [Select]
//$message['subject'] = $message['subject'] == '' ? $txt['no_subject'] : $message['subject'];
FIND
Code: [Select]
$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];
REPLACE WITH
Code: [Select]
//$row['subject'] = $row['subject'] == '' ? $txt['no_subject'] : $row['subject'];
FIND
Code: [Select]
$context['subject'] = $form_subject != '' ? $form_subject : $txt['no_subject'];
REPLACE WITH
Code: [Select]
//$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

  • Guest
Re: Require to add subject in PM
« Reply #3 on: October 31, 2012, 07:52:28 AM »
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: [Select]
$txt['no_subject'] = '(No subject)';
REPLACE WITH
Code: [Select]
$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..,

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,949
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Require to add subject in PM
« Reply #4 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.
Michael Eshom
Cincy Space - now open!

MadTogger

  • Guest
Re: Require to add subject in PM
« Reply #5 on: November 01, 2012, 04:44:03 AM »
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..,