Private Message Warning

Written by Mick in Tutorials on 17 May 2019

Creating a very simple warning message when users private message each other. In this case, I wanted a specific warning shown when sending a private message using a simple line of html and css code. Nothing fancy, nothing troublesome. This area can be used to your liking, ie; ads, rules, etc.

1. Open Themes/default/PersonalMessage.template.php and find:

echo '
<dl id="post_header">';

Add after:

        echo '
                                <div class="pm-warning"><p>Please, do not send private messages to the author for support. Instead, reply to articles so others can also find the answer. <br /> Regards, The idesignSMF team.</p></div>';

2. Open your current theme's css file and at the very end add:

.pm-warning {
   background-color: #2ecc71;
   width: 100%;
   color: #ffffff;
   font-size: 18px;
   line-height: 22px;
   text-align: center;
   padding: 15px;
   display: block;
   margin-bottom: 20px;

Replace hex colors to your liking as well as the text

Reference: About PersonalMessage.template.php scripting help

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time.

Get more stuff like this

Subscribe to our mailing list and get interesting content and updates.