AutoChimp WordPress plugin mod enable autoresponder

I have been testing out this plugin for wordpress called autochimp. “Version 1.00 | By Wanderer LLC Dev Team ”

Visit plugin site

It seems to be pretty fantastic.

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..

File 88-autochimp.php

Line 408

$merge_vars = array( ‘FNAME’=>$user_info->first_name, ‘LNAME’=>$user_info->last_name, ‘REGDATE’=>date(“Y-m-d”) );

Added the REGDATE line.

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.

Varnish Rules WordPress Multi-Site

Getting your wordpress site to load fast can be a jaunting task. I have been testing out Varnish Cache for the last 2 weeks and found it to pretty effective and pushing our resource forward.

WordPress is crazy CPU and database intense. I have been playing Varnish and have found that there are several key areas that I need to have working.

First one would be our affiliate module at our site. It sets a cookie every time ends up on our network or on a affiliate link.

First rule looks for our affiliate cookie. If it doesn’t exist it passes the connection directly to Nginx. If it does exist it simply remove the cookie. The content at that point is cached so when the user visits the site again the page does not have to be reloaded.

sub vcl_recv {
# This checks to see if the client has the affiliate cookie if not the page is not cached.
if (req.http.Cookie !~ “affiliate”) {
return(pipe);
}

#This one fixs uploading issues I had with larger files.
if (req.request == “POST” && req.http.Cookie ~ “wordpress_logged_in_” )
{
return(pass);
}

#Clipping

remove req.http.cookie;
return (lookup);
}

sub vcl_fetch {
if (req.url ~ “wp-(login|admin)”) {

return (pass);
}

## This line I found to be critical to stop the user getting someone elses cached cookies. 🙂

if (!(req.url ~ “wp-(login|admin)”)) {
unset beresp.http.set-cookie;
}
set beresp.ttl = 24h;
return (deliver);
}

Uploading Giant GB Files with PHP regardless of limits

Attached is a java app that with a php script that will allow you setup a upload interface for very large files. Basically the java applets splits the file into many peices and submits them to a php file handler. At the end of the batch the php file just assembles them back together. No memory limit. No file upload limit.

javaupload

Specify the upload folder in the split-chunk.php file.

//    specify upload directory – storage
//    for reconstructed uploaded files
$upload_dir = “/uploads/”;
//
//    specify stage directory – temporary storage
//    for uploaded partitions
$stage_dir = “/uploads/stage/”;

//    specify upload directory – storage     //    for reconstructed uploaded files    $upload_dir = “/uploads/”;
//    //    specify stage directory – temporary storage     //    for uploaded partitions    $stage_dir = “/uploads/stage/”;

From there set the upload applet paramaters in the upload_java.php file

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}

<param name=”uc_uploadUrl” value=”split_chunk.php”/>

<param name=”uc_partitionLength” value=”1048576″/>

<param name=”uc_maxFiles” value=”1″/>

<param name=”uc_fileNamePattern” value=”(?i)^.+.(cvs|txt|csv)$”>

<param name=”gc_loggingLevel” value=”DEBUG”/>

<param name=”ac_fireUploaderStatusChanged” value=”true”/>

uc_partitionLength = the max size your php server can handle or less.