Easily insert progress meters into your content and/or sidebars.
I’m seeing the shortcode source when I try and use it in a text widget.
As of this writing WordPress does not support shortcodes in text
widgets. ProgPress has the ability to enable all shortcodes in
text widgets (not just [progpress]
), but it is turned off by
default. It can be enabled on the ProgPress settings page.
The code is based on a proposed patch to WordPress core. Hopefully
this feature is added to WordPress itself at some later date. I’ve
tried to code defensively so if the feature is added to WordPress in
the future, having it enabled in the plugin should not have any negative
side effects.
What are the default styles? What does the markup look like?
Please check out the Examples section on the settings page. It
will generate markup and display the default styles for the currently
installed version of ProgPress when you click “Load Examples”. I’ve
done this rather than put a static copy here that I might forget to
update in future.
What’s all this about shortcodes? I’ve been using ProgPress in a different way for ages!
Since ProgPress pre-dates shortcodes being added to WordPress it
originally used an older syntax based on HTML comments. This syntax is
still supported (although newer features like label
have not been
back-ported). It can be enabled on the ProgPress settings page.
You add a progress meter by including the following in a post or in a
text widget:
<!--progpress|title|goal|current|previous|label-->
Only these five options are supported, only the first three are
required.
Besides shortcodes and HTML comments, is there any other way I can use ProgPress to generate meters?
Sure. You can call the jcp_progpress_generate_meter
function
directly.
<?php if (function_exists('jcp_progpress_generate_meter')){
echo jcp_progpress_generate_meter("title", 100, 50, 25, "label");
}?>
The arguments to the function are:
title, goal
, current
, previous
, label
, separator
, class
,
and prefix
(in that order).
How will the meter show up in my RSS feeds?
Inline styles (based on the default styles) are used to ensure the
meters render in RSS readers.