Extension:TODOListProgressBar

What can this extension do?
This extension is aimed at making the process of tracking the progress of a TODO list (or other list) easier. When creating your TODO list, you include the tag along with each item. As you complete an item, you update its status accordingly and the rest of the extension takes care of displaying the nice progress bar for a visual indicator as to the progress of completing the TODO list. In addition, it places a status string where the tag is located so that your TODO list will tell you which items are complete and which arent.

Usage
If you do not want to keep referring to this page or the code, place a tag somewhere on a page and it will display the help contents for you. Please note: The most current documentation will always be within the extension itself; it is highly recommended you use so you are sure the information you are given matches the version of TODO List Progress Bar you are running.

Help for TODO List Progress Bar

The tag has multiple modes of operation:


 * Defaults Mode (Not Implemented)
 * 
 * Sets defaults for the following items and progress bars such as color, width, height, etc.
 * Graphic Mode
 * Caption
 *  (No caption given)
 * Used for displaying a progress bar for a list.
 * Help Mode
 * Renders the help text you are reading at this moment.
 * Item Mode
 * Item
 * Item
 * Used for adding items to a list.
 * Progress Mode
 * Caption
 * 
 * Simple progress bar that isn't dependent upon a list.
 * Values Mode
 * 
 * Outputs list data in a table.
 * Outputs list data in a table.

All tags require the "type" parameter. It only has the following values:
 * "defaults" (Not Implemented)
 * "graphic"
 * "help"
 * "item"
 * "progress"
 * "values"

The type parameter tells the code what to do with the tag. As such, it has no default value.

Examples
Examples can be found *here*. These are working examples.

NOTE: Sorry all. The wiki I was using for my examples was taken down with out my knowledge. I will get some examples up ASAP. - Vadtec 16:25, 27 October 2010 (CST)

If you think of an example that should be included, let me know via the discussion page.

Download instructions
Please cut and paste the code found below and place it in. Note: stands for the root directory of your MediaWiki installation, the same directory that holds .

Installation
To install this extension, add the following to :

License
Copyright &copy; 2010 by Vadtec, vadtec@vadtec.net ("VADTEC")

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND VADTEC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VADTEC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Credits
A portion of this code is based directly on Progressbar, I have merely modified it to work with my needs. I take no credit for the portion that is based on Progressbar.

Change Log

 * 20100612.0
 * Inital release
 * 20100613.0
 * Changed all the div elements to use the inline display style rather than the block style.
 * 20100613.1
 * Realized I added an inline where I shouldn't have.
 * Fixed some nasty XSS bugs I had introduced. (Thanks to Max Semenik for noticing this.)
 * Changed the  tag to allow text to appear between the tags and be displayed along with the status indicator.
 * 20100613.2
 * Made the name parameter optional to simplify the tag syntax.
 * Added a "nostatus" parameter to the item tag.
 * Added an "unknown" status value.
 * 20100613.3
 * Fixed a bug related to "nostatus" causing items marked with nostatus to not be calcualted in the final tally.
 * 20100613.4
 * Added code to allow the parsing of wikitext from within the tags. (Made it XSS safe.)
 * Added a "noerase" parameter to the graphic tag.
 * 20100614.0
 * Added the "multilist" parameter to allow combining of data sets into one progress bar.
 * Stubbed in part of the "values" tag code.
 * 20100614.1
 * Added a "help" type that displays the help as a wiki page.
 * 2010614.2
 * Added the "progress" type for displaying simple progress bars.
 * 20100621.0
 * Added the "values" type for displaying the list data in tabular form.
 * Added the ISC license to the code.

TODO (pun)

 * 1) Add a  for setting page wide defaults.
 * 2) This will require an array to store the defaults so they can be changed.
 * 3) Add a "percent" parameter that allows giving a percent complete value to items that are not completed.
 * 4) This will cause only a portion of the items value to be added to the final tally.