Advertisement:

Author Topic: PM to New Registered Users  (Read 211333 times)

Offline Midgard

  • Jr. Member
  • **
  • Posts: 271
  • Gender: Male
PM to New Registered Users
« on: December 17, 2004, 07:00:24 AM »
need an welcome message for new registered members, but not email, is PM

how can?


EDIT:  This is now a mod for RC2
http://mods.simplemachines.org/index.php?mod=387
« Last Edit: August 01, 2006, 10:45:01 PM by Jay The Code Monkey »

ryanbsoftware

  • Guest
Re: PM to New Registered Users
« Reply #1 on: December 17, 2004, 01:01:56 PM »
all you would need to do is find the code for that and instead of it emailing new users, replace the code with a mysql query to add a pm into the database for that user with the text that would go into the email, or do it manually, lol.

Offline Kirby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,040
  • Gender: Male
Re: PM to New Registered Users
« Reply #2 on: December 17, 2004, 07:54:02 PM »
Open Register.php
Look for:
Code: [Select]
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}

Add after:
Code: [Select]
// Set up the message arrays
$pmfrom = array(
'id' => 1,
'name' => 'name or variable',
'username' => 'name or variable'
);
$pmto = array(
'to' => array($memberID),
'bcc' => array()
);

// Give them a warm welcome via PM :)
sendpm($pmto, 'Subject Here', 'Message Here', 0, $pmfrom);

Something along those lines... SMF has a built in PM function to make things easy :D
You will probably have to adjust some of that stuff... who knows if this works out I might even make it a mod o.O
« Last Edit: December 18, 2004, 12:12:58 AM by Kirby »

Offline Midgard

  • Jr. Member
  • **
  • Posts: 271
  • Gender: Male
Re: PM to New Registered Users
« Reply #3 on: December 18, 2004, 08:38:50 AM »
Thanks Kirby, that works

Offline _complex

  • Jr. Member
  • **
  • Posts: 247
  • Gender: Male
  • ha...yooo
    • Checkit
Re: PM to New Registered Users
« Reply #4 on: December 19, 2004, 02:31:56 PM »
Out of the blue :P is there anyway you can add a sound to the pm?..

so that when you have a new pm it'll play a sound?.. then once read it stops??.

ryanbsoftware

  • Guest
Re: PM to New Registered Users
« Reply #5 on: January 03, 2005, 12:49:43 PM »
Out of the blue :P is there anyway you can add a sound to the pm?..

so that when you have a new pm it'll play a sound?.. then once read it stops??.

I would think so if you use the [dohtml] tag and used html code to play the music. ;)

Offline RGSMDNR

  • Jr. Member
  • **
  • Posts: 196
  • Gender: Male
Re: PM to New Registered Users
« Reply #6 on: January 05, 2005, 12:06:27 PM »
how would i go about adding something like

Welcome 'user',

please go here .

thanks

?

Offline mytreo

  • Jr. Member
  • **
  • Posts: 284
    • treo
Re: PM to New Registered Users
« Reply #7 on: January 05, 2005, 01:56:56 PM »
Open Register.php
Look for:
Code: [Select]
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}

Add after:
Code: [Select]
// Set up the message arrays
$pmfrom = array(
'id' => 1,
'name' => 'name or variable',
'username' => 'name or variable'
);
$pmto = array(
'to' => array($memberID),
'bcc' => array()
);

// Give them a warm welcome via PM :)
sendpm($pmto, 'Subject Here', 'Message Here', 0, $pmfrom);

Something along those lines... SMF has a built in PM function to make things easy :D
You will probably have to adjust some of that stuff... who knows if this works out I might even make it a mod o.O

That is awesome kirby, thank you much.
Treo forum - Powered by SMF, of course
Treo news - powered by MovableType and integrated with SMF
Treo downloads - hacked from phpNuke and integrated with SMF
Treo knowledge base - powered by Wikka and integrated with SMF
Treo 650 | Treo 700w | Treo 700p

Offline RGSMDNR

  • Jr. Member
  • **
  • Posts: 196
  • Gender: Male
