×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to remove the "directions" link completely

How to remove the "directions" link completely 11 years 9 months ago #19592

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
Hey Daniel,

I was also wondering how I remove the directions link completely that shows up on the map. I am assuming its somewhere in the code but I didn't know what file I had to edit to remove the directions link that appears on the hotspots.

Thanks,
Shaun

How to remove the "directions" link completely 11 years 9 months ago #19606

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Directions link in the infowindow or what directions link exactly?
Regards,
Daniel

How to remove the "directions" link completely 11 years 9 months ago #19618

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
The directions link in general. Mainly the directions link that appears on the hotspot when you click it. Our hotspots are on in the middle of lakes, so we don't need people to be able to get directions to it since it will register addresses around the lake. So if people click it, they will possibly be sent to peoples addresses lol

Thanks,
Shaun

How to remove the "directions" link completely 11 years 8 months ago #19678

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
The directions link in general. Mainly the directions link that appears on the hotspot when you click it. Our hotspots are on in the middle of lakes, so we don't need people to be able to get directions to it since it will register addresses around the lake. So if people click it, they will possibly be sent to peoples addresses lol

Thanks,
Shaun

How to remove the "directions" link completely 11 years 8 months ago #19688

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Isn't there a setting for the directions in the backend?
I had a look at the js code and I see this:
if (this.options.showDirections.toInt()) {
...
}

So we check if the directions option is on or off.
Regards,
Daniel

How to remove the "directions" link completely 11 years 8 months ago #19771

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
I didn't see any setting to turn the directions off. What file is that directions link located in? I am just going to modify it to be a "report" button that links into Jomsocial's reporting function. So then people can report hotspots if they are not correct or have misleading information in them.

I know the file to edit to get information to display in the box that appears on the actual hotspot when its clicked is: com_hotspots/views/hotspot/tmpl/description_raw.php. So I am guessing that it would be located somewhere around there since this files displays what is directly above that link, I just don't know what file I have to edit to do that. Could you tell me what file that is so I can change the "directions" link to "Report" and have it link into Jomsocial's?

Thank you,
Shaun

How to remove the "directions" link completely 11 years 8 months ago #19776

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
depending on where you want to remove the directions (main map or single view) the code will be located in views/hotspots or views/hotspot
then in both look for default_menu.php -> there you have the code for the directions. Be carefull what you navigate -> eventually you'll have to modify the JS files(if you get js errors...)

Regards,
Daniel

How to remove the "directions" link completely 11 years 8 months ago #19787

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
What we want to remove is located in the main map(we changed the link to the single map. So when the image is clicked, instead of going to a new map, the image they clicked pops up instead.) I edited the views/hotpots/tmpl/default_menu.php file to only display the hotspot search. So the directions link is hidden/removed. Now the only thing I can't seem to find in the code is where the "directions" link on the actual clicked hotspot is located. I looked through all the files between the hotspots and hotspot folders, but I could not seem to find anything that would show a change when I edited it.(I might have just overlooked the code somewhere possibly) I am either going to change the link to the report page or remove/hide it. I can change the setting for that part's css to "display: none;" and it removes it, but The zoom feature on it is a nice feature to display on the actual hotspot. So I was hoping to keep that and just edit the direction link. I just can't seem to find it.

(I attached the screen shot of the link that displays)

Thank you,
Shaun
Attachments:

How to remove the "directions" link completely 11 years 8 months ago #19803

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Well, I had a look at the code again and we do js check for showDirections. So I went in the settings and I looked for a show directions button. After a while I realised that we don't have such an option there. So I went the code to see what I'm doing to set the the showDirections variable and actually it is being set to the value of the menu. If there is no menu, we cannot show the directions...

So go to components/com_hotspots/utils.php around line 106 you should have this:
$settings['showDirections'] = HotspotsHelper::getSettings('hs_show_controllmenu', 1);
to
$settings['showDirections'] = 0;

And then the directions button should not be shown on the page.
Regards,
Daniel

How to remove the "directions" link completely 11 years 8 months ago #19807

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
Thank you, that worked perfectly!

Thanks,
Shaun
  • Page:
  • 1
Time to create page: 0.126 seconds