Results 1 to 6 of 6

Thread: [Release v2] PM on add user to buddy list

Threaded View

  1. #1
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    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.
     

  2. #2
    Senior Member snyx has disabled reputation snyx's Avatar
    Join Date
    Aug 2000
    Location
    Vancouver, BC, Canada (whistler.2010)
    Posts
    1,073
    Loving it man, LOVING IT!
     

  3. #3
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    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??? )

    Seriously, I'm glad you're loving it.
     

  4. #4
    Senior Member JohnM is on a distinguished road
    Join Date
    May 2000
    Location
    MI
    Age
    23
    Posts
    623
    You should make your settings actual settings in vB, and the message a template...
     

  5. #5
    Senior Member conan is on a distinguished road
    Join Date
    Sep 2000
    Posts
    389
    Nice hack man, great job as usual!
     

  6. #6
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    Originally posted by JohnM
    You should make your settings actual settings in vB, and the message a template...
    Unfortunately I'm not quite that talented just yet. I'll look into doing a better version a bit down the road.
     

Similar Threads

  1. Add to buddy list not working...
    By Contramontanum in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 3
    Last Post: Tue 25th May '04, 10:58am
  2. When you add some one to your buddy list..
    By Brian Briscoe in forum vBulletin Suggestions and Feedback
    Replies: 1
    Last Post: Mon 10th Feb '03, 12:11pm
  3. Replies: 2
    Last Post: Tue 7th May '02, 4:07pm
  4. [RELEASE v2] Pop-up Buddy List
    By mrlister in forum Releases: Version 2.x
    Replies: 19
    Last Post: Wed 29th Aug '01, 11:37am

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts