I used the code that you told me about. When I test the code out, I wasnt able to get passed the 300 word limit. However, I got people that are exceeding the 300 word limit and rambling on in the message field. Is there some how they are bypassing it?
$message=hesk_input($_POST['message']) or $hesk_error_buffer[]=$hesklang['enter_message'];
--After the line above add the following below---
}
if (strlen($message) > 300)
{
$hesk_error_buffer[]='Your message is too long, limit it to 300 chars.';
How To Stop People From Breaking Message Limit
Moderator: mkoch227
-
- Posts: 65
- Joined: Sat Aug 15, 2009 9:38 pm
That should work for posting a new ticket (customer side only), if you wish to limit reply lenght as well you should add similar code into reply_ticket.php:
Code: Select all
if (strlen($message) > 300)
{
hesk_error('Your message is too long, limit it to 300 chars.');
}
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
Below
Code: Select all
$message=hesk_input
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
There is no such error in Hesk, it must be a customization you did?It gives me an error that I can only have one ticket submitted at a time
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
I found the error. In the script you gave me a while back ago to only have a person allowed 1 ticket at a time. There was a >=, the variable has to be >=2 not >=1 to not allow a buyer to open up mutliple tickets. The whole time it was set to 1.
Mysteriously it worked all this time until it came to modify the reply characters allowed limit. But I figured it out last night via trial and error. Thanks again.
Mysteriously it worked all this time until it came to modify the reply characters allowed limit. But I figured it out last night via trial and error. Thanks again.