×

Notice

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

TOPIC: Can hotspots be a link to a website?

Can hotspots be a link to a website? 13 years 3 months ago #11407

  • steve
  • steve's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
How do I make a Hotspots link to a URL of an external domain?

Can hotspots be a link to a website? 13 years 3 months ago #11408

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Steve,
You can't actually. Right now it is possible to make a link to the hotspots description page, to sobi2 entry or to an article entry.

Can hotspots be a link to a website? 13 years 3 months ago #11419

  • steve
  • steve's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
is there any way for me to go into the code and be able to edit some code to be able to create this effect?

without being able to link to external domains i will be unable to use hotspots on my site...

any suggestions or instructions on how to accomplish this goal would be great. thanks

Can hotspots be a link to a website? 13 years 3 months ago #11422

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
It is possible, but it isn't quite that easy.
If you look at the backend file:
administrator/components/com_hotspots/edit/tmpl/default.php
on line 121 you have this code
<select onchange="EditLinkForm(this)">
						<option value="detail"<?php echo ('detail' == $this->row->autor ? ' selected="selected"' : '') ?>><?php echo JText::_('To hotspots long description (Detailpage)'); ?></option>
						<option value="sobi2"<?php echo ('sobi2' == $this->row->autor ? ' selected="selected"' : '') ?>><?php echo JText::_('To sobi2 entry'); ?></option>
						<option value="article"<?php echo ('article' == $this->row->autor ? ' selected="selected"' : '') ?>><?php echo JText::_('To an article page'); ?></option>
					</select>

He you have to add another option and then edit the EditLinkForm function later in the file (you'll find it at the bottom).

After that you have to edit
components/com_hotspots/utils.php
You'll find this code ar around line 179
 
				if ($autor == "sobi2") {
					$mlink = JROUTE::_("index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=" . $description);
				} elseif ($autor == "article") {
					$mlink = JROUTE::_("index.php?option=com_content&view=article&id=" . $description);
				} else {
					$cats = self::get_front_categories();
					if(isset($cats[$row->catid])) {
						$urlcat = $row->catid . ':' . JFilterOutput::stringURLSafe($cats[$row->catid]['text']);
					}
					$urlid =  $row->id.':'.JFilterOutput::stringURLSafe($row->name);
					$mlink = JRoute::_("index.php?option=com_hotspots&view=hotspot&lcatid=" . $urlcat . "&id=" . $urlid);
				}

you have to add your new option there and this should be actually all.

Actually, did I say that we'll have this feature in the next version??

Can hotspots be a link to a website? 13 years 2 months ago #11588

  • George G
  • George G's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hi Daniel, and congratulations for your great support over this component.

I would suggest something more interesting...

For my site purposes i added lots of fields on the component.
As i saw it wasnt that difficult, and i think that the source code can be easily edited in order to support predefined fields.
I would suggest in a future release to add around 10 pre-defined fields (field 1 field 2...) and also to add a new tab into backend configuration with option to enable/dissable each of them.

Also an option to create payment-charge options (with subscription packages) is cool and can help lots of hotspots users...

Can hotspots be a link to a website? 13 years 2 months ago #11590

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Payment option - yep, I'm working on such a thing already - paypal :)

For the fields - well I want to build something on the EAV schema( en.wikipedia.org/wiki/Entity-attribute-value_model ). This way you could be able to add as many fields you want without having to hack the database.
  • Page:
  • 1
Time to create page: 0.163 seconds