Remove Reply When New Ticket is Submitted
Moderator: mkoch227
-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
Remove Reply When New Ticket is Submitted
Im using version 2.1, but already purchased 2.2.
I have it so that people cant reply to tickets and have to wait for our company to reply to them.
When a person submits a ticket, they should not be allowed to reply to the ticket until we reply back. What is happening is when a person opens a new ticket, they can reply immediately to the new ticket. After that, they cant reply until we reply back.
We would like to know to to remove this, if someone opens a ticket, we dont want them to reply back until we reply back. Right now as it stands, they can reply back when they open a new ticket. After that, they cant reply back to the ticket until we reply back to it.
Thanks again.
I have it so that people cant reply to tickets and have to wait for our company to reply to them.
When a person submits a ticket, they should not be allowed to reply to the ticket until we reply back. What is happening is when a person opens a new ticket, they can reply immediately to the new ticket. After that, they cant reply until we reply back.
We would like to know to to remove this, if someone opens a ticket, we dont want them to reply back until we reply back. Right now as it stands, they can reply back when they open a new ticket. After that, they cant reply back to the ticket until we reply back to it.
Thanks again.
Re: Remove Reply When New Ticket is Submitted
Just below in ticket.php try pasting
This should lock the ticket unless it's waiting for a customer reply.
Code: Select all
$ticket = hesk_dbFetchAssoc($result);
Code: Select all
if ($ticket['status'] != 2)
{
$ticket['locked'] = 1;
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
Re: Remove Reply When New Ticket is Submitted
Works Great Thank you K
Re: Remove Reply When New Ticket is Submitted
This is a very logical mod on the surface but not all users will give you all the information that you need right away in their first post. Some of mine remember things after they have submitted their ticket and then add extra stuff to help..
Does make more sense though like this - and I guess if any of the HESK support staff need any further info they can always ask for it in their reply thus opening the ticket back up allowing the customer to add more replies.
I've added this to my installation of HESK and will see how things go for a while.
Thanks
Does make more sense though like this - and I guess if any of the HESK support staff need any further info they can always ask for it in their reply thus opening the ticket back up allowing the customer to add more replies.
I've added this to my installation of HESK and will see how things go for a while.
Thanks

-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
Re: Remove Reply When New Ticket is Submitted
I tried the code above. and it doesnt work it allows the person to leave one more reply and then removes it once a ticket is opened.
Re: Remove Reply When New Ticket is Submitted
No problems here, seems to work perfectly - are you sure you made the correct edits?
-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
Re: Remove Reply When New Ticket is Submitted
When the ticket is opened by a user, they can leave one more reply before the reply button is removed. I thought it was something to do with the values. I've changed them both with no avaiability.
-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
Re: Remove Reply When New Ticket is Submitted
IF YOU WANT THE CODE TO REALLY WORK THIS IS WHAT YOU DO. IT TOOK SOME TWEAKING BUT NOW EVERYTHING WORKS FINE. SO IF ANY ONE WANTS TO DO IT. THIS IS WHAT YOU DO.
===================================
HOW TO LIMIT NUMBER OF OPEN TICKETS
===================================
1. Locate the submit_ticket.php and below the hesk_dbConnect(); add the following line :
$sql = "SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `status` != '1' AND (`email` LIKE '".hesk_dbEscape($email)."' OR `ip` LIKE '".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."')";
$res = hesk_dbQuery($sql);
if (hesk_dbNumRows($res) >= 1)
{
hesk_error("You can have maximum 1 open tickets at a time!");
}
======================================================
HOW TO LIMIT REPLIES ON TICKET TO 1
======================================================
1. In the ticket.php file change the following code from this :
$ticket['status'] != 3 || $hesk_settings['custopen']==1
To this :
if ($ticket['locked'] != 1 && $ticket['status'] != 1 && $ticket['status'] != 1)
===========================================================
REMOVE THE REPLY BUTTON WHEN TICKET IS FIRST OPENED BY USER
===========================================================
1. Open the ticket.php file and locate the following line :
$ticket = hesk_dbFetchAssoc($result);
2. Just below the above line add the following :
if ($ticket['status'] != 1)
{
$ticket['locked'] = 1;
}
===================================
HOW TO LIMIT NUMBER OF OPEN TICKETS
===================================
1. Locate the submit_ticket.php and below the hesk_dbConnect(); add the following line :
$sql = "SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `status` != '1' AND (`email` LIKE '".hesk_dbEscape($email)."' OR `ip` LIKE '".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."')";
$res = hesk_dbQuery($sql);
if (hesk_dbNumRows($res) >= 1)
{
hesk_error("You can have maximum 1 open tickets at a time!");
}
======================================================
HOW TO LIMIT REPLIES ON TICKET TO 1
======================================================
1. In the ticket.php file change the following code from this :
$ticket['status'] != 3 || $hesk_settings['custopen']==1
To this :
if ($ticket['locked'] != 1 && $ticket['status'] != 1 && $ticket['status'] != 1)
===========================================================
REMOVE THE REPLY BUTTON WHEN TICKET IS FIRST OPENED BY USER
===========================================================
1. Open the ticket.php file and locate the following line :
$ticket = hesk_dbFetchAssoc($result);
2. Just below the above line add the following :
if ($ticket['status'] != 1)
{
$ticket['locked'] = 1;
}
Re: Remove Reply When New Ticket is Submitted
is there any way to limit submitting ticket to 1 per session
some times the customer press the submit bottom many time and I got multiple tickets
some times the customer press the submit bottom many time and I got multiple tickets
Re: Remove Reply When New Ticket is Submitted
Hi, you could use a bit of JavaScript on the forms submit button like this for example:
http://javascript.internet.com/forms/di ... ttons.html
Hope that helps
http://javascript.internet.com/forms/di ... ttons.html
Hope that helps

Re: Remove Reply When New Ticket is Submitted
I have this script but it calls to install script in the "head" and "body" section. There is no "head" or "body" section in a PHP webpage. Anyone know which page has the submit ticket button on it? I searched this forum and the net with no results.