PDA

View Full Version : Buy Me A Beer/Latte Hack?


DinarMet
12-08-2007, 05:23 PM
Hello Members,

Is there any kind of feature that would allow members to buy each other a beer (in my case I would prefer a latte). Many sites and blogs use this for revenue streams and I thought it would be great in a forum community. It would be an nice incentive for members to post quality content. I searched in the Modifications forums but I can't find anything like this.

If it doesn't exist, it might be a good idea for someone to create it, if it's possible. It would also be nice to give the admin a choice of what the person is buying (a beer, a latte, etc) and also the choice of dollar increments to be deposited in the person's account (I'm assuming Paypal).

Any help here would be appreciated.

Thanks

DM

Edit: Also including one for the site itself would be good too.

It would also serve the members best if this appeared on all the posts that a member makes ( a small icon somewhere) and not just in their profile. Of course it would only appear for members who participate.

exfsmiler
02-14-2008, 01:22 PM
I managed to do this after having vbulletin for 4 days!
im only a newbie though so code maybe messy.....

Add a custom user field in AdminCP>User Profile Field>Add New User Field
I called mine "Email address for buy me a drink function"

Then in AdminCP>Styles & Templates>Style Manager>Postbit Templates> postbit

Find:
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] </div>

Paste Before Following </div>:
<if condition="$post['fieldX']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy Me A Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Do You Want To Buy Me A Drink?">
<img alt="Do You Want To Buy Me A Drink?" border="0" src="drink.gif" border="0"/>
</if>

You Will need to edit the X to your field number

The code above is set up to donate 3 English Pounds

change the 3 to your desired amount
and to convert to Dollars:
change GBP to USD and GB to US

i'm not sure of any other countries or currencys

also upload the attached drink.gif to the root folder of your forum (you can change the picture)

Now if the user has filled in the new field in their edit profile they will have a picture of a drink in all of their posts and when someone clicks on it, it opens up a new window in paypal for them to donate money for a drink

Enjoy