PDA

View Full Version : Miscellaneous Hacks - Paypal donate in notice.


seanm07
08-09-2008, 10:00 PM
This is so easy to add you don't even need to know what a computer is to use it.


This is my first little add-on.:erm:
Hope you like it.:)

Why I made it:
Well because of this thread:https://vborg.vbsupport.ru/showthread.php?t=187701

Installation:
Open Admin cp - Notices - Add notice.
In title put what ever you want to find this in the notice manager as members will not see this.
In notice HTML put this code:

<center>
<tr>
<td class="$bgclass">
<div style="margin:0 auto; width: 40%; border: 3px dotted #FFFFFF; background-color: #0066FF";>
</center>
<center>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
Please enter the amount you would like to donate:
<input type="text" name="amount" size="6" value="5.00" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="youremail@blabla.com" />
<input type="hidden" name="item_name" value="Keep our forum running." />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="tax" value="0" />

<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" alt="Make payments with PayPal - it's fast, free and secure!" />
</center>
</form>
<center>
<h4>INSERT DESCRIPTION TO GET PEOPLE TO DONATE HERE</h4>
</div>
</center>Things you need to edit in the code:
Put a description in where it says "INSERT DESCRIPTION TO GET PEOPLE TO DONATE HERE"
Put your donation email where is says "youremail@blabla.com"
Put what you want to call your donate where it says "Keep our forum running."
Put your currency where it says "GBP" Get currency codes here http://www.xe.com/iso4217.php (http://www.xe.com/iso4217.php)
Put where it says tax 0 put what ever if any tax you want added.



Leave the Display Order as it is unless you know what your doing and want to change it.
Active is if it is enabled make sure it is set to yes.
Persistent If this option is set to 'No', the notice will be shown only once per visit to each user.

Set when you want it to display.
To set it for all just set it to users posts is between 0 and 999999999 posts.:up:


http://img230.imageshack.us/img230/6907/donatenf3.png

nirvana43
08-10-2008, 10:54 AM
Superb mod!! 1st to install it! :)

seanm07
08-10-2008, 10:54 AM
Thanks for the comment nirvana43 :D

Simon Lloyd
08-10-2008, 12:33 PM
What can i say? brilliant!, thanks for taking the time. Can i use that HTML code in the navbar template?

Regards,
Simon

seanm07
08-10-2008, 12:53 PM
What can i say? brilliant!, thanks for taking the time. Can i use that HTML code in the navbar template?

Regards,
Simon

Yeah sure.

Simon Lloyd
08-10-2008, 12:56 PM
Is there a way of tracking which user made the donation as i would like to make them a VIP or something for their efforts?

Simon Lloyd
08-10-2008, 01:05 PM
Thanks for replying but....how? lol i don't know php or html, i have found the navbar breadcrumb and then the navbar template, where would i put the button code so that the paypal button appears in the big space in the navbar next to where it says welcome....you last visited...?

seanm07
08-10-2008, 06:55 PM
Well this is a simle as it gets to installing and you can just go into your paypal acount and check your transactions for donations.

seanm07
08-10-2008, 06:57 PM
The code for just the button is

<center>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
Please enter the amount you would like to donate:
<input type="text" name="amount" size="6" value="5.00" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="youremail@blabla.com" />
<input type="hidden" name="item_name" value="Keep our forum running." />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="tax" value="0" />

<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" alt="Make payments with PayPal - it's fast, free and secure!" />
</center>
</form>


Go into admin cp - style manager - edit style dropdown - find where you want it to go and put this code at the very bottom or somewhere you want it to go. warning you should make sure you can easily undo your actions incase you break something.

Simon Lloyd
08-10-2008, 07:06 PM
Thanks, i've been hacking around with it in another template i created so no problem breaking anything as i can just delete it! anyway i kinda got that far, one thing i am trying to do now is just add the username to subject line to paypal i can keep track of donations that way as i may not recognise the email and searching for user by email is a pig or at least it was in 3.5.1. Here's what i have but can't get it to display the username:
located in the ad_header_logo (3.7.1 PL1)<center>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
Please enter the amount you would like to donate:
<input type="text" name="amount" size="3" value="5.00" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="payments@thecodecage.com" />
<input type="hidden" name="item_name" value= $userinfo[username]" has donated."/>
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="tax" value="0" />
<br>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" alt="Make payments with PayPal - it's fast, free and secure!" />
</center>
</form>
<center>
<h5>Help in making this great a forum and to increase our <br>bandwidth is appreciated and you will become a forum VIP!</h5>
</div>
</center>

seanm07
08-10-2008, 07:09 PM
I dont understand give me a link to your forum

also you have somehting wrong:


$userinfo[username]"


forgot first " and that text will show up on the paypal website not your vb forum so the phrase $userinfo[username] wont display use text only

Simon Lloyd
08-10-2008, 07:15 PM
if you click the donate button (which thanks to you works perfect!) it creates a paypal form and in the description it currently shows "has donated" i'm just trying to insert the username before it.
www.thecodecage.com/forumz
Thanks sean.

Simon Lloyd
08-10-2008, 07:18 PM
how do i display the username as text, or is it not possible?

seanm07
08-10-2008, 07:20 PM
Yeah as i said the phrase for the user name wont be reconised unless you some how make it find the uusername convert it to text then send it.

Simon Lloyd
08-10-2008, 07:22 PM
woah! way beyond me! guess i'll leave it like that looks good anyway thanks a lot!

seanm07
08-10-2008, 07:23 PM
No problem dude :D

Simon Lloyd
08-10-2008, 07:24 PM
Got the code!!!!
<input type="hidden" name="item_name" value="$bbuserinfo[username] has donated." />

Hornstar
08-11-2008, 02:10 AM
very nice work. thanks for sharing.

seanm07
08-11-2008, 02:52 PM
Thanks hornstar1337 :P

velias
08-25-2008, 01:42 AM
How to modify GBP to EUR?

seanm07
08-27-2008, 12:47 PM
Read my topic post and it says "Put your currency where it says "GBP" Get currency codes here http://www.xe.com/iso4217.php
" ctrl and f then type GBP or just look for it.

OTForums
08-29-2008, 04:07 PM
Thankyou, once I get my new forum skin I will add this to my forum.

Installed in advance. ;)

Satfool1
09-14-2008, 01:11 PM
Added on my forum, works perfectly.

Thanks for sharing as it works better than a product instalation

AzaDiyaR
09-14-2008, 02:54 PM
thanks working ;)

Denver Jackson
10-31-2008, 03:15 PM
Anyway to change the colour of the text ?

raja811
11-10-2008, 08:55 AM
instaled but there no diplay?

dmknights
11-10-2008, 10:41 PM
*Installed*
Useful. Thank You

appsfinder
12-06-2008, 06:35 PM
I had small problem with template i had to remove this code

<tr>
<td class="$bgclass">

what does this code do?

ckgreenman
10-27-2009, 03:04 PM
Ok Tried this on 3.8.4 and it doesn't work. All it does is appear to reload the current page but doesn't take you to the paypal form. Any suggestions?