WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

blago AIR Badge Clicktracker

Inserts a custom AIR Install Badge in your post or page content, and displays user click counts on its configuration page.

1 prepare the AIR badge (or look at the sample actionscript file in folder airbadge-source): In the AIRInstallBadge.as, add: import flash.external.ExternalInterface; to the package. Declare two vars in the class:

//count clicks

protected var siteUrl:String;

protected var clicksObj:Object;

Add the variable needed to send the jQuery get request; place this in the function that receives the flashvars on init:

 siteUrl = validateString(params.siteurl);

Next, find the function that handles the click (handleActionClick()), and add this call on the events that you'd like to track clicks for:

 addDownloadCount(action);

this calls:

//---process download clicks in WordPress---
protected function addDownloadCount($action:String):void {
    var clickType:String = $action;
    if(!clicksObj) clicksObj = new Object();

    try{ 
        if(ExternalInterface.available) {
            clicksObj.siteurl = siteUrl;
            clicksObj.clicktype = clickType;
            ExternalInterface.call("count_airbadge_click", clicksObj);
        }
    }catch( e:Error ){}
}

2 install the plugin: - unzip the files to a local folder - copy the AIR Badge folder to your WP plugin folder

3 activate: - activate the plugin on your WP admin > plugins page - make sure you visit the Settings page to configure the plugin. Set the location to your AIRInstallBadge_hh.swf, and add values for your appid and the pubid here. The appid corresponds with the ID you put in while publishing your AIR file. Grant Skinner's Badger app will easily get the pubid for you. IMPORTANT: You need to disable the inclusion of the javascript libraries swfObject and/or jQuery, if other plugins are already adding those to the head of your pages. It's not a good idea to have them twice in your header, but not much will happen without them. You can also customize some badge colors in Settings. The Button label color is the one you see in the word "install".

4 add tag to page or post: - add this to your page where you want your custom Air Badge to appear:

[airbadge]0[/airbadge]

This is backwards compatible with the AirBadge plugin 1.0, but ready to be used for tracking more badges in a blog:

[airbadge]blago Telexer, http://www.blagoworks.nl/telexer/update/install_blagoTelexer_209.air, 2.09, http://www.blagoworks.nl/telexer/update/badge_img.jpeg [/airbadge]

To see if everything is working, click on your newly-placed AIR Badge and then visit the Settings page to see if the numbers have changed.

If you decide to uninstall the plugin, you can clear the counts and options the plugin has saved: you need to set a check before de-activating. The counts are only removed if you set this check, so you have the option to leave the counts in the database, if you need to de-activate and then want to activate again.

Requires: 2.7 or higher
Compatible up to: 2.8.4
Last Updated: 2009-9-18
Downloads: 449

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1