I managed to do that pretty easily
open up inc/ticket_list.inc.php
This file handles all the rows of tickets in your admin_main.php (ie Admin home page)
now, here is where we can add/move columns around to fit our needs.
Since I'm using the system as more of a "check in" system, I need it to show things like customer name, phone, what they brought and so on.
Starting from the top of ticket_list.inc.php between lines 185 and 200 we have our headings for our columns.
each column is enclosed by <th> code code </th> tags. Based on columns already there we can construct our custom field. Before we can start, we need to find out what "number" is this field. For example, go down the custom fields in your settings and see what field you want to add. Count down from the top what number that field is and that'll be the starting point.
So lets say you have these custom fields:
Address
City
State
Zip
Phone
If you want to show City, then that'll be named "custom2". Zip will be "custom4" and so on.
Now that we know what "custom(number)" our field is called we can go back to editing ticket_list.inc.php
find the position you want to place your field in and make a new <th> code </th>
so it'll look something like:
Code: Select all
<th class="admin_white" style="text-align:left; white-space:nowrap;"><a href="<?php echo $href . '?' . $query; ?>custom7"><?php echo $hesklang['phone']; ?></a></th>
since in the above code Hesk will not know what $hesklang['phone'] is, lets define it. Open up language/en/text.php and add
Code: Select all
$hesklang['phone']='Phone Number';
save and close it then go back to ticket_list.inc.php
Around line 265 you should see some more <td> tags. Those are what the system will use to show each row and the information for that particular ticket. This is where we can also make it clickable so when we click our custom field, we can go in and see that ticket.
So the
MOST important thing remember here is that the same order needs to be kept with the above editing when we added the column headings or they will not align right.
Do the moving and when done, add your custom field the same way but it will look like:
Code: Select all
<td class="$color">$owner<a href="admin_ticket.php?track=$ticket[trackid]&Refresh=$random">$ticket[custom7]</a></td>
the good thing is that you can add multiple custom fields to show more data.. for example you can do:
Code: Select all
<td class="$color">$owner<a href="admin_ticket.php?track=$ticket[trackid]&Refresh=$random">$ticket[custom7] $ticket[custom8]</a></td>
The above will bundle custom7 and custom 8 into one separated by a space.
That's about it. upload the modified files to your hesk and try it out.
I hope I was being as clear as possible!
