Predetermined Donation amounts

Download and support for PhpBB3 Paypal Donation Mod
User avatar
Solidjeuh
Donator
Donator
Posts: 251
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Predetermined Donation amounts

Postby Solidjeuh » 28 Dec 2011, 02:20

This little code change will let you use Predetermined Donation amounts.

Print Screen 1: http://i43.tinypic.com/30tjrxj.png

Print Screen 2: http://i41.tinypic.com/2v81xk9.png

Open: styles/prosilver/template/donate/donate_body.html

Find:

Code: Select all

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>
   <div style="text-align:center; padding-top:6px;">      
      <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <div>
      <input type="hidden" name="cmd" value="_donations" />
      <input type="hidden" name="business" value="{DONATION_EMAIL}" />
      <input type="hidden" name="item_name" value="{L_DONATION_TITLE} {SITENAME}" />
      <input type="hidden" name="no_shipping" value="1" />
      <input type="hidden" name="return" value="{U_DONATE_SUCCESS}" />
      <input type="hidden" name="cancel_return" value="{U_DONATE_CANCEL}" />
      <input type="hidden" name="item_number" value="{S_USERNAME}" />
      <input type="hidden" name="tax" value="0" />
      <input type="hidden" name="bn" value="PP-DonationsBF" />
      
      <input type="text" name="amount" style="height:17px; font-size:12px;" class="inputbox autowidth" />
      <select name="currency_code" id="currency_code">
      <option value="EUR">{L_DONATION_EUR}</option>
      </select>
      </div>
      <fieldset id="contactpaypal" class="submit-buttons" style="margin-top:8px;">
                    <input type="reset" class="button2" name="reset" value="{L_RESET}" />
                    <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" onclick="JavaScript:document.getElementById('contactpaypal').style.display='none';document.getElementById('processingpaypal').style.display='block';" />
        </fieldset>
      <fieldset id="processingpaypal" class="submit-buttons" style="margin-top:8px; display:none;">
                    <img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /> <input type="submit" class="button1" name="submit" value="{L_DONATION_CONTACT_PAYPAL}" />
        </fieldset>
      </form>
   </div>
   <span class="corners-bottom"><span></span></span></div>
</div>


Replace with:

Code: Select all

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>
   <div style="text-align:center; padding-top:6px;">      
      <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <div>
      <input type="hidden" name="cmd" value="_donations" />
      <input type="hidden" name="business" value="{DONATION_EMAIL}" />
      <input type="hidden" name="item_name" value="{L_DONATION_TITLE} {SITENAME}" />
      <input type="hidden" name="no_shipping" value="1" />
      <input type="hidden" name="return" value="{U_DONATE_SUCCESS}" />
      <input type="hidden" name="cancel_return" value="{U_DONATE_CANCEL}" />
      <input type="hidden" name="item_number" value="{S_USERNAME}" />
      <input type="hidden" name="tax" value="0" />
      <input type="hidden" name="bn" value="PP-DonationsBF" />
        <input type="hidden" name="currency_code" value="EUR" />
       
      <strong>Please select the amount you wish to donate</strong><br />
      <br />
      
<dd><select name="amount">
                            <option value="1.00">1.00 &euro;</option>
                            <option value="2.00">2.00 &euro;</option>
                            <option value="3.00">3.00 &euro;</option>
                            <option value="4.00">4.00 &euro;</option>
                            <option value="5.00">5.00 &euro;</option>
                            <option value="6.00">6.00 &euro;</option>
                            <option value="7.00">7.00 &euro;</option>
                            <option value="8.00">8.00 &euro;</option>
                            <option value="9.00">9.00 &euro;</option>
                            <option value="10.00">10.00 &euro;</option>
                            <option value="12.50">12.50 &euro;</option>
                            <option value="15.00">15.00 &euro;</option>
                            <option value="17.50">17.50 &euro;</option>
                            <option value="20.00">20.00 &euro;</option>
                            <option value="22.50">22.50 &euro;</option>
                            <option value="25.00">25.00 &euro;</option>
                            <option value="27.50">27.50 &euro;</option>
                            <option value="30.00">30.00 &euro;</option>
                            <option value="35.00">35.00 &euro;</option>
                            <option value="40.00">40.00 &euro;</option>
                            <option value="45.00">45.00 &euro;</option>
                            <option value="50.00">50.00 &euro;</option>
                            <option value="55.00">55.00 &euro;</option>
                            <option value="60.00">60.00 &euro;</option>
                            <option value="65.00">65.00 &euro;</option>
                            <option value="70.00">70.00 &euro;</option>
                            <option value="75.00">75.00 &euro;</option>
                            <option value="80.00">80.00 &euro;</option>
                            <option value="85.00">85.00 &euro;</option>
                            <option value="90.00">90.00 &euro;</option>
                            <option value="95.00">95.00 &euro;</option>
                            <option value="100.00">100.00 &euro;</option>
                            <option value="125.00">125.00 &euro;</option>
                            <option value="150.00">150.00 &euro;</option>
                            <option value="200.00">200.00 &euro;</option>
                          </select>
  <br />
  <br />
        </dd>
      </div>
      <fieldset id="contactpaypal" class="submit-buttons" style="margin-top:8px;">
                    <input type="reset" class="button2" name="reset" value="{L_RESET}" />
                    <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" onclick="JavaScript:document.getElementById('contactpaypal').style.display='none';document.getElementById('processingpaypal').style.display='block';" />
        </fieldset>
      <fieldset id="processingpaypal" class="submit-buttons" style="margin-top:8px; display:none;">
                    <img src="{ROOT_PATH}images/loader.gif" width="16" height="16" alt="" style="margin-bottom:-5px; padding-right:10px;" /> <input type="submit" class="button1" name="submit" value="{L_DONATION_CONTACT_PAYPAL}" />
        </fieldset>
      </form>
   </div>
   <span class="corners-bottom"><span></span></span></div>
</div>


IMPORTANT!

Change the currency value into your own country currency!
<input type="hidden" name="currency_code" value="EUR" />

You can change the donation amounts into whatever you want!
<option value="1.00">1.00 &euro;</option>

1.00 &euro;

& = Euro
Please search google for your own html currency symbol

User avatar
Arnevb
Donator
Donator
Posts: 98
Joined: 08 Oct 2011, 16:23
BBCodes: 8
Location: Belgium

Predetermined Donation amounts

Postby Arnevb » 28 Dec 2011, 09:31

YesYesYEEEESS! Thanks so much!

master412160
BBCoder II
BBCoder II
Posts: 39
Joined: 04 Jun 2011, 12:17

Predetermined Donation amounts

Postby master412160 » 07 Jan 2012, 20:07

Nice code but I would prefer to still have all the other stuff that this code seems to remove.

1. The progress bar
2. Your own text you defnined through acp.

How is that possible with this code?
Hello please check out my Interview Site, Interviewed You

User avatar
Solidjeuh
Donator
Donator
Posts: 251
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Predetermined Donation amounts

Postby Solidjeuh » 07 Jan 2012, 20:09

master412160 wrote:Nice code but I would prefer to still have all the other stuff that this code seems to remove.

1. The progress bar
2. Your own text you defnined through acp.

How is that possible with this code?

Everything stay's the same .. this code just changes the amount..
See screenshot: http://i44.tinypic.com/23lilwz.png

master412160
BBCoder II
BBCoder II
Posts: 39
Joined: 04 Jun 2011, 12:17

Predetermined Donation amounts

Postby master412160 » 07 Jan 2012, 20:15

Yeah I see now, I didn't pay enoufh attention.
Hello please check out my Interview Site, Interviewed You


Return to “Paypal Donation Mod”

Who is online

Users browsing this forum: No registered users and 0 guests