Re: PM to New Registered Users
« Reply #8 on: January 05, 2005, 02:12:25 PM »
yes, but what do i type in the 'Message' field so it will show up like in my post...

Welcome "user name"

blah blah 'link'


Offline Kirby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,040
  • Gender: Male
Re: PM to New Registered Users
« Reply #9 on: January 05, 2005, 04:07:30 PM »
Just an FYI, please download the mod version of this. It is available at my package server (http://www.zfgc.com/kirby/smf). It is a more recent version and allows you to do it with the ease of your admin panel. Please do NOT download other mods, I have to double check them to make sure they are 1.0 compatible, and I have to fix the Topic Descriptions one. Thanks for the good comments :)

Offline diplomat.

  • SMF Friend
  • Full Member
  • *
  • Posts: 545
  • Gender: Male
  • avidSOUND
    • avidSOUND
Re: PM to New Registered Users
« Reply #10 on: January 10, 2005, 11:55:30 PM »
everytime a member registers to my site, it logs an error:

Code: [Select]
8: Undefined index: pm_successfully_sent
File: /var/www/html/forums/Sources/Subs-Post.php
Line: 497
?action=register2

is that supposed to happen...cuz it still sends the pm
avidSOUND.com: Where Aspiring Musicians Can Be HEARD!

Offline RGSMDNR

  • Jr. Member
  • **
  • Posts: 196
  • Gender: Male
Re: PM to New Registered Users
« Reply #11 on: January 11, 2005, 12:38:10 AM »
no they arent compatible, i have to modify my modifications.english.php to read

// Version: 1.0 RC2; Modifications

to match the file install.php

also, there is no field for the body of the message.

Offline diplomat.

  • SMF Friend
  • Full Member
  • *
  • Posts: 545
  • Gender: Male
  • avidSOUND
    • avidSOUND
Re: PM to New Registered Users
« Reply #12 on: January 12, 2005, 10:54:31 AM »
you have to have this mod installed also

Modsetting Textarea
avidSOUND.com: Where Aspiring Musicians Can Be HEARD!

Offline guider

  • Jr. Member
  • **
  • Posts: 268
Re: PM to New Registered Users
« Reply #13 on: February 05, 2005, 07:18:17 AM »
I have the Modsetting Textarea but before applying the PM mod I get a "Failed" on ./Themes/default/languages/Modifications.english.php. Presenting the FTP logininfo doesn't fix the 'Failed'. What goes wrong here?
« Last Edit: February 05, 2005, 07:24:54 AM by guider »

Offline Kirby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,040
  • Gender: Male
Re: PM to New Registered Users
« Reply #14 on: February 05, 2005, 02:14:54 PM »
you have to CHMOD the files to 777

Offline guider

  • Jr. Member
  • **
  • Posts: 268
Re: PM to New Registered Users
« Reply #15 on: February 05, 2005, 02:23:42 PM »
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: PM to New Registered Users
« Reply #16 on: February 05, 2005, 05:13:05 PM »
Failed means it can't make the change, meaning there's something wrong with the mod or the file.

-[Unknown]

Offline bobert

  • Semi-Newbie
  • *
  • Posts: 26
  • Gender: Male
    • The Computer Guy
Re: PM to New Registered Users
« Reply #17 on: February 07, 2005, 03:07:34 PM »
Ya, I still can't get this to work either. I have a standard setup, the only thing different is the theme, and that I have some mods installed. I'm not running through Mambo either. Any more suggestions?
All the best,
Kyle

Offline Kirby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,040
  • Gender: Male
Re: PM to New Registered Users
« Reply #18 on: February 07, 2005, 04:18:37 PM »
thats odd...

Offline jiminoregon

  • Semi-Newbie
  • *
  • Posts: 87
Re: PM to New Registered Users
« Reply #19 on: February 08, 2005, 03:49:49 AM »
It already was 777. I'm using Smf in combination with mambo btw. I entered my adminpanel outside of Mambo before installing it as that should get better results... I Applied the mod and that file still said Failed. Nothing happened, no link in Admin it seems, nothing.

Same here...and it leaves a ghost of itself on the edit settings page.

Jim