PHP Classes

How to Receive Funds for a Project Using the Crowdfunding WordPress Plugin WP Crowd Fund: Promote crowd-funding campaigns on WordPress sites

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-02-24 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
wp-crowd-fund 1.0GNU General Publi...5PHP 5, Content management, Finances, B...
Description 

Author

This package can promote crowd-funding campaigns on WordPress sites.

It can register a new WordPress post type to present a crowd-funding campaign on a post page.

The plugin implements an administration panel to manage crowd-funding campaigns, campaign perks, and "givebacks".

It can also manage campaign contributor donations using PayPal.

Picture of TJ Webb
Name: TJ Webb <contact>
Classes: 7 packages by
Country: Canada Canada
Innovation award
Innovation award
Nominee: 3x

Example

<?php
/*
Plugin Name: WP Crowd Fund
Plugin URI: http://webb.tj/
Description: A crowd funding plugin for WordPress providing similar functionality to Kickstarter or indieGoGo. Offers both fixed and flexible funding campaigns. Fully configurable, payments processed with PayPal.
Version: 1.0
Author: TJ Webb
Author URI: http://webb.tj/
*/

//core functionality
require_once('required/constants.php');
require_once(
'required/posttype.php');
require_once(
'required/admin-fields.php');
require_once(
'required/admin-validator.php');
require_once(
'required/settings.php');
require_once(
'required/core.php');
require_once(
'required/api.php');
require_once(
'required/frontend.php');
require_once(
'required/frontend-process.php');
session_start();
//paypal integration
require_once('required/paypal/core.php');

if(!
function_exists('pre')){
    function
pre($a){
        echo
'<pre>';
       
print_r($a);
        echo
'</pre>';
    }
}

register_activation_hook(__FILE__, array('WPCrowdFund_Installer', 'activate'));
register_deactivation_hook(__FILE__, array('WPCrowdFund_Installer', 'deactivate'));
add_action('wpcf_cron', array('WPCrowdFund_Installer', 'cron'));

class
WPCrowdFund_Installer{

    public static function
activate(){
       
wp_schedule_event(time(), 'hourly', 'wpcf_cron');
    }

    public static function
cron(){
        global
$wpdb;
       
$now = strtotime('now');
       
$wpdb->query(
           
$wpdb->prepare(
               
"
                DELETE FROM
$wpdb->postmeta
                WHERE meta_value < %d
                AND meta_key = %s
                "
,
                    (
$now - (2*60*60)), 'hold'
               
)
        );
    }

    public static function
deactivate(){
       
wp_clear_scheduled_hook('wpcf_cron');
    }
}


Details

=== Plugin Name === Contributors: webbtj Tags: crowdfunding, ecommerce, paypal Requires at least: 3.4.2 Tested up to: 3.4.2 Stable tag: trunk == TODO: == = For Launch = - >>Admin JS -- check - >>Front End JS -- check - >>Anonymous Donations -- check - >>PayPal Integration (Flexible Funding only using Express Checkout) -- check - >>Extra Backer Fields (configurable) -- check - >>API Comments -- check - >>Cron to delete old holds -- think it's done, cron registers correctly, sql query works, just need to confirm cron actually runs -- check - >>Fix Issue wth DateTime object -- check = CAN Wait Until Shortly After Beta Launch = - Generate report of sold perks/backer info (can wait until after launch) - Admin CSS - Remove/Hide Fixed Funding Option (for now) - Interface to provide API Credentials - Interface to provide titles/descriptions for a "product" = Required For Public Launch = - Front End CSS - Settings Page (if applicable based on existing functionality) - How long are holds? == Description == This plugin provides crowd funding functionality to your WordPress website. Create unlimited campaigns with unlimited "perks" or "give backs". Create multiple perks of the same value for the same campaign. Contributors can choose any available perk with a value equal to, or less than their donation. Choose a fixed or flexible funding campaigns (or some of each). Payments are collected one a campaign is complete. Features: - Create any number of campaigns - Create both fixed and flexible funding campaigns - Create any number of give backs for a campaign - Create multiple give backs of the same dollar value for the same campaign - Set maximum available quantities for limited items in give backs - Global configurations for PayPal API integration - Create special instructions for contributors on checkout (ask them to provide extra information in the checkout comments such as mailing address for physical give backs or clothing size if applicable) - Collect contributor name, email address and extra comments on checkout - Very easy to use API for integrating the plugin into other plugins or custom themes - Pre-designed templates found in the templates/ directory of the plugin - Templates can be overridden by creating a file of the extact same name in your current theme's directory Administer Global Campaign Limitations: - Maximum campaign length - Maximum campaign value - Maximum number of give backs - Maximum give back value - Available campaign types (flexible and fixed) == Installation == 1. Extract the zip and add the directory wp-crowd-fund/ to your wp-content/plugins/ directory. 2. Activate the plugin via the WordPress Plugins menu 3. Visit the Crowd Fund configuration screen under the settings menu to set limitations and PayPal API credentials. == Screenshots == 1. The funding column. == Changelog == = 0.0.5 = Numbers of backers was always returning all backers [wpcf_backers] *fixed* Contribution dollar values were always returning all contributions [wpcf_contributed] *fixed* Contribution percentage was not accounting for the commas, so a goal of $12,000 was treated as 12, so the percentages were extremely off. = 0.0.4 = Added Perk and Backer variables to the payment process response pages. Vars are: - $backer - $backer_custom - $backer_title - $backer_description - $backer_email - $backer_amount - $perk - $perk_custom - $perk_cost - $perk_limit - $perk_sold - $perk_hold - $perk_title - $perk_description Any variables without a value will be a boolean false. There may have been other minor changes since 0.0.3 regarding payment processing and some template tags. = 0.0.3 = PayPal Express Checkout Integration (API Creds hard coded for now) Wrap rendered templates in classed divs Output buffer to catch content rendered by plugin and put it into the content (instead of echoing in place) Fix DateTime issue, some configutations may not have the DateTime module, just do time stamp math for now = 0.0.2 = Update some requirements/todo and roadmap stuff Added Anonymous field Changes to extra fields template structure to allow specifying if a field is required or required Add JS logic and frontend-processing logic to handle required additional fields = 0.0.1 = Fixed some stub/missing api/template functions Commented/Documented api/template functions Custom Fields (configurable with template) Put items on hold once they are requested Finished some missing logic Perk Buy/Cancel work-flows Disable admin input fields for perks with at least one unit sold Frontend JS nice-ness, see js/wp-crowd-fund.js for details. Moved some stuff that wasn't really part of the templating API into a "core.php" file = 0.0.0 = Initial github push

  Files folder image Files (41)  
File Role Description
Files folder imagecss (1 file, 1 directory)
Files folder imagejs (2 files)
Files folder imagerequired (8 files, 1 directory)
Files folder imagetemplates (10 files)
Accessible without login Plain text file project_roadmap.md Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file readme.txt Doc. Documentation
Accessible without login Plain text file wp-crowd-fund.php Example Plugin start script

  Files folder image Files (41)  /  css  
File Role Description
Files folder imageimages (13 files)
  Accessible without login Plain text file jquery-ui-1.8.23.custom.css Data Auxiliary data

  Files folder image Files (41)  /  css  /  images  
File Role Description
  Accessible without login Image file ui-bg_flat_0_aaaaaa_40x100.png Icon Icon image
  Accessible without login Image file ui-bg_glass_55_fbf9ee_1x400.png Icon Icon image
  Accessible without login Image file ui-bg_glass_65_ffffff_1x400.png Icon Icon image
  Accessible without login Image file ui-bg_glass_75_dadada_1x400.png Icon Icon image
  Accessible without login Image file ui-bg_glass_75_e6e6e6_1x400.png Icon Icon image
  Accessible without login Image file ui-bg_glass_75_ffffff_1x400.png Icon Icon image
  Accessible without login Image file ui-bg_highlight-soft_75_cccccc_1x100.png Icon Icon image
  Accessible without login Image file ui-bg_inset-soft_95_fef1ec_1x100.png Icon Icon image
  Accessible without login Image file ui-icons_222222_256x240.png Icon Icon image
  Accessible without login Image file ui-icons_2e83ff_256x240.png Icon Icon image
  Accessible without login Image file ui-icons_454545_256x240.png Icon Icon image
  Accessible without login Image file ui-icons_888888_256x240.png Icon Icon image
  Accessible without login Image file ui-icons_cd0a0a_256x240.png Icon Icon image

  Files folder image Files (41)  /  js  
File Role Description
  Accessible without login Plain text file admin.js Data Auxiliary data
  Accessible without login Plain text file wp-crowd-fund.js Data Auxiliary data

  Files folder image Files (41)  /  required  
File Role Description
Files folder imagepaypal (3 files)
  Plain text file admin-fields.php Class Class source
  Plain text file admin-validator.php Class Class source
  Accessible without login Plain text file api.php Example Example script
  Plain text file constants.php Class Class source
  Accessible without login Plain text file core.php Example Example script
  Plain text file frontend-process.php Class Class source
  Plain text file frontend.php Class Class source
  Plain text file posttype.php Class Class source

  Files folder image Files (41)  /  required  /  paypal  
File Role Description
  Plain text file communication.php Class Class source
  Accessible without login Plain text file core.php Aux. Configuration script
  Plain text file ipn.php Class Class source

  Files folder image Files (41)  /  templates  
File Role Description
  Accessible without login Plain text file wpcf-campaign-cont...mation-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-cont...-perks-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-contribute-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-contributor-fields.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-perks-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-single-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-campaign-thanks-template.php Aux. Configuration script
  Accessible without login Plain text file wpcf-paypal-could-not-complete.php Aux. Configuration script
  Accessible without login Plain text file wpcf-paypal-no-paypal-token.php Aux. Configuration script
  Accessible without login Plain text file wpcf-paypal-perk-not-in-campaign.php Aux. Configuration script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0