News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Require subject for pm's

Started by smp420, August 26, 2009, 10:42:12 PM

Previous topic - Next topic

smp420

All my inbox is filled with pm's that dont have subjects i think there should be a mod that requires you to enter a subject for this
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Arantor

It would actually be just a case of removing the default of (no subject), though it will display that if there is a message already without a subject.

It can be done - it might take me a few days to get on to this one though.

Kays

A quick fix I use is to add the following to modifications.english.php (or the modifications file for your language) in the Themes/default/Languages folder above the "?>" at the bottom.



$txt[24] = '';


For SMF 2.0:


$txt['no_subject'] = '';


The user will get an error if the subject is left blank.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

smp420

"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Arantor

Thanks, Kays :)

I was going to actually direct on how to change the relevant parts - then bundle it up as a modification - but that works great.

Kays

That's how I've always done it.

But in looking at it, there's only one line in PersonalMessage.php which sets that up.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Arantor

I don't think it would be a huge deal to package it as a mod but I'd want to do it by modding PersonalMessage.php to not include the string initially, rather than emptying the language string, but that's just me.

Kays

That's how I would do it also. Adding the blank language string is just a smpler and maybe safer method for a manual edit.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Arantor

I won't argue with that at all. But if done properly the mod should be good to run from the package manager.

I might look into this one later on, but I think I should stop modding for a few days - I'm 5 in 5 days right now...

Advertisement: