Bitcoin Forum

Bitcoin => Project Development => Topic started by: Anonymous on November 19, 2010, 01:08:48 AM



Title: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Anonymous on November 19, 2010, 01:08:48 AM

http://www.bitcoin.me/images/bitdonkek.jpg (http://www.bitcoin.me/images/bitdonkek.jpg)

The EFF recently accepted bitcoins for donations and posted an address on their site to do so. The problem is a default bitcoin address looks ugly and user unfriendly. People use paypal because it is trivial to make a button and paste the html on your website without having to code anything.

Im starting a bounty for a developer to clone the paypal donate process. I know mt gox and mybitcoin already offer some functionality however it is still not quite there.

I am coming at this from a total non coder so its important to take into consideration the great mass of people who might recoil in horror from a bitcoin address or the thought of anything more than copy and paste html code. Paypal is widely used for these very reasons.

We need to hide how the bitcoin sausage is made!

Ill start off with 100btc.







Title: Re: Bounty for a "Donate Bitcoin" button .
Post by: kiba on November 19, 2010, 01:12:11 AM
You might want to post your bounty in the title.


Title: Re: Bounty for a "Donate Bitcoin" button .
Post by: Anonymous on November 19, 2010, 01:46:35 AM
You might want to post your bounty in the title.

 :P  I did have the word bounty in there.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: kiba on November 19, 2010, 03:49:25 AM
Shouldn't this be moved to Project Development?


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: mikegogulski on November 27, 2010, 06:32:31 PM
I spent a little time on this and failed to come up with a solution.

The intended model was to provide a block HTML+javascript code that people wanting to host the button could paste into their sites:

Code:
<a href="" onclick="donatedialog(bitcoinaddress);">Click here to send me Bitcoins</a>
<script type="text/javascript">
...
</script>

The problem with this model is that the included script is loaded from a remote server but needs to make a JSON-RPC-HTTP(S) connection to (generally) localhost in order to post the "send" instruction. This runs into the accursed same origin policy: https://secure.wikimedia.org/wikipedia/en/wiki/Same_origin_policy. Fail.

What I suggest instead is that the Bitcoin program (optionally) install URL handlers for bitcoin:(address) URIs into the browsers installed on the user's computer. That way, clicking on a Bitcoin URI would pop up the "send" dialog, possibly pre-populated with the amount to send as well as the address.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: kiba on November 27, 2010, 06:35:42 PM
I spent a little time on this and failed to come up with a solution.

The intended model was to provide a block HTML+javascript code that people wanting to host the button could paste into their sites:

Code:
<a href="" onclick="donatedialog(bitcoinaddress);">Click here to send me Bitcoins</a>
<script type="text/javascript">
...
</script>

The problem with this model is that the included script is loaded from a remote server but needs to make a JSON-RPC-HTTP(S) connection to (generally) localhost in order to post the "send" instruction. This runs into the accursed same origin policy: https://secure.wikimedia.org/wikipedia/en/wiki/Same_origin_policy. Fail.

What I suggest instead is that the Bitcoin program (optionally) install URL handlers for bitcoin:(address) URIs into the browsers installed on the user's computer. That way, clicking on a Bitcoin URI would pop up the "send" dialog, possibly pre-populated with the amount to send as well as the address.

Something like the chromium extension. http://bitcointalk.org/index.php?topic=1411.0


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: mikegogulski on November 27, 2010, 06:58:14 PM
Something like the chromium extension. http://bitcointalk.org/index.php?topic=1411.0

No, way easier and more portable (do we really want to promulgate a Chrome extension, a Firefox addon, an MSIE plugin, a Safari whatsis, and on and on?) It can be done in the installer.

This is from the NSIS installer script that installs the open-source Pidgin instant messenger program on Windows:

Code:
!macro URI_SECTION proto
  Section /o "${proto}:" SecURI_${proto}
    Push "${proto}"
    Call RegisterURIHandler
  SectionEnd
!macroend
SectionGroup /e $(URIHANDLERSSECTIONTITLE) SecURIHandlers
  !insertmacro URI_SECTION "aim"
  !insertmacro URI_SECTION "msnim"
  !insertmacro URI_SECTION "myim"
  !insertmacro URI_SECTION "ymsgr"
  !insertmacro URI_SECTION "xmpp"
SectionGroupEnd

...

Function RegisterURIHandler
  Exch $R0
  DetailPrint "Registering $R0 URI Handler"
  DeleteRegKey HKCR "$R0"
  WriteRegStr HKCR "$R0" "" "URL:$R0"
  WriteRegStr HKCR "$R0" "URL Protocol" ""
  WriteRegStr HKCR "$R0\DefaultIcon" "" "$INSTDIR\pidgin.exe"
  WriteRegStr HKCR "$R0\shell" "" ""
  WriteRegStr HKCR "$R0\shell\Open" "" ""
  WriteRegStr HKCR "$R0\shell\Open\command" "" "$INSTDIR\pidgin.exe --protocolhandler=%1"
  Pop $R0
FunctionEnd

Bitcoin uses NSIS as well for its Windows installer. The work would be to include the installation of URI-scheme handlers into the user environment for each of the different GUI installers, plus implement the "catch" part of the handler inside the Bitcoin code itself.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Anonymous on November 29, 2010, 10:41:23 PM
I spent a little time on this and failed to come up with a solution.

The intended model was to provide a block HTML+javascript code that people wanting to host the button could paste into their sites:

Code:
<a href="" onclick="donatedialog(bitcoinaddress);">Click here to send me Bitcoins</a>
<script type="text/javascript">
...
</script>

The problem with this model is that the included script is loaded from a remote server but needs to make a JSON-RPC-HTTP(S) connection to (generally) localhost in order to post the "send" instruction. This runs into the accursed same origin policy: https://secure.wikimedia.org/wikipedia/en/wiki/Same_origin_policy. Fail.

What I suggest instead is that the Bitcoin program (optionally) install URL handlers for bitcoin:(address) URIs into the browsers installed on the user's computer. That way, clicking on a Bitcoin URI would pop up the "send" dialog, possibly pre-populated with the amount to send as well as the address.

The preference would be to let the donator choose how much they want to donate.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Bruce Wagner on November 29, 2010, 11:57:54 PM
The preference would be to let the donator choose how much they want to donate.

The folks at MyBitcoin.com are working on a donate button which will allow the sender to specify the amount.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: phoebusg on December 15, 2010, 12:59:02 AM
What would be nice to see is an API so similar to paypal's that you could easily port over your current cart/e-commerce functions if you wanted to. Or use both.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: grondilu on December 15, 2010, 01:14:09 AM
I disagree with you when you say a bitcoin address is ugly or unfriendly.  It is fine.

I actually prefer a plain ASCII address to a "bitcoin button" because I don't know exactly what a "bitcoin button" really do behind the scene.

We should not adapt to people's intellectual laziness.  Ultimately they'll grow up and understand why a plain ASCII address is better.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Innomen on December 26, 2010, 10:42:38 AM

We should not adapt to people's intellectual laziness.  Ultimately they'll grow up and understand why a plain ASCII address is better.


 >:( Ugh! I am so tired of that attitude!

I am always flabbergasted at the irony of cyber-luddites whining about how ease of use and user friendliness are abominations unto the net.

I for one am in favor of options and choice, there is no logical or ethical defense of the reverse.

In the real world people use web pages with images and buttons. Some may want the whole world to go back to amber text and CRTs, but too bad. If one wants to browse via telnet, that's their business. But they shouldn't get uppity and try to force everyone else into their anti-technology Unabomber fantasy land just because their elitist $%#s can't handle seeing fresh faces at the country club.

The people that like to use terms like "intellectual laziness" in a scolding do-it-my-way-or-you're-stupid context are attempting to impose their subjective and intolerant whims onto the community and it makes me sick because the whole point of Bitcoin and indeed open source generally is freedom of the very choice they're attempting to step on.

With the recent Wikileaks madness, and as a political blogger, I am eager to see a truly free PayPal alternative. This means replication of every feature PayPal has. And that includes making it easy on donors and buyers. Duh. I guess you're against point of sale machines as well. Much better to force card users to memorize huge account numbers and replace magnetic strips with keypads, right? Please.

If you want to turn your webpage into some techie-bootcamp, fine, but I don't feel like running my users and readers through an obstacle course just because I think they could use the exercise. Not all of them are tech minded and I don't have any pressing need to try and force them into that role, or indeed to be more like me at all.

Rant concluded. ---

For the record I vote for the solution put forth by mikegogulski or whoever else. The URI solution is ideal.

I would love to have a Bitcoin button on my page that works like PayPal donate, and the URI solution seems like the most flexible and user friendly solution.

Just to be intellectually lazy can someone link me to the appropriate place to make this feature request or to do whatever else I can do to support the adoption and inclusion of such a feature? :)


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: grondilu on December 27, 2010, 12:43:48 AM

