Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
UKBL ~ "Buy Me a Beer" Hack Details »
UKBL ~ "Buy Me a Beer" Hack
Mod Version: 1.00, by UKBusinessLive (Designer) UKBusinessLive is offline
Developer Last Online: Feb 2012 I like it Show Printable Version Email this Page

vB Version: 3.8.1 Rating: (4 votes - 4.75 average) Installs: 36
Released: 12 Feb 2009 Last Update: 14 Feb 2009 Downloads: 221
Not Supported Template Edits Re-usable Code Translations  

UKBL ~ "Buy Me a Beer" Hack v1.5



You may of seen this on other Forums But Now, The Buy Me a Beer Hack comes to VBulletin Display a Drinks Icon on your Postbit and watch those beers come rolling in, Don't forget to Buy me a Beer
Now even Easier to Install




View the demo above for step by step demo on how to set up a Buy me a Beer on your forums as well as Buy me a Drink - Multichoice

All we need to do is a simple Custom User Field to allow members to add their paypal address, Thats It.

In this Updated version i've set the beer Price to 3 you can off course change this and convert the currency to UD Dollars, its a lot easier believe me.
So to Start



Here is a walkthrough on what to do.

Download the beer.zip file and upload the four images to your forums /images/misc directory or even a hosting service like photobucket.


Next we need to create a Custom User Field in the members CP so, Log onto your Admin CP and go to "User Profile Fields"

Click on Add New User Profile field, and chose "Single Line Text Box"

Then copy the Following


Title = Buy Me A Beer

Description = Add your Paypal Email Address so members can buy you a Beer!

Max length of allowed user input = 50

Field Length = 50

Display Order = 10

Field Required = No

Field Editable by User = Yes

Private Field = No

Field Searchable on Members List = Yes

Display Page = Edit your Details

Thats It when your done click save

Then you'll see a list of custom fields and your new one should be right at the bottom, Make a note of the field number, For example we'll use field8



Copy and Paste the code from the zip file into notepad


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



You need to edit the following

Remember to change the X in FieldX to the Field Number from your Custom Field shown in RED

In the code look for


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


This is the value of your beer, Look for


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is the currancy country code and GB is the Country , so for Dollars you'd need to change these values to USD and US

its pretty easy really,

and finally change the url of the pictures you uploaded earlier to your forums /images/misc folder or even an image hosting company.

Thats all there is to the code edits, Now we need to go back to our Admin CP, Go to the template you are using in Styles & Templates/Style Manager, and select Edit templates.

Go to "postbit templates" and select the template you are using, either postbit or postbit_legacy.


Find the following


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

directly below it add your saved code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then all your members need to do is to add their Paypal address in their UserCP and automatically their drinks icon will show up in their postbit, If they no longer want to accept Drinks, all they need to do is to delete their Paypal Address from their User CP

So when they click on your Drinks icon they'll be taken to your Paypal's donation Page



Easy

Hope you enjoy this, Please don't forget to click install if you use





UPDATE 13.02.09

Several Members have expressed concerns with the fact that when you hover with your cursor over the drinks icon the members paypal add is displayed in the Status Bar.

Concerns were made about email harvesters and spammers, and as a responsible Developer Please Find below a security patch which you will need to add at the bottom of the Postbit template that your using, Just copy and paste, right at the bottom.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



This will disable the Staus bar and prevent anyone viewing details, however once the Beer icon has been clicked and the page reverts to the paypal payment page, then the link will be shown.

Also Don't forget to add a template conditional around your uploaded code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


With the X the numbers of your usergroup, This will prevent guests, and no registered members from viewing this hack

Please continue reporting any bugs and we'll fix them accordindly



A Second Version with Multiple choices is now available in the Multichoice.zip

REMEMBER YOU'LL NEED TO ADD THIS IN ADDITION TO THE BUY ME A BEER HACK.

You can Now add a wide variety of Drinks, Food or anything you want to the list and this will be shown inyour posbit and will still allow others to Buy for you via paypal, The Code is basically the same but we will need to add a few extra's, To get the multichoice hack to work we need to have the "Buy Me a Beer Hack" Installed, so if you havn't done that then please do so before going to Multichoice, OK so lets start...

1. Download the Multichoice.zip to your desktop and copy the multichoice.txt file to your text editor, like Notepad

