Image URLs being renamed/appended

Everything concerning the Wordpress/Joomla/Drupal plugins
Post Reply
jakenorton
Posts: 51
Joined: Mon Jan 04, 2021 8:20 pm

OK, I solved my first issue, but now have a new and frustrating one:

When I upload my tour, it is now working fine, EXCEPT when rendered the images in all my image popups - which are pulled from my photo site - have the WP base url appended to them. What's very weird though is the index.html and the pano.xml don't have this issue - it's only when the player pulls the data out.

As an example, here's code pulled from a test hotspot in my pano.xml file:

Code: Select all

<hotspot skinid="ht_image" description="to see if it works" title="testing this" url="https://photos.smugmug.com/Galleries/Travel/Asia/Tibet-1/i-w8Qd2MN/0/1dd3a331/X2/03964_s_10af92x5x43753-X2.jpg" target="" id="Point01" tilt="13.22" pan="-354.06"/>
And, when I open the post, the image fails to display. I then go to inspect element, and the url is appended and the new url is:

Code: Select all

https://jakenorton.com/wp-content/uploads/2021/04/31085_JN_02693_Pano/https://photos.smugmug.com/Galleries/Travel/Asia/Tibet-1/i-w8Qd2MN/0/1dd3a331/X2/03964_s_10af92x5x43753-X2.jpg


So, somewhere along the line the player or something is appending the base url to the image urls. Any idea what is going on?

Thanks,

Jake
- Jake

Jake Norton
www.jakenorton.com
jakenorton
Posts: 51
Joined: Mon Jan 04, 2021 8:20 pm

I'm going a bit crazy with this issue, and hoping someone has a suggestion as to what is going on. I have scoured the forums, watched webinars, changed skin variables and actions using $(r)$(hu) and more, and still get the same result over and over: the browser, player, WP, or some evil being (or most likely my mistake) causing the absolute url to the web-based images to be appended to having the WP base url of the project at the beginning.

I put the tour in a PW protected post here: https://jakenorton.com/pano-test-ad-infinitum/ PW is: goingcrazy

Really hope someone has an idea or solution for this, as I'm out of ideas!

Thanks in advance,

Jake
- Jake

Jake Norton
www.jakenorton.com
jakenorton
Posts: 51
Joined: Mon Jan 04, 2021 8:20 pm

Seems I might have found the culprit in the skin.js code:

Code: Select all

		me._ht_image.onclick=function (e) {
			skin._popup_image.ggText=player.getBasePath()+""+me.hotspot.url;
			skin._popup_image.ggSubElement.style.width = '0px';
			skin._popup_image.ggSubElement.style.height = '0px';
			skin._popup_image.ggSubElement.src='';
			skin._popup_image.ggSubElement.src=skin._popup_image.ggText;
			player.setVariableValue('vis_image_popup', true);
			skin._popup_body_text.ggText=me.hotspot.description;
			skin._popup_body_text.ggTextDiv.innerHTML=skin._popup_body_text.ggText;
			if (skin._popup_body_text.ggUpdateText) {
				skin._popup_body_text.ggUpdateText=function() {
					var hs=me.hotspot.description;
					if (hs!=this.ggText) {
						this.ggText=hs;
						this.ggTextDiv.innerHTML=hs;
						if (this.ggUpdatePosition) this.ggUpdatePosition();
Specifically the second line which appears to append the base path to the hotspot url, when I want it to do what it's supposed to do and just grab the absolute url and roll with it.

Hopki, anyone, have an idea on this, please?
- Jake

Jake Norton
www.jakenorton.com
User avatar
Hopki
Gnome
Posts: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

This was solved in support e-mail.
But for anyone following, if you want to open an image that is hosted somewhere else then you need to make some modifications.

The Hotspot type has to be changed to URL.
The SKin ID can remain: ht_image.
Then the URL can be added in the Hotspots Link URL text field.

The Hotspot Template action needs to be modified, the value shows

Code: Select all

$(r)$(hu)
.
This needs to be changed to

Code: Select all

$(hu)?:
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply