Installation

  1. If you have a previous version installed, first deactivate it.
  2. Download the latest version (see http://www.deborahmcdonnell.com/damselfly/wordpress-plugins/progressfly/)
  3. Upload progressfly.php into your plugins directory (usually /wp-content/plugins)
  4. Navigate to the Plugins page in your administration panel and activate the plugin ProgressFly
  5. Add a function call where you want the meter to appear, eg the sidebar. (Functions are explained below.) Alternatively, embed functions as needed in your posts and pages.

That's it! The plugin should automatically create the table it needs and after that you can manage your project meters through your wordpress administration panel, under the Manage tab. (If you had a previous version installed and you can't see any new fields with this version, de-activate ProgressFly and then re-activate it. This should prompt ProgressFly to modify its database tables.)

Upgrading to 0.50

Version 0.50 involves some extensive changes to progressfly's database. The plugin will make these changes for you, automatically adding the new fields.

However, some of the new fields contain CSS information, and are in fact subsets of the old fields. This means the old fields will need some editing to remove duplicate (and potentially meter-breaking) data, and you'll need to check the new fields contain the data you want. The changes were necessary both to make the CSS control simpler, and also to fix a tricksy bug in the display of the "cssbare" progress meter.

Yes, it's very, very annoying to have to re-key all your data. I'm very sorry. If it makes you feel any better, I had to do it for all of my projects, too — multiple times, actually, because I had to keep testing and re-keying and testing and re-keying while I was developing the new version. Trust me, if I knew how to get around that, I would have!

Right, on to the changed fields:

Style Classes

From version 0.31 of ProgressFly, style classes are customised in the admin panel, and those values are then hard-coded into the progress meter each time the function is called. This isn't ideal, in one way, but it overcomes problems with browser inheritability and also means that any meters embedded in your posts (should) display correctly in your feeds.

It does mean that you need confidence with CSS if you're going to muck about with anything in the "freestyle" section. If your tinkering appears to break something, go to ProgressFly's options submenu; down the bottom you'll find a list of the default CSS so you can revert to a 'clean' install and check if that fixes the problem.

Embeddable Functions

Embed Meter

[pfmeter id=# target=# progress=# display=# precision=#]

Inserted into a wordpress post or page, the above code will embed the specified progress meter into the page. The parameter options are as follows:

id (Required)
The ProjectID of the progress meter you want to display.
target=# progress=# (Optional)
If you specify a number for both target and progress, the function will display a static progress meter (useful if you like to post daily metrics). If you omit one or both, the function will call the project target/progress figures from the database, and will therefore produce a dynamic meter which updates as you update the database
display=# (Optional)
Controls how the progress meter is displayed:If omitted, the function will assume you have chosen display=1
precision=# (Optional)
Controls the number of digits to be displayed after the decimal point. (If you want no decimal point, ie integers, enter 0.) If omitted, the function will use the global default (set to 0 on installation; changeable through the options panel).

Template Functions

Print Specific Meter:

<?php pf_specific($id, $metertype, $globalprec, $precision); ?>

Outputs the progress meter for the project with id number equal to '$id'.

$metertype can be:

$globalprec, $precision (optional) — defaults to "yes" (and the default precision) if omitted. If you wish to override the default precision for this display, enter "no", and then specify the precision in $precision. Note these variables must be specified or omitted as a pair: you can leave out both, or enter both, but you should not enter only one, at risk of breaking your meter.

 

Print Projects:

<?php pf_printprojects($limit, $metertype, $complete, $pfcategory, $orderby, $orderdxn, $visible, $globalprec, $precision); ?>

This function will print out your projects in a list, according to the variables you specify:

 

Disclaimer

I am far from an expert in PHP. You can rest assured that all care was taken with this code, because I don't want to break my site (and because I based it on other peoples' code, so it should be stable enough). But I can't guarantee it won't break yours. If you have any questions or queries or suggestions, I'll do my best to answer them.