Version: , by tubedogg
Developer Last Online: Dec 2016
Version: 2.2.x
Rating:
Released: 03-28-2001
Last Update: Never
Installs: 0
No support by the author.
This hack automatically sends a PM to a user when he or she is added to someone's buddy list. It works both when you add via the link in a profile, and when you add via the Edit Buddy List page in the User Control Panel. It does not send a message when a user is added to someone's ignore list, nor does it send a message when a user is removed from someone's buddy list. The message is configurable, and is sent "from" the board admin or a moderator. That is also configurable.
No demo or screenshot, since it happens behind the scenes and is never seen by anyone.
For version: v2 beta 3 (may work with beta 1 and beta 2, however it is untested with those versions).
Files needed: buddyadd.php, buddyupdate.php (see attached zip file).
Files to edit: member2.php, buddyadd.php, buddyupdate.php (see instructions below).
Instructions
1] Unzip the files buddyadd.php and buddyupdate.php to your hard drive.
2] Open member2.php in an ASCII text editor, such as Notepad (Windows), SimpleText (Mac), EditPlus, UltraEdit, TextPad, etc. (DO NOT use WYSIWYG HTML editors such as FrontPage, HotDog, DreamWeaver, etc. They will in all likelyhood screw up the file! I will not be able to support you if you edit the file in one of these programs.)
3] Find (around line 35)
Code:
$bbuserinfo[$var]=trim($bbuserinfo[$var]);
Right under this, add
Code:
include("buddyadd.php");
Find (around line 155)
Code:
$listids=trim($listids);
Right under this, add
Code:
include("buddyupdate.php");
4] Open buddyadd.php in an ASCII text editor (see direction #2 for more info on doing this).
5] On the second line, change the value of $fromuserid (it's set at 1 right now) to an admin or moderator's user id. That way, if someone replies to the PM, it goes to a moderator or an admin and not the user, who has no idea that a PM was sent when they added someone to their buddy list. Next, you can change the wording of the $message if you wish. Only edit it at the top (line 3), not in the middle. Keep in mind that unless your board allows HTML in messages, you cannot use HTML in your message. However, you *can* use vBCode. The default message gives a link for the recipient to send a PM to the user that added the recipient to their buddy list, and states that the message is automated and not to reply to it. Add "\n" (without the quotes) anywhere you want a new line to appear.
6] Repeat step #5, only in buddyupdate.php. I suggest you use the same wording in both, since both are sent upon addition to a buddy list.
7] Save member2.php, buddyadd.php, and buddyupdate.php, and upload them all to your main forums directory.
That's it!
Instructions are also included in the zip file (pmonadd.txt).
FEEDBACK WANTED! Likes/disklikes/modification requests all gladly accepted.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Great! I'm glad you like it.
Took me a while to realize (my dumbass self) that when you go through the Edit Buddy List page it uses a different function than when you add someone from their profile (getinfo) page. Once I got past that hump, and realized I couldn't use the same code on both sections it was smooth sailing. (Oh yeah, and then there was the part where it was sending me 8 emails telling me I had private messages that I didn't cause I forgot to change the email variable. Am I getting stupider??? )