• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Adding a PayPal button

masterchief

Well-known member
#2
When adding the Paypal button- can this be customized to where people can choose how much he/she wants to donate?
yes, you configure the buttons at your paypal acct. my button has empty field and it gets filled in..

check it out... www.masterchief.com/community

click on paypal button and see where it gpes.. you will not be obligated at all. just close the browser window when you are finished
 

masterchief

Well-known member
#6
I will revisit that .. as I have merchant account ALL options are available to me. thanx for pointing this out.

UPDATE - As I have a PayPal merchant account, there is are multiple options available to me as for selection of types of payment buttons, accepting donations being one of those.

@WhiteTiger Do you have merchant account at PayPal?
 
#7
masterchief ....not me personally. I will check with my "boss" and see if he does.

Altho I do send billing invoices and receive my paycheck via Paypal.
 
#8
In order to make it possible for users of a forum to make contributions/gifts/donations of money through a PayPal account, is it possible and easily accomplished to insert a small icon link like this
between the "Like" and "Reply" buttons? If so, where and how would one accomplish this task?
 

Jake Bunce

XenForo moderator
Staff member
#9
In order to make it possible for users of a forum to make contributions/gifts/donations of money through a PayPal account, is it possible and easily accomplished to insert a small icon link like this
between the "Like" and "Reply" buttons? If so, where and how would one accomplish this task?
Edit this template:

Admin CP -> Appearance -> Templates -> post

Add this code:

Code:
				<a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=marketing_us/send_money" class="item" target="_blank">
					<span></span>
					<img src="http://i1117.photobucket.com/albums/k599/rumel2/KSMO_Gift.gif" border="0" />
				</a>
like so:

Code:
			<div class="publicControls">
				<a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" class="item muted postNumber hashPermalink" title="{xen:phrase permalink}">#{xen:calc '{$post.position} + 1'}</a>
				<xen:if is="{$post.canLike}">
					<a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
				</xen:if>

				<a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=marketing_us/send_money" class="item" target="_blank">
					<span></span>
					<img src="http://i1117.photobucket.com/albums/k599/rumel2/KSMO_Gift.gif" border="0" />
				</a>

				<xen:if is="{$canReply}">
					<a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
				</xen:if>
			</div>
The result:

Screen shot 2011-03-27 at 11.52.56 AM.png
 
#10
Thank You very much Jake for your prompt and detailed reply. We will give that code a try. Your continuing contributions really help maintain the supportive atmosphere of this wonderful community.

A couple of follow up questions :
  1. Will this edit be preserved through future upgrades or will it revert back to default code on subsequent releases?
  2. If it is not preserved, is there a method to make it permanent or will this edit need to be done for each new release?
  3. If there is a method, could you please describe it for me?
 

Jake Bunce

XenForo moderator
Staff member
#11
Yes it's preserved. Custom templates are not overwritten during an upgrade. Though sometimes you have manually revert and recustomize templates after an upgrade to incorporate required changes in the new version.
 

Jake Bunce

XenForo moderator
Staff member
#14
Is it possible to display a paypal button in a certain thread ?
You could edit this template:

Admin CP -> Appearance -> Templates -> thread_view

Use this code:

Code:
<xen:if is="{$thread.thread_id} == 1">
	PAYPAL CODE HERE
</xen:if>
You need to specify the thread_id.

If you want to add a paypal link inside of a post then you need to use a regular URL. The standard Paypal "form buttons" won't work inside of posts.
 
#16
That was brilliant, Jake... You should write a book on Xenforo hacks and tips, seriously! People do it all the time.

As for me, I tried to use the Paypal code you posted, but it's not working, maybe due to being very old. You can't use <href="email address"> with Paypal. Any suggestion?