View Full Version : PM upon donate
paul41598
06-20-2005, 10:18 PM
Is there an option somewhere to auto PM someone when you donate points to a user. So if I donated points to user B, he would receive a PM, saying congratulations, user A donated X points to you.
?
Link14716
06-23-2005, 12:09 AM
Is there an option somewhere to auto PM someone when you donate points to a user. So if I donated points to user B, he would receive a PM, saying congratulations, user A donated X points to you.
?
Not in the current release, but uShop 1.0.0 will have it.
clasione
07-12-2005, 05:41 AM
Any update on this? I'm looking for a donation notification aswell....
I've been seeing some other forums with it which use ucash ushop....
tomdude9
07-25-2005, 04:15 AM
go to the 'uttstore_standard_confirmation' template, and find <form action="ushop.php" method="post">...replace with:
<!--replace XXX with the donate function's ID number-->
<if condition="$_REQUEST[actionid] == 'XXX'">
<form action="private.php" name="private" method="post">
<input type="hidden" class="bginput" name="recipients" value="$_FIELDS[username]" />
<input type="hidden" class="bginput" name="title" value="$_FIELDS[points] POINTS RECIEVED" />
<input type="hidden" name="message" value="$_FIELDS[username],
I have just donated $_FIELDS[points] points to you.
Sincerely, $bbuserinfo[username]">
<!--feel free to change this message but preserve the spacing, line breaks won't parse-->
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="" />
<input type="hidden" name="forward" value="" />
<input type="hidden" name="receipt" value="0" />
</form></if>
<form action="ushop.php" method="post" onsubmit="document.private.submit()"...repeat as needed for admin donate, steal, change other's title, etc...
:)
clasione
07-25-2005, 11:05 AM
Yahhhh ---- Thanks for posting!
tomdude9
07-25-2005, 04:42 PM
no problem man, I searched forever looking for a way to pull this off until I realized you could send two forms at once with javascript (I'm no brilliant coder by any means)...so I'm happy to save other people the trouble, lol
clasione
07-25-2005, 05:31 PM
This is what I've got and it's not sending a PM upon donate....
You have any idea why it may not be working?
Take a peek:
<!--replace XXX with the donate function's ID number-->
<if condition="$_REQUEST[actionid] == 'XXX'">
<form action="private.php" name="private" method="post">
<input type="hidden" class="bginput" name="recipients" value="$_FIELDS[username]" />
<input type="hidden" class="bginput" name="title" value="$_FIELDS[points] POINTS RECIEVED" />
<input type="hidden" name="message" value="$_FIELDS[username],
I have just donated $_FIELDS[points] points to you.
Sincerely, $bbuserinfo[username]">
<!--feel free to change this message but preserve the spacing, line breaks won't parse-->
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="" />
<input type="hidden" name="forward" value="" />
<input type="hidden" name="receipt" value="0" />
</form></if>
<form action="ushop.php" method="post" onsubmit="document.private.submit()">
<input type="hidden" name="do" value="action">
<input type="hidden" name="actionid" value="$_REQUEST[actionid]">
<input type="hidden" name="step" value="$nextstep">
$fields_hidden
<div style="padding:25px 0px 25px 0px">
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%" align="center"><tr><td>
<table cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="tcat"><div style="float: right;">$action[name]</div>
<b>Action:</b>
</td>
</tr>
<tr>
<td class="alt1">
<fieldset><legend>Cost:</legend><div style="text-align: right;">$action[cost]</div></fieldset>
$field_templates_display
<if condition="$action[tax] != '0'">
<fieldset><legend>Taxes:</legend><div style="text-align: right;">$action[tax]%</fieldset></if>
<tr>
<td class="tfoot"><div style="float: right;"><input type="submit" name="submit" accesskey="s" value="Confirm"></div><span style="color: black; Font-size: 110%;">Total Cost: <b>$totalcost</b> Are you sure you want to perform this action?</span></td>
</tr>
</td>
</tr>
</table>
</td></tr></table>
</form>
DUH ---- THERE IT IS.... XXX
vdinh
08-06-2005, 11:08 PM
I did fix the actionid but dit not send PM upon donate or for other actions. Here the code:
<!--replace XXX with the donate function's ID number-->
<if condition="$_REQUEST[actionid] == '1'">
<form action="private.php" name="private" method="post">
<input type="hidden" class="bginput" name="recipients" value="$_FIELDS[username]" />
<input type="hidden" class="bginput" name="title" value="$_FIELDS[points] POINTS RECIEVED" />
<input type="hidden" name="message" value="$_FIELDS[username],
I have just donated $_FIELDS[points] points to you.
Sincerely, $bbuserinfo[username]">
<!--feel free to change this message but preserve the spacing, line breaks won't parse-->
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="" />
<input type="hidden" name="forward" value="" />
<input type="hidden" name="receipt" value="0" />
</form></if>
<form action="ushop.php" method="post" onsubmit="document.private.submit()"
<input type="hidden" name="do" value="action">
<input type="hidden" name="actionid" value="$_REQUEST[actionid]">
<input type="hidden" name="step" value="$nextstep">
$fields_hidden
<div style="padding:25px 0px 25px 0px">
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%" align="center"><tr><td>
<table cellpadding="6" cellspacing="1" border="0" width="100%">
<tr>
<td class="tcat"><div style="float: right;">$action[name]</div>
<b>Action:</b>
</td>
</tr>
<tr>
<td class="alt1">
<fieldset><legend>Cost:</legend><div style="text-align: right;">$action[cost]</div></fieldset>
$field_templates_display
<if condition="$action[tax] != '0'">
<fieldset><legend>Taxes:</legend><div style="text-align: right;">$action[tax]%</fieldset></if>
<tr>
<td class="tfoot"><div style="float: right;"><input type="submit" name="submit" accesskey="s" value="Confirm"></div><span style="color: yellow; Font-size: 110%;">Total Cost: <b>$totalcost</b> Are you sure you want to perform this action?</span></td>
</tr>
</td>
</tr>
</table>
</td></tr></table>
</form>
hbalagh1
10-04-2005, 05:12 AM
go to the 'uttstore_standard_confirmation' template, and find <form action="ushop.php" method="post">...replace with:
<!--replace XXX with the donate function's ID number-->
<if condition="$_REQUEST[actionid] == 'XXX'">
<form action="private.php" name="private" method="post">
<input type="hidden" class="bginput" name="recipients" value="$_FIELDS[username]" />
<input type="hidden" class="bginput" name="title" value="$_FIELDS[points] POINTS RECIEVED" />
<input type="hidden" name="message" value="$_FIELDS[username],
I have just donated $_FIELDS[points] points to you.
Sincerely, $bbuserinfo[username]">
<!--feel free to change this message but preserve the spacing, line breaks won't parse-->
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="" />
<input type="hidden" name="forward" value="" />
<input type="hidden" name="receipt" value="0" />
</form></if>
<form action="ushop.php" method="post" onsubmit="document.private.submit()">...repeat as needed for admin donate, steal, change other's title, etc...
:)
I am using this for the donate, but would also like to repeat it and use it for a gift received, i changed the function id # on it and changed some of the text but it doesn't send a pm for the gift only for donate of cash, anyone know how to go about this.
RichNTrace
01-22-2006, 04:48 PM
Hi im using v3.0.9 with uCash & uShop 0.95b i've attempted what you posted above the pm send works but then the points do not deduct from the user, is there any fix for that ?
any help would be much appreciated. Thank you...
jzewatsky
02-03-2006, 02:15 AM
I changed the code (very slightly) to the following and it works for me.
<!--replace XXX with the donate function's ID number-->
<if condition="$_REQUEST[actionid] == '1'">
<form action="private.php" name="private" method="post">
<input type="hidden" class="bginput" name="recipients" value="$_FIELDS[username]" />
<input type="hidden" class="bginput" name="title" value="$_FIELDS[points] POINTS RECIEVED" />
<input type="hidden" name="message" value="$_FIELDS[username],
I have just donated $_FIELDS[points] points to you.
Sincerely, $bbuserinfo[username]">
<!--feel free to change this message but preserve the spacing, line breaks won't parse-->
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="insertpm" />
<input type="hidden" name="pmid" value="" />
<input type="hidden" name="forward" value="" />
<input type="hidden" name="receipt" value="0" />
</form></if>
<form action="ushop.php" method="post" onsubmit="document.private.submit()">
I also shared the code above with Tyler in this thread (https://vborg.vbsupport.ru/showthread.php?p=889037#post889037) in hopes that he could use it to help him add PM functionality to his "Transactions Addon With a 'message'" hack.
clasione
02-11-2006, 02:32 PM
I have this working now...... Can someone modify the above code to work so I can notify myself of custom purcase......
So it will be basically the same function but it will send to me (admin) only when action id's a specified.....
I have three custom purchases that I need to know about...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.