The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
UKBL ~ "Buy Me a Beer" Hack Details »» | |||||||||||||||||||||||||
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 Step By Step Demo: http://www.ukbusinesslive.co.uk/foru...Me__a_Beer.swf 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 Code:
<if condition="$post['fieldX']"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer"> <img alt="Buy me a Beer?" border="0" src="http://www.yourforum.com/images/misc/beer.png" border="0"/> </if> Remember to change the X in FieldX to the Field Number from your Custom Field shown in RED In the code look for Code:
Beer&amount=3 Code:
currency_code=GBP 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 Code:
$template_hook[postbit_userinfo_right] <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon] </div> </div> Code:
<!-- /By me a Beer start--> <if condition="$post['fieldX']"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer"> <img alt="Buy me a Beer?" border="0" src="http://www.yourforum.com/images/misc/beer.png" border="0"/> </if><!-- /By me a Beer End--> 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. Code:
<script> function hidestatus(){ window.status='' return true } if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT) document.onmouseover=hidestatus document.onmouseout=hidestatus </script> Also Don't forget to add a template conditional around your uploaded code Code:
<if condition="is_member_of($bbuserinfo, X, X, X)"> The Code goes here !! </if> 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 Code:
<!--buy me a beer --> <center> <if condition="is_member_of($bbuserinfo, x, x, x, x)"> <if condition="$post['field8']"><div class="info"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field8]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer"> Buy Me a Drink</a></if><if condition="$post['field9']"><img alt="Buy me a Beer?" border="0" src="http://www.yourforum.com/images/drinks/$post[field9].png" border="0"/></div></if></center> </if> <!--end buy me a beer --> Code:
<if condition="is_member_of($bbuserinfo, x, x, x, x)"> Code:
<if condition="$post['field8']"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field8] Now look at the next bit Code:
<img alt="Buy me a Drink?" border="0" src="http://www.yourforum.com/images/drinks/$post[fieldx9].png" border="0"/> 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 Supporters / CoAuthors Show Your Support
|
Comments |
#2
|
|||
|
|||
Reserved
|
#3
|
|||
|
|||
Just to let you all know i've updated the code making it easier for everyone.
The main differences are 1. Now your members will not have to play around making Donation Buttons at Pay pal to get an ID number, all they need to do is add their Paypal email in the Custom user field in the User CP 2. To stop abuse of the system with members paying pennies to each other, which means Paypal will take that as cost, and no one getting anything, I've made the donations fixed at ?3, Its easy to change this amount and also the currancy, its all in the code 3. Installation time should be no more than 10 minutes or less if your fast. New Zip file uploaded Enjoy |
#4
|
|||
|
|||
There's a flash tutorial on how to install Buy me a beer and Buy me a Drink here
http://www.ukbusinesslive.co.uk/foru...Me__a_Beer.swf |
#5
|
||||
|
||||
great...want to try this....but can't make the image appear...please view my code below...if it's right....
thanks and best regards... Code:
<!-- BUY ME A BEER START --> <center> <if condition="is_member_of($bbuserinfo, 2, 5, 6, 7, 9, 10, 11, 12, 13)"> <if condition="$post['field23']"><div class="info"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field23]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer"> Buy Me a Drink</a></if> <if condition="$post['field25']"> <img src="$stylevar[imgdir_misc]/buy_me/$post[field25].png" alt="Buy me a Drink?" border="0"/></div></if></center> </if> <!-- / BUY ME A BEER END --> |
#6
|
|||
|
|||
Quote:
Hi, Just need to make sure your profile fields are set up right, When you make your second profile field, the one with the list of drinks you need to use "Single Selection Menu" and within that in "Set Default" you need to chose "Yes, But no First blank Option" Just check make sure they are right, You can see hows its done in this video tutorial http://www.ukbusinesslive.co.uk/foru...Me__a_Beer.swf let me know how you got on |
#7
|
||||
|
||||
million thanks UKBusinessLive for helping me to my site... much appreciated...
finally got it work....and by the way...hope it's okay...if i include the image as clickable link... by adding the </a> below... pls. view my code...below... Code:
<!-- BUY ME A BEER START --> <center> <if condition="is_member_of($bbuserinfo, 2, 5, 6, 7, 9, 10, 11, 12, 13)"> <if condition="$post['field23']"><div class="info"> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field23]&item_name=Buy Me Something&amount=3%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow"> <font size=1>Buy Me Something</font> </if> <br /> <if condition="$post['field25']"> <img alt="Pls.Click To Buy Me This" border="0" src="http://mysite.com/images/buy_me/$post[field25].png" border="0"/></div></if></center> </if></a> <!-- / BUY ME A BEER END --> |
#8
|
|||
|
|||
Quote:
Add where you think it'll work best |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|