Help Desk Software & Beyond
May 22, 2012, 12:33:41 AM *
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] 2
  Print  
Author Topic: [REQ] Hide links in header  (Read 3617 times)
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« 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
Administrator
Hero Member
*****

Karma: 22
Posts: 605



View Profile WWW
« 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

Follow me on: LinkedIn
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« 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


View Profile
« 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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #4 on: March 31, 2008, 10:59:08 AM »

In ttx.cgi...

Find this...

Quote
$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...

Quote
$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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #5 on: March 31, 2008, 11:13:19 AM »

URL for link to alternate template should look something like this...

Quote
/ttx.cgi?cmd=newticket&form=CUSTOM_FORM

http://www.troubleticketexpress.com/customer-service-form.html


If you need help getting that properly inserted into the Perl....

Quote
$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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« 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  .....

Quote
    $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


View Profile
« 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  .....

Quote
    $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.

Quote
[%Time Tracker%]     </a>

just remove it...

Quote
[%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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« 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 ....

Quote
http://dev.csg.mts.net/"$ENV{SCRIPT_NAME}?cmd=newticket&form=timetracker&sid=&style="


Those quotes don't seem right
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« 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...

Quote
$query->param('sid')."&style=".$query->param('style').'">[%Reports%]</a> | <a href="'.$ENV{SCRIPT_NAME}.'?cmd=newticket&form=timetracker&sid='.

As code...
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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« 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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #11 on: March 31, 2008, 12:02:47 PM »

LOL .....

Internal Server Error Smiley I love this
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #12 on: March 31, 2008, 12:11:14 PM »

LOL .....

Internal Server Error Smiley I love this

Working perfectly on my test server....

Code:
$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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« 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


View Profile
« 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.   Wink

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?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1] 2
  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.034 seconds with 19 queries.