Page 1 of 1

Directory Outside of phocapanorama?

Posted: 08 Jan 2019, 22:12
by linkage
Hi Phoca,

Is it possible to use a relative directory to another folder outside of phocapanorama? I currently have all of my krpano tours in a sub-folder on my site (with important URL's) and I would prefer not to have to duplicate into phocapanorama.

I have only just installed and haven't tested anything but I am grateful to you for developing this component and module. Great idea!

Thank you,
John

Re: Directory Outside of phocapanorama?

Posted: 09 Jan 2019, 14:51
by Jan
Hi, there is no option for this but it can be changed in code:

components\com_phocapanorama\views\item\view.html.php

line cca. 40

Code: Select all

$this->t['panoramapathrel']			= 'phocapanorama/';
$this->t['panoramapathabs']			= JPATH_ROOT .'/phocapanorama/';
components\com_phocapanorama\views\category\view.html.php
line cca. 36

Code: Select all

$this->t['panoramapathrel']	= JURI::base().'phocapanorama/';
$this->t['panoramapathabs']	= JPATH_ROOT .'/phocapanorama/';
First is relative path which is used on website to link the panorama file, second is absolute path on server to test if the files are there.

In Category view - this are thumbnails of the panormas, in item view these are the panorama files.

Jan

Re: Directory Outside of phocapanorama?

Posted: 15 Jan 2019, 02:25
by linkage
Hey Jan, thank you very much, that works great! I guess that can't be done as an override can it? If you update the extension, I may not remember to go back and change this :)

Sorry, I thought I had set this up to get notified of a response but so far didn't. I just logged in and had a look today and saw your reply.
Thank again! Great extension! I'll write a JED review now :)

Re: Directory Outside of phocapanorama?

Posted: 15 Jan 2019, 05:37
by linkage
Sorry Jan, I am having a further issue. The first time I call the module it is working here:

https://www.2018-testing.linkagephoto.com/virtual-tours

...through article with {module Phoca Panorama Panorama}

For the second one, I created a new item in component and edited the name of the panorama folder (sample2), same category as first. Next, I copied the "Phoca Panorama Panorama" module and saved with new name "Phoca Panorama Sample 2" and edited the option for "Select Panorama" to the new item created in the component. Then, added {module Phoca Panorama Sample 2} in article but nothing is displaying:

https://www.2018-testing.linkagephoto.c ... -example-2

..I tested that one with the module changed back to the first example, and it did display so the calling of the module from the article is working but for some reason it isn't seeing the other folder, in this case "/sample2" which is inside the root folder "tours" that I edited to in the .php files.

BTW
This is a dev environment with Joomla 3.9.1

PHP 7.2.13

Thank you,

John

Re: Directory Outside of phocapanorama?

Posted: 17 Jan 2019, 00:56
by linkage
Sorry, I was mistaken. The edited php files aren't working. I have the tours in a folder called, 'tours' which is in the root of my site (same as phocapanorama)

This is what I have:
components\com_phocapanorama\views\item\view.html.php
Line 40

Code: Select all

$this->t['panoramapathrel']	= 'tours/';
$this->t['panoramapathabs']	= JPATH_ROOT .'/tours/';
...and
components\com_phocapanorama\views\category\view.html.php
Line 36

Code: Select all

$this->t['panoramapathrel']	= JURI::base().'tours/';
$this->t['panoramapathabs']	= JPATH_ROOT .'/tours/';
...source code shows that phocapanorama folder is still being referenced:
https://www.2018-testing.linkagephoto.com/virtual-tours

What else might it be?

Re: Directory Outside of phocapanorama?

Posted: 19 Jan 2019, 01:37
by Jan
Hi, see email.

Jan

Re: Directory Outside of phocapanorama?

Posted: 19 Jan 2019, 18:18
by linkage
So, the solution here of course is to edit the module as well as the component. In my case, I'm calling the tours via the module in an article.

modules/mod-phocapanorama/mod_phocapanorama.php

Line 45-46:

Code: Select all

$p['panoramapathrel']	= 'phocapanorama/';
$p['panoramapathabs']	= JPATH_ROOT .'/phocapanorama/';
...I changed to:

Code: Select all

$p['panoramapathrel']	= 'tours/';
$p['panoramapathabs']	= JPATH_ROOT .'/tours/';
Thank you Jan for all your assistance :)

Please mark this thread as Solved :)

Re: Directory Outside of phocapanorama?

Posted: 19 Jan 2019, 18:41
by Jan
Hi, thank you for updating this post.

Jan