vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   AutoPM after addBuddy (https://vborg.vbsupport.ru/showthread.php?t=104872)

jj 01-09-2006 06:20 PM

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.

jj 01-09-2006 06:28 PM

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

The Chief 01-09-2006 06:42 PM

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!!

Snoop-It 01-09-2006 08:02 PM

excellent hack! using it on my board aswell.. thanks for this!

Antivirus 01-09-2006 08:08 PM

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.
:)

The Chief 01-09-2006 08:17 PM

Quote:

Originally Posted by Antivirus
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.
:)

there seems to be an error,

XML Error: mismatched tag at Line 80

I can't even upload it...

Antivirus 01-09-2006 08:20 PM

ok, looking at it...

Snoop-It 01-09-2006 08:23 PM

damm just tried upgrading and i got this error.. when importing the product..

XML Error: mismatched tag at Line 80

The Chief 01-09-2006 08:23 PM

Quote:

Originally Posted by dholaholic
damm just tried upgrading and i got this error.. when importing the product..

XML Error: mismatched tag at Line 80

he said he was looking at it ;)

Snoop-It 01-09-2006 08:26 PM

yeh i posted straight away.. i didnt see that post - my bad.. :nervous:


All times are GMT. The time now is 02:08 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
  • Page Generation 0.01270 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete