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
  #22  
Old 01-09-2006, 08:32 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i fixed it i think I zipped the wrong file that time sorry:smoke:
Reply With Quote
  #23  
Old 01-09-2006, 08:40 PM
Snoop-It's Avatar
Snoop-It Snoop-It is offline
 
Join Date: Jun 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent, now it works. cheers man!
Reply With Quote
  #24  
Old 01-09-2006, 08:43 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool
Reply With Quote
  #25  
Old 01-09-2006, 08:46 PM
jj's Avatar
jj jj is offline
 
Join Date: Sep 2005
Location: Viernheim, Germany
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just looked into your changes I think if you can use a self-made bbcode you also could use the standard url bbcode so there is no need to add a custom bbcode. You could do that by inserting
HTML Code:
[url=$2/profile.php?do=addlist&userlist=buddy&u=$3]click to accept[/url]
into the phrase. For example (a 3rd person message phrase version):
HTML Code:
Hello,

$1 has added you to his buddy-list. If you like to get friends you need to add $1 to your buddy-list, too.

[url=$2/profile.php?do=addlist&userlist=buddy&u=$3]Click here[/url] to add $1 to your buddy-list now.

The Board Admin
Now if you go on with the code I posted above to use the Username in the title and message, we get
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]);
$anti_autopm_bud_mes = str_replace("$2",$vbulletin->options['bburl'],$anti_autopm_bud_mes);
$anti_autopm_bud_mes = str_replace("$3",$vbulletin->userinfo['userid'],$anti_autopm_bud_mes);
$pmdm->set('message', $anti_autopm_bud_mes);
I haven't tested the above thing and don't know if it works, but you may work it out yourself Keep on the learning.
Reply With Quote
  #26  
Old 01-09-2006, 08:46 PM
EricaJoy EricaJoy is offline
 
Join Date: Sep 2002
Location: New York, NY
Posts: 236
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool beans, i'm sure i will be clicking install momentarily..
Reply With Quote
  #27  
Old 01-09-2006, 09:18 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
Just looked into your changes I think if you can use a self-made bbcode you also could use the standard url bbcode so there is no need to add a custom bbcode. You could do that by inserting
HTML Code:
[url=$2/profile.php?do=addlist&userlist=buddy&u=$3]click to accept[/url]
into the phrase. For example (a 3rd person message phrase version):
HTML Code:
Hello,

$1 has added you to his buddy-list. If you like to get friends you need to add $1 to your buddy-list, too.

[url=$2/profile.php?do=addlist&userlist=buddy&u=$3]Click here[/url] to add $1 to your buddy-list now.

The Board Admin
Now if you go on with the code I posted above to use the Username in the title and message, we get
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]);
$anti_autopm_bud_mes = str_replace("$2",$vbulletin->options['bburl'],$anti_autopm_bud_mes);
$anti_autopm_bud_mes = str_replace("$3",$vbulletin->userinfo['userid'],$anti_autopm_bud_mes);
$pmdm->set('message', $anti_autopm_bud_mes);
I haven't tested the above thing and don't know if it works, but you may work it out yourself Keep on the learning.

this works great, but it sucks that it opens in a new window...

it would be better if it just opened in the same window, but good idea noneless
Reply With Quote
  #28  
Old 01-10-2006, 07:39 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent addition but i have this hack that allows members to choose wether they save a copy of their pms or not and regardless of wether they have it turned on or off it still saves the pm any chance of making it adhere to the savecopy rules ?

https://vborg.vbsupport.ru/showthrea...light=savecopy
Reply With Quote
  #29  
Old 01-10-2006, 11:08 AM
jj's Avatar
jj jj is offline
 
Join Date: Sep 2005
Location: Viernheim, Germany
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msimplay
excellent addition but i have this hack that allows members to choose wether they save a copy of their pms or not and regardless of wether they have it turned on or off it still saves the pm any chance of making it adhere to the savecopy rules ?

https://vborg.vbsupport.ru/showthrea...light=savecopy
Don't want to Download the zip and look into it, but I looked into some postings. It seems there is a field added to the user table according to this post, so why don't you just try this:

Replace in Original code of the plugin:
Code:
$pmdm->set_info('savecopy', 1);
with
Code:
$pmdm->set_info('savecopy', $vbulletin->userinfo['savecopy']);
Reply With Quote
  #30  
Old 01-10-2006, 12:48 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is lush, I foresee this having a boatload of installs even if not HOTM (I always type HTML when I try to type HOTM )

Might I suggest using {1}, {2}, ... {n}, like so:
Change phrase "anti_autopm_bud_mes" to this:
HTML Code:
Hello,

{1} has added you to his buddy-list. If you like to get friends you need to add {1} to your buddy-list, too.

[url={2}/profile.php?do=addlist&userlist=buddy&u={3}]Click here[/url] to add {1} to your buddy-list now.

The Board Admin
Change the "anti_autopm_bud_tit" to this:
Code:
{1} has just added you to his buddy list!
Change this snippet of code:
PHP 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]);
$anti_autopm_bud_mes str_replace("$2",$vbulletin->options['bburl'],$anti_autopm_bud_mes);
$anti_autopm_bud_mes str_replace("$3",$vbulletin->userinfo['userid'],$anti_autopm_bud_mes);
$pmdm->set('message'$anti_autopm_bud_mes); 
to this:
PHP Code:
$anti_autopm_bud_tit construct_phrase($vbphrase['anti_autopm_bud_tit'], $vbulletin->userinfo['username']);
$anti_autopm_bud_mes construct_phrase($vbphrase['anti_autopm_bud_mes'], $vbulletin->userinfo['username'], $vbulletin->options['bburl'], $vbulletin->userinfo['userid']);
$pmdm->set('title'$anti_autopm_bud_tit);
$pmdm->set('message'$anti_autopm_bud_mes); 
Saves inventing a whole new construct_phrase() function

Again, nice work
Reply With Quote
  #31  
Old 01-10-2006, 03:46 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by j.jacobsen
Don't want to Download the zip and look into it, but I looked into some postings. It seems there is a field added to the user table according to this post, so why don't you just try this:

Replace in Original code of the plugin:
Code:
$pmdm->set_info('savecopy', 1);
with
Code:
$pmdm->set_info('savecopy', $vbulletin->userinfo['savecopy']);
Thanks works great
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 06:15 PM.


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.05377 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
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
  • (7)bbcode_code
  • (5)bbcode_html
  • (2)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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