• Welcome to Simple Machines Community Forum. Please login or sign up.
October 26, 2021, 04:12:11 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


PM to New Registered Users

Started by Midgard, December 17, 2004, 07:00:24 AM

Previous topic - Next topic

Midgard

December 17, 2004, 07:00:24 AM Last Edit: August 01, 2006, 10:45:01 PM by Jay The Code Monkey
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

ryanbsoftware

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.

Kirby

December 17, 2004, 07:54:02 PM #2 Last Edit: December 18, 2004, 12:12:58 AM by Kirby
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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

Midgard


_complex

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

Quote from: nviceversa 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??.

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

RGSMDNR

how would i go about adding something like

Welcome 'user',

please go here .

thanks

?

mytreo

Quote from: Kirby on December 17, 2004, 07:54:02 PM
Open Register.php
Look for:
// Admin gets informed here...
adminNotify('approval', $memberID, $_POST['user']);
}


Add after:

// 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

RGSMDNR

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'


Kirby

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 :)

diplomat.

everytime a member registers to my site, it logs an error:


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!

RGSMDNR

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.

diplomat.

avidSOUND.com: Where Aspiring Musicians Can Be HEARD!

guider

February 05, 2005, 07:18:17 AM #13 Last Edit: February 05, 2005, 07:24:54 AM by guider
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?

Kirby

you have to CHMOD the files to 777

guider

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.

[Unknown]

Failed means it can't make the change, meaning there's something wrong with the mod or the file.

-[Unknown]

bobert

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

Kirby


jiminoregon

Quote from: guider 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.

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

Jim

Advertisement: