View Full Version : Miscellaneous Hacks - Send PM On Promotion
paul41598
02-26-2007, 10:00 PM
Due To Popular Demand........
Send PM On Promotion (LITE VER) :)
Description:
- This LITE version of Send PM On Promotion will send a private message to a member when he/she is promoted to another usergroup via the Usergroup --> Promotions setup
Inspiration:
- Actually I was inspired from my previous hack related to this one here (https://vborg.vbsupport.ru/showthread.php?t=136336). Others thought it would be cool if this worked with promotions.
Features: (Lite Version)
Fully Customizable AdminCP Options
Ability To Turn On PM Alert
Ability To Change All PM Options Including (Sender, Subject, Body)
Only Works On Primary Usergroups!
Features: (Premium Version Only (http://chugger.homeip.net/myhacks/))
Fully Customizable AdminCP Options
Ability To Turn On PM Alert
Ability To Change All PM Options Including (Sender, Subject, Body)
Will Work On Both Primary & Secondary Usergroups!
Installation:
1.) Read Install.txt Apply File Edits
2.) Upload Product
3.) Enjoy Release
Possible Future Plans:
- ??
Important Notes:
- Please be aware that this hack does involve file edits. More specifically the cron that handles promotions. It is the only way to do it, so please don't ask why I did it this way :rolleyes: I have tested it pretty thoroughly, and it should work, but use at your own risk. Always backup your files!
(http://chugger.homeip.net/myhacks/)
Find Premium Hacks Here (http://chugger.homeip.net/myhacks/)
projectego
02-27-2007, 08:21 PM
Perfect! This is something I have needed for a while now! Thank you, Paul! ;)
Tanabe
02-27-2007, 08:43 PM
This is pretty good I'll click install when I actually have time to install it.
D.Ilyin
02-28-2007, 05:24 AM
paul41598 thank's! Clicked install.
Possible Future Plans:
- ??
1. Different custumizeable PM text for different promotions
2. Different PM sender text for different promotions
3. Not only PM but and e-mail
Is it enough? :)
bada_bing
02-28-2007, 06:41 PM
Cool will this work on vb 3.5.x ?
paul41598
02-28-2007, 07:02 PM
Cool will this work on vb 3.5.x ?
untested
bada_bing
03-01-2007, 02:30 PM
Has anyone tested this on 3.5.x ?
Snake
04-06-2007, 09:38 PM
Is this going to work whenever I have promoted a regular member to a staff member like a moderator or super mod?
Sir_Yaro
04-16-2007, 10:08 PM
It's ridicule to ask for money for such simple hack.
it’s a disgrace....
to make it work for secondary groups add:
if ($vbulletin->options['sendpm_on_promotion_pm_on_off'])
{
$botpermissions['adminpermissions'] = 2;
$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();
}
below:
else
{
$secondaryupdates["$joinusergroupid"] .= ",$promotion[userid]";
$secondarynames["$joinusergroupid"] .= iif($secondarynames["$joinusergroupid"], ", $promotion[username]", $promotion['username']);
$user['membergroupids'] .= (($user['membergroupids'] != '') ? ',' : '') . $joinusergroupid;
PinkDaisy
04-17-2007, 12:35 AM
didn't work for me and messed up my promotions to not work :(
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
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:
else
{
break;
}
}
}
}
to:
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:
else
{
break;
}
}
}
}
to:
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!
furnival
04-13-2014, 03:52 PM
Something like this is badly needed for VB4.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.