Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Keith Tysinger on April 17, 2009, 09:11:12 AM

Title: Buy Me A Drink
Post by: Keith Tysinger on April 17, 2009, 09:11:12 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1750)

Buy Me A Drink Version: 1.1 Mod by Keith Tysinger

For SMF 2.0 Beta 4, 2.0 RC1, 2.0 RC3, and 1.1.8

Buy_me_a_drink_1_2.zip now works with 2.0 RC3 and the new Curve theme.

Buy Me a Drink allows members to buy other members a drink... or soda... or coffee... or even a cigar. This fun mod uses Paypal to transfer funds.

The member profile form is modified to allow a user to choose their favorite drink. They can choose from:

1) Drink
2) Beer
3) Coffee
4) Soda
5) Cigar

Demo: Madcoder.biz/forum (http://madcoder.biz/forum/)

The profile is also modified to allow the user to enter another email address for their paypal account. The user can choose to allow or disallow guests from buying them a drink.

The admin center allows the moderators to:

1) Turn the mod on/off
2) Choose from small or large icons to better suit your site's theme
3) Choose dollar amount of drink

This mod displays an icon on their posts relating to their drink of choice and adds
a paypal payment screen.

Version History:

1.1 (4-30-2009) Corrected a missing double quote; this error broke the xhtml validation

Please support the evolution of this mod: buy the author a drink ;)


Keith.Tysinger@gmail.com (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=Keith%2eTysinger%40gmail%2ecom&lc=US&item_name=Buy%20me%20a%20%2e%2e%2e&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)

For installation of this or any other script, please contact me via contact form @ www.MadCoder.biz
Title: Re: Buy Me A Drink
Post by: damnitmike on April 17, 2009, 09:48:46 AM
I always thought this mod was cool.....kbensons version seemed to have gotten lost or forgotten.....

I'll give it a go here shortly.....
Title: Re: Buy Me A Drink
Post by: Afro on April 17, 2009, 11:34:25 AM
any hope for smf 1.1.8 version
Title: Re: Buy Me A Drink
Post by: GazOutEast on April 18, 2009, 10:33:03 AM
sam_milla - don't be so lazy - use the search function

Karl Benson's version = Buy me a Beer - it works perfectly well on 1.1.8 and gave sterling service on one of my 1.1.8 forums until it was upgraded to RC1

I am very pleased to see this version appear
Many thanks to kc2002 for updating it
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on April 20, 2009, 01:30:03 AM
Thanks folks. I have never installed Karl Benson's Mod because I didn't want to plagiarize :) I borrowed his idea and created a new mod for 2.0 RC1 because I wanted a working mod for my website.... and something a little different.

I hope you enjoy it.... and the drinks! :)

Title: Re: Buy Me A Drink
Post by: LadyC on April 20, 2009, 01:37:35 PM
congratulations kc, on getting your first mod approved!
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on April 25, 2009, 11:58:19 PM
I just added support for 1.1.8 today. The conversion was a pain and a lot of work!

I hope it works  ;D

any hope for smf 1.1.8 version
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on April 30, 2009, 03:37:03 AM
I just added support for 1.1.8 today. The conversion was a pain and a lot of work!

I hope it works  ;D

any hope for smf 1.1.8 version

Tonight I release a new version that corrected a missing double quote ("). This caused an xhtml validation error.

The error is in the Display.template.php file. This is the corrected (one line of code) version for 2.0 RC1:

<li><a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="'.$txt['buy_description_icon'] . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="'.$txt['buy_description_icon'].$message['member']['buy_type'].'" border="0" /></a></li>';

2.0 beta 4

<li><a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="Buy me ' . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="Buy me '  . $message['member']['buy_type'].'" border="0" /></a></li>';

v. 1.1.8

<a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="'.$txt['buy_description_icon'] . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="'.$txt['buy_description_icon'].$message['member']['buy_type'].'" border="0" /></a>';
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on May 11, 2009, 03:13:33 AM
Hi all,

Just installed this on my site, 1.1.8 with a little over 2000 users, I think I'm going to like it a lot... however, there seems to be one minor flaw if you use the package manager to install... not really too sharp with packages yet myself, tried to fix it manually myself without success... it seems that after install everything is good except that it displays two icons for the buy_me_?? on the posted messages instead of one, any help?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 11, 2009, 01:36:12 PM
It appears that the mod was installed twice. The $themedir/Display.template.php file was modified twice.

You need to search in that file for:

Code: [Select]
if ($message['member']['buy_on'])
{
if (!$modSettings['BuyMeIcon']) echo'<br /><br />';

echo '
  <a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="'.$txt['buy_description_icon'] . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="'.$txt['buy_description_icon'].$message['member']['buy_type'].'" border="0" /></a>';
}

There should be TWO identical lines (blocks of code) like the one above. Remove one of them and you will be all set. Just be sure to remove the whole block from if ... }

Otherwise email me the Display.template.php file and I will edit it for you and email it back to you.


Hi all,

Just installed this on my site, 1.1.8 with a little over 2000 users, I think I'm going to like it a lot... however, there seems to be one minor flaw if you use the package manager to install... not really too sharp with packages yet myself, tried to fix it manually myself without success... it seems that after install everything is good except that it displays two icons for the buy_me_?? on the posted messages instead of one, any help?
Title: Re: Buy Me A Drink
Post by: benjicadena on May 13, 2009, 04:45:39 PM
I just noticed that when you click on the buy a drink icon the following message that comes up has the word recommended misspelled. This is how the sentence comes out: "You have chosen to buy --- some coffee. The reccomended price is $; however, you may send any amount you wish. Please click on the Paypal Donate button below and you will be allowed to enter the amount you wish to pay.

It should be one c and two m's Recommended.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 13, 2009, 07:51:15 PM
Oh no. That is embarrassing. I will correct that.

It's in the $languagedir/index.english.php file

$txt['buy_reccomended']='The recommended price is';

You can edit that file or correct it in the admin panel-> language files in SMF 2.0.

I just noticed that one you click on the buy a drink icon the following message that comes up has the word recommended misspelled. This is how the sentence comes out: "You have chosen to buy --- some coffee. The reccomended price is $; however, you may send any amount you wish. Please click on the Paypal Donate button below and you will be allowed to enter the amount you wish to pay.

It should be one c and two m's Recommended.
Title: Re: Buy Me A Drink
Post by: Blah blah on May 14, 2009, 11:22:57 AM
Hi...can the "Buy me a drink" mod be coded so that only Admins can use the feature?

Thanks in advance
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 14, 2009, 02:28:07 PM
I could show you how to do a quick and dirty fix for this. Maybe a nice feature for a future version.

Hi...can the "Buy me a drink" mod be coded so that only Admins can use the feature?

Thanks in advance
Title: Re: Buy Me A Drink
Post by: Blah blah on May 14, 2009, 02:32:17 PM
Let me hear it  :D
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 15, 2009, 12:21:55 AM
Are you using the 2.0 version? If so, edit profile-modify.php in the /source dir.


search for

      'buy_text' => array(
      'buy_guest' => array(
      'buy_email' => array(

(three changes) each of the above blocks of code will have this line:

'enabled' => $modSettings['BuyMeEnable'],

change all three to this:

'enabled' => ($modSettings['BuyMeEnable'] && $context['user']['is_admin']),

This will not allow non admins to turn on the mod in their profile.

The next version will use SMF's permissions.

Let me hear it  :D
Title: Re: Buy Me A Drink
Post by: Blah blah on May 15, 2009, 12:40:23 AM
Thanks man  :D

great mod too btw
Title: Re: Buy Me A Drink
Post by: Xavi-Nena on May 16, 2009, 04:21:17 PM
Ok I am clearly blind, where do I turn this on at?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 17, 2009, 05:12:44 AM
Ok I am clearly blind, where do I turn this on at?

It should have taken you there automatically.

Admin -> Configuration -> Modifications -> Buy me a drink

Then you set it up in your profile -> modify -> forum profile

Hey if that is your picture, maybe I can buy you a drink sometime?  8)
Title: Re: Buy Me A Drink
Post by: Xavi-Nena on May 17, 2009, 09:30:35 PM
hehe it is me, thank you but since this pic was taken I have let myself go a bit...;)

also re: the mod, I cannot get the manual instructions for 1.1.8 i have to manually ad it to 2 of my files any suggestions?
Title: Re: Buy Me A Drink
Post by: Xavi-Nena on May 17, 2009, 10:14:05 PM
actually i need to manually edit display.template.php, sources/load.php and sources/modsettings.php

i used the 1.0 package download parse instructions for these files because the 1.1 was not working to parse but im guessing that is why my issues lies because i can see the buy a drink admin area but when i check the box and edit the settings and click save it redirects me to the main admin features and config page and it does not stay checked, i do not see any option in my members avatar info area of each post nor is there any info on the profile page to edit the email and such. :)

i cannot wait to get this mod working, i think its a great mod....now i just need to figure it out to use it :)

added: i should add that i am using the ultimate profile mod, if that makes a difference.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 18, 2009, 01:28:16 AM
Email those files to me and I will check them out / edit them for the mod.

keith.tysinger@gmail.com

I corrected the parser error, but v 1.0 should be exactly the same, except for a very small missing quote (") in the file.


actually i need to manually edit display.template.php, sources/load.php and sources/modsettings.php

i used the 1.0 package download parse instructions for these files because the 1.1 was not working to parse but im guessing that is why my issues lies because i can see the buy a drink admin area but when i check the box and edit the settings and click save it redirects me to the main admin features and config page and it does not stay checked, i do not see any option in my members avatar info area of each post nor is there any info on the profile page to edit the email and such. :)

i cannot wait to get this mod working, i think its a great mod....now i just need to figure it out to use it :)

added: i should add that i am using the ultimate profile mod, if that makes a difference.
Title: Re: Buy Me A Drink
Post by: Xavi-Nena on May 18, 2009, 07:45:44 AM
I am very pleased to report my stubbornness paid off yet again. I found I had put the
                 'BuyMe' => 'ModifyBuyMeSettings',

in the wrong place :) now all is working, thank you for all the help!
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on May 21, 2009, 06:39:19 AM

There should be TWO identical lines (blocks of code) like the one above. Remove one of them and you will be all set. Just be sure to remove the whole block from if ... }

Otherwise email me the Display.template.php file and I will edit it for you and email it back to you.



Got it, fixed, thanks
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on May 21, 2009, 06:54:18 AM
Oh no. That is embarrassing. I will correct that.

It's in the $languagedir/index.english.php file

$txt['buy_reccomended']='The recommended price is';

You can edit that file or correct it in the admin panel-> language files in SMF 2.0.


I might just add there are 2 lines need edting on this, that edit is needed twice...
Title: Re: Buy Me A Drink
Post by: GazOutEast on May 26, 2009, 03:42:16 AM
Has anyone tested this on RC1-1 yet?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on June 06, 2009, 10:43:55 PM
Yes. It works fine with RC1-1.


Has anyone tested this on RC1-1 yet?
Title: Re: Buy Me A Drink
Post by: Morp on June 25, 2009, 12:12:32 PM
Can anyone make this work with 1.1.9?
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on July 03, 2009, 05:06:00 AM
Problems... I had a major problem installing a mod here about a month ago, and I made a big mistake in trying to correct it by going to 2.0 RC1-1, couldn't get ANY mods to work in that version, so decided to go back to 1.1.9... after a lot of cussing and work, finally have everything back to normal except this mod, the package manager gets major errors when I click "Apply "... I really liked this mod, please give me some advice on how to proceed with getting it re-installed... I really hate doing manual installs, but if necessary...

Here's a list of the mods I have...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Frjventure.com%2Fimages%2Fsmfhelpticket10.png&hash=fe061337405bef9980f08b6edac0eaef)
Title: Re: Buy Me A Drink
Post by: Xavi-Nena on August 02, 2009, 11:49:48 AM
I'm sorry man, but this mod has never worked with 1.1.9. There are lots of differences in the two and too much work to make a 1.1.9 version.

Sorry!

Would this cause errors galore once i updated to 1.1.9?

I am missing ./Sources/Profile-Modify.php and ./Sources/ManageSettings.php and had to manuall uninstall it from everywhere else because it gave me over 58k pages of errors. Yes that is 58,000 pages of errors.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on August 14, 2009, 09:25:30 PM
Actually the mod may work with 1.1.9. I have never tested it. If the install doesn't give you any errors, it's a go.


Quote
I am missing ./Sources/Profile-Modify.php and ./Sources/ManageSettings.php and had to manuall uninstall it from everywhere else because it gave me over 58k pages of errors. Yes that is 58,000 pages of errors.

What do you mean you are missing these files? They are included in smf, not the mod.
Title: Re: Buy Me A Drink
Post by: ElectricSquid on August 19, 2009, 07:55:18 PM
What a great idea.
I was about to install the "Buy Me A Beer" mod and then I found this.

I would like to do a little customization to it though.
What I would like is to have the ability to use a few of the icons all at once in their own row.
Each item having their own price.

Coffee - $1
  Beer - $2
  Wine - $3
A Shot - $4
  Cigar - $5

How hard do you think this would be to do?
Title: Re: Buy Me A Drink
Post by: ElectricSquid on August 21, 2009, 04:37:39 PM
Forget my last post, I found an easy way to do it using Karl Bensons "Buy Me A Beer" mod.
When I tried to install this mod, I had Test Failed on each file it was going to modify, LOL :P
My forum is very modified with a lot of custom coding, so it's no surprise this happened.

The "Buy Me A Beer" mod, on the other hand, is very light compared to this one, and installed without issue on SMF 1.1.10. Changing the price is hardcoded, but for me, that was not an issue.

It was also very easy to customize it to allow multiple icons with different prices.
For my forum, it fits right in very well that way.
Title: Re: Buy Me A Drink
Post by: ElectricSquid on August 21, 2009, 04:42:59 PM
Actually the mod may work with 1.1.9. I have never tested it. If the install doesn't give you any errors, it's a go.


Quote
I am missing ./Sources/Profile-Modify.php and ./Sources/ManageSettings.php and had to manuall uninstall it from everywhere else because it gave me over 58k pages of errors. Yes that is 58,000 pages of errors.

What do you mean you are missing these files? They are included in smf, not the mod.

I had the same problem.
SMF 1.1.10
Those files do not exist in that SMF version.
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on October 14, 2009, 02:53:26 PM
After an all-night session, a little cussing, and much trial & error, I have this module functioning properly on...

--= SMF 2.0 RC2  8) =--


Man, you've no idea how eagerly I've been awaiting SMF 2.0 to go final, I love the concept of this module and although I haven't been able to follow all the way through in testing for errors in PayPal functionality (I only have one PayPal account and don't really have much inclination to learn about "sandboxing" it) I'll just keep it in the development site for a while, maybe somebody will help me test that part of it later.

After all is said and done, I'll attempt to explain exactly what needs doing in the fewest steps possible to get this bad boy up and running on 2.0 RC2, and hopefully the author will be watching this thread closely and make the necessary adjustments to the install package...

First, as the install package is now, the only error you get on "test" install is ./Themes/default/Display.template.php, the 2.0 RC2 version has an extra section very near where the  BuyMeADrink installer currently looks to make its edit, the attached Display.template.php file shows you exactly where to put the edit...

Secondly, there is another flaw in the installer which will not be apparent until you actually try to modify your profile to enable "BuyMe" functionality, you'll get a database error, to remedy the situation download the attached install20.php file and upload to the root SMF 2.0 RC2 directory and execute it by accessing the page directly with your web browser, this file has the necessary code changes and should work fine for any install using MySQL...

Like I said it took me all night to figure out but you don't have to go thru that here if you pay heed to these two simple steps, and btw it should go smoother if you execute/upload both of these edits BEFORE you go beyond the "test" install using the SMF package manager, if you mess it up and have to start over it's a major pain to clean up a previous attempt at using the package manager unsuccessfully... just do the two steps described above first, then go ahead and use the package manager to execute the other edits & extractions from the zip file and it should be a successful install although it says the Display.template.php file has errors...

Oh yes, you can see the results of my night's work on my test site here:
eMarketing Exchange (development site) (http://rjventure.com/test/)

Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on November 17, 2009, 06:57:40 PM
After an all-night session, a little cussing, and much trial & error, I have this module functioning properly on...

--= SMF 2.0 RC2  8) =--


Man, you've no idea how eagerly I've been awaiting SMF 2.0 to go final, I love the concept of this module and although I haven't been able to follow all the way through in testing for errors in PayPal functionality (I only have one PayPal account and don't really have much inclination to learn about "sandboxing" it) I'll just keep it in the development site for a while, maybe somebody will help me test that part of it later.

After all is said and done, I'll attempt to explain exactly what needs doing in the fewest steps possible to get this bad boy up and running on 2.0 RC2, and hopefully the author will be watching this thread closely and make the necessary adjustments to the install package...

First, as the install package is now, the only error you get on "test" install is ./Themes/default/Display.template.php, the 2.0 RC2 version has an extra section very near where the  BuyMeADrink installer currently looks to make its edit, the attached Display.template.php file shows you exactly where to put the edit...

Secondly, there is another flaw in the installer which will not be apparent until you actually try to modify your profile to enable "BuyMe" functionality, you'll get a database error, to remedy the situation download the attached install20.php file and upload to the root SMF 2.0 RC2 directory and execute it by accessing the page directly with your web browser, this file has the necessary code changes and should work fine for any install using MySQL...

Like I said it took me all night to figure out but you don't have to go thru that here if you pay heed to these two simple steps, and btw it should go smoother if you execute/upload both of these edits BEFORE you go beyond the "test" install using the SMF package manager, if you mess it up and have to start over it's a major pain to clean up a previous attempt at using the package manager unsuccessfully... just do the two steps described above first, then go ahead and use the package manager to execute the other edits & extractions from the zip file and it should be a successful install although it says the Display.template.php file has errors...

Oh yes, you can see the results of my night's work on my test site here:
eMarketing Exchange (development site) (http://rjventure.com/test/)



Update.... the above scenario works great for the Charter release of SMF 2.0 RC2, now I need some assistance with the public release of 2.0 RC2... I put the edit described in the SMF support site instructions into the public version of Display.template.php and it causes a template parse error on line 636. Not sure but I think there is a missing quote or something... I've tried several times but I'm just not PHP savvy enough to correct the problem... help... I know already that it operates great on 2.0 RC2, just this one little bug to squash
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on November 21, 2009, 03:22:16 AM
Help? Read previous message.
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on November 24, 2009, 03:47:21 PM

Update.... the above scenario works great for the Charter release of SMF 2.0 RC2, now I need some assistance with the public release of 2.0 RC2... I put the edit described in the SMF support site instructions into the public version of Display.template.php and it causes a template parse error on line 636. Not sure but I think there is a missing quote or something... I've tried several times but I'm just not PHP savvy enough to correct the problem... help... I know already that it operates great on 2.0 RC2, just this one little bug to squash


Would really like to get my problem squared away BEFORE SMF 2.0 goes final, sigh

You awake Keith? It's got to be a simple syntax error because I can upload the modified Display.template.php I used from the Charter version and all is fine with this mod but problems elsewhere in the system because it's not the Public release of Display.template.php, need some advice on what to look for in the edit your mod is attempting to write.

Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on November 30, 2009, 12:27:40 AM

Would really like to get my problem squared away BEFORE SMF 2.0 goes final, sigh

You awake Keith? It's got to be a simple syntax error because I can upload the modified Display.template.php I used from the Charter version and all is fine with this mod but problems elsewhere in the system because it's not the Public release of Display.template.php, need some advice on what to look for in the edit your mod is attempting to write.



Update... got it fixed, seems there is no bug... All I did was un-install ALL mods, re-upload a fresh copy of Display.template.php... then re-install the mods again making sure to have latest version of each one... seems to have worked... having a few error messages in the log but NOT from this mod, it seems aok so far...

Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on January 11, 2010, 03:00:04 PM
Would like to see the icon on Profile Summary as well as posts, but judging from the response to previous posts about this mod, the author isn't inclined to respond to this either, sigh...
Title: Re: Buy Me A Drink
Post by: anakmacan on January 24, 2010, 02:57:06 PM
Great modddd!!!!!!!! im sending a little donation right now ^^
Title: Re: Buy Me A Drink
Post by: Andiiieee[: on February 06, 2010, 01:39:07 AM
 Type     Action     Description
1.    Execute Modification    ./Sources/Admin.php    Test failed
2.    Execute Modification    ./Sources/Load.php    Test failed
3.    Execute Modification    ./Sources/Profile-Modify.php    File not found
4.    Execute Modification    ./Sources/ManageSettings.php    File not found
5.    Execute Modification    ./index.php    Test failed
6.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Admin.english.php    Test failed
8.    Execute Modification    ./Themes/default/Display.template.php    Test failed
9.    Extract File    ./Themes/default/images/buy_beer_large.gif    
10.    Extract File    ./Themes/default/images/buy_beer_small.gif    
11.    Extract File    ./Themes/default/images/buy_soda_large.gif    
12.    Extract File    ./Themes/default/images/buy_soda_small.gif    
13.    Extract File    ./Themes/default/images/buy_coffee_large.gif    
14.    Extract File    ./Themes/default/images/buy_coffee_small.gif    
15.    Extract File    ./Themes/default/images/buy_cigar_large.gif    
16.    Extract File    ./Themes/default/images/buy_cigar_small.gif    
17.    Extract File    ./Themes/default/images/buy_drink_large.gif    
18.    Extract File    ./Themes/default/images/buy_drink_small.gif    
19.    Extract File    ./Themes/default/Buyme.template.php    
20.    Extract File    ./Sources/Buyme.php    
21.    Execute Code    install20.php    

can i have these files please?
Title: Re: Buy Me A Drink
Post by: GazOutEast on February 06, 2010, 02:38:11 AM
Type     Action     Description
1.    Execute Modification    ./Sources/Admin.php    Test failed
2.    Execute Modification    ./Sources/Load.php    Test failed
3.    Execute Modification    ./Sources/Profile-Modify.php    File not found
4.    Execute Modification    ./Sources/ManageSettings.php    File not found
5.    Execute Modification    ./index.php    Test failed
6.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Admin.english.php    Test failed
8.    Execute Modification    ./Themes/default/Display.template.php    Test failed

can i have these files please?

Which version of SMF are you using - it looks like you're trying to install a mod for SMF 2.0 onto SMF 1.1.x
Title: Re: Buy Me A Drink
Post by: ForumMustang.com on February 12, 2010, 03:05:32 PM
I managed to install the mod on SMF RC2 with your files after a few tries but I am having troubles with the icon in the profile area. On one forum the icon is showing twice and on another one it's showing three times.
I checked the code in the display.template.php file and it's how it should be and with no duplicate:

Code: [Select]
            // Any custom fields for standard placement?
            if (!empty($message['member']['custom_fields']))
            {
                foreach ($message['member']['custom_fields'] as $custom)
                    if (empty($custom['placement']) || empty($custom['value']))
                if ($message['member']['buy_on'])
                    {
                        if (!$modSettings['BuyMeIcon']) echo'';

                            echo '
                      <li><a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="'.$txt['buy_description_icon'] . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="'.$txt['buy_description_icon'].$message['member']['buy_type'].'" border="0" /></a></li>';
                            }       

Any idea what could be wrong?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 15, 2010, 02:33:45 AM
Support for SMF 2.0 RC 3 is out now. I'm afraid I never made a version for RC 2.

bperry921-- I would have been very happy to help you had you emailed me. I have this page bookmarked now and will check it much more often! Only two small changes were necessary to make the script install on RC3. Thanks for the suggestions for future versions. Holler at me anytime @ keith.tysinger@gmail.com

For the others with problems installing this script: it will only install in the versions listed. These are the only versions I have tested it on. It works with 2.0 RC1-1 and RC3 but not RC2. Every time the SMF team changes the templates for newer versions, I have to make some small adjustments. It's frustrating to everyone.

Check out my demo site, www.madcoder.biz/forum

This goes directly to a post where you can see the mod in action:

http://madcoder.biz/forum/index.php?topic=2.0
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 15, 2010, 03:43:48 AM
It looks like you have installed the software multiple times. The problem shouldn't be hard to fix, just remove the additional code from display.template.php

Email me the templates and I can edit them for you. Didn't you get some errors before you installed this?


I managed to install the mod on SMF RC2 with your files after a few tries but I am having troubles with the icon in the profile area. On one forum the icon is showing twice and on another one it's showing three times.
I checked the code in the display.template.php file and it's how it should be and with no duplicate:

Code: [Select]
            // Any custom fields for standard placement?
            if (!empty($message['member']['custom_fields']))
            {
                foreach ($message['member']['custom_fields'] as $custom)
                    if (empty($custom['placement']) || empty($custom['value']))
                if ($message['member']['buy_on'])
                    {
                        if (!$modSettings['BuyMeIcon']) echo'';

                            echo '
                      <li><a href="', $scripturl, '?action=buyme;u=', $message['member']['id'], '" title="'.$txt['buy_description_icon'] . $message['member']['buy_type']. '"><img src="' . $settings['images_url'] . '/'.$message['member']['buy_icon'].'" alt="'.$txt['buy_description_icon'].$message['member']['buy_type'].'" border="0" /></a></li>';
                            }       

Any idea what could be wrong?
Title: Re: Buy Me A Drink
Post by: Arantor on March 15, 2010, 07:47:33 AM
For the others with problems installing this script: it will only install in the versions listed. These are the only versions I have tested it on. It works with 2.0 RC1-1 and RC3 but not RC2. Every time the SMF team changes the templates for newer versions, I have to make some small adjustments. It's frustrating to everyone.

Sorry to say but that's the price of updating mods for release candidates and not final builds. Nowhere does it say that the templates "must not change" between now and 2.0 final.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 15, 2010, 08:50:32 AM
I understand. I have always liked to upgrade to the newest RC, but I think I will stop that and wait for finals. RC2-3 was a very tempting upgrade due to the new Curve theme!


For the others with problems installing this script: it will only install in the versions listed. These are the only versions I have tested it on. It works with 2.0 RC1-1 and RC3 but not RC2. Every time the SMF team changes the templates for newer versions, I have to make some small adjustments. It's frustrating to everyone.

Sorry to say but that's the price of updating mods for release candidates and not final builds. Nowhere does it say that the templates "must not change" between now and 2.0 final.
Title: Re: Buy Me A Drink
Post by: Arantor on March 15, 2010, 08:52:35 AM
Well, RC2 was a nightmare because of Curve. RC2 -> RC3 is relatively painless and strongly encouraged because of security concerns. Given the way the tracker is going, I think we can expect maybe RC4 before final, maybe not.
Title: Re: Buy Me A Drink
Post by: bloox on March 16, 2010, 11:05:16 AM
Hello is not working with rc3 i tryed both versions 1.1 - 1.2

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi41.tinypic.com%2Fjqq4wi.png&hash=1d6e352d7f7acd58ef8983bda254be7e)
Title: Re: Buy Me A Drink
Post by: Arantor on March 16, 2010, 11:16:34 AM
What other mods do you have installed?
Title: Re: Buy Me A Drink
Post by: bloox on March 16, 2010, 11:31:23 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi43.tinypic.com%2Fixh4cm.png&hash=f4f7f0c5fed4c6fab11ca6ef9cdbe0b1)
Title: Re: Buy Me A Drink
Post by: Arantor on March 16, 2010, 11:32:37 AM
I think it's conflicting with the changes made by Thank-O-Matic.
Title: Re: Buy Me A Drink
Post by: bloox on March 16, 2010, 11:36:51 AM
I installed thankomatik after this but im gonna try unistalling it

Do you know also why i have double files like this?

Quote
BoardIndex.php~
Admin.php~
Groups.php~

edit: tried , still the same
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 16, 2010, 02:13:25 PM
I will install thank-o-matic this afternoon and let you know what I find out.

The files beginning with a ~ are backup files. I assume they are the the older version right before a mod is installed. I'm not completely sure since it's done automatically by SMF.
Title: Re: Buy Me A Drink
Post by: Arantor on March 16, 2010, 02:58:13 PM
That's exactly what the ~ files are, saved copies of the file before the last mod install.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 17, 2010, 01:46:31 AM
Bloox:

It is conflicting with the referrals mod. The referrals mod had some errors on uninstall; however, when I uninstalled it my mod was able to install.

Code: [Select]
$select_columns = '
mem.referrals_no, mem.referrals_hits, mem.referred_on, mem.referred_by,
IFNULL(lo.log_time, 0) AS is_online, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type,


The referrals mod adds the second line which breaks the "search and replace" of my installation. Frankly, I'm not sure how I could fix the conflict because the third line is used twice in the Load.php file.
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 17, 2010, 02:10:44 PM
With a HEAVILY modified SMF 2.0 RC3 system, you'll most likely need to do a manual install, I've got it installed and it seems to function perfectly for admin user, but there are several flaws for normal users, it's filling up my SMF error log with the following two errors for guest users who visit one of my posts where the BuyMe icons is suppose to be displayed but guests and normal users alike get that dern ugly box with the x in it instead of displaying the BuyMe icon...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.rjventure.com%2Fimages%2Fsmfhelpticket35.png&hash=b9fa074e20f24de061d0a01da279138f)

Also, normal registered users also have a screwed up dialogue to add the BuyMe options in their Profile options, it doesn't display the nice narrative display but it displays just fine for admin user?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 17, 2010, 04:33:04 PM
Bob, I can only guess that the errors are related. I think fixing the language files should do the trick.

When you did the manual install,  did you add the language code to the right language file? It sounds like you added it to the admin lang files. I will check when I get home tonight. I can't remember how many different language files were modded. Should be an easy fix.
Title: Re: Buy Me A Drink
Post by: Arantor on March 17, 2010, 04:36:50 PM
I suspect part of the issue is that the language file cache hasn't been cleared. Once any lang file is modified, Admin > Maintenance > Routine > Empty the file cache.

As for the icon being missing, check what URL is being generated for it.
Title: Re: Buy Me A Drink
Post by: Arantor on March 17, 2010, 10:15:40 PM
And then don't forget Admin > Maintenance > Routine > Empty the file cache
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 18, 2010, 12:35:59 AM
Bob, I can only guess that the errors are related. I think fixing the language files should do the trick.

When you did the manual install,  did you add the language code to the right language file? It sounds like you added it to the admin lang files. I will check when I get home tonight. I can't remember how many different language files were modded. Should be an easy fix.

Clearing the cache didn't help, I checked the index.english.php file, the code was added properly...

When I did the manual install, I only edited the files that failed the test install, the rest were done by the package manager because they tested clean...

Sheesh, am I going to have to check every single file to make the edits took?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 18, 2010, 01:35:18 AM
Nope, it's that english.index.php file.

I betcha you edited the wrong one. Are you looking in \smf\Themes\default\languages

I can't figure out what else it may be...
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 18, 2010, 02:29:09 PM
Nope, it's that english.index.php file.

I betcha you edited the wrong one. Are you looking in \smf\Themes\default\languages

I can't figure out what else it may be...


Dude... I'm no rank amateur, there is no such critter as smf/Themes/default/languages/english.index.php
Title: Re: Buy Me A Drink
Post by: Arantor on March 18, 2010, 02:35:33 PM
No, but it might be called index.english.php, or index.english-utf8.php.
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 18, 2010, 02:41:49 PM
No, but it might be called index.english.php, or index.english-utf8.php.

Yes, in fact it is index.english.php and I already told him the file edits that were to be made to it are intact, they are there, BUT I thank you for your input because I keep forgetting about the utf8 files, I'm going to check that in sec, thanks
Title: Re: Buy Me A Drink
Post by: Arantor on March 18, 2010, 08:44:03 PM
Spacing on the = should make no difference for SMF parsing, except maybe in the language editor.

/me suspects index.english-utf8.php doesn't have them...
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 19, 2010, 03:19:24 AM
You are right! The language editor was out-of-whack but the mod worked fine. I updated the mod anyway.

I bet you are right about the utf8 file. Do I need to add the language to this file also? I don't even have that file in my installation of SMF.


Spacing on the = should make no difference for SMF parsing, except maybe in the language editor.

/me suspects index.english-utf8.php doesn't have them...
Title: Re: Buy Me A Drink
Post by: Arantor on March 19, 2010, 03:48:47 AM
It's always a good idea to add english-utf8 even if you don't have it. All you do is build the changes exactly the same way, but in the <file name="......english-utf8.php"> add an extra attribute, error="skip".

So:
<file name="$languagedir/Modifications.english-utf8.php" error="skip">

SMF will then skip the file if it doesn't exist, or if there was some other edit, it's handy for support random themes, for example.
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 19, 2010, 08:37:44 AM
Ok guys, looks like I'm back to normal now, what a night, good thing I'm off work today...

Now, let me make a request or three...

Back before SMF 2.0 RC3, Wayne from SA Mod Development and I had the BuyMe icon functioning in several other places besides just in a posting, more specifically, it was in Profile Summary, Who's Online screen, PM's, and I think the member listing too...

Any chance of adding these while you are messing with the language files?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 19, 2010, 12:01:24 PM
So what was wrong bperry? I will see about those changes later tonight. Those changes would be good.

Ok guys, looks like I'm back to normal now, what a night, good thing I'm off work today...

Now, let me make a request or three...

Back before SMF 2.0 RC3, Wayne from SA Mod Development and I had the BuyMe icon functioning in several other places besides just in a posting, more specifically, it was in Profile Summary, Who's Online screen, PM's, and I think the member listing too...

Any chance of adding these while you are messing with the language files?
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 19, 2010, 02:01:37 PM
So what was wrong bperry? I will see about those changes later tonight. Those changes would be good.


Not absolutely positive, but I'm pretty sure it was the utf8 file
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 20, 2010, 01:05:11 AM
I added the drink icons in the PM, member list, and the profile page. Will post update in a few days.

So what was wrong bperry? I will see about those changes later tonight. Those changes would be good.


Not absolutely positive, but I'm pretty sure it was the utf8 file
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 20, 2010, 02:23:48 AM
I added the drink icons in the PM, member list, and the profile page. Will post update in a few days.

So what was wrong bperry? I will see about those changes later tonight. Those changes would be good.


Not absolutely positive, but I'm pretty sure it was the utf8 file

Cool beans man, please include the "Who's Online" screen if there's time?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on March 20, 2010, 06:07:05 AM
Bob I sent you a PM with the edits you need for the upgrade since you are doing manual installs. I may do the Who's online later. I'm a little burned out at the moment. Programming will wear you out. I have a few more features like adding permissions and error checking the paypal email address. Too many are leaving that field blank and it is required. Any more suggestion, let me hear 'em. I'll get to them.

I'm pretty pleased with what I have so far. You can see it at madcoder.biz/forum
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on March 22, 2010, 01:48:24 AM
Bob I sent you a PM with the edits you need for the upgrade since you are doing manual installs. I may do the Who's online later. I'm a little burned out at the moment. Programming will wear you out. I have a few more features like adding permissions and error checking the paypal email address. Too many are leaving that field blank and it is required. Any more suggestion, let me hear 'em. I'll get to them.

I'm pretty pleased with what I have so far. You can see it at madcoder.biz/forum

Have had the update installed for several hours now, so far so good, no errors in the log, GREAT JOB dude, take your time I'm an old hand at programming and can attest that it does indeed wear on you at times... I may be able to figure out how to add to "Who's Online" myself eventually, should be pretty simple already did it before, should be almost the same edit
Title: Re: Buy Me A Drink
Post by: Bruno36 on April 12, 2010, 06:43:19 AM
Hello!

How to change the currency in euros?
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on April 12, 2010, 11:14:43 AM
Edit the language file.

languagedir/Modifications.english.php

Change this one especially:

$txt['buy_money'] = '$';

remember to keep the beginning and ending quotes at the end; only change what is between the quotes.
Title: Re: Buy Me A Drink
Post by: Bruno36 on April 12, 2010, 12:00:56 PM
My problem is sending a paypal error

Quote
Ce destinataire n'accepte pas les paiements libellés en USD. Veuillez contacter le vendeur et lui demander de modifier ses préférences de réception de paiements de telle sorte que cette devise soit acceptée

Quote
This recipient does not accept payments denominated in USD. Please contact the seller and ask them to change their preferences for receiving payments so that the currency is accepted
Title: Re: Buy Me A Drink
Post by: Arantor on April 12, 2010, 01:05:29 PM
See: http://www.simplemachines.org/community/index.php?topic=369818.msg2534084#msg2534084 for more information.

But instead of using GBP as the currency code, use EUR.
Title: Re: Buy Me A Drink
Post by: Bruno36 on April 12, 2010, 01:42:41 PM
thank you, you just edit the file and replace the line Buyme.template.php
Code: [Select]
<input type="hidden" name="currency_code" value="USD" />with
Code: [Select]
<input type="hidden" name="currency_code" value="EUR" />
Title: Re: Buy Me A Drink
Post by: Drakmyr on May 11, 2010, 02:46:13 PM
Hello, i'm getting an error with this mod in 2.0RC3.

This shows up in my error log whenever I view the Security and Moderation section of the admin panel:

Code: [Select]
8: Undefined index: label
File: /home/drakmyr/public_html/dev/cache/lang_ManageSettings_english_default.php (generic_menu_dropdown_above sub template - eval?)
Line: 308

The line in question builds the menu list to reach each section of Security and Moderation. There seems to be a blank tab between General and Anti-Spam that when I hover over it, my status bar shows the link address as: http://www.everlastingquest.co.cc/dev/index.php?action=admin;area=securitysettings;sa=BuyMe when clicked, it takes me to the General tab instead. I do have a section in Modification Settings for Buy Me a Drink, was the Security and Moderation/Buy Me a Drink section replaced with this one? if so, how can I fix this, as I hate getting errors.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 11, 2010, 03:15:55 PM
I'll check into it. It's the same way on my forum.
Title: Re: Buy Me A Drink
Post by: Drakmyr on May 11, 2010, 04:24:37 PM
ok. thank you.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 12, 2010, 03:16:03 AM
You can search for this in you ManageSettings.php file:

'BuyMe' => array(
         ),


(It's under, function ModifySecuritySettings() )

and simply delete it. It should not be in there at all. Thankfully, the bug doesn't seem to cause a big problem, just a missing tab and maybe an entry in the error log.

Title: Re: Buy Me A Drink
Post by: Drakmyr on May 12, 2010, 09:11:59 AM
Thank you. i thought that might be it, but didn't want to change it unless i was sure.
Title: Re: Buy Me A Drink
Post by: coolfx350 on May 14, 2010, 07:11:51 PM
Will it be supporting 1.1.11?   1.1.8 is outdated
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 15, 2010, 12:35:33 AM
I haven't tested it. If it doesn't give an error on the pre-install, it should be good to go. If I had 1.1.11 installed, I would test it out for you...

Will it be supporting 1.1.11?   1.1.8 is outdated
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on May 15, 2010, 03:39:47 AM
Hey Keith,

I attempted a couple times to figure out the Who's Online edit, not quite competent enough with PHP to get it figured out, need some pointers if you will...

Bob I sent you a PM with the edits you need for the upgrade since you are doing manual installs. I may do the Who's online later. I'm a little burned out at the moment. Programming will wear you out. I have a few more features like adding permissions and error checking the paypal email address. Too many are leaving that field blank and it is required. Any more suggestion, let me hear 'em. I'll get to them.

I'm pretty pleased with what I have so far. You can see it at madcoder.biz/forum
Title: Re: Buy Me A Drink
Post by: Spacecadet on May 17, 2010, 09:47:33 AM
I'm having a minor problem with this mod. I am not seeing any icons on the posts sich as a beer or pop. I am using a slightly modified version of the RC3 default theme so i don't belive this is an issue. I can see the settings window and have turned the mod on. Is there something in permissions i am missing?

Great mod by the way, ty to the author.
Title: Re: Buy Me A Drink
Post by: Arantor on May 17, 2010, 09:50:00 AM
When you installed the mod, did you tell it to install in other themes (the bottom part of the package manager)? If not, icons may not have been copied across.
Title: Re: Buy Me A Drink
Post by: Spacecadet on May 17, 2010, 09:58:52 AM
I did yes, forgot to mention that in the post oops. I even uninstalled it and reinstalled in 2 times thinking i might have missed that.
Title: Re: Buy Me A Drink
Post by: Arantor on May 17, 2010, 10:03:29 AM
Hmm, then I don't know, I don't know this mod at all :(
Title: Re: Buy Me A Drink
Post by: Spacecadet on May 17, 2010, 10:11:52 AM
Back to that paitience thing again.....love your pic by the way made me laught after i read your other post.
Title: Re: Buy Me A Drink
Post by: Spacecadet on May 17, 2010, 10:18:13 AM
Ok well I fixed the problem of having no icon, I found it by accident in my profile page. I don't remeber reading in the notes that it had to be turned on by each user in the profile settings.

thanks anyway.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 17, 2010, 08:48:33 PM
Oh yeah it's turned off by default because it would show the user's email (paypal) address. Lots of folks want to hide their email addy.
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 17, 2010, 08:49:18 PM
Sure I will check into that for you ...

Hey Keith,

I attempted a couple times to figure out the Who's Online edit, not quite competent enough with PHP to get it figured out, need some pointers if you will...

Bob I sent you a PM with the edits you need for the upgrade since you are doing manual installs. I may do the Who's online later. I'm a little burned out at the moment. Programming will wear you out. I have a few more features like adding permissions and error checking the paypal email address. Too many are leaving that field blank and it is required. Any more suggestion, let me hear 'em. I'll get to them.

I'm pretty pleased with what I have so far. You can see it at madcoder.biz/forum
Title: Re: Buy Me A Drink
Post by: Bob Perry of Web Presence Consulting on May 17, 2010, 09:12:04 PM
Sure I will check into that for you ...

Hey Keith,

I attempted a couple times to figure out the Who's Online edit, not quite competent enough with PHP to get it figured out, need some pointers if you will...

Bob I sent you a PM with the edits you need for the upgrade since you are doing manual installs. I may do the Who's online later. I'm a little burned out at the moment. Programming will wear you out. I have a few more features like adding permissions and error checking the paypal email address. Too many are leaving that field blank and it is required. Any more suggestion, let me hear 'em. I'll get to them.

I'm pretty pleased with what I have so far. You can see it at madcoder.biz/forum

I've got another project fix needs doing to somone else's mod, I'd be willing to pay a reasonable fee to some experienced PHP coder who's got some time? Just look in support thread for Referral Mod at my last few posts about this issue...
Title: Re: Buy Me A Drink
Post by: ActivePatriot on May 22, 2010, 12:11:04 PM
Will this mod work with ultimate profile mod?

I already have the buy me a drink mod installed and am wanting to install the ultimate profile mod:
http://custom.simplemachines.org/mods/index.php?mod=1675

Will the buy me a drink stuff in the profile still work?
Title: Re: Buy Me A Drink
Post by: ForumMustang.com on May 22, 2010, 02:18:25 PM
Yes, I have both mods installed in a forum and they are both working fine. ;)
Title: Re: Buy Me A Drink
Post by: DoctorMalboro on May 22, 2010, 02:26:57 PM
I bought the drink, now, where i download it? ;D

Excellent mod :)
Title: Re: Buy Me A Drink
Post by: ActivePatriot on May 22, 2010, 03:27:56 PM
Yes, I have both mods installed in a forum and they are both working fine. ;)


Thanks for the info!
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 23, 2010, 10:55:44 AM
I've thought a lot about how to add that feature!  ;D

I bought the drink, now, where i download it? ;D

Excellent mod :)
Title: Re: Buy Me A Drink
Post by: ActivePatriot on May 26, 2010, 01:39:39 PM
From chadon's reply I went ahead and installed the Ultimate Profile mod, but can't see the Buy Me a drink in the ultimate profile.

Where would I put the drink image link to show up in the Ultimate Profile Contact me section?

I'd like it to show up under the globe in this example:

http://activepatriot.org/index.php?action=profile;u=5 (http://activepatriot.org/index.php?action=profile;u=5)

SMF 2 RC3


Edit:
Forgot  to mention posted this on Ultimate Profile thread here also:
http://www.simplemachines.org/community/index.php?topic=298641.2120 (http://www.simplemachines.org/community/index.php?topic=298641.2120)

Not sure which thread is more appropriate to post at?
Title: Re: Buy Me A Drink
Post by: TheDeath on May 27, 2010, 02:58:56 PM
Hello,

I have found a bug in the memberlist.
Then user click to sort column buy, the user become a errormessage.

The problem is:
Code: [Select]
The database value you're trying to insert does not exist: sort
Function: MLAll
Datei: /****/Sources/Memberlist.php
Zeile: 443

 
http://***/index.php?action=mlist;sort=buy_me;start=0
8: Undefined index: buy_me
Datei: /****/Sources/Memberlist.php
Zeile: 403


The solution for this:
Search in sources/Memberlist.php
Code: [Select]
'email_address' => array(
'down' => allowedTo('moderate_forum') ? 'mem.email_address DESC' : 'mem.hide_email DESC, mem.email_address DESC',
'up' => allowedTo('moderate_forum') ? 'mem.email_address ASC' : 'mem.hide_email ASC, mem.email_address ASC'
),
add
Code: [Select]
'buy_me' => array(
'down' => 'mem.buy_text DESC',
'up' => 'mem.buy_text ASC'
),


greetings
TheDeath
Title: Re: Buy Me A Drink
Post by: Keith Tysinger on May 31, 2010, 01:28:33 AM
Kudos, TheDeath. I will take a look into that and fix it up. I've been busy lately with other projects and I have a one-track mind :)
Title: Re: Buy Me A Drink
Post by: scenerip2k on June 23, 2010, 06:28:13 PM
I also notices that when you click on buy icon next to a user error message comes up as:

example:

Buy me a drink

Error: mdg has an invalid email address
Title: Re: Buy Me A Drink
Post by: jacbier on September 22, 2010, 03:27:49 PM
I have a problem with the display of de icons.
Instead of icons I get a line of text.
The gif files are standing in de theme image map.
I have activated the mod on de admin page and I allowed guests to send money in my profile

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg521.imageshack.us%2Fimg521%2F550%2Fprofiel.png&hash=5a40fca2886a0041272a2e4a70199f3e).
Title: Re: Buy Me A Drink
Post by: jacbier on September 23, 2010, 05:25:38 AM
Fortunately, I solved the problem.
I have made a translation of the mod
Users could choose between `drankje´, ´bier´, ´koffie´, frisdrank´ en ´sigaar´instead of 'drink', 'bear', 'coffee' 'soda' and cigar '.
However, this has consequences for the name of the icons.
buy_beer_large.gif becomes buy_bier_large.gif!

Can the mod be adjusted so that no problems will occur when the mod is used in an other language than English?
Title: Re: Buy Me A Drink
Post by: GernotFrisch on April 08, 2011, 11:36:29 AM
Can you please update it to RC5? Please?

There's just a few parse errors.
Title: Re: Buy Me A Drink
Post by: jacbier on April 09, 2011, 05:09:02 AM
I would also appreciate that!
Title: Re: Buy Me A Drink
Post by: BritManNJ on August 02, 2011, 09:08:35 AM
I'm a noob at smf but recently upgraded to v2.00

I tried to install Buy Me A Drink and thought, since it indicated it was okay for "Curve" installed it although it did show errors for some other themes.

It appeared to install okay and appears as an option on members' profile but when I attempt to access it through Admin I get:

Server error

The website encountered an error while retrieving

http://myforum.net/forum/index.php?action=admin;area=modsettings;sa=BuyMe;e94c1c6=c7d7880cc004ff1a7f97b7a0076860a1


and no access to the panel.

I tried to uninstall but a message tells me to contact the author.

Any ideas?
Title: Re: Buy Me A Drink
Post by: BritManNJ on August 05, 2011, 08:39:55 AM
Sorry to bump this, but there has been no response here, nor to an IM and the author's website seems to have disappeared :-(
Title: Re: Buy Me A Drink
Post by: sheldors on September 03, 2011, 04:26:25 PM
Hello, all!
Is there an integration with SMF 2.0?
Title: Re: Buy Me A Drink
Post by: ^SITS^ on September 03, 2011, 06:44:55 PM
If anyone who like some info on AA, I can help you out...  :P
Title: Re: Buy Me A Drink
Post by: BigMike on October 30, 2012, 11:43:32 PM
I realize this hasn't been posted to in over a year but I have a question regarding donations through PayPal.

First off HUGE thanks to Keith for this great mod! I just installed it on on my SMF 2.0.2 and it's working great - straight out of the box!

I sent my first $2 to a forum member and PayPal kept 18%. I've used PayPal before and I know there is a percentage charge, but since this is a donation, shouldn't it be free from charge? Is there even an option for donations in PayPal?

Just curious, thanks!
BigMike
Title: Re: Buy Me A Drink
Post by: BigMike on October 31, 2012, 11:02:32 AM
A member on our site did some research and came across..

"Yes, you pay the normal transaction fees unless your are registered Non-Profit Organization, then you would get a reduced tranaction fee.   Bottom line, regardless of your status, transaction fees apply."
https://www.paypal-community.com/t5/How-to-use-PayPal-Archive/Does-PayPal-get-a-cut-from-my-donation-button/td-p/21636

and also,
"I use 'Personal Transaction' and 'Payment Owed' when needed. It avoids the fees and the 'gift' dilemma and is essentially an eCheck that costs pennies to accomplish. Just make sure PayPal gets their cut most of the time. Don't try to circumvent their system when you know the fees are what keeps them in business. I'm certain PayPal has averaged 2% on my transactions and I figure that's around $1500 in the last 3 years."
http://www.coincommunity.com/forum/topic.asp?TOPIC_ID=58550&whichpage=2

So it looks like...
1) There will always be a fee

and

2) Shouldn't this fee be around 2 or 3% instead of the 18% that its currently charging?
Title: Re: Buy Me A Drink
Post by: BigMike on May 29, 2013, 03:44:57 PM
Update on this,

I've added the following to the submission form:

Code: [Select]
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-DonationsBF">

Now StealPal is only taking 3% instead of 18%.

I strongly suggestion this be included with this mod, and further still, has anyone a better solution that will send the $ as a donation so that it does not take away any percentage??

Thanks
Mike
Title: Re: Buy Me A Drink
Post by: PyroTech03 on October 24, 2016, 02:44:10 AM
I know this is like...epic level necro, but how would I go about adding custom "drinks" to this?  I found the different cases, but can't find where they're defined.
Title: Re: Buy Me A Drink
Post by: Dzonny on October 24, 2016, 11:28:51 AM
From a quick look I can see that you should modify Buyme.php file, and also Load.php, Profile-Modify.php and add new language strings as well.
Title: Re: Buy Me A Drink
Post by: shadav on August 12, 2019, 04:10:36 PM
I know this is old and all but it was listed as a mod for 2.0.15 version
I could not install automatically so I did manually...
having an issue: clicked on my members list and profile and well:

Database Error
Unknown column 'mem.buy_text' in 'field list'
File: forum/Sources/Load.php
Line: 1046

I used the install instructions for 2.0.15
I'd really like to be able to install this :D any help is greatly appreciated
Title: Re: Buy Me A Drink
Post by: Rock Lee on August 19, 2019, 03:21:06 PM
All the messages I have read about your problem is with the database that makes me think that you do not add these columns generating errors later, since the modifications are somewhat old, you have to update to the new way of doing it in the wiki it says expressly which line is changed with respect to the DB.


Regards!

ADD: Maybe reading me can clarify your doubts (https://wiki.simplemachines.org/smf/$smcFunc).
Title: Re: Buy Me A Drink
Post by: shadav on August 19, 2019, 03:31:37 PM
All the messages I have read about your problem is with the database that makes me think that you do not add these columns generating errors later, since the modifications are somewhat old, you have to update to the new way of doing it in the wiki it says expressly which line is changed with respect to the DB.


Regards!

ADD: Maybe reading me can clarify your doubts (https://wiki.simplemachines.org/smf/$smcFunc).
yeah this was just me having a blonde moment, i forgot to add the sql to the database :D
Title: Re: Buy Me A Drink
Post by: Rock Lee on August 21, 2019, 03:14:53 PM
yeah this was just me having a blonde moment, i forgot to add the sql to the database :D

Perfect then I hope you have no more problems and luck with your project :D.


Regards!