Quantcast
Channel: Recent Discussions on osTicket Forums
Viewing all articles
Browse latest Browse all 7550

Add external link outside to the main menu in class.nav.php

$
0
0

My apologies if anyone has done this, as I've searched for weeks trying to find the answer.

On the landing page on the Main Menu, there is Support Center Home.... Open A New Ticket... Check Ticket Status.

1 of our biggest bugs is having the support center open up into a new tab or window, and we wanted to keep everything together so customers can click away using the same window.

in class.nav.php

The default menu for example is.... $navs['new']=array('desc'=>__('Open a New Ticket'),'href'=>'open.php','title'=>'');

So after searching and looking into things we discovered that it will never accept http://yoursite.com, or any other type of link you want customers to go to, unless you want to put a link in the landing page only. Which by doing that, wont carry to the other php pages.

So here's what we've done to add another external outside link for customers to come back to our main site once there done.

1) go to class.nav.php and  copy / paste  $navs['new']=array('desc'=>__('Open a New Ticket'),'href'=>'open.php','title'=>''); and put in the order of your choice where you want it to be in the main menu...

then change to  $navs['main-site']=array('desc'=>__('Back to Main Site'),'href'=>'main-site.php','title'=>''); or anything else you'd like, and save the file.

2) we need to create a php page and redirect to the site of your choice by placing a redirect script in the page.

3) Open note pad and place this code in note pad, and save it as main-site.php which is the same name as the last bit of the link

4) change the location URL to whatever you want for your customer to go to.

<?php
/* Redirect browser */
header("Location: http://yoursite.com/");
 
/* Make sure that code below does not get executed when we redirect. */
exit;
?> 

4) upload the file to the main directory where index.php is. example. subdomain.com/support/index.php  


That's it, You'll now be able to have customers go to any place you'd like without opening tabs and 15 different windows ect.


Viewing all articles
Browse latest Browse all 7550

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>