Archive for November, 2005

links for 2005-11-28

Google analytics plugin, modified

I am using the $dt->blog(); » Google analytics plugin here on this site, but for tracking outgoing link clicks I have had to modify the plugin like this:


add_filter('the_content', 'ga_addonclick', 10);

function ga_addonclick($value){

    if(get_option('ga_onclick')){

        $value = preg_replace("/<a href=\"([^\"]+)\”/e”,
        “‘<a href=\’$1\’ rel=\’nofollow\’ onclick=\”.ga_parseurl(’$1′).’\””   ,$value);
        }
        return $value;
}

function ga_parseurl($href){
    $onclickcode = stripslashes(get_option(’ga_onclick_code’));

    $href = str_replace(’http://’, ”, $href); 

    return str_replace(’$site’,$href,$onclickcode);
}




links for 2005-11-27

links for 2005-11-26

grabbing a file played in a flash applet via applescript

I just hacked together a little applescript that grabs files from your temporary directory to another place, renames them according to the current applications main window’s name. Basically this sounds like nothing, but what it actually does is very useful if you like to save some of the songs playing on a flash based radio stream like pandora.com. download the file here (2.4 kB zipped file).

related:

. ..