ProgPress: A Progress Meter Plugin for WordPress

Download & Installation

Download here

Upload the wp-progpress folder into your wp-content/plugins folder and activate the plugin from the admin panel. You can then configure the plugin options under Plugins -> ProgPress

Usage

You add a progress meter by including the following in a post or in a text widget:

<!--progpress|MeterTitle|MeterGoal|CurrentCount|PreviousCount|CountLabel-->

or, if you want to use it directly in one of your template files (thanks to Scott Phillips for pointing out I forgot this):

<?php if (function_exists('jcp_progpress_generate_meter')){
echo jcp_progpress_generate_meter("MeterTitle", MeterGoal, CurrentCount,
PreviousCount,"CountLabel");
}?>

Only MeterTitle, MeterGoal, and CurrentCount are required. The other arguments can be left off.

For example:

<!--progpress|defaults|180000|73023|71398|words-->

will produce:

defaults
73023/180000 words

Customization

The appearance of the meters are controlled via css, and can be customized accordingly to allow them to better fit the feel of your site. By default, the following css is included when the plugin is activated:


div.jcp_pp { margin: 0 auto; padding: 0; text-align: center; width:200px; }
div.jcp_pp_title { font-weight: bold; }
div.jcp_pp_meter { overflow: hidden; width: 100%; height: 20px; border: 1px solid #000; padding: 2px; }
div.jcp_pp_meter div {height: 100%; float: left; background-color: #000;}
.widget_text div.jcp_pp { width: 90%; }

You can disable the default css from the options panel, or add additional rules to your own stylesheet. Here are a few examples illustrating what can be done.

Blue meters without padding

div.jcp_pp_meter { padding: 0; }
div.jcp_pp_prog { background-color: #22a; }
div.jcp_pp_new { background-color: #22f; }

<!--progpress|style Test|50000|48000-->

style Test
48000/50000

Blue meters with 3D borders

div.jcp_pp { width: 400px; }
div.jcp_pp_meter { padding: 0;height: 30px; border: inset 4px #aaa; background-color: #aaa; z-index: 1; overflow: visible; }
div.jcp_pp_prog, div.jcp_pp_new { border: outset 4px red; margin-left: -4px; margin-top: -4px; z-index: 2; background-color: #22a; border-color:#22a;}
div.jcp_pp_new { border-color:#22f; background-color: #22f; border-left: none; z-index: 3; }

<!--progpress|style Test Too|100000|70000|67000-->

style Test Too
70000/100000

Image based meter

div.jcp_pp_meter { padding: 0; height: 33px; background-image: url(pp_bg_remain.jpg); }
div.jcp_pp_prog,div.jcp_pp_new {background-image:url(pp_bg_current.jpg); }

<!--progpress|style Test Also|500|350||pages-->

style Test Also
350/500 pages

Give it a Try

Try it out, and please rate it. If you have any problems or suggestions leave a comment. I’ll do my best to respond. Feel free to leave a tip if you find it helpful.

16 Comments

  1. [...] thanks to Jason Penney’s wonderful plugin, ProgPress for providing the [...]

  2. Debbie Ohi says:

    Love your plugin, Jason! I tried making a Paypal donation via your Wordpress plugin page, but got an error message. :-(

  3. Jason Penney says:

    @Debbie Ohi – Yikes! Thanks so much for pointing that out. Not sure why that stopped working, but it should be all set now.

  4. Lia Keyes says:

    Any chance you could do one for blogger? I love what you’ve done here!

  5. [...] directly, but are seeing it some other way, I’m testing an update to my ProgPress plug-in that should make the progress meter show up at the top of this post. I know it works in Google [...]

  6. Kristen says:

    Hi Jason,
    I tried to activate the plugin and got an error message in Wordpress:

    “Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘{’ in wp-content/plugins/progpress/wp-progpress.php on line 114 ”

    I’m running Wordpress v2.8. Is this error due to a problem with one of the settings on my server?

    Thanks in advance for your help!

  7. Jason Penney says:

    @Lia Keyes – I wish I could, but I’d have no idea where to begin.

    @Kristen – Is your hosting provider running php4? I’m not sure I ever tested ProgPress on php4, but looking at it now I think it might not work. I think I need to make a few other adjustments for WP 2.8.1+, so I’ll see what I can do about fixing your issue at the same time.

  8. Kristen says:

    Hi Jason,
    In the server specs, it says my host is running PHP 4.4.9. It also said “You can enable PHP 5.2.5 as CGI binary using FastCGI”. I tried enabling PHP 5.2.5 and was able to activate the ProgPress plugin but unfortunately the switch caused other problems, like not even being able to login to Wordpress at all through Firefox and not being able to perform some of the other functions in Wordpress through IE 7 either. So it looks like the problem is due to the PHP version my host is running.

  9. [...] updated my ProgPress Plug-in. This version should (hopefully) solve the issue with php4 that recently came to light. It [...]

  10. Jason Penney says:

    @Kristen – Please try the newest version. It should clear up the issue.

  11. Luke says:

    Hello!

    Where do I edit the css for the plugin? I want to do some custom css, but when I added the css lines above to my theme style sheet, the progress meter didn’t change at all?

    Thanks!

    Luke

  12. [...] ProgPress is an awesome tool for us you like to see our progress in visual detail.  Nicely done Jason Penny.  So, ignore the post below with the other Progmeter in it…that will be the last [...]

  13. Hello, sailor! I love what you’ve done here — it’s the most straightforward and easy-to-use progress bar plugin for WP out there. I even hacked it a bit to display percents the way that I like (number %, instead of 5/100 %). It wasn’t anything difficult, but I can send you the code if you like.

Leave a Reply

U Comment/I Follow

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>