Page 1 of 1
Phoca Panorama tour names
Posted: 27 Feb 2014, 10:46
by tekfix
It seems that the tour name is hardcoded into the component! It works only if the Item name and folder is exactly "tour". If I use any other name it gives a page not found error and in the source code of that page you can see that the iframe url is always trying to open the "tour" folder. This also means that only one panorama can be shown.
How can this be fixed? I looked into the /components/com_phocapanorama/views/item/view.html.php file and it seems that it is setting the tour name on line 38. My php knowledge is not good enough to figure out how to change it so that it picks up the real panorama name from the component...
This is a very nice component, provided this problem can be solved!
Bamce
Re: Phoca Panorama tour names
Posted: 03 Mar 2014, 00:38
by Jan
Hi, do you use internal iframe or external iframe?
In the code, there is standard variable to get the name from Options?
Code: Select all
// view.html.php
$this->t['file_name'] = htmlspecialchars($this->t['p']->get( 'file_name', 'tour' ));
// default.php
$tourAbs = $this->t['panoramapathabs'] . htmlspecialchars($this->item[0]->folder).'/'.$this->t['file_name'].'.html';
$tourRel = $this->t['panoramapathrel'] . htmlspecialchars($this->item[0]->folder).'/'.$this->t['file_name'].'.html';
echo '<iframe style="width:'.$this->t['panorama_width'].';height:'.$this->t['panorama_height'].';border: 0px" src="'.$tourRel.'"></iframe>';
Jan
Re: Phoca Panorama tour names
Posted: 25 Apr 2014, 09:22
by tekfix
Sorry, almost forgot about this. The code you show above is there. I have tried javascript and iframe (not external). My Joomla version now is 3.2.3. I did not realise that there is a place in the options for the panorama file name. Now I tested it a bit more and the problem is not in that code - it is somwhere else...
The problem is that I can show only one panorama - the one which name is defined in the options. I currently have one category "Panorama tests" and within that I have two items "tour" and "krematoriekapellet". The files are correctly placed in their own subdirectories, and the directories and files are named exactly as defined in the item settings. Both items show up in the category list on the frontpage. If I write 'tour' in the Options ... Panorama File Name the tour item will show the panorama ok, but if I select the krematoriekapellet item I get a 404 - category not found error. If I change the Options ... Panorama File Name to krematorikapellet I can view that item, but then I get the same 404 error when I try to view the tour....
So it seems that only one panorama (the one named in the options) can be shown, not all of the items? Or am I doing something wrong in my settings?
Re: Phoca Panorama tour names
Posted: 26 Apr 2014, 00:04
by Jan
Hi, no, this system was set by users who use the panorama to display the panoramas - they just export every panorama with different name but the export function call all the basic files with the same name, e.g. tour.html, tour.xml, etc. So every panorama has different name but all have the basic files called the same - e.g. "tour" - every panorama should have own folder, so there are no conflicts with the name.
Jan
Re: Phoca Panorama tour names
Posted: 05 May 2014, 08:56
by tekfix
Aaaah, ok - THAT explains! Thanks! Now it works!
I had been exporting the different panoramas using different names (the same name on the panorama as on the folder I put it in). So ALL panoramas should be exported using the SAME name and ONLY the folders should have different names! Wow, I used quite a few hours struggling with that....
PLEASE, change your documentation on Phoca Panorama to read:
"In options set the file name - the name of js, swf and xml file. For example, if your software created: tour.js, tour.swf and tour.xml, you should set "tour" in this option. NOTE! All panorama items should use the same name for the exported files - only the folders should have different names!"
Re: Phoca Panorama tour names
Posted: 11 May 2014, 23:39
by Jan