Advertisement:

Author Topic: Remove (no subject) from Personal Messages  (Read 18159 times)

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Remove (no subject) from Personal Messages
« on: September 17, 2009, 12:53:47 PM »
Are your members lazy? mine are. Having loads of PMs with (no subject) was a problem. Being the Admin and "teccy" I was continually getting messages with (no subject) but asking specific questions. Trying to find them later to answer or quote was proving very difficult.

So I decided I needed to force my members to input a subject line. If you delete the default (no subject) and try and send the PM you get an error so all that was needed was to remove the default text.

I found this was stored in the variable $txt[24] in the Themes\default\languages\index.english.php file. So I changed it from:

$txt[24] = '(no subject) ';

to

$txt[24] = ' ';    Ensuring you have at least ONE space between the ' '

Now they have to put a subject in when they create the message.

Hope this is of use and may be suitable for Tips and Tricks?

Note to Admin: Please move to Tips and Tricks if you think it suitable.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,045
    • Arantor on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #1 on: September 20, 2009, 12:36:28 PM »
The equivalent in 2.0 would be $txt['no_subject'].

Word of advice with this: there are instances where this can be displayed elsewhere, though it is far from common.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Remove (no subject) from Personal Messages
« Reply #2 on: September 21, 2009, 03:16:04 PM »
The equivalent in 2.0 would be $txt['no_subject'].

Word of advice with this: there are instances where this can be displayed elsewhere, though it is far from common.
Sorry Arantor, I don't understand. What can be displayed elsewhere? The phrase "No Subject", the variable or this post  ???
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,045
    • Arantor on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #3 on: September 21, 2009, 03:20:48 PM »
There are instances where the string (no subject) comes up elsewhere in the forum, which feeds on $txt['no_subject'] (or $txt[24]), so while it does work to do this, it isn't always recommended.

For example: in the event of a thread's title being deleted by a moderator, normally (no subject) would be substituted in.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Remove (no subject) from Personal Messages
« Reply #4 on: September 21, 2009, 03:33:03 PM »
There are instances where the string (no subject) comes up elsewhere in the forum, which feeds on $txt['no_subject'] (or $txt[24]), so while it does work to do this, it isn't always recommended.

For example: in the event of a thread's title being deleted by a moderator, normally (no subject) would be substituted in.
Aha! Thanks, hadn't realised that, I'll warn the mods. Might revisit this and create a new variable to hold "No Subject" for other areas.

[Edit] Just checked this out. If a topic is created without a subject or a topics subject is deleted as you suggested, then the error message "No Subject was filled in" is shown like it does in personal messages posted without a subject. So in a way, removing the default is good here too as it forces the user to put one in. Seems the tip has even more benefits than I thought :)
« Last Edit: September 21, 2009, 03:41:23 PM by Chas_Large »
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,045
    • Arantor on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #5 on: September 21, 2009, 03:46:49 PM »
That error is actually the standard error for doing that, but there are times when it can happen - though it's not normal practice.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Remove (no subject) from Personal Messages
« Reply #6 on: November 18, 2009, 06:25:48 AM »
excellent tip!!!

Offline supahben

  • Jr. Member
  • **
  • Posts: 114
  • Gender: Male
  • La la la
    • MobiPhreak - Underground Mobile Discussions
Re: Remove (no subject) from Personal Messages
« Reply #7 on: December 20, 2009, 05:13:10 PM »
thanks! :) did this on my site :D

Offline johnnynine

  • Newbie
  • *
  • Posts: 9
Re: Remove (no subject) from Personal Messages
« Reply #8 on: June 27, 2010, 11:27:28 PM »
Thanks, although I wish though could be done without modifying the source code.

Offline Samker

  • Jr. Member
  • **
  • Posts: 145
  • Gender: Male
  • "Whatever doesn't kill us makes us stronger."
    • SCforum.info - Samker's Computer Forum
Re: Remove (no subject) from Personal Messages
« Reply #9 on: June 29, 2010, 02:05:13 PM »
Thanks  Chas! :)
Samker's Computer Forum - SCforum.info

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,136
  • Master of BBC Abuse
Re: Remove (no subject) from Personal Messages
« Reply #10 on: July 02, 2010, 05:14:18 AM »
Thanks, although I wish though could be done without modifying the source code.
In 2.0 you can edit language strings in admin so it's hardly a big deal. Of course if you were crazy you could write a mod for this but it really would be a total waste of time.

Nice tip anyway. I might use it.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Remove (no subject) from Personal Messages
« Reply #11 on: July 05, 2010, 02:29:15 AM »
Thanks, although I wish though could be done without modifying the source code.
In 2.0 you can edit language strings in admin so it's hardly a big deal. Of course if you were crazy you could write a mod for this but it really would be a total waste of time.

Nice tip anyway. I might use it.
Indeed you can and for those not too familiar with doing so, here's how.
Admin > Configuration > Themes and Layout > Modify Themes.
Under SMF default theme, click the link "Browse the templates and files in this theme."
Click "Languages" (directory icon)
Click "Index.english.php or whatever language file you're using. This will open in the built in editor.
Search for $txt['no_subject'] = 'No Subject'; and edit it accordingly
Click the SAVE CHANGES button.
All done :)

My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #12 on: July 05, 2010, 02:36:43 AM »
Indeed you can and for those not too familiar with doing so, here's how.
Admin > Configuration > Themes and Layout > Modify Themes.
Under SMF default theme, click the link "Browse the templates and files in this theme."
Click "Languages" (directory icon)
Click "Index.english.php or whatever language file you're using. This will open in the built in editor.
Search for $txt['no_subject'] = 'No Subject'; and edit it accordingly
Click the SAVE CHANGES button.
All done :)

you can done it via

* My Community »* Administration Center »* Languages »* Edit Languages(click on english if you want to edit it)

Edit Language Entries  << (in it choose general strings)

Find (No subject) in it and edit it by simply replace the test there with a space ;)

Github Profile
My Mods
How to enable Post Moderation
Paid Support
Elkarte


"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline lucas-ruroken

  • SMF Hero
  • ******
  • Posts: 4,907
  • Gender: Male
  • Adk Developer
    • lucas.ruroken on Facebook
    • lucasruroken on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #13 on: July 06, 2010, 06:25:10 PM »
For diferentes languages?

You can add that:
Search:
$txt['no_subject'] = 'Something/algo';

and replace with
$txt['no_subject'] = '';

;)
« Last Edit: September 18, 2010, 01:18:30 PM by lucas-ruroken »
Adk Portal 3.1 is coming....

Design your universe!

Offline Idiotji

  • Jr. Member
  • **
  • Posts: 172
    • Every Thing Can Be Customized
Re: Remove (no subject) from Personal Messages
« Reply #14 on: September 14, 2010, 07:38:43 PM »
Not working in mine case i change the name (no subject) to (welcome) but still by default no subject comes???
http://tekloverz.com
This Time Every Thing Is Customized

Offline lucas-ruroken

  • SMF Hero
  • ******
  • Posts: 4,907
  • Gender: Male
  • Adk Developer
    • lucas.ruroken on Facebook
    • lucasruroken on GitHub
Re: Remove (no subject) from Personal Messages
« Reply #15 on: September 14, 2010, 09:08:19 PM »
are you using SMF2?

If so... delete the content of the cache folder ;)
Adk Portal 3.1 is coming....

Design your universe!

Offline marwan

  • Jr. Member
  • **
  • Posts: 103
Re: Remove (no subject) from Personal Messages
« Reply #16 on: September 18, 2010, 05:02:01 AM »
For diferentes languages?

You can add that:
Search:
$txt['no_subject'] = 'Something/algo';

and replace with
$txt['no_subject']

;)
Great tip! So in one- English languages I should remove the equal mark and whatever is after it?

Offline hsimpson

  • Semi-Newbie
  • *
  • Posts: 21
Re: Remove (no subject) from Personal Messages
« Reply #17 on: September 23, 2010, 04:35:34 PM »
Thanks for the tip mate  ;)
I'm in no condition to drive...wait! I shouldn't listen to myself, I'm drunk!

Offline faeriedust

  • Jr. Member
  • **
  • Posts: 103
Re: Remove (no subject) from Personal Messages
« Reply #18 on: November 01, 2010, 02:12:15 PM »
Thanks, although I wish though could be done without modifying the source code.
In 2.0 you can edit language strings in admin so it's hardly a big deal. Of course if you were crazy you could write a mod for this but it really would be a total waste of time.

Nice tip anyway. I might use it.
Indeed you can and for those not too familiar with doing so, here's how.
Admin > Configuration > Themes and Layout > Modify Themes.
Under SMF default theme, click the link "Browse the templates and files in this theme."
Click "Languages" (directory icon)
Click "Index.english.php or whatever language file you're using. This will open in the built in editor.
Search for $txt['no_subject'] = 'No Subject'; and edit it accordingly
Click the SAVE CHANGES button.
All done :)

I've been trying to accomplish this but I'm having a problem. After I click on languages, it gives me settings.english.php but there is no $txt['no_subject'] anywhere in there. This is what I have in that file:

<?php
// Version: 1.1; Settings

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'The classic look that introduced the groundbreaking PHP/MySQL port of YaBB and distinguished it through two years of development until its rebirth as SMF.<br /><br />Author: <i><a href="mailto:webmaster@yabbse.org">The YaBB SE Team</a></i>.';

?>

How or where would I insert the "no subject" part? (Sorry, I'm a neophite)
I'm using 1.1.11

Oya

  • Guest
Re: Remove (no subject) from Personal Messages
« Reply #19 on: November 01, 2010, 02:14:15 PM »
you won't find it in settings.english.php, the instructions say index.english.php...