vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Send PM On Promotion (https://vborg.vbsupport.ru/showthread.php?t=140629)

Sir_Yaro 04-17-2007 11:36 AM

did u apply Install.txt edits ?

Aeolian_X 06-06-2007 10:03 PM

This hack doesn't allow you to select usergroups that receive this PM. Instead, it has a global message for all promotions. It's a good idea, but doesn't have the features it needs to be great.

AngelBlue 10-17-2007 03:09 PM

This hack failed to work for me.
After much messing around with vBulletin errors, I gave up and uninstalled.

It seemed to think that the code to put in the cron file was very wrong, despite me copying it exactly from the install file.

Heika 01-03-2008 04:39 AM

Quote:

Originally Posted by AngelBlue (Post 1362373)
This hack failed to work for me.
After much messing around with vBulletin errors, I gave up and uninstalled.

It seemed to think that the code to put in the cron file was very wrong, despite me copying it exactly from the install file.


Same problem here. I give..

Raptor 01-03-2008 05:37 AM

doesnt work

and this guy expect ppl to pay for his premium hacks ?

not very good marketing tbh

neopet001 01-07-2008 09:28 AM

Is there a way to replace PM by email sending on promotion?

lazytown 07-23-2008 11:19 PM

Does such a thing exist for 3.7.2?

Carly 09-13-2008 01:21 PM

FYI this doesn't work for 3.7

Wish OP's website would work, because I'd be willing to pay for this if I could get a version that had separated PMs for separate promotions and worked with 3.7...

chsmith700 09-17-2009 10:49 PM

This works on 3.8.2 with the following modifications:

Install calls for changing this is promotion.php:
Code:

else
                                                        {
                                                                break;
                                                        }
                                                }
                                        }
                                }

to:
Code:

else
                                                        {
                                                                break;
                                                        }
                                                }
                                        }
                                       
                                        if ($vbulletin->options['sendpm_on_promotion_pm_on_off'])
                                        {                       
                                                $pmbody = construct_phrase($vbphrase['sendpm_on_paid_promotion_alertpm'], $promotion['username'], $promotion['title']);
                                       
                                                $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
                                                $pmdm->set('fromuserid', $vbulletin->options['sendpm_on_promotion_fromuserid']);
                                                $pmdm->set('fromusername', $vbulletin->options['sendpm_on_promotion_fromusername']);
                                                $pmdm->set('title', $vbulletin->options['sendpm_on_promotion_pm_subject']);
                                                $pmdm->set('message', $pmbody);
                                                $pmdm->set_recipients($promotion[username], $botpermissions);
                                                $pmdm->set('dateline', TIMENOW);
                                                $pmdm->save();
                                        }
                                }

For it to work on 3.8.2 change this line of code in promotion.php:
Code:

else
                                                        {
                                                                break;
                                                        }
                                                }
                                        }
                                }

to:
Code:

else
                                                        {
                                                                break;
                                                        }
                                                }
                                        }
                                       
                                        if ($vbulletin->options['sendpm_on_promotion_pm_on_off'])
                                        {                       
                                                $pmbody = construct_phrase($vbphrase['sendpm_on_paid_promotion_primary_alertpm'], $promotion['username'], $promotion['title']);
                                       
                                                $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
                                                $pmdm->set('fromuserid', $vbulletin->options['sendpm_on_promotion_fromuserid']);
                                                $pmdm->set('fromusername', $vbulletin->options['sendpm_on_promotion_fromusername']);
                                                $pmdm->set('title', $vbulletin->options['sendpm_on_promotion_pm_subject']);
                                                $pmdm->set('message', $pmbody);
                                                $pmdm->set_recipients($promotion[username], $botpermissions);
                                                $pmdm->set('dateline', TIMENOW);
                                                $pmdm->save();
                                        }
                                }


furnival 08-30-2011 09:24 AM

The code chsmith700 posted above does seem to work but the promotions cron job won't run any more after it's inserted!


All times are GMT. The time now is 01:51 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.01294 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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