arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« on: March 31, 2008, 10:30:11 AM » |
|
G'day!
I have created a new template ...and would like to have my reps access it from a link in header.shtml ... my question is ....how can I hide this link? like how the reports link only shows up once you login .... is this possible? ... or is that only possible with a module ...TTXreports for example.
Thank you in advance
|
|
|
|
|
Logged
|
|
|
|
|
Alex
|
 |
« Reply #1 on: March 31, 2008, 10:45:00 AM » |
|
As long as you need dynamic links (e.g. available to logged in operators only), you have to customize source code (the program).
|
|
|
|
|
Logged
|
|
|
|
arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« Reply #2 on: March 31, 2008, 10:49:23 AM » |
|
Hmmm....
Do you mean customize ttx.cgi? .....
|
|
|
|
|
Logged
|
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #3 on: March 31, 2008, 10:54:00 AM » |
|
Hi Arvin-
I'll post the location in a second...
|
|
|
|
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #4 on: March 31, 2008, 10:59:08 AM » |
|
In ttx.cgi... Find this... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | '; Your new link in blue will show up to the right of the 'reports' link... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href="MY CUSTOM LINK HTML">MY CUSTOM LINK TEXT</a> | '; Edit: It's critical here to be accurate with the single & double quote characters.
|
|
|
|
« Last Edit: March 31, 2008, 11:02:02 AM by sparky672 »
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #5 on: March 31, 2008, 11:13:19 AM » |
|
URL for link to alternate template should look something like this... /ttx.cgi?cmd=newticket&form=CUSTOM_FORM http://www.troubleticketexpress.com/customer-service-form.htmlIf you need help getting that properly inserted into the Perl.... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href=\"$ENV{SCRIPT_NAME}?cmd=newticket&form=CUSTOM_FORM&sid='. $query->param('sid')."&style=".$query->param('style').'">MY CUSTOM LINK TEXT</a> | ';
|
|
|
|
« Last Edit: March 31, 2008, 11:18:11 AM by sparky672 »
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« Reply #6 on: March 31, 2008, 11:42:34 AM » |
|
Mmmm ... that kinda works ..... I followed you instructions .... it seems to work ... however ... a skiny blue rectangle appears instead of the link ..... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href=\"$ENV{SCRIPT_NAME}?cmd=newticket&form=timetracker&sid='. $query->param('sid')."&style=".$query->param('style').'">[%Time Tracker%] </a> | '; http://dev.csg.mts.net/cgi-bin/ttx.cgi?cmd=login&sid=&style=
|
|
|
|
|
Logged
|
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #7 on: March 31, 2008, 11:47:00 AM » |
|
Mmmm ... that kinda works ..... I followed you instructions .... it seems to work ... however ... a skiny blue rectangle appears instead of the link ..... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href=\"$ENV{SCRIPT_NAME}?cmd=newticket&form=timetracker&sid='. $query->param('sid')."&style=".$query->param('style').'">[%Time Tracker%] </a> | '; http://dev.csg.mts.net/cgi-bin/ttx.cgi?cmd=login&sid=&style=It looks fine in my browser but I think that stray tab-space in your link is your blue box problem. [%Time Tracker%] </a> just remove it... [%Time Tracker%]</a>
|
|
|
|
« Last Edit: March 31, 2008, 11:50:32 AM by sparky672 »
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« Reply #8 on: March 31, 2008, 11:50:39 AM » |
|
Strange ...... I did that ... and still the same thing happened... however ...when I can click on the blue bar ... the browser URL field displays .... Those quotes don't seem right
|
|
|
|
|
Logged
|
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #9 on: March 31, 2008, 11:57:14 AM » |
|
Let's try breaking out the script variable, forcing the Perl to properly replace it... Just the SECOND line... Note the extra single quotes too... $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href="'.$ENV{SCRIPT_NAME}.'?cmd=newticket&form=timetracker&sid='. As code... $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href="'.$ENV{SCRIPT_NAME}.'?cmd=newticket&form=timetracker&sid='.
|
|
|
|
« Last Edit: March 31, 2008, 11:58:50 AM by sparky672 »
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #10 on: March 31, 2008, 12:01:44 PM » |
|
You're also missing a plain space after your last </a> and before the last pipe... |
Just for aesthetics.
|
|
|
|
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« Reply #11 on: March 31, 2008, 12:02:47 PM » |
|
LOL ..... Internal Server Error  I love this
|
|
|
|
|
Logged
|
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #12 on: March 31, 2008, 12:11:14 PM » |
|
LOL ..... Internal Server Error  I love this Working perfectly on my test server.... $data{LOGINLOGOUT} .= "<a href=\"$ENV{SCRIPT_NAME}?cmd=reports&sid=". $query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href="'.$ENV{SCRIPT_NAME}.'?cmd=newticket&form=timetracker&sid='. $query->param('sid')."&style=".$query->param('style').'">[%Time Tracker%]</a> | '; There must be something bungled along the way... blow it all out and use this from above.
|
|
|
|
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
arvin
Sr. Member
  
Karma: 10
Posts: 400
Yeah thats right !
|
 |
« Reply #13 on: March 31, 2008, 12:26:57 PM » |
|
Cha Ching!
that did it ...and...the only thing different this time .... I cut and pasted into notepad 1st ...and then cust and pasted into ttx.cgi
|
|
|
|
|
Logged
|
|
|
|
Sparky
Moderator
Hero Member
   
Karma: 83
Posts: 2,228
stop pushing all those buttons
|
 |
« Reply #14 on: March 31, 2008, 12:33:06 PM » |
|
Cha Ching!
that did it ...and...the only thing different this time .... I cut and pasted into notepad 1st ...and then cust and pasted into ttx.cgi
If I said it once, I said it a hundred times, nothing beats a good text editor.  When I cut I pasted from above, I got a bunch of invisible junk. So I removed all leading spaces and posted as {code} so it may or may not not have been your Notepad trick. I use BBEdit (Mac only) and it does everything. Most importantly, I can see anything that doesn't belong after a cut 'n' paste from a web site.
|
|
|
|
|
Logged
|
Did you update the paths in ttxcfg.cgi after moving TTX to your new location? To those seeking help.... please report back when you figure it out. 
|
|
|
|