WordPress.org

Ready to get started?Download WordPress

Forums

Donate Plus in sidebar (11 posts)

  1. deydod
    Member
    Posted 5 years ago #

    Hi
    how can I add donateplus into the sidebar without using shortcodes? I want to avoid people to click on donate and after that filling the fields.
    Thanks
    Deyan

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

  2. devbit
    Member
    Posted 5 years ago #

    I haven't created a widget for it yet (coming soon...) but for now you can edit your template to use the following php functions instead of the shortcodes.

    First grab the Class like so:
    <?php $donateplus = new DonatePlus(); ?>

    The Form:
    <?php $donateplus->DonatePage(); ?>

    The Wall:
    <?php $donateplus->DonorWall(); ?>

    The Total:
    <?php $donateplus->DonorTotal(); ?>

    This plugin is still in its infancy, so bear with me as I add more useful features in the future. Thanks!

  3. Stephan69
    Member
    Posted 5 years ago #

    Hi devbit

    I inserted your codes into a sidebar widget HTML widget, but it doesn´t work:(((
    My insert was:

    <?php $donateplus = new DonatePlus(); ?>
    <?php $donateplus->DonatePage(); ?>
    <?php $donateplus->DonorWall(); ?>
    <?php $donateplus->DonorTotal(); ?>

  4. devbit
    Member
    Posted 5 years ago #

    Working on adding sidebar widget support to v1.4, will update soon. Thx!

  5. devbit
    Member
    Posted 5 years ago #

    Version 1.4 now offers Widget support and the following functions as alternatives to using the shortcodes:

    <?php DonatePlusForm(); ?>
    <?php DonatePlusWall(); ?>
    <?php DonatePlusTotal(); ?>

    NOTE: You will need to activate the Donate Plus Widgets from the Plugins Panel seperately before they will be available.

  6. DreadKnight
    Member
    Posted 5 years ago #

    Hello! I can't really activate the Donate Plus Widgets. If i deactivate the original one and upgrade Donate Plus Widgets it still doesn't upgrades to 1.5 or activates....

  7. devbit
    Member
    Posted 5 years ago #

    I've integrated the widgets into the main plugin to fix the version control issue, an update should be available any minute now.

  8. DreadKnight
    Member
    Posted 5 years ago #

    Cheers!

  9. greenthing
    Member
    Posted 5 years ago #

    How can I get the widget just to show the hedder, the donation field and the "Donate" button, rather than the entire form?

  10. brtepley
    Member
    Posted 4 years ago #

    greenthing.

    I think I found where you can configure the output of the donateplus form. Look at donate-plus.php, around line 703.

    $output .='<input type="hidden" id="cmd" name="cmd" value="_donations">
    
    <p class="donate_amount"><label for="amount">'.__('Donation Amount', 'dplus').':</label><br /><input type="text" name="amount" id="amount" value="'.$dplus['default_value'].'" /> <small>('.__('Currency: ','dplus').$cur.')</small></p>';

    To get rid of everything but the text box and button you could change the string to this:

    $output .='<input type="hidden" id="cmd" name="cmd" value="_donations">
    
    <p class="donate_amount"><input type="text" name="amount" id="amount" value="'.$dplus['default_value'].'" /></p>';

    Breaking down the code:

    First line and a line break (Donation Amount:):

    <label for="amount">'.__('Donation Amount', 'dplus').':</label><br />

    Second line, input area, and currency:

    <input type="text" name="amount" id="amount" value="'.$dplus['default_value'].'" /> <small>('.__('Currency: ','dplus').$cur.')</small></p>';

    Hope this helps. It took me a while to figure it out, but it seems to be working. Always get into the code at your own risk.

  11. therawdata
    Member
    Posted 4 years ago #

    Wow! What a big help! Thank you guys so much!

    Copy 360 Games

Topic Closed

This topic has been closed to new replies.

About this Topic