How to upload krpano viewer to WordPress site and embed in html page

  • First time deploying a krpano virtual tour to my Wordpress web site and need some help since the documentation was not clear.

    I used PTgui and the krpano MAKE VTOUR (MULTIRES) droplet.bat. The Virtual Tour views great when viewing it locally using Internet Explorer and the tour.html file.

    I have uploaded all the Virtual Tour Files to my Wordpress site in public_html/wp-content/uploads/panoramas/my_pano.

    (1) Where do I upload the embedpano.js file? What is the recommended location?

    (2) Do I also have to upload the other files in the krpano Viewer folder (e.g., krpano.html, krpano.js, krpano.swf, and krpano.xml) since I already have a tour.html, tour.js, tour.swf, and tour.xml in my virtual tour folder?

    (3) In this shortcode example below:

    (a) Do I use krpano.swf or my tour.swf?
    (b) Why am I not using my tour.html in the shortcode instead of the .swf file?
    (c) Is the pano.xml replaced by my tour.xml?
    (d) Can I assume that the target: "pano" should be entered "as is" and references the div id="pano"?

    <script src="embedpano.js"></script>

    <div id="pano" style="width:600px; height:400px;"></div>

    <script>
    embedpano({swf:"krpano.swf", xml:"pano.xml", target:"pano"});
    </script>

    A section of real-code which matches my situation would be helpful.

    Thanks.

  • Hi tmhok,

    I have already successfully used panopress to deploy the pano, but I am trying to understand how to do it without panopress and that is why I am asking these questions.

    I did notice with panopress that I can not control the pano rotation speed by editing the tour.xml file. Changing the rotation speed does not seem to have any effect.

  • Part of my confusion is that I have a set of krpano output files and a set of viewer files from the krpano distribution and it is not clear which files to deploy from these two sets and where they should be located on my Wordpress web site. I have attached a screenshot of the top level of each of these two sets of files. I would specifically like to know which of the viewer files (e.g., krpano.XX, embedpano.js) from the krpano distribution I need.

    I have also attached a screen shot of my current web site deployment.

    Thanks.

  • the only files you need to upload are those in the vtour output folder, assuming you are using the make vtour droplet

    panopress does not affect xml file or other krpano settings at all, any changes you make (rotation speed, etc) would still work properly when embedded w panopress

    proper working path for your uploaded pano in your screenshots would be something like this

    Code
    http://www.MY-SITE.com/wp-content/uplaods/panoramas/The%20Cathedral%20Basilica%20Church/Virtual%20Tour%2048MP/tour.htm

    and with panopress you would use shortcode like this -

    Code
    [pano file="http://www.MY-SITE.com/wp-content/uplaods/panoramas/The%20Cathedral%20Basilica%20Church/Virtual%20Tour%2048MP/tour.htm"]

    note that all of the spaces " " in your url path must be converted to "%20", you would be better off using directory names like "the-cathedral-basilica-church" with dashes instead of spaces to avoid this confusion

    "my-pano-tour-folder-name" = good directory name using dashes instead of spaces, no characters will be converted
    "My Pano Tour Folder Name" = bad directory name, spaces must be converted to %20 in URL format
    "My%20Pano%20Tour%20Folder%20Name" = above example w spaces converted to URL format

    sam

  • Hi Sam,
    Thanks for your reply and comments on panopress and use of spaces in path names.

    What about the embedpano.js script that I saw in the krpano shortcode example. Don' I need to deploy that to my web site?

    I was successful with panopress yesterday but the rotation speed was too fast and I could not affect any changes by adjusting the autorotation parameters in my tour.xml file which I did upload back to the web site after each change. I tried changing the speed from 0 to 30 in increments with no effect.

    I am also trying to learn how to do the shortcode per krpano documentation examples without the use of panopress. Any help there would also be appreciated.

  • you only need the krpanotools droplet output folder contents, nothing else, the emebdpano.js is already included in the tour.htm file

    krpano does not use any shortcodes on its own, but if you are referring to the krpano embed code instructions in your first post, DO NOT use that code with wordpress, it will not work as expected, that code is for if you were building a static page or otherwise integrating your own code into a custom dynamic template etc

    panopress does not affect krpano xml or any other embedded files in any way, most likely your errors with rotate speed etc were due to local browser caching, always clear your cache etc when testing xml updates

    if you want to easily embed a pano in wordpress etc without panopress, just use an iframe like this

    Code
    <iframe width="100%" height="500" src="http://www.WEBSITE.com/path/pano.htm" allowfullscreen></iframe>

    first, verify that your pano path url is correct and works on its own when opened in a browser before embedding (if it does not work on its own it will not work in an embed), then paste the entire iframe line into a post (use wp text editor mode, NOT fancy editor mode) and save your post

    sam

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!