Help Desk Software & Beyond
May 21, 2012, 11:20:00 PM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [MOD] How to change the "Contact us" Link in the header.shtml  (Read 1335 times)
JamesTan
Newbie
*

Karma: 0
Posts: 8


View Profile
« on: September 10, 2007, 11:04:02 PM »

Hi,

I have created two new customer contact forms "newform-keycustomers.html" and "newform-others.html", in addition to the default newticket.html, e.g.

http://localhost/cgi-bin/ttx.cgi?cmd=newticket&form=newform-keycustomers
http://localhost/cgi-bin/ttx.cgi?cmd=newticket&form=newform-others

In both webpages, when I click on the "Contact Us" link in the header, it points me to the default newticket.html.

I want to be able to return to the newform-keycustomers form if the user is on keycustomer page, and similarly back to newform-others if the user is on the newform-others page.

Appreciate your guidance.

Thanks,
James Tan
« Last Edit: January 18, 2008, 03:12:48 PM by sparky672 » Logged
Magnus Wester
Full Member
***

Karma: 2
Posts: 116



View Profile WWW
« Reply #1 on: September 11, 2007, 01:02:07 AM »

In version 2.22, most of the macro replacement, i.e. the (%MACRONAME%) stuff, takes place in TTX.cgi around line 370. I suggest you try to add your own macro, e.g. (%TICKETNAME%), and do the replacement here. Then you can replace all references to "newticket" with (%TICKETNAME%).
Logged
JamesTan
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #2 on: September 11, 2007, 04:26:31 AM »

Hi,

Great thanks. I got it working for my newticket forms.

In ttx.cgi, I added the following lines:

$data{HTMLBASEWIDTH} = $cfg->get('HTMLBASEWIDTH');

#--------Beginning of additions------------------
my $t;
  if ($query->param('cmd') eq 'newticket' && $query->param('form') ne undef) {
    my @parts = split(/\/|\\/, $query->param('form'));
    $t = pop @parts;
    $t = 'newticket&form='.$t;
  }
  if ($t eq undef) {
    $t = 'newticket';
  }
$data{NEWTICKETFORMLINK} = "| <a href=\"$ENV{SCRIPT_NAME}?cmd=$t&sid=".$query->param('sid').
                         "&style=".$query->param('style').'">[%Create Another Ticket%]</a> |';
#--------------End of additions--------------------

$data{HELPDESKCMD} = ($cfg->get('_USER') ne undef) ? 'helpdesk':'ticket';



In the header.shtml file, I amended line 120 to:
                        (%HOMELINK%) (%DASHBOARDLINK%) <a href="(%ENV_SCRIPT_NAME%)?cmd=(%HELPDESKCMD%)&sid=(%INPUT_sid%)&style=(%INPUT_style%)">[%Tickets%]</a> (%NEWTICKETFORMLINK%)(%LOGINLOGOUT%)

When an operator logs in and click on the "Create Another Ticket" link, he is still linked to the default newticket form. But it is okay, this is what I want.

Thanks,
James Tan
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.02 seconds with 18 queries.