MyBB Community Forums

Full Version: Number of characters in the preview of a PM-alert
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Once again I need your help:

If someone sends a PM to another user, he will receive one email to say there's a PM for him/her on the board.
In that email, there is a short description of the text of that PM, followed with...

Is it possible to increase/decrease the number of characters send in this email? For example, the email will only show the first 50 characters so the receiver has to go to te PM on the forum to show the whole message?
In which template I can adjust this?
open inc/datahandlers/pm.php , find:

$parser_options = array(
'me_username' => $pm['sender']['username'],
'filter_badwords' => 1
);

Add this below.

$pm['message'] = my_substr($parser->text_parse_message($pm['message'], $parser_options), 0, 100)."...";

You can change 100, but I found it looks best.

I also added this to email_newpm in messages lang.

*Please do not reply to this Email you need to log-in to reply.
Thanks a lot Sarisisop, I will try it.......
(2018-04-21, 01:37 PM)wageral Wrote: [ -> ]Thanks a lot Sarisisop, I will try it.......

You're welcome, I've been using it for a few years now.

*Just remember that it will revert if inc/datahandlers/pm.php is updated so keep a note of the changes you made.
^ you might be knowing, patches plugin can be used for modifying the core files ..
(the plugin is working on MyBB 1.8.x)
(2018-04-21, 01:57 PM).m. Wrote: [ -> ]^ you might be knowing, patches plugin can be used for modifying the core files ..
(the plugin is working on MyBB 1.8.x)

Thank you M I didn't know about it I will have a look.