Background Knowledge
The progress of a task in TaskFreak! is shown as a percentage value and is not exactly visually appealing to quickly spot the progress. With a few minor alterations we can show the percentage completed bar that fills as the task progresses and a gradient bar indicating the progress along with the percentage value.
This solution was posted by Searcher at Re: Taskfreak Customizing Status.
Solution
- Edit at line #268 as shown below.
Cod Before
268
<th width="<?php echo FRK_STATUS_LEVELS * 2; ?>%" onclick="freak_sort('statusKey')" colspan="< ?php echo FRK_STATUS_LEVELS ?>" class="sortable">< ?php echo (FRK_STATUS_LEVELS == 1)?'X':$langForm['status']; ?></th>
Code After
268
<th width="80" onclick="freak_sort('statusKey')" class="sortable">< ?php echo (FRK_STATUS_LEVELS == 1)?'X':$langForm['status']; ?></th>
- Edit at line #382
Code Before
< ?php $s = $objItem->itemStatus->statusKey; for ($i = 0; $i < FRK_STATUS_LEVELS; $i++) { $j = ($i < $s)?(FRK_STATUS_LEVELS - $i):0; ?> <td id="est<?php echo ($i+1).$objItem->id; ?>" class="sts< ?php echo $j; ?>"< ?php if ($objUser->checkLevel(14) || $objItem->checkRights($objUser->id,8,true)) { echo ' onclick="freak_sts('.$objItem->id.','.($i+1).')" style="cursor:pointer"'; } ?>> </td> < ?php } ?>Code After
<!-- status bar update --> <td> <table width="100%" cellpadding="0" cellspacing="0"> <tr> < ?php $s = $objItem->itemStatus->statusKey; for ($i = 0; $i < FRK_STATUS_LEVELS; $i++) { $j = ($i < $s)?(FRK_STATUS_LEVELS - $i):0; ?> <td width="10" onmouseover="this.style.cursor='pointer'" id="est<?php echo ($i+1).$objItem->id; ?>" class="sts< ?php echo $j; ?>"< ?php if ($objUser->checkLevel(14) || $objItem->checkRights($objUser->id,8,true)) { echo ' onclick="freak_sts('.$objItem->id.','.($i+1).')" style="cursor:pointer"'; } ?>> </td> < ?php } ?> <td style="border:0"></td> <td id="status_perc_<?php echo $objItem->id; ?>" style="border:0; font-size:8px; color:#000" align="right"> < ?php echo ($s*20)."%"; ?></td> </tr> <tr><td style="border:0; height:2px"></td></tr> <tr> <td colspan="7" style="border:0"><img id="status_bar_<?php echo $objItem-/>id; ?>" src="skins/status.jpg" height="5" width="< ?php echo ($s*16); ?>" /></td> </tr> </table> </td> <!-- status bar update --> - Download the status gradient bar image file from “http://demofreak.dracon.biz/skins/status.jpg” and the copy image file to the /taskfreak/skins/ directory.
Source: Taskfreak Customizing Status
PlanetMySQL Voting: Vote UP / Vote DOWN