Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
AutoPM after addBuddy Details »»
AutoPM after addBuddy
Version: 1.0.4, by Antivirus Antivirus is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 01-08-2006 Last Update: 07-19-2006 Installs: 164
Uses Plugins
 
No support by the author.

What: This will send an automatic PM to a user after you add him/her to your Buddy List. The PM you automatically sent is saved within your outfolder and the Admin can modify the title and message of the PM by changing the phrases.

1 Product (1 plugin and 2 phrases)

Versions / Features:
  • 1.0.0 - released on 1/9/06
  • 1.0.1 - added automatic approval link into body of PM received by user
    added a check to prevent looping of the PM if the receiver already has the sender on his/her buddylist
  • 1.0.2 - added an anti-harassment link in the PM to deter users from "annoying" others into becoming their friends.
    added link so receiver of PM can easily view sender's profile.
  • 1.0.3 - cleaned up code and added link for recipient of PM to view sender's profile from within PM
  • 1.0.4 - Fixed bug which was wrongly sending PM to someone when user added someone to his/her ignore list
To Install: Just import the xml file as a product from within AdminCP>PluginSystem>ManageProducts>Add/ImportProduct

To change the title of the PM, edit $vbphrase[anti_autopm_bud_tit], and to change the message of the PM, edit $vbphrase[anti_autopm_bud_mes].

PLEASE REMEMBER TO BACKUP BEFORE YOU INSTALL!

Thanks: Thanks to Andreas for writing the [HowTo] Send PM's Automatically. This was inspired by Cloud Warrior's really cool vbFriends hack, which lacked this functionality and it seemed like many people would want it.

about: I'm taking this out of beta, as i think it's working all right by now. Any advice on how to improve this, comments, or bugs - are more than welcome, as I will do my best to address all.

If you use this, please click the install thingie

.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-09-2006, 03:36 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First post reserved
Reply With Quote
  #3  
Old 01-09-2006, 03:41 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

holy crap, I think I will like this and install it for sure, just gimme two secs

Wonders, im so happy
Reply With Quote
  #4  
Old 01-09-2006, 04:02 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, first suggestion, it seems to work fine but you need to allow HTML and PHP so that we can make reference to usernames and link back if you know what I mean.

Here is what i tried to make which will be normal for any users to do is to aprove the new fried request so that they both become new friends.



Quote:
Hello, I just added you to my Friend List. If you would like to be friends, please add me to yours. Thanks!

<a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$userinfo[userid]">Approve $userinfo[username] as your friend!</a>
Reply With Quote
  #5  
Old 01-09-2006, 04:22 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gamebgs
need to allow HTML and PHP so that we can make reference to usernames and link back if you know what I mean.
I was trying to figure that out, without enabling html across the whole boards. But I couldn't figure out how to get the html to display properly, as adding the html in the phrase just causes the html code to be displayed.

I'm sure there's a way to get the html enabled just for this specific instance of sending a PM, and not across the entire PM system, i just need to find out how.

It would be nice if there were another field in the PM datanager such as:
$pmdm->set('allowhtml', 1); but no such luck.

I'll try to figure it out... great idea!
Reply With Quote
  #6  
Old 01-09-2006, 04:34 PM
vwturbo vwturbo is offline
 
Join Date: Jul 2004
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work for your first product. I installed it and quickly tested it and it works just like it should. gamebgs and I were anxiously awaiting this.
Reply With Quote
  #7  
Old 01-09-2006, 04:35 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the kind words
Reply With Quote
  #8  
Old 01-09-2006, 04:44 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Antivirus
I was trying to figure that out, without enabling html across the whole boards. But I couldn't figure out how to get the html to display properly, as adding the html in the phrase just causes the html code to be displayed.

I'm sure there's a way to get the html enabled just for this specific instance of sending a PM, and not across the entire PM system, i just need to find out how.

It would be nice if there were another field in the PM datanager such as:
$pmdm->set('allowhtml', 1); but no such luck.

I'll try to figure it out... great idea!
thank you, hope it works out great, as it would be cool to use the $userinfo[username] instance in the title also to do something like this...


