start_delimiter=$configuration->start_delimiter; $this->end_delimiter=$configuration->end_delimiter; $this->delimiter_tag_name=$configuration->delimiter_tag_name; $this->paied_users_table = $configuration->paied_users_table; $this->paied_items_table = $configuration->paied_items_table; $this->bonus_posts_table = $configuration->bonus_posts_table; $this->paypal_requests_table = $configuration->paypal_requests_table; $this->paypal_field_types_table = $configuration->paypal_field_types_table; $this->paypal_fields_table = $configuration->paypal_fields_table; $this->paypal_url=$configuration->paypal_url; $this->paypal_email = $configuration->paypal_email; //Hook into wordpress add_action('admin_menu', array(&$this,'Are_PayPal_Configuration')); add_filter('the_content', array(&$this,'post_filter')); add_action('wp_head', array(&$this,'add_html_headers')); add_action( 'wp_footer', array(&$this,'put_my_url_to_footer')); $install = new Are_PayPal_Install(); register_activation_hook(__FILE__,array(&$install,'install')); $this->set_templates(); } function put_my_url_to_footer() { ?> _e("This blog is monetized using Are-PayPal WP Plugin");?> } function set_templates(){ $InstantPaymentTemplate = get_option($this->prefix."_InstantPaymentTemplate"); if (!$InstantPaymentTemplate){ $template="
%EXPLANATION%
%EXPLANATION%
%EXPLANATION%
%LOGINURLTEXT%'.$LastAction.'
Aurimas Norkevicius for help with the plugin.')); ?>
_e('Click the button below to donate. Any amount is highly appreciated.')?>
How to hide content and show paypal button?
How to configure paypal's Instant Payment Notification (IPN)?
'.$LastAction.'
| _e('Back');?> | |||||
| _e('Details');?> | |||||
| =$field->Name;?> | =$field->Value;?> | ?>||||
| _e('Login');?> | =$login[0]->user_login;?> | ||||
| _e('Post title');?> | =$post[0]->post_title;?> | ||||
| _e("Type")?> | _e("Email")?> | _e("Amount")?> | _e("Login")?> | _e("Post Title")?> | _e("Action")?> |
|---|---|---|---|---|---|
| %TYPE% | %EMAIL% | %AMOUNT% | %LOGIN% | %TITLE% | "; foreach($fields as $field) { switch ($field->Name) { case "txn_type": $rowTemplate=str_replace('%TYPE%',$field->Value,$rowTemplate); break; case "payer_email": $rowTemplate=str_replace('%EMAIL%',$field->Value,$rowTemplate); break; case "mc_gross": $rowTemplate=str_replace('%AMOUNT%',$field->Value,$rowTemplate); break; case "mc_amount3": $rowTemplate=str_replace('%AMOUNT%',$field->Value,$rowTemplate); break; case "custom": list($post_id,$user_id) = explode("|",$field->Value); $user_id=mysql_escape_string($user_id); $post_id=mysql_escape_string($post_id); $login=$wpdb->get_results("SELECT user_login FROM $wpdb->users where ID='$user_id'"); $post=$wpdb->get_results("SELECT post_title FROM $wpdb->posts where ID='$post_id'"); $rowTemplate=str_replace('%LOGIN%',$login[0]->user_login,$rowTemplate); $rowTemplate=str_replace('%TITLE%',$post[0]->post_title,$rowTemplate); break; } } $rowTemplate=str_replace('%AMOUNT%','',$rowTemplate); echo($rowTemplate); ?>_e("Details")?> |
'.$LastAction.'
'.$LastAction.'
'.$LastAction.'
'.$LastAction.'
| $item_id | \n"; echo "$item_title | \n"; echo "";
$users = $wpdb->get_results("SELECT user_login FROM $wpdb->users u INNER JOIN $this->paied_users_table up ON up.user_id=u.id and up.post_id=$item_id AND (ADDDATE(up.purchase_date, up.expire) > CURDATE() OR up.expire is null OR up.expire = 0)");
foreach($users as $user) {
echo $user->user_login;
echo " "; } echo " | \n";
echo "$item_name | \n"; echo "$item_number | \n"; echo "$item_amount | \n"; echo "$item_currency | \n"; echo "$item_expire | \n"; ?>if ($item->post_id){ ?>=_e('Clear Priceing')?> | ?>=_e('Edit bonus posts')?> | ?>=_e('Edit purchasers')?> | } ?> =_e('Edit')?> | echo '
| '.__('No Posts Found').' | ||||||||
".__("Purchasing current content you will also get access for posts below")."