Hello everybody
This is my first post.
I have been hacking around with TTX to make some minor changes. I am not Perl programmer nor have I done much CGI. I mostly work with PHP and Java.
I would like to be able to send out emails notifying a status update to two email addresses. I have been looking around the code but can't find where to begin. If I could find the line of code that says 'send out an email to the customer' then I could just repeat this twice. The other email address can be hard coded into the app so it should be simple to do. Where do I begin?
Also, is there any documentation? Maybe a copy of the code with some comments? I am shocked that there are no comments. Even just one comment describing each function would be nice. I can't find my way around the software. All the forms have an action of %ENV_SCRIPT_NAME% which I can find nothing about. When I google it I get info back about the HTTP var SCRIPT_NAME. Seeing this I conclude that every form in the app submits to the script which printed the form...however I can not navigate the code and find how things are connected together so I can't clearly work out which script calls which form and which function each form submits to. Is there a flow-diagram for TTX?
If someone could give me a start on being able to map out how the software works then I could draw my own flow-diagram and ascertain what each function does and when.
I would prefer some help in understanding the flow of the code rather than just being told how to make the change I want. I know the ttx.cgi is loaded first. This then checks what the command is in the query string and calls a function. So lets take a new ticket as an example. The user clicks 'Contact Us' this invokes the command 'newticket' which points to TTXTicket::newticket. If this completes ok it returns 'confirmnew' which ttx.cgi points to TTXTicket::confirmnew which appears to do nothing much. This is as far as I can get along the new ticket line.
Also, I know that at some point in TTXTicket::newticket something must happen to save to the DB and send out emails. Is this correct? If it is I cant find where in newticket that this happens. I know that TTXMySQLTickets::save writes to the DB and then TTXTicket::opernotify and TTXTicket::usernotify are used to prepare emails and then TTXMail::sendmail does the final prep and sends the email. But like I said I can't find where in the new ticket process that this happens. I really need a full understanding of the flow of the app to make all the changes I require.
When I google for 'trouble ticket express documentation' all I get back is installation instructions and an operator manual.
Anyway, thanks for your time and I hope to hear back soon
Regards
thread title edit by sparky as per sticky thread rules.