WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Activity Sparks

Display a customizable sparkline graph of post and/or comment activity.

Can I use it if I don't want to call a widget in the sidebar?

Basic template tag support was added in v0.3. The following code checks for plugin activation and renders with the default settings.

    <?php if(function_exists('activitysparks')) {
        activitysparks();   
    } ?>

To change the default settings you must pass an array of the parameters you wish to alter. These are the available parameters and valid values

  • dataset = 'posts', 'comments', 'both' or 'legend'
  • width_px = positive integer
  • height_px = positive integer
  • period = 1, 7, 14, 30, etc. (number of days to group by)
  • ticks = positive integer (number of periods to display)
  • chma = 0 or positive integer (chart margin px)
  • bkgrnd = 6 character hex value (e.g. FFFFFF) or 'NONE' for transparency
  • posts_color = 6 character hex value (e.g 4D89F9)
  • comments_color = 6 character hex value (e.g FF9900)

An example of how to implement parameters is as follows:

    <?php if(function_exists('activitysparks')) {
        activitysparks(array('dataset'=>'legend','width_px'=>480,bkgrnd=>'NONE'));  
    } ?>

Caching is not available for the template tag implementation.

Requires: 2.8 or higher
Compatible up to: 3.2.1
Last Updated: 2012-10-22
Downloads: 1,691

Ratings

3 stars
3.7 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