2.Next we need to create a Custom User Field in the members CP so, Log onto your Admin CP and go to "User Profile Fields"

Click on Add New User Profile field, and chose "Single Selection drop down menu "

Then copy the Following


Title = Buy Me A Drink

Options Add the Different varity of drinks here ( One on each line, Remember you need to keep the name of the drinks the same as the drinks Picture format, so if you have Beer, Then you should have beer.png as the graphic file. )

Display Order = 15

Field Required = No

Field Editable by User = Yes

Private Field = No

Field Searchable on Members List = Yes

Display Page = Edit your Details

Thats It when your done click save





Remember you need to add this second custom user field in addition to the first one, make a note of the user Field Number Its like this Field9

Next Make sure that the graphic files are named the same as the Drinks in the Multichoice box, So if you have Wine as one of your choices, you need to make sure the Graphic is called Wine.png

In your forums Image directory you need to make a new directory called "Drinks" and upload all your drinks graphic files to your newly created directory, should be something like this..

YourForum.com/images/drinks

Finally we need to edit the code we have already uploaded into the postbit template,

So grab that code



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now look carefully at the code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


The red X's are to be replace withthe usergroup ID's of the usergroups you want to view


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This remains the same as this is our user dedined field which we did earleier which allows the insertion of the Paypal Email addy. That was field8 in our example.

Now look at the next bit


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Have you noticed i've changed the "Buy me a Beer" to "Buy me a Drink" and inplace of the name of our graphic file i've added another post field attribute $post[fieldx9] Which is the custom user field for the dropdown multichoice this will insert whatever the member choses to show in their postbit.

VERY IMPORTANT.

As the Name only of the Graphic file is chosen by the user, you need to ensure that your graphic formats remain the same, either all .jpg, png, or gif, No mixing of formats allowed.

Hope you enjoy the new addition

Many thanks to My Friend Steve (TimberFloorAu) from http://www.yobromofo.com/forum/ for the update on the code, and for getting my ideas working

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	beer -b.png
Views:	131
Size:	124.1 KB
ID:	94736   Click image for larger version

Name:	beer-a.png
Views:	95
Size:	33.1 KB
ID:	94738   Click image for larger version

Name:	paypal.png
Views:	132
Size:	48.0 KB
ID:	94743   Click image for larger version

Name:	multi.png
Views:	95
Size:	30.6 KB
ID:	94859  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Forum Home Enhancements UKBL ~ "Save As Homepage" Button UKBusinessLive vBulletin 3.8 Template Modifications 10 30 May 2009 10:55
UKBL ~ "Save As Homepage" Button UKBusinessLive vBulletin 3.5 Template Modifications 1 06 Feb 2009 15:44
Forum Home Enhancements UKBL ~ "Save As Homepage" Button UKBusinessLive vBulletin 3.6 Template Modifications 1 06 Feb 2009 15:41
Forum Home Enhancements UKBL ~ "Save As Homepage" Button UKBusinessLive vBulletin 3.7 Template Modifications 1 06 Feb 2009 15:39

  #121  
Old 14 Mar 2009, 23:43
kahethu kahethu is offline
 
Join Date: May 2005
I have agonized about how to get this hack for months!
Beautiful work.

I seem to have a conditional error when I edit my postbit; I figure it must be my error.

I just sent you a PM.
Simon
Reply With Quote
  #122  
Old 15 Mar 2009, 09:11
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by kahethu View Post
I have agonized about how to get this hack for months!
Beautiful work.

I seem to have a conditional error when I edit my postbit; I figure it must be my error.

I just sent you a PM.
Simon
Hi Simon,

Just looked at your posbit template the conditional error was for an additional </IF> tag which was spare, I deleted that and alls well

However, It seems that your Postbit has been heavily modified, i think as part of your style where i wouldnormally post the hack, just makes your postbit look like a right mess

I will however have another go and see if we can get it working for you

Last edited by UKBusinessLive; 15 Mar 2009 at 09:37.
Reply With Quote
  #123  
Old 15 Mar 2009, 17:04
ac1d1dty ac1d1dty is offline
 
Join Date: Jul 2008
Can I make this so someone clicks to buy someone a drink and can then choice the amount?

thanks
Reply With Quote
  #124  
Old 15 Mar 2009, 17:48
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by ac1d1dty View Post
Can I make this so someone clicks to buy someone a drink and can then choice the amount?