We should not adapt to people's intellectual laziness.  Ultimately they'll grow up and understand why a plain ASCII address is better.


 >:( Ugh! I am so tired of that attitude!

I am always flabbergasted at the irony of cyber-luddites whining about how ease of use and user friendliness are abominations unto the net.

Well, the URI idea is ok.  Assuming a uri of the form "bitcoin:address#amount[%comment]", I suggest the following URI handler program :

Code:
#!/bin/bash

urldecode() { echo -e "$(sed 'y/+/ /; s/%/\\x/g')"; }
error() {
    if [[ -n "$DISPLAY" ]]
    then zenity --error --text "$*"
    else echo "$*" 2>&1
    fi
    return 1
}

question() {
    echo -n "Do you want to send $1 BTC to this address $2 "
    if [[ -n "$3" ]]
    then echo -n "with '$3' as a comment"
    fi
    echo "?" ;
}

if
    uri="${uri#bitcoin:}"
    [[ -z "$uri" ]]
then error "usage: $0 bitcoin-URI"
elif
    addr="${uri%#*}"
    [[ ! "$addr" =~ ^[1-9a-km-zA-HJ-NP-Z]{34}$ ]]
then error "Wrong address format"
elif
    s=${uri##*#}
    amount=${s%\%*}
    [[ ! "$amount" =~ ^([1-9][0-9]*\.{,1}[0-9]*|0\.[0-9]*)$ ]]
then error "Wrong amount format"
    echo $_
elif comment="${uri##*%}"
    [[ -n "$DISPLAY" ]]
then
    zenity --question --text "$(question $amount $addr $comment)"
else
    read -p "$(question $amount $addr $comment) (y/N) " answer
    [[ "$answer" =~ ^[yY]$ ]]
fi &&

bitcoind sendtoaddress $addr $amount "$comment"



Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Anonymous on January 03, 2011, 12:08:51 PM
What would be nice to see is an API so similar to paypal's that you could easily port over your current cart/e-commerce functions if you wanted to. Or use both.

bingo. Thats exactly what this is about. The bounty was specifically for the ease of use that paypal provides.

No doubt the smart developers here can make it even better with bitcoin.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: davout on January 03, 2011, 04:15:38 PM
What would be nice to see is an API so similar to paypal's that you could easily port over your current cart/e-commerce functions if you wanted to. Or use both.

bingo. Thats exactly what this is about. The bounty was specifically for the ease of use that paypal provides.

No doubt the smart developers here can make it even better with bitcoin.
Just wait a week or two, you'll see it on BC, with the option to auto forward funds, or auto sell them /w a market order or a minimum price. :)


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Bruce Wagner on January 10, 2011, 10:03:00 PM
I think that if the Bitcoin AH (Account Hub) project takes hold, users will have an account on at least one (trusted, local) Account Hub.   At that point, the links could simply take the user to their own Account Hub's web interface to make the transaction.

It would be very similar to clicking a mailto:bruce@brucewagner.com link... and it taking you to a new browser window in a GMAIL Compose screen and filling in my email address.

Except that it would take you to the account hub where YOU have an account....  and fill in all of the payment details....  WHO you are sending this payment to, DESCRIPTION of the transaction, and the AMOUNT (which you could modify), and the recipient's BITCOINADDRESS.    Then, the transaction would be handled entirely by your Account Hub.

This is basically the same thing as a web-based transaction initiated on MyBitcoin....  except that the "Bitcoin AH" is a FOSS, and P2P Decentralized, version of the same functionality.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Bruce Wagner on January 11, 2011, 04:16:48 PM

Take a look at the idea I came up with this morning.... regarding a universal web button for DONATE BITCOIN... and for PAY WITH BITCOIN....

  http://bitcointalk.org/index.php?topic=2628.msg37238#msg37238

Open AH (Account Hub) integration, into a standard button, could be the solution to this.  It could initiate a payment for ANY bitcoin payment processor of your choice (i.e. MyBitcoin, MyGox, or ANY Bitcoin AH in the world, even your own AH running on your server at home,...)


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Anonymous on January 11, 2011, 10:31:13 PM
What would be nice to see is an API so similar to paypal's that you could easily port over your current cart/e-commerce functions if you wanted to. Or use both.

bingo. Thats exactly what this is about. The bounty was specifically for the ease of use that paypal provides.

No doubt the smart developers here can make it even better with bitcoin.
Just wait a week or two, you'll see it on BC, with the option to auto forward funds, or auto sell them /w a market order or a minimum price. :)

Nice. Open source ftw.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: adius on February 11, 2012, 10:07:24 PM
Hey everybody,
I think I developed exactly what you were looking for! =)

Checkt it out: bitcoinate.org (http://bitcoinate.org)

Tell me what you think?!


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: markm on February 11, 2012, 10:51:32 PM
I don't think it is at all obvious that it is a donate button.

A donate button in English probably should include the word "donate"...

-MarkM-


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Andrew Bitcoiner on February 11, 2012, 10:54:13 PM
As the owner of http://bitcashretail.com/ I believe it makes the perfect bitcoin donation/purchase button solution out there.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: Wandering Albatross on February 13, 2012, 05:28:34 AM
Quote from: Anonymous
its important to take into consideration the great mass of people who might recoil in horror from a bitcoin address or the thought of anything more than copy and paste html code. Paypal is widely used for these very reasons.

BTC is anonymous. Paypal's not.  If someone recoils in horror at a bitcoin address then how would they have BTC? It's something that you get used to quickly and eventually it's trivial.

Are you saying you want traceable donations? Seems to be against what eff is supposedly about. I do have my doubts and feel like eff is yet another controlled-opposition. Of course you wouldn't be privy to that info as only the eff pupper masters would know meanwhile keeping staffers  shiny and happy.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: biqs4zi4f on February 23, 2012, 03:04:30 PM
I tried to figure out what the most portable Javascript way of doing a "Donate" button this is and wrote an article about it, here you go:
http://leo.bogert.de/2012/02/22/simple-bitcoin-donate-button/

The code which can be copied directly from my article into your HTML should work with any browser: It uses no 3rd party libraries, and no fancy modern JS functions.

While it does not fully wire in to the Bitcoin-client, it is IMHO currently the only solution which will work for almost everyone.
The Bitcoin client which supports the bitcoin:// address format might not be widespread enough to use it yet.
Also, I remember from development of other apps which use custom addresses that its quite difficult to get the protocol registration working for all browsers which a user has installed.

I'm aware that it is not fully what was requested here. HOWEVER sometimes the most simple solutions are the best IMHO. So I'll just try to claim the bounty and see what happens ;D


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: grue on February 23, 2012, 05:03:25 PM
Hey everybody,
I think I developed exactly what you were looking for! =)

Checkt it out: bitcoinate.org (http://bitcoinate.org)

Tell me what you think?!
stop necroing 1 year old threads


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: biqs4zi4f on February 23, 2012, 05:08:36 PM
stop necroing 1 year old threads
This thread is still in the top 3 google search results for "donate bitcoin button" so IMHO it should be filled with useful information  :-*


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: frisco2 on April 16, 2012, 03:16:00 AM
You can register a bitcoin account on Online-TipJar.com and get a button (tipjar), or use any image.


Title: Re: 100btc Bounty for a "Donate Bitcoin" button .
Post by: frisco2 on April 18, 2012, 06:23:38 AM
Great job :)
I am thinking of creating a tip jar search engine: so that one could give donations to people using whatever account that they have, yours, mine, youtipit, or flattr.