Article

Mailchimp API listSubscribe / listBatchSubscribe and Groups

Commonly, larger mailchimp lists are segmented by interest groups to allow specific targeting without handling subscriber data on different lists.

Now if you want to import large amounts of already subscribed users, using the mailchimp api is the best solution. Scanning the mailchimp api docs of the listBatchSubscribe action I was not able to find any documentation on how to import subscribers to specific interest groups – should have read the listSubscribe docs too ;-) . It turned out it is really simple. Just add an array of group information to your data rows using the key ‘GROUPINGS’ and you are good to go. Group information must contain the key ‘groups’ – a comma separated list of interests and either the group id or the name of the group you want to add your data to. ID, name and values of groups can also be listed using the listInterestGroupings method.

A simple example:

$batch = array(
   array(
      'EMAIL' => 'test@yourdomain.com',
      'FNAME' => 'Test',
      'LNAME' => 'Test',
      'GROUPINGS' => array(
          array('name' => 'MyGroup', 'groups' => 'Value1, Value3'),
          array('id' => 15, 'groups' => 'Value2'),
      )
);
$chimp->listBatchSubscribe($list_id, $batch, true, true, true);


jQuery plugin: stop cluttering your animation queue with hoverFlow

A typical Problem with jQuery hover animations is, that they build up the animation queue if the mouse is moved before the animation finished. There are quite a few solutions.

First you can use the excellent hoverIntent plugin and set it’s threshold to be above or equal to the animations duration. Another solution is to use jQuery’s stop() function and reset the elements style. Both of these tend to result in rather unnatural behaviors.

A nicer way to reset animations is implemented in the hoverFlow Plugin, that smoothly resets your animations and prevents the buildup of the animation queue. Thanks to Jürgen Genser for sharing it with me.

Implementing it is really straighforward – you simply replace jQuery’s animate() with hoverFlow(). See a quick example below:


Subversion Commandline – Recursively add new Files

a nice workaround for svn’s missing -R option to svn add

svn st | grep -e '?' | sed 's/^?[\t]*//;' | xargs svn add