One issue I noticed is that for mailchimp to utilize a autoresponder automatically from leads from this plugin you need to submit a date field or registration date field with the lead. Otherwise the aut oresponder just doesn’t work.
The mod is pretty simple. I created a field on the list then added a field to be sent automatically.
I am not sure if you have to do the first setup but I did and it worked so..
I am not sure if it works for sub sites on wordpress. If it doesn’t I attend to modify it so that sub blogs on the network can use it to sync their own mailchimp accounts.
Problem with buddypress admin bar login functionality.
When a visit comes to a WPMU site and clicks on the login link at the bp admin bar the default function is to direct them to the primary domain login page.
Once they login they are then directed to the primary domain homepage. The user can still login to there admin panel at that point but it causes the user to have to login again at their own domain.
This is not ideal functionality with mapped domains.
I modded the bp-core-adminbar.php file temporarily to test a alternate method for the login url. Thus far is seems to work.
This seems to change the behavior so when the visitor clicks on the login page. They are redirected to the same url. Once they are logged in it directs them into there admin area. Seems more logical.
End plugin looks like this
// **** “Log In” and “Sign Up” links (Visible when not logged in) ********
function custom_bp_adminbar_login_menu() {
global $bp;
$sql = $wpdb->prepare( “INSERT IGNORE INTO “.$wpdb->base_prefix.”affiliate_tree (user_id, ref_user_id, lvl)
SELECT %d, ref_user_id, lvl+1 FROM “.$wpdb->base_prefix.”affiliate_tree WHERE user_id=%d”, $user_id, $refer_user_id );
$queryresult = $wpdb->query($sql);
}
}
From there I tweaked the supporter-amazon.php and paypal file as there was a bug that was causing the affiliate payment process not to load.
Also on the affiliate program there were some other random fixes. I worked the code regarding a user showing up on a user page without a referralid.
It now cross references the blog that they landed on with adminstrator of the blog. It uses that data to set the cookie.
There was a problem with the cookie being set by the ‘ref’ get query.. However at that point in the code it was not defined.
if(defined(‘AFFILIATE_CHECKALL’)) {
// We are here if there isn’t a reference passed, so we need to check the referrer.
if(!isset( $_COOKIE[‘affiliate_’ . COOKIEHASH]) && isset($_SERVER[‘HTTP_REFERER’])) {
// We haven’t already been referred here by someone else – note only the first referrer
// within a time period gets the cookie.
$referrer = parse_url($_SERVER[‘HTTP_REFERER’], PHP_URL_HOST);
global $wpdb;
// Check if the user is a valid referrer
//$affiliate = $this->db->get_var( $this->db->prepare( “SELECT user_id FROM {$this->db->usermeta} WHERE meta_key = ‘affiliate_referrer’ AND meta_value=’%s'”, $referrer) );
$affiliate = $this->db->get_var( $this->db->prepare( “SELECT b.user_id FROM ” . $wpdb->base_prefix . “blogs a, ” . $wpdb->base_prefix . “bp_user_blogs b WHERE a.blog_id=b.blog_id AND a.domain=’%s’ LIMIT 1”, $referrer) );
// Check for mapped domain.
if(!$affiliate){
$affiliate = $this->db->get_var( $this->db->prepare( “SELECT b.user_id FROM ” . $wpdb->base_prefix . “domain_mapping a, ” . $wpdb->base_prefix . “bp_user_blogs b WHERE a.blog_id=b.blog_id AND a.domain=’%s’ LIMIT 1”, $referrer) );
}
if($affiliate) {
$_GET[‘ref’]=$this->db->get_var( $this->db->prepare( “SELECT meta_value FROM {$this->db->usermeta} WHERE meta_key = ‘affiliate_reference’ AND user_id=’%s'”, $affiliate) );
// Update a quick count for this month
do_action( ‘affiliate_click’, $affiliate);
// Store the referrer
do_action( ‘affiliate_referrer’, $affiliate, $referrer );