News:

Wondering if this will always be free?  See why free is better.

Main Menu

Member donate Button

Started by PuntersPassions, March 09, 2010, 02:50:17 PM

Previous topic - Next topic

PuntersPassions

Heres something else im looking at.

I am looking for a way to put a "Donate" button under the members name so Other member scan donate to that member if they want.
But heres the catch.. Somehow i need to take a % of the proceeds.

So in the left bar.. Say under the members name or Avatar i would put a donate button.
No member would be able to do this.. Only admin.

Any ideas??

Im glad this place is here.. helped me out loads



Arantor

There isn't really an easy way of doing that unless you arrange something with PayPal, since they have to arrange for the money to be split.

http://custom.simplemachines.org/mods/index.php?mod=830 would handle the donate-to-member on its own though.

PuntersPassions


PuntersPassions

well i cant find the Open Themes/{themename}/Profile.template.php

The only theme tha has this in it is the CORE one. and yet this mod says i have to alter this. :-\

The mod works fine on the core one but not on any others. I just cant find the Profile.template.php

Arantor

{themename} is a placeholder for the names of the other themes you might have. For example with a theme called MyTheme it will have a folder like Themes/MyTheme.

PuntersPassions

Quote from: Arantor on March 09, 2010, 05:02:05 PM
{themename} is a placeholder for the names of the other themes you might have. For example with a theme called MyTheme it will have a folder like Themes/MyTheme.

Yeah.. like Themes/Classic/ which is what i looked in but no folder saying profile.template,php

Arantor

It won't be a folder, it'll be a file. If the theme doesn't have a Profile template (i.e. no Themes/Classic/Profile.template.php file) it will use the default theme's file instead.

PuntersPassions

Quote from: Arantor on March 09, 2010, 05:35:23 PM
It won't be a folder, it'll be a file. If the theme doesn't have a Profile template (i.e. no Themes/Classic/Profile.template.php file) it will use the default theme's file instead.

Ok, im following now..

Right i have installed the package as it says. I also added the Buy me beer gif in the icons bit. But it will show up on the CORE forum but not my Classic one.
Thats whats confusing me.
Thats other mod (users online) work in CORE but not in classic..

Im sure its something really easy that im missing.. its late as well.. lol

Arantor

You added an image to Themes/default/images, no? You will need to add that to Themes/classic/images too.

PuntersPassions

Quote from: Arantor on March 09, 2010, 06:01:32 PM
You added an image to Themes/default/images, no? You will need to add that to Themes/classic/images too.

yeah done that.

/public_html/forum/Themes/classic/images (thats where the beer.gif is)

Arantor

That should be everything you need to do, if the theme doesn't have a Profile.template.php, it uses the default's, and if you've added the images there should be nothing left.

PuntersPassions

Quote from: Arantor on March 09, 2010, 06:41:41 PM
That should be everything you need to do, if the theme doesn't have a Profile.template.php, it uses the default's, and if you've added the images there should be nothing left.

yep done all that and it dont work.

i am using version 1.1.11.

Anyhow i cant do nothing till tomorrow as my server has decided to do an upgrade.. (3 hours).

i will have another look tomorrow.

Cheers for the help so far mate. ;D

Arantor

When the server isn't being upgraded, can we have a link to the bit in question?

PuntersPassions

Quote from: Arantor on March 09, 2010, 07:12:08 PM
When the server isn't being upgraded, can we have a link to the bit in question?

What do you mean link.. i cant allow access to my admin bit.. Sorry..

Arantor

OK, in that case... you're getting a broken image shown in the page, right? Right click on it and get the image's URL from that and post that here. It's just the address to a picture on its own, doesn't have security issues.

PuntersPassions

Hooraaay..

Been having a fiddle.. Got it to work on the forum.. i just had to add the text into Display.template.php.

My problem now is i need to alter it from Dollars into Pounds and also the amount.. 5 to 1

         // SHOW BUY ME A BEER
         if (!$message['member']['is_guest'] && $context['user']['is_logged'] && !empty($message['member']['buymeabeer']))
         {
         $priceofbeer = 5 ; // In US Dollars no cents
   echo'<br/>
   <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=' [nofollow]; , htmlentities ($message['member']['buymeabeer'], ENT_NOQUOTES, "UTF-8") , '&item_name=' , htmlentities ($txt['pleasebuymeabeer'], ENT_NOQUOTES, "UTF-8") , '&amount=', $priceofbeer ,'%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" rel="nofollow" title="', $txt['buymeabeeralt'] ,'"><img alt="', $txt['buymeabeeralt'] ,'" border="0" src="', $settings['images_url'] , '/buymeabeer.gif" border="0"/></a><br/>';
         }


How do i alter the currency??

PuntersPassions

Ok i have sorted the Amount.. so just need to alter the currency..

I can see the USD bit in the text.. but im stuck

Arantor

Change currency_code to GBP instead of USD for currency and change $priceofbeer = 5 to $price of beer = 1

         // SHOW BUY ME A BEER
         if (!$message['member']['is_guest'] && $context['user']['is_logged'] && !empty($message['member']['buymeabeer']))
         {
         $priceofbeer = 1 ; // In US Dollars no cents
   echo'<br/>
   <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=' , htmlentities ($message['member']['buymeabeer'], ENT_NOQUOTES, "UTF-8") , '&item_name=' , htmlentities ($txt['pleasebuymeabeer'], ENT_NOQUOTES, "UTF-8") , '&amount=', $priceofbeer ,'%2e00&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" rel="nofollow" title="', $txt['buymeabeeralt'] ,'"><img alt="', $txt['buymeabeeralt'] ,'" border="0" src="', $settings['images_url'] , '/buymeabeer.gif" border="0"/></a><br/>';
         }

PuntersPassions

Nice one Thankyou very much..

i expect i have to do the same sort on thing with the other thing that dont work but at least i know now..


You can mark this as completed now..

Cheers.

Advertisement: