PM to New Members [Added Support for 2.0 RC3]

Started by Nibogo, December 04, 2008, 08:28:42 AM

Previous topic - Next topic

DSystem

Great MOD

Translation to Portuguese Brazil:

<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['pm_register'] = 'Enviar MP para novos membros';
$txt['pm_register_id'] = 'Selecione o ID do remetente';
$txt['pm_register_username'] = 'Nome de usuário remetente';
$txt['pm_register_subject'] = 'Assunto da MP';
$txt['pm_register_body'] = 'A mensagem da MP (BBCODE)';
$txt['pm_register_body_desc'] = 'Isto é onde você define a mensagem que você gostaria de enviar para o usuário. Para inserir o nome de usuário do usuário, apenas inserir "<b>{$username}</b>".  Para o nome do fórum use "<b>{$forumname}</b>".';
]]></add>
</operation>
</file>

Surgical

Why doesnt this work for 2.0.7?

And if it does, can you give me instructions on how to get it working?


luuuciano

No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

joeyjojoshabadoo

i just installed this on 207 seems fine, no funny business needed with emulators or anything

peterwaalker


lmorgh

Hello,
Sorry for digging up an old thread, but I'm in need of a mod that would send an automated PM on new members registration, and this looks exactly what I'm looking for. Unfortunately I cannot get it to work on SMF 2.0.10.  :-\

I can install it through package manager fine, and all the settings are there. The only problem is that it doesn't actually send a PM to new members. Is there any chance for this mod to be updated? Or could anyone provide me with an alternative? I just registered, so I don't really know how things work around here. Hope someone is able to help me out.

Shambles

To get this to work on 2.0.11 I had to make a small change to Sources/Subs-Members.php following installation:

Code (Find) Select

   // PM to New Members - Select the Username and the ID of the sender
   if (!empty($modSettings['pm_register_id']) && !empty($modSettings['pm_register_username'])){
   
    // Set the PM Body with all the settings
    $pm_words = array(
'{$username}', '{$forumname}'
);

$pm_register_body = str_replace($pm_words,
array(
$regOptions['username'],
'[url=' .$scripturl. ']' .$context['forum_name']. '[/url]',
),
$modSettings['pm_register_body']
);

$pm_register_body = preg_replace('~<br(?: /)?' . '>~', "\n", $pm_register_body);
$pm_register_body = un_htmlspecialchars($pm_register_body);

   $pmfrom = array(
      'id' => $modSettings['pm_register_id'],
      'name' => $modSettings['pm_register_username'],
      'username' => $modSettings['pm_register_username'],
   );
   $pmto = array(
      'to' => array($memberID),
      'bcc' => array()
   );
   }
   
   // PM to New Members - Send the PM only if the mod is enable
   if (!empty($modSettings['pm_register_subject']) && !empty($modSettings['pm_register_body']) && !empty($modSettings['pm_register']) && !empty($modSettings['pm_register_id']) && !empty($modSettings['pm_register_username']))
   sendpm($pmto,$modSettings['pm_register_subject'],$pm_register_body, 0, $pmfrom);



Code (Replace) Select

   // PM to New Members - Select the Username and the ID of the sender
   if (!empty($modSettings['pm_register_id']) && !empty($modSettings['pm_register_username'])){
   
    // Set the PM Body with all the settings
    $pm_words = array(
'{$username}', '{$forumname}'
);

$pm_register_body = str_replace($pm_words,
array(
$regOptions['username'],
'[url=' .$scripturl. ']' .$context['forum_name']. '[/url]',
),
$modSettings['pm_register_body']
);

$pm_register_body = preg_replace('~<br(?: /)?' . '>~', "\n", $pm_register_body);
$pm_register_body = un_htmlspecialchars($pm_register_body);

   $pmfrom = array(
      'id' => $modSettings['pm_register_id'],
      'name' => $modSettings['pm_register_username'],
      'username' => $modSettings['pm_register_username'],
   );
   $pmto = array(
      'to' => array($memberID),
      'bcc' => array()
   );
   
   sendpm($pmto,$modSettings['pm_register_subject'],$pm_register_body, 0, $pmfrom);
}


NOTE: If you have the BCC Messages Mod installed, also do the following:

Code (Find) Select

   sendpm($pmto,$modSettings['pm_register_subject'],$pm_register_body, 0, $pmfrom);


Code (Replace) Select

   sendpm($pmto,$modSettings['pm_register_subject'],$pm_register_body, '', 0, $pmfrom);

Grammy

Quote from: Shambles on October 26, 2015, 07:22:43 AM
To get this to work on 2.0.11 I had to make a small change to Sources/Subs-Members.php following installation:



Even with your edit and the proper ID, Sender name, etc. in settings, Shambles, it's not working (functioning at all) for me.  So I was wondering...  I'm testing this by creating new registrations, then logging in under those usernames to see if I have a PM.  Officially, however, registration is disabled.  So, even though I manually created the new users, must registration be enabled in order for this mod to work?

Grammy

Quote from: Grammy on July 31, 2016, 06:54:33 PM

Even with ... the proper ID, Sender name, etc. in settings, it's not working (functioning at all) for me.  So I was wondering...  I'm testing this by creating new registrations, then logging in under those usernames to see if I have a PM.  Officially, however, registration is disabled.  So, even though I manually created the new users, must registration be enabled in order for this mod to work?


*striking out on the mods board, lately*   :)

Kiriakos GR

Quote from: Surgical on March 12, 2014, 11:49:22 AM
Why doesnt this work for 2.0.7?

And if it does, can you give me instructions on how to get it working?

Instructions for all .....

1) Settings menu : Admin>>Members>Registration>Settings 

2) Setup example :
*Select the ID of the sender  ..........  1 ...  this is default ID of forum Administrator (if you use second account as Global moderator then use this specific account ID)
Account ID this is visible to administrators  ( 0 ID does not belong to any account - this detail causes most confusions)
 
*Select the Username of the sender ...  Simply add text of your own account name
*The subject of the PM .................... Example.... Important: Your first day at (name of your forum)


This mod works just once per new member registration. 
PM should be a guide (reminder) of specific topics that a new member should be aware of.

My own text of PM for new members. ( example)
This is automated welcome message and a guide of details that all new members should be aware of.

Forum settings: Avatars / Attachments / Pictures handling / Basic rules 
url


Read-me First: Forum settings - New members - Profile Settings
url

(Name of forum) forum this is daily moderated (looked after) by me and of one forum moderator.

(Name of forum) Forum announcement: Jim is our new moderator
url

For any problem related with your new account, or in case that moderation team block your account.
You can communicate with me directly at:  (Admin email) 

Please be also informed that we do terminate a member account with out warning when we detect suspicious use of it.
Please use wisely the privilege of you been part of this forum.



To test this mod you need to create a fresh member account, and him will receive this PM.
Tested with SMF 2.0.13

Marina3



Advertisement: