change priority to urgency and also date format

Everything related to Hesk - helpdesk software

Moderator: mkoch227

ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

change priority to urgency and also date format

Post 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
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post 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... :wink:

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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
ricksaul
Posts: 11
Joined: Sun May 27, 2007 1:02 am

mysql connection problem

Post 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
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post 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).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
ielliott
Posts: 1
Joined: Sun Jun 17, 2007 11:49 pm

Post 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♦
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

The above comment was made for 0.94 so there was no new version yet :wink: 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
andrew
Posts: 12
Joined: Thu Sep 13, 2007 2:27 pm

Post by andrew »

Klemen Stirn wrote:The above comment was made for 0.94 so there was no new version yet :wink: 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?
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
andrew
Posts: 12
Joined: Thu Sep 13, 2007 2:27 pm

Post by andrew »

Klemen Stirn wrote:See viewtopic.php?t=1473 :wink:
I posted the answer in there :D I'm sure of it :lol:
ok.
its quite obvious :lol:

Medicine / Bio Medicine
Mathematician/Statistician
Chemist
Pharmacist/Pharmacologist
Biologist
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
sua
Posts: 8
Joined: Mon Jan 14, 2008 2:34 am

Post 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']));
sua
Posts: 8
Joined: Mon Jan 14, 2008 2:34 am

Post 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!
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
sua
Posts: 8
Joined: Mon Jan 14, 2008 2:34 am

Post 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.
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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

Code: Select all

<td $color>$reply['dt']</td>
replace it with

Code: Select all

<td $color>$replied_on</td>
That should get you to where you want to be ...

DC
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Post Reply