WordPress.org

Ready to get started?Download WordPress

Forums

Donate Extra
Defaults on Donor Page (2 posts)

  1. Mr. Bingo
    Member
    Posted 1 year ago #

    I would like to default the "Put my Dontation on the Recognition Wall" to yes and also default the "Show on Wall" to "Amount, User Details and Comments".

    Are these options possible?

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

  2. justinesmithies
    Member
    Plugin Author

    Posted 1 year ago #

    Yes these are possible , you would have to edit some lines of code in the file donate-extra.php

    add this to one of the lines with <option> in it to make it the default selected value.

    <p class="show_onwall" id="wallops"><label for="show_onwall" >'.__('Show on Wall', 'dextra').':</label><br /><select name="item_number"style="margin-left: 0px !important;">
    				<option value="0:'.$user_ID.'">'.__('Do not show any information','dextra').'</option>
    				<option value="1:'.$user_ID.'">'.__('Amount, User Details & Comments','dextra').'</option>
    				<option value="2:'.$user_ID.'">'.__('User Details & Comments Only','dextra').'</option>
    			</select></p>

    So you could make value 2 the default by doing :

    <option value="2:'.$user_ID.'" SELECTED>'.__('User Details & Comments Only','dextra').'</option>

    also change these lines too :

    var WallOps1 = '<?php echo '<p class="show_onwall" id="wallops"><input type="hidden" name="item_number" value="0:'.$user_ID.'" /></p>';?>';
     	var WallOps2 = '<?php echo '<p class="show_onwall" id="wallops"><label for="show_onwall">'.__('Show on Wall', 'dextra').':</label><br /><select name="item_number" style="margin-left: 0px !important;"><option value="1:'.$user_ID.'">'.__('Amount, User Details & Comments','dextra').'</option><option value="2:'.$user_ID.'">'.__('User Details & Comments Only','dextra').'</option></select></p>';?>';

    Remember to set the SELECTED option and change the value for the class show_onwall from 0 to 1 .

    this should get you started.

    Thanx

    Justine

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic