WordPress.org

Ready to get started?Download WordPress

Forums

Donate Plus
Large space between fields and donate button when using [donorwall] (3 posts)

  1. bgt9752
    Member
    Posted 2 years ago #

    Hi,

    When I activate the donor wall option, my donate/paypal button drops way down the page with a bunch of whitespace above it.

    How do I get it to display directly below the form and checkbox for using donor wall settings?

    Any feedback is appreciated.

    Thank you, Jake

    http://wordpress.org/extend/plugins/donate-plus/

  2. jmbullis
    Member
    Posted 2 years ago #

    I think I found a solution for you as I found this thread looking for a solution.

    If you go to /public_html/wp-content/plugins/donate-plus and edit donate-plus.php. Look around line 450 and you will find the following code:

    $output .= '
    <input type="hidden" name="notify_url" value="'.$notify.'">
    <input type="hidden" name="item_name" value="'.$dplus['donate_desc'].'">
    <input type="hidden" name="business" value="'.$dplus['paypal_email'].'">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="rm" value="1">
    <input type="hidden" name="return" value="'.$tyurl.'">
    <input type="hidden" name="currency_code" value="'.$dplus['paypal_currency'].'">
    <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
    <p class="submit"><input type="image" src="'.$button.'" border="0" name="submit" alt="">
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></p>
    </form>';

    If you look at this in Firebug you will see that a <br> tag is automatically being placed after each hidden input. I found that if I either remove the hard breaks in the code, or place a space between each line, like:

    $output .= '
    <input type="hidden" name="notify_url" value="'.$notify.'">
    
    <input type="hidden" name="item_name" value="'.$dplus['donate_desc'].'">
    
    <input type="hidden" name="business" value="'.$dplus['paypal_email'].'">
    
    <input type="hidden" name="lc" value="US">
    
    <input type="hidden" name="no_note" value="1">
    
    <input type="hidden" name="no_shipping" value="1">
    
    <input type="hidden" name="rm" value="1">
    
    <input type="hidden" name="return" value="'.$tyurl.'">
    
    <input type="hidden" name="currency_code" value="'.$dplus['paypal_currency'].'">
    
    <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
    
    <p class="submit"><input type="image" src="'.$button.'" border="0" name="submit" alt="">
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></p>
    </form>';

    that the hidden fields are no longer visible as breaks and it fixes this issue of the space.

  3. isign4jc
    Member
    Posted 1 year ago #

    This just helped me, too. Thanks for the tip. I was pulling my hair out trying to figure out where those white spaces were coming from!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic