UBB.Dev
Posted By: JoshPet Admins: Customize the Welcome PM and Email - 10/23/2002 7:27 AM
Here's another "how to" for Admins.

When a new user registers at your site, they receive a very generic "Welcome" Private Message and an email confirming their password.

You can customize these messages with a few simple edits to your language files.

I would recommend customizing the "Welcome" PM to encourage people to complete their profiles and make them aware of things they should take note of on your site. For example, if you have a "newbie" or "getting started" forum, your message might tell them to start there first.

To modify the Welcome Private Message:

- Open the /languages/english/adduser.php file (or whatever language you use).

- Look for this line:
$ubbt_lang['WEL_MSG'] = "Welcome to our boards! Please take the time to edit your profile to take full advantage of all of our features.";

- Edit the text between the quotes to whatever you wish.
  Tips:
  - You may use <br /> to add a line break to the text.
  - If you need to use the quote mark (") within the text, you need to escape it out by inserting the \ mark before the quotes in your test string, like this: "   Don't do this for the first or the last quote, only quotes within the quotes.


The user also receives a welcome email, which confirms their username and password. You can add a little custom text to this using the same technique.

To modify the Welcome Email Message:

This email comes looking something like this:

Someone from the ip address '1.2.3.4.5' registered the Username "testing". The password for this Username is "testing".

Since it inserts variables into the text, the easiest thing to do, is to add text to the beginning of the message. This is the easiest way without modification to the scripts.

- Open the /languages/english/adduser.php file (or whatever language you use).

- Look for this line:
$ubbt_lang['PASS_BODY1'] = "Someone from the ip address";

- Edit the text between the quotes to whatever you wish.
  Tips:
  - You may use \n to add a line break to the text.
  - If you need to use the quote mark (") within the text, you need to escape it out by inserting the \ mark before the quotes in your test string, like this: "   Don't do this for the first or the last quote, only quotes within the quotes.


By customizing these two messages, you can make an extra special first impression on your new users.

Hope this helps!

Right on Josh. I really enjoy reading the tweaks and recommendations you post.

I'd like to see what others have decided on inputting in these two fields.

If any of you out there would like to share what you have done, I'd love to see it. I'm not good at creativity....

Thanks again Josh.
To take this a little further, how do I change the title of the Welcome PM? In other words, instead of saying "Welcome", I'd like it to say, "Please read this important message".

(and while I'm at it, in which file do I specify the ID number of the user that the Welcome PM is from? I don't want it to be from me, the Admin, anymore... I want to pawn the job off to somebody else.)
OK -

In /languages/english/generic.php you'll see:

$ubbt_lang['INTRO_SUB2'] = "Welcome";


That's the subject of the PM. It's in "generic" which Implies the textstring is used elsewhere, but upon searching all the scripts - I didn't find it used by any other script. So you can change the langauge file there.


As per the # that the Welcome PM comes from -

In adduser.php find this:

Code
<br />// --------------------------------------<br />// Put the message into the Messages table<br />   $query = " <br />         INSERT INTO {$config['tbprefix']}Messages (M_Uid,M_Status,M_Subject,M_Sender,M_Message,M_Sent)<br />         VALUES ('$Uid','$Messstat_q','$Subject_q','[:"red"]2[/]','$Message_q','$date')<br />      "; <br />   $dbh -> do_query($query);<br />


Note the number "2" above - change it to the usernumber of the person you want the welcome PM to come from.
Josh...wish I had noticed this thread sometime ago! (Would have saved some time...)

Anyway, might add that in the same language file admins can change the SUBJECT of the welcome email, from "Your password for..." (followed by the name of the board) (field name: PASS_SUB) to whatever they wish...useful on boards where most users enter a password on the new user screen, and where this message is used mostly for conveying other info! Tony
Josh, or anyone else out there....have you tried this with 6.4 or is there alternate methods of doing this?

Thanks.
6.3 and higher, you can edit all wordlets right from the Admin menu. Very user friendly.

Admin -> Edit a Language File

woot. something new for me. thanks josh
[]JoshPet said:
6.3 and higher, you can edit all wordlets right from the Admin menu. Very user friendly.

Admin -> Edit a Language File

[/]

Just as a warning though - if you enter \n via the admin panel, and then edit the same language file again you will find it now says \\n - edit it again and it now says \\\n and so on - so it might be best to do it via FTP.

Of course this may be a bug

There also seems to be a limit - I altered mine to give some helpful tips on deleting cookies etc., and it didn't display a thing, until I reduced the length of the wordlet.
Or you can go into the Languages section and search for the key boards, edit from inside the control panel wink
Originally Posted by AshtarRose
Or you can go into the Languages section and search for the key boards, edit from inside the control panel wink


ehr, yes, you can now. Not in 2003 when the last post in this thread was written smile
Leave it to ash to be fashionably (4 years) late...
wish ash had told me that in 2003 LOL
© UBB.Developers