Are you able to make it so it sends it to other user groups other than just admins? I have a custom user groups I'd like it to send the info to:
new user, ip, email, etc.
Also, where do we input the code to displaying the ip and email?
Shemo Wrote:Are you able to make it so it sends it to other user groups other than just admins? I have a custom user groups I'd like it to send the info to:
new user, ip, email, etc.
It will never send PMs to a usergroup.
This will send PMs to a specified user (replace <UID> with the user ID)
Find:
PHP Code:
'toid' => $user_info['uid'],
'fromid' => intval($mybb->settings['pmregister_fromuid']),
|
Replace with:
PHP Code:
'fromid' => $user_info['uid'],
'toid' => <UID>,
|
Shemo Wrote:Also, where do we input the code to displaying the ip and email?
AdminCP -> Board Settings -> Change.
Figure the rest out from there...
Zinga, it's working, but question for you...
When you had me make the last edit so I specify which user the PM gets sent to when a new user registers, is it supposed to PM the new registered user too or what? I made a testtest account to try this plugin and it sent me, Shemo, the email and not the new registered user. Now, can I use your plugin to send an admin a PM when a new user registers with the users IP and Email, but use the plugin from DennisTT to PM the actual new user; or..can I do both with just yours???
Might be confusing you, but let me know...
Thanks,
Shemo
If you want to send a PM to both you and the end user, find:
PHP Code:
$pmh->admin_override = true;
$pmh->set_data($pm);
if($pmh->validate_pm())
$pmh->insert_pm();
|
Add below:
PHP Code:
$pm['toid'] = intval($mybb->settings['pmregister_fromuid']);
$pm['fromid'] = $user_info['uid'];
$pmh->set_data($pm);
if($pmh->validate_pm())
$pmh->insert_pm();
|
Is there a way to make it so the new user receives the message format that you can edit in the adminCP settings and the admin receives 1 with a certain format like:
New user:XXX
Email address:XXX
IP:XXX
Age: XXX
etc...
Thanks a bunch,
-Shemo
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/at19029/public_html/forums/inc/plugins/pmregister.php on line 97
Is the error I'm receiving after doing your last edit, but it was working at first..hmn. I didn't change anything except for what you listed.
When it was working, neither the new user nor me, the admin received a new PM. =(
Meh, don't worry about the 2 separate PMs with different information..I just kept your default message to new users and added this to the bottom of it. You're a great person for helping us as it is..don't wanna make extra work. =P
-----------------------------------
Admin Section:
{username}
{regip}
{email}
Is there a way to get it to show their age and location too?
Also, I'm still getting that parse error. =(
Zinga, I got it working to my liking..I'm using your mod to send PMs to me about new users and DennisTT's mod to PM the new users.
Now, when I specify the UID to have the PM sent to, it's not sending it to another 1 of the admins UID, which is 22. He's in-charge of all the players on the forums and of my guild, so he needs to be up-to-date with this information. I also tried his GID, but that didn't work either. This is how I have it listed in your plugin:
Code:
$pm = array(
'username' => $user_info['username'],
'fromid' => $user_info['uid'],
'toid' => 4,22,
'subject' => $mybb->settings['pmregister_subject'],
'message' => $message,
'options' => array(
|
4 is me, and 14/22 is him, 14 being his GID and 22 being his UID.
Sorry for the late reply - I haven't exactly been in the mood to look at this lately.
You can't specify a list in that code, because it only accepts a single integer.
You'll have to get it to send two PMs.
Make a second copy of the following code:
PHP Code:
$pm = array(
'username' => $user_info['username'],
'toid' => $user_info['uid'],
'fromid' => intval($mybb->settings['pmregister_fromuid']),
'subject' => $mybb->settings['pmregister_subject'],
'message' => $message,
'options' => array(
'signature' => 'no',
'disablesmilies' => 'no',
'savecopy' => 'no',
'readreceipt' => 'no'
)
);
$pmh->admin_override = true;
$pmh->set_data($pm);
if($pmh->validate_pm())
$pmh->insert_pm();
|
Directly under the code for sending the first PM (note, this is important, you need to put it before unset($pmh);).
PERFECT! This is why we come to you Zinga, your stuff works. We don't come to you for help because we don't like your work or it doesn't work. We want you in the community and we need you to be there!!!
Thanks again and keep up the great work.
-Shemo