Archive for the ‘PHP/MySQL/MSSQL’ Category

TaskFreak! v0.6.2 – Customizing Status

Октябрь 3rd, 2011

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


  1. 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>
  2. 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"';
                            }
                        ?>>&nbsp;</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"'; } ?>>&nbsp;</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">&nbsp;< ?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 -->
  3. 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

TaskFreak! v0.6.2 – Customizing Status

Октябрь 3rd, 2011

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


  1. 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>
  2. 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"';
                            }
                        ?>>&nbsp;</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"'; } ?>>&nbsp;</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">&nbsp;< ?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 -->
  3. 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

TaskFreak! v0.6.2 – Add Unique Ticket/Task Number

Июль 14th, 2010

Background Knowledge


TaskFreak! does not show within the interface a unique ticket/task number. Depending on the use of TaskFreak! having such a value can have it’s benefits. Since this unique value does already exist in the back end, it will be fairly trivial to render this value within the task list and task details panel. I will show you how this is done using Searcher’s solution posted in the TaskFreak! Forum. There has been some modifications but not much.

Solution


  1. Edit index.php in the root of TaskFreak!. Add the table header column just below line # 248 as follows.
    2
    
    <th width="3%" onclick="freak_sort('itemId')" class="sortable" >< ?php echo $langForm['id']; ?></th>
  2. Next add the table data just below line # 302 as follows.
    2
    
    <td style="text-align:right;">< ?php echo $objItem->id; ?>&nbsp;</td>
  3. Edit /include/html/xajax_panel_view.php just below line # 5 just before the priority column as follows.
    6
    7
    8
    9
    10
    
    <div id="fid">
            	<div class="flabel">< ?php echo $GLOBALS['langForm']['id']; ?></div>
            	<div class="vid">< ?php echo $objTask->id; ?></div>
            < /div>
    </div>
  4. Edit /include/language/en/freak.php just below line # 46 as follows.

    Note: Each interface language file will be required to be edited if you desire to use them. If you do not do so, you will receive error messages and it may cripple TaskFreak!

    2
    
    'id' => 'ID',
  5. Edit applicable skins’ CSS in this example /skins/redfreak/css/freak.css just below line # 550.
    9
    10
    11
    12
    13
    14
    15
    16
    
    #fid 
    {
    	float: left;
    	width: 80px;
    	height:32px;
    	margin-left: 3px;
    	font-weight: bold;
    }
  6. Edit applicable skins’ CSS in this example /skins/redfreak/css/freak.css ID #fpro and remove “margin-left: 3px;”.

Source: Unique Ticket/ToDo Follow Number – Further prioritizing


PlanetMySQL Voting: Vote UP / Vote DOWN