![]() |
Small hack to automatically send PM to new users
after they have activated account. Requested by Xelation Tested on 2.2.5 UPDATED - v2.1 - 2002-05-02 Version 2.1 only fixes some problems with installation. Now it checks to see if the settings are already present in the DB, it has an option to remove the settings if you wish to uninstall and it has an option to remove any surplus settings you may have as a result of running the old install file. If you have version 2.0 up and running problem-free, there is absolutely no need to upgrade. You should uninstall version 1.0 before installing this one. This version facilitates vB's built in setting system, and no longer requires a writable file on the server. It also supports popup on PM. Follow the instructions in install.txt -- If you are running MySQL 3.22.xx, you might need to use this installfile instead. |
nice :)
would be a good feature at my board :) |
will be installing in a few...the first one also. haha
|
Heh - it would be cool if someone was actually able to use it :)
*looks at the time*hmm - 05.20... Time to get home, I guess. Should probably be thinking of getting up in - err - 3 hours |
Oh first time someone actually created a hack I requested! I'm gonna install it right now... I'll tell you how it went.
|
okie. i just installed. it would be cool if you made it show the input area under the vb options...but hey, this is nice also
I don't feel like editing the hack so i'll leave it as is. heh I installed it at teencribs.com .... please register only if you plan on being part of the board...not just for the sake of trying out the hack! |
Quote:
|
Works perfectly! Thank you very much! :D
|
Just though I would make a screen shot for everyone. :D oh and I just made a temporary message for now... that will change later.
|
Nice hack, just installed this here (another good way to tell people to enter their license). :)
|
Quote:
|
Ok works a treat, I did make one change though, to use the username of the user in the message:
Code:
$PM_content = str_replace('$username',$username,fread($fp, 50000)); |
Great feature, gonna install this hack later. Thnx
|
Quote:
I also changed PHP Code:
PHP Code:
Just in case someone wants an incredibly long default PM |
Why not store it in the database, as a setting?
|
Quote:
This was kind of a quick&dirty done in the wee hours. But I guess by saying that you just gave me a reason to play some more with the DB :) |
Hey,
How do I change who the PM comes from? I have two identities, my Administrator ID and my anonymous "Moderator" ID. I'd like the welcome PM to come from moderator and it's coming from my Administrator ID. Thanks! |
Quote:
|
LOL.
OK, here's another one. I have "pmpopup" and PM e-mail notification set to YES to during registration. However, I have created a new ID to test the system, and when I clicked the activation link there was no popup or E-mail notification of the new PM when I returned to the main menu. What could cause that? It's almost like vB is not recognizing the automated PM as a "new" message. This concerns me because my users are very computer illiterate and I want them to have a reason to go into the user cp. If there is no popup, then most people won't even notice the first new message. Heck, most of my users don't even know PMs exist, so the popup, or at the very least E-mail notification, on the first message would be really sweet. Thanks! |
I'd have to look in to this when I get back home from this business trip.
I'll change it so it uses the settings table as well, in stead of storing the default message in a file. Have had a lot to do at work lately, so I haven't had time to implement this yet... |
Doesn't seem to be working on 2.2.2... anyone else have this installed or have to modify anything?
|
neal> Doesnt work for me either. :(
|
I'll see if I have time to install 2.2.2 on my testserver today and see if there is anything special that needs to be done there.
As I still have craploads of work to do, I can't promise that I have the time today, but I'll try. |
Quote:
|
Yes it works, don't forget that the user has to activate the account before he receives the PM.
|
mine doesn't work either. Note that I don't have email activation turned on, if that would have anything to do with it?
|
bump? :(
|
Yes it has to do with that. If you look closely at where you need to insert the code, you'll notice that it is when the user activates. If you want to change this you'll have to place it at where the user registers if I am making any sense (I'm actually too lazy to look it up right now... maybe tomorrow)
|
yeah that makes sense, if you can find where that is in the code I would be soo appreciative~ Thanks :]
|
I would love to use this hack if you were to adapt it to work with vB 2.2.2, it would help control a few things on my board as well (I believe, at least)
SaintDog |
I have been really swamped in work lately, so I haven't even gotten around to upgrading my own boards to 2.2.2 yet.
At the moment, I am not sure when I will get around to look at it. Sorry. Will do it as soon as I find the time, tho. |
That's cool, I can wait (for a little ;))
|
Awesome!
|
Very nice Hack, I would love to use it, but I also have the Email verification turned off and don't know where to put the code in register.php :(
Please help |
Quote:
I'd like to know aswell |
same here. anyone?
|
I hope Sparkz doesn't mind, but I updated this hack since I wanted to use it.
-works with 2.2.1 and 2.2.2 no problem -works whether or not you have email activation turned on -uses templates instead of text files https://vborg.vbsupport.ru/showthrea...threadid=35647 |
There is a slight issue with this hack;
if a user who registers chooses not to receive stuff from admins, it still sends a PM to them upon activiation. I received a rather rude message from a user about this; is there any fix? |
If a user is going to write rude messages to you about a welcome PM, then they are not worth having around any way. How lame.
Anyway, I don't think the option you are referring to will limit Private Messages in any way. *****2.2.3 Issue***** Anyone get this to work in 2.2.3 yet? It's giving me errors on line 593 in register.php. Here is the line that's giving it fits. There could be more but I have to fix this one first (Line is IN BOLD): // send default PM to new user $originating_user = 1; $PM_file = "admin/default_pm.txt"; $fp = fopen <http://www.php.net/fopen>($PM_file, 'r'); $PM_title = str_replace <http://www.php.net/str_replace> ('$username', $username, fgets <http://www.php.net/fgets>($fp, 4096)); $PM_content = str_replace <http://www.php.net/str_replace> ('$username',$username,fread <http://www.php.net/fread>($fp, filesize <http://www.php.net/filesize> ($PM_file))); $DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid) VALUES (NULL,$u,$u,$originating_user,'".addslashes <http://www.php.net/addslashes>(htmlspecialchars <http://www.php.net/htmlspecialchars>($PM_title))."','".addslashes <http://www.php.net/addslashes>($PM_content)."',".time <http://www.php.net/time>().",0,0)"); // send default PM to new user |
can it modified to send the PM to the normal user depend on his post NO.?
ex. if the user get 50 post >> he will get defult PM " thank you for your posts after another 20 post more your titel will be chang to Tyro Hacker and you will get star " thank you |
All times are GMT. The time now is 08:06 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|