thanks
The amount is set for 3 or you can change it for $3, or whatever you want within the code. But for the end user to change the amount, they'll have to change it when it goes to the paypal payment page, It shows as a donation on paypal so they will be able to change the amount there.

The reason i did this at 3 was because of the silly fees paypal charge, the end user would be left with Pennies if i'd set it at 1
Reply With Quote
  #125  
Old 15 Mar 2009, 18:41
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by TimberFloorAu View Post
The little green bar is called : Murphys Inn


Happy St Patricks day to you Steve

Today i even put a Buy me a Beer hack on my main site

How desperate is that ???



You can never have too many beers bought for you
Reply With Quote
  #126  
Old 15 Mar 2009, 19:45
ArnyVee's Avatar
ArnyVee ArnyVee is offline
 
Join Date: Mar 2008
Gerry, nice work! You can't have too many beers, right?

I haven't added this hack yet, but I will be in the near future

I haven't looked back, but did you ever get the code for the PayPal to go to the site admin or one particular PayPal rather than paying each other?
Reply With Quote
  #127  
Old 15 Mar 2009, 19:53
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by ArnyVee View Post
Gerry, nice work! You can't have too many beers, right?

I haven't added this hack yet, but I will be in the near future

I haven't looked back, but did you ever get the code for the PayPal to go to the site admin or one particular PayPal rather than paying each other?
Yes i did mate, Thats what i used for my main site


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just change the red email to your sites email addy, and don't forget the url of your picture at the end
Reply With Quote
  #128  
Old 15 Mar 2009, 19:54
ArnyVee's Avatar
ArnyVee ArnyVee is offline
 
Join Date: Mar 2008
Fantastic! I can always count on you to have the answers Gerry!
Reply With Quote
  #129  
Old 15 Mar 2009, 19:58
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by ArnyVee View Post
Fantastic! I can always count on you to have the answers Gerry!
No worries
Reply With Quote
  #130  
Old 16 Mar 2009, 11:50
Ranger375 Ranger375 is offline
 
Join Date: Jun 2007
Is there any way to make it so the beer that is bought just appears on the user's profile, rather than on their post? If so, how would I do this? Thanks!
Reply With Quote
  #131  
Old 16 Mar 2009, 18:38
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by Ranger375 View Post
Is there any way to make it so the beer that is bought just appears on the user's profile, rather than on their post? If so, how would I do this? Thanks!
I guess you would add it in their profile template, but i'm not sure 100%, but won't that defeat the object???

if a member helps out and perhaps saves another member $$$$$$$$$$'s, Then surely it would pay to show the beer icon on the members postbit so they have max exposure
Reply With Quote
  #132  
Old 18 Mar 2009, 17:50
kahethu kahethu is offline
 
Join Date: May 2005
I've added mine but they cannot change the amount even at paypal (it's a donation). Any idea what I could be missing?

Simon
Reply With Quote
  #133  
Old 18 Mar 2009, 18:32
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by kahethu View Post
I've added mine but they cannot change the amount even at paypal (it's a donation). Any idea what I could be missing?

Simon
The amount is fixed At 3 or $3 whatever currency your using. You can change the amount in the code by finding


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and changing it to what you want

The reason i did this like this is twofold, One to prevent people simply paying small amounts that paypal fee's will use most of it up and secondly to prevent accidental amounts and disputes afterwards, like you only wanted to pay 10 not 100

The fixed fee is known by all and if members want to pay more, Just Buy another Beer!!!

Glad you got it working in the end
Reply With Quote
  #134  
Old 22 May 2009, 05:43
pnosko31 pnosko31 is offline
 
Join Date: May 2006
here is my suggestion:

in the postbit maybe make it so it displays the number of beers purchased for them and the number of beers they purchased for others (similar to the way other mods like the thank you hack keeps count.)

So in their postbit/profile it would show:

Beers Recieved: 3
Beers Purchased: 2

and maybe have it send an pm to the person with a custom message or something when someone buys them a beer.
Reply With Quote
  #135  
Old 27 May 2009, 20:23
Vinyljunky's Avatar
Vinyljunky Vinyljunky is offline
 
Join Date: Feb 2007
Congrats on the Advisor status
__________________
Siliconhell.com - Mindbending quizzes and a forum full of fun
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 11:09.

Layout Options | Width: Wide Color: