Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2007, 05:23 PM
DinarMet DinarMet is offline
 
Join Date: Feb 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Buy Me A Beer/Latte Hack?

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.
Reply With Quote
  #2  
Old 02-14-2008, 01:22 PM
exfsmiler exfsmiler is offline
 
Join Date: Feb 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
$template_hook[postbit_userinfo_right]
				<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] </div>
Paste Before Following </div>:
Code:
<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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03676 seconds
  • Memory Usage 2,187KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete