WordPress.org

Ready to get started?Download WordPress

Forums

Seamless Donations
Hooks for thermometer (4 posts)

  1. runamuk0
    Member
    Posted 7 months ago #

    Hi,
    Are there plans to add a target amount for the designated funds?

    Are there any hooks into SD to allow a thermometer to be displayed for a designated fund showing the current total donations and the target amount?

    Thanks,
    Tony

    http://wordpress.org/plugins/seamless-donations/

  2. allendav
    Member
    Plugin Author

    Posted 7 months ago #

    Hi!

    Thats a great idea, but not part of the plugin yet - if you have a patch that adds target amount and thermometer I could take a look at rolling it into the plugin.

    Cheers...

    ...Allen

  3. runamuk0
    Member
    Posted 7 months ago #

    Hi Allen,
    I'm relatively new to WP development. I just got into the code. Here is a website which has the type of display we would like to implement: http://www.donorschoose.org/project/first-grade-adventure/1158064/

    How long do you think this would take to implement?

    If I were to implement this, what storage method would you use to store the Goal Amount? I was thinking of adding to the $fund_array either a second array with SHOW/HIDE and the Amount or concatenating the 2 values with a {tab} character or similar. What would you recommend?

    Thanks,
    Tony

  4. allendav
    Member
    Plugin Author

    Posted 6 months ago #

    Hmmmm... The fund array is exceptionally simple right now and is stored in a single option something like this:

    array(
    'Name of fund one' => 'SHOW',
    'Name of fund two, which is not displayed' => 'HIDE'
    )

    I think I would refactor that in a new version to something like

    array(
    array( name => 'Name of fund one', visibility => 'SHOW', goal => 1000 ),
    array( name => 'Name of fund two, which is not displayed', visibility => 'HIDE', goal => false
    )

    where false could indicate no goal.

    In an init hook or somewhere, you'd have to recognize that the old style array is present and transfer any data into the new style.

    Of course, you'd also have to change the code that displays the fund options to recognize the new array structure.

    Probably not take long to make these changes - if you write a patch for it, I could take a look - I hope to have the plugin on GitHub soon for pull requests too.

    Cheers...

    ...Allen

Reply

You must log in to post.

About this Plugin

About this Topic