We would also need some statements like if he approves, do not send a PM, can this be done??
Reply With Quote
  #9  
Old 01-09-2006, 06:07 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i used vbuddies plugin and the sendpm doesn't work aswell as this one however it might be worth taking a look at the plugin for it to help with variables it
has a link to their profile in it
Reply With Quote
  #10  
Old 01-09-2006, 06:09 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msimplay
i used vbuddies plugin and the sendpm doesn't work aswell as this one however it might be worth taking a look at the plugin for it to help with variables it
has a link to their profile in it
cool, I hope you will take a look at this Antivirus
Reply With Quote
  #11  
Old 01-09-2006, 06:20 PM
jj's Avatar
jj jj is offline
 
Join Date: Sep 2005
Location: Viernheim, Germany
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,

I've installed it and it works. I have some suggestions for future versions. I could do them all by myself but I don't have the time at the moment
  • Possibility to send the pm from a defined user account or from the user who added the recipient. For example: I use a "Bot" to store some external information into the forum. He could also be used to send the pm. Maybe some others would like that, too.
  • After a quick look on your code, I found there is no check if the recipient already has added the sender to his buddy list. If that happens maybe another phrase should be chosen without a sentence like "If you would like to be friends, please add me to yours", i.e. just "I've added you to my buddy-list" or "User $1 has added you to his buddy-list". Got my idea?

If more gets into my mind, I'll post it.
Reply With Quote
  #12  
Old 01-09-2006, 06:28 PM
jj's Avatar
jj jj is offline
 
Join Date: Sep 2005
Location: Viernheim, Germany
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gamebgs
thank you, hope it works out great, as it would be cool to use the $userinfo[username] instance in the title also to do something like this...
That's quite easy and a quickie. Here we go:

1) Find in original code
Code:
	$pmdm->set('title', $vbphrase[anti_autopm_bud_tit]); 
	$pmdm->set('message', $vbphrase[anti_autopm_bud_mes]);
2) Replace with
Code:
	$anti_autopm_bud_tit = str_replace("$1",$vbulletin->userinfo['username'],$vbphrase[anti_autopm_bud_tit]);
	$pmdm->set('title', $anti_autopm_bud_tit); 
	$anti_autopm_bud_mes = str_replace("$1",$vbulletin->userinfo['username'],$vbphrase[anti_autopm_bud_mes]);
	$pmdm->set('message', $anti_autopm_bud_mes);
3) Use $1 in the phrases where you like to get the username
Reply With Quote
  #13  
Old 01-09-2006, 06:42 PM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by j.jacobsen
That's quite easy and a quickie. Here we go:

1) Find in original code
Code:
	$pmdm->set('title', $vbphrase[anti_autopm_bud_tit]); 
	$pmdm->set('message', $vbphrase[anti_autopm_bud_mes]);
2) Replace with
Code:
	$anti_autopm_bud_tit = str_replace("$1",$vbulletin->userinfo['username'],$vbphrase[anti_autopm_bud_tit]);
	$pmdm->set('title', $anti_autopm_bud_tit); 
	$anti_autopm_bud_mes = str_replace("$1",$vbulletin->userinfo['username'],$vbphrase[anti_autopm_bud_mes]);
	$pmdm->set('message', $anti_autopm_bud_mes);
3) Use $1 in the phrases where you like to get the username
wow, thanks for this, but now is there a way to put a link in there somewhere, like I think you should be able since you got this to work...

Like a link of what i posted before for that user to automatically add him (approve)??

thanks!!
Reply With Quote
  #14  
Old 01-09-2006, 08:02 PM
Snoop-It's Avatar
Snoop-It Snoop-It is offline
 
Join Date: Jun 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent hack! using it on my board aswell.. thanks for this!
Reply With Quote
  #15  
Old 01-09-2006, 08:08 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i didn't see any of your new posts until i just got this requested feature added. i was able to use a custom BBcode in order to avoid having to enable HTML in PMs globally, so now the approval link thingie in the PM message body seems to work. Let me know how it works for you.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12882 seconds
  • Memory Usage 2,351KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (15)post_thanks_box
  • (15)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (15)post_thanks_postbit_info
  • (14)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete