I haven't provided this as a download yet because there are still a few things that I'd like to fix.
I'm open to suggestions.
<?php class NP_ProgressBar extends NucleusPlugin { function getName() { return 'Progress Bar'; } function getAuthor() { return 'Tom Reinhart'; } function getURL() { return 'http://www.alltom.com/'; } function getVersion() { return '0.1'; } function getDescription() { return 'Displays a progress bar. Usage: <%plugin(ProgressBar,[val],[max])%> or <%plugin(ProgressBar,[val],[max],[background color],[foreground color])%>'; } function doSkinVar() { // $skinType, $min, $max, $bg, $fg $spacer = '[path_to_spacer_image]'; switch( func_num_args() ){ case 3: $min = func_get_arg(1); $max = func_get_arg(2); $min = floatval($min); $max = floatval($max); if( ($min > $max) || ($min < 0) || ($max < 0) ){ die( 'Invalid variables sent to ProgressBar plugin.' ); }else{ if( $min == 0 ){ echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="#FFCCCC"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; }elseif( $min == $max ){ echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="#FF0000" width="36%"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; }else{ $percent = floatval($min / $max * 100); echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="#FF0000" width="'. $percent . '%"><img src="' . $spacer . '" width="1" height="1" alt="" /></td>'; echo '<td bgcolor="#FFCCCC"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; } } break; case 5: $min = func_get_arg(1); $max = func_get_arg(2); $bg = func_get_arg(3); $fg = func_get_arg(4); $min = floatval($min); $max = floatval($max); if( ($min > $max) || ($min < 0) || ($max < 0) ){ die( 'Invalid variables sent to ProgressBar plugin.' ); }else{ if( $min == 0 ){ echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="' . $bg . '"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; }elseif( $min == $max ){ echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="' . $fg . '" width="36%"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; }else{ $percent = floatval($min / $max * 100); echo '<table border=0 cellpadding=3 cellspacing=0 width="100%" style="border:1px solid black">'; echo '<tr><td bgcolor="' . $fg . '" width="'. $percent . '%"><img src="' . $spacer . '" width="1" height="1" alt="" /></td>'; echo '<td bgcolor="' . $bg . '"><img src="' . $spacer . '" width="1" height="1" alt="" /></td></tr>'; echo '</table>'; } } break; } } } ?>