Page 1 of 2
change priority to urgency and also date format
Posted: Sun May 27, 2007 3:27 am
by ricksaul
I am trying helpdesk for the first time and am wondering how I can change the title of priority to urgency.. as everyone thinks theirs is the highest priority .
Also as I am in australia we use dd-mm-yyyy format.. I read in a post that this is not easily changed . Are there any plans to make this option ?
thanks Rick Saul
Posted: Sun May 27, 2007 5:53 pm
by Klemen
Hi,
All the language (text used) is in the "en.inc.php" file inside "language" folder, you can open it with notepad and find/replace any "Priority" to "Urgency". But thanks for the heads up, I'm not a native English speaker so...
As for the date, I will see if I can work something out in the next version, but can't give any promises or dates.
mysql connection problem
Posted: Mon May 28, 2007 2:24 am
by ricksaul
thanks for this.. for someone who does not speak english as a native language you have done a great job with helpdesk.
I have another issue. I have connected Helpdesk to a new install of mysql on my test machine but it took me a long time of blundering thru trying to figure it out.. Can you tell me how i can create a new mysql database that helpdesk can connect to. ? I have no idea where to start in order to create a new production version database.
regards Rick Saul
Posted: Mon May 28, 2007 7:49 am
by Klemen
You'll have to check with your host to do that, it depends on the server setup. But most hosts have some sort of control panel where you can manage MySQL databases (among other things).
Posted: Sun Jun 17, 2007 11:53 pm
by ielliott
Klemen,
Any update on changing the date format (I'll also through timezone into the mix).
I just downloaded the current version (.94) but still don't see it.
I do notice that the date/time is called in using NOW(). Where is this defined?
Thanks,
Elliott♦
Posted: Mon Jun 18, 2007 10:49 pm
by Klemen
The above comment was made for 0.94 so there was no new version yet

Not sure when I will find time for doing (it's quite some work) it as I started writing my diploma and that's the top priority right now.
As for NOW(), that's a MySQL function:
http://dev.mysql.com/doc/refman/5.0/en/ ... nction_now
Posted: Thu Sep 13, 2007 3:48 pm
by andrew
Klemen Stirn wrote:The above comment was made for 0.94 so there was no new version yet

Not sure when I will find time for doing (it's quite some work) it as I started writing my diploma and that's the top priority right now.
As for NOW(), that's a MySQL function:
http://dev.mysql.com/doc/refman/5.0/en/ ... nction_now
what diploma are you studying for Klemen?
Posted: Thu Sep 13, 2007 6:11 pm
by Klemen
Posted: Thu Sep 13, 2007 7:10 pm
by andrew
I posted the answer in there

I'm sure of it
ok.
its quite obvious
Medicine / Bio Medicine
Mathematician/Statistician
Chemist
Pharmacist/Pharmacologist
Biologist
Posted: Mon Dec 10, 2007 8:22 am
by DC
Heres a quick little mod I did that will reformat the date any way you like This is a hardcoded change but it works well its only the output so it does not mess with what the db is looking for ...
Look for this line its in several hesk scripts that output dates/times
$ticket['lastchange']=hesk_formatDate($ticket['lastchange']);
One being
print_tickets.inc.php
And replace it with this ...
//DC Date format workaround
$date_format = "m/d/y h:i A";
$ticket['lastchange'] = date($date_format, strtotime($ticket['lastchange']));
then another version of this code I use in admin_ticket.php
//DC Date format workaround
$date_format = "m/d/y h:i A";
$created_on = date($date_format, strtotime($ticket['dt']));
$lastchange = date($date_format, strtotime($ticket['lastchange']));
Then scroll down a bit were you will see some table row code
Replace this ...
<tr>
<td>'.$hesklang['created_on'].': </td>
<td>'.$ticket['dt'].'</td>
</tr>
<tr>
<td>'.$hesklang['last_update'].': </td>
<td>'.$ticket['lastchange'].'</td>
</tr>
With this ...
<tr>
<td>'.$hesklang['created_on'].': </td>
<td>'.$created_on.'</td>
</tr>
<tr>
<td>'.$hesklang['last_update'].': </td>
<td>'.$lastchange.'</td>
</tr>
In this example it will output 12/10/07 2:43 AM
DC
Posted: Tue Jan 15, 2008 3:19 am
by sua
Thanks for this help. However, where exactly in admin_ticket.php do you place the following code?
then another version of this code I use in admin_ticket.php
//DC Date format workaround
$date_format = "m/d/y h:i A";
$created_on = date($date_format, strtotime($ticket['dt']));
$lastchange = date($date_format, strtotime($ticket['lastchange']));
Posted: Tue Jan 15, 2008 3:27 am
by sua
Also, how do I change in admin_main.php so the "Date Posted" under "Find a Ticket by" is mm-dd-yyyy?
Any help is greatly appeciated...
Thanks!
Posted: Tue Jan 15, 2008 3:27 am
by DC
Basically your just searching for the code that I listed and replacing it with my mod, is the problem that you cant find the code that matches? I thoght I had it pretty simplified if your still stuck il see what I can do ...
Always make a backup before trying any mods. I have tested this and it works well but do make a backup of your original before trying this mod ...
DC
Posted: Tue Jan 15, 2008 3:30 am
by sua
Yeah, I got everything up to the following, then I'm lost:
-----------------------------------------------------------------------
then another version of this code I use in admin_ticket.php
//DC Date format workaround
$date_format = "m/d/y h:i A";
$created_on = date($date_format, strtotime($ticket['dt']));
$lastchange = date($date_format, strtotime($ticket['lastchange']));
---------------------------------------------------------------------------
I couldn't find $ticket['lastchange']=hesk_formatDate($ticket['lastchange']); in admin_ticket.php.
Posted: Tue Jan 15, 2008 4:03 am
by DC
Ok try this my version is modified a great deal so I cant really give you line numbers so try searching for this code block
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font> [<a
href="admin_change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'">'.$hesklang['open_action'].'</a>]';
}
Then right after that block of code add this ...
Code: Select all
$date_format = "m/d/y h:i A";
//DC Date format workaround
$created_on = date($date_format, strtotime($ticket['dt']));
$lastchange = date($date_format, strtotime($ticket['lastchange']));
Then scroll down a bit where you will see some table row code
Replace this ...
Code: Select all
<tr>
<td>'.$hesklang['created_on'].': </td>
<td>'.$ticket['dt'].'</td>
</tr>
<tr>
<td>'.$hesklang['last_update'].': </td>
<td>'.$ticket['lastchange'].'</td>
</tr>
With this ...
Code: Select all
<tr>
<td>'.$hesklang['created_on'].': </td>
<td>'.$created_on.'</td>
</tr>
<tr>
<td>'.$hesklang['last_update'].': </td>
<td>'.$lastchange.'</td>
</tr>
Then last but not least look for
this line that starts our while loop
Code: Select all
while ($reply = hesk_dbFetchAssoc($result)){
directly after that line add
Code: Select all
//DC Date format workaround
$replied_on = date($date_format, strtotime($reply['dt']));
Then you will see some other table code find this
replace it with
That should get you to where you want to be ...
DC