Difference between revisions of "Use my own URL for a virtual tour"

From 3dvista
Jump to navigation Jump to search
Line 5: Line 5:
 
If you want to have a URL of your own domain for the virtual tour you need to create a HTML page with the code below and place it in the URL that you want to use:
 
If you want to have a URL of your own domain for the virtual tour you need to create a HTML page with the code below and place it in the URL that you want to use:
  
(Just fill in with your own URL, Title and Descriptions)
+
(We will use the URL of the example, "https://storage.net-fs.com/hosting/2727323/186/",  that you need to replace with your own URL. Same appies to Titles and Descriptions)
  
  
  <nowiki><!DOCTYPE html>
+
  <!DOCTYPE html>
    <html>   
+
    <html>   
 
+
   
    <head>
+
      <head>
          <title>The Title of the Tour</title>
+
            <title>THE TITLE OF THE TOUR</title>
          <meta property="description" content="PUT THE DESCRIPTION HERE" />
+
            <meta property="description" content="PUT THE DESCRIPTION HERE" />
          <meta itemprop="name" content="PUT THE NAME OF THE TOUR HERE">
+
            <meta itemprop="name" content="PUT THE NAME OF THE TOUR HERE">
          <meta itemprop="description" content="PUT THE DESCRIPTION HERE">
+
            <meta itemprop="description" content="PUT THE DESCRIPTION HERE">
          <meta itemprop="image" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
+
            <meta itemprop="image" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
          <meta name="twitter:card" content="summary_large_image">
+
            <meta name="twitter:card" content="summary_large_image">
          <meta name="twitter:title" content="PUT THE TITLE FOR TWITTER HERE">
+
            <meta name="twitter:title" content="PUT THE TITLE FOR TWITTER HERE">
          <meta name="twitter:description" content="PUT THE DESCRIPTION FOR TWITTER HERE">
+
            <meta name="twitter:description" content="PUT THE DESCRIPTION FOR TWITTER HERE">
          <meta name="twitter:url" content="PUT THE URL OF THIS WEBPAGE HERE">
+
            <meta name="twitter:url" content="PUT THE URL OF THIS WEBPAGE HERE">
          <meta name="twitter:image:src" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
+
            <meta name="twitter:image:src" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
          <meta name="twitter:image:width" content="1200">
+
            <meta name="twitter:image:width" content="1200">
          <meta name="twitter:image:height" content="630">
+
            <meta name="twitter:image:height" content="630">
          <meta property="og:title" content="PUT THE TITLE OF THE TOUR HERE">
+
            <meta property="og:title" content="PUT THE TITLE OF THE TOUR HERE">
          <meta property="og:type" content="website">
+
            <meta property="og:type" content="website">
          <meta property="og:description" content="PUT THE DESCRIPTION HERE">
+
            <meta property="og:description" content="PUT THE DESCRIPTION HERE">
          <meta property="og:url" content="PUT THE URL OF THIS WEBPAGE HERE">
+
            <meta property="og:url" content="PUT THE URL OF THIS WEBPAGE HERE">
          <meta property="fb:app_id" content="817622095004141">
+
            <meta property="fb:app_id" content="817622095004141">
          <meta property="og:image" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
+
            <meta property="og:image" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
          <meta property="og:image:width" content="1200">
+
            <meta property="og:image:width" content="1200">
          <meta property="og:image:height" content="630">
+
            <meta property="og:image:height" content="630">
          <link rel="image_src" href="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
+
            <link rel="image_src" href="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <meta name="viewport" content="user-scalable=no, initial-scale=0.5, width=device-width">
+
            <meta name="viewport" content="user-scalable=no, initial-scale=0.5, width=device-width">
          <style type="text/css">
+
            <style type="text/css">
              html, body { height:100%; margin:0; overflow:hidden; padding:0; width:100%;}
+
                html, body { height:100%; margin:0; overflow:hidden; padding:0; width:100%;}
              iframe { height:100%; position:relative; width:100%; }
+
                iframe { height:100%; position:relative; width:100%; }
          </style>
+
            </style>
      </head>
+
        </head>
      <body>
+
        <body>
          <script type="text/javascript">
+
            <script type="text/javascript">
              var ua = (function() { return navigator.userAgent.toLowerCase(); })();
+
                var ua = (function() { return navigator.userAgent.toLowerCase(); })();
              var inUA = function(value) { return (ua.search(value.toLowerCase()) >= 0); };
+
                var inUA = function(value) { return (ua.search(value.toLowerCase()) >= 0); };
              var mobile = inUA('android') || inUA('ios') || inUA('iphone') || inUA('ipod') || inUA('ipad');
+
                var mobile = inUA('android') || inUA('ios') || inUA('iphone') || inUA('ipod') || inUA('ipad');
              var url = 'https://storage.net-fs.com/hosting/2727323/186/' + window.location.hash;
+
                var url = '<nowiki>https://storage.net-fs.com/hosting/2727323/186/'</nowiki> + window.location.hash;
              function redirect()
+
                function redirect()
              {
+
                {
                  location.href = url;
+
                    location.href = url;
              }
+
                }
              function embed()
+
                function embed()
              {
+
                {
                  var attrs = {
+
                    var attrs = {
                      'width': '100%',
+
                        'width': '100%',
                      'height': '100%',
+
                        'height': '100%',
                      'src': url,
+
                        'src': url,
                      'scrolling': 'auto',
+
                        'scrolling': 'auto',
                      'frameborder': '0',
+
                        'frameborder': '0',
                      'allowfullscreen': '1',
+
                        'allowfullscreen': '1',
                      'allow': 'fullscreen; accelerometer; gyroscope; magnetometer; vr'
+
                        'allow': 'fullscreen; accelerometer; gyroscope; magnetometer; vr'
                  };
+
                    };
                  var iframe = document.createElement('IFRAME');
+
                    var iframe = document.createElement('IFRAME');
                  for (var name in attrs)
+
                    for (var name in attrs)
                      iframe.setAttribute(name, attrs[name]);
+
                        iframe.setAttribute(name, attrs[name]);
                  document.body.appendChild(iframe);
+
                    document.body.appendChild(iframe);
              }
+
                }
              if (mobile)
+
                if (mobile)
              {
+
                {
                  redirect();
+
                    redirect();
              }
+
                }
              else if (navigator.getVRDisplays)
+
                else if (navigator.getVRDisplays)
              {
+
                {
                  navigator.getVRDisplays().then(function(displays)
+
                    navigator.getVRDisplays().then(function(displays)
                  {
+
                    {
                      if (displays.length > 0)
+
                        if (displays.length > 0)
                          redirect();
+
                            redirect();
                      else
+
                        else
                          embed();
+
                            embed();
                  }).catch(function(err)
+
                    }).catch(function(err)
                  {
+
                    {
                      embed();
+
                        embed();
                  });
+
                    });
              }
+
                }
              else
+
                else
              {
+
                {
                  embed();
+
                    embed();
              }
+
                }
          </script>
+
            </script>
      </body>
+
        </body>
  </html>
+
    </html>
  </nowiki>
 

Revision as of 10:36, 13 November 2019

When you are hosting your tour with 3DVista Hosting Service or any other hosting provider, the URL of your tour will have the domain on the provider in it.

For example: https://storage.net-fs.com/hosting/2727323/186/

If you want to have a URL of your own domain for the virtual tour you need to create a HTML page with the code below and place it in the URL that you want to use:

(We will use the URL of the example, "https://storage.net-fs.com/hosting/2727323/186/", that you need to replace with your own URL. Same appies to Titles and Descriptions)


<!DOCTYPE html>
    <html>  
   
     <head>
           <title>THE TITLE OF THE TOUR</title>
           <meta property="description" content="PUT THE DESCRIPTION HERE" />
           
           
           
           <meta name="twitter:card" content="summary_large_image">
           <meta name="twitter:title" content="PUT THE TITLE FOR TWITTER HERE">
           <meta name="twitter:description" content="PUT THE DESCRIPTION FOR TWITTER HERE">
           <meta name="twitter:url" content="PUT THE URL OF THIS WEBPAGE HERE">
           <meta name="twitter:image:src" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
           <meta name="twitter:image:width" content="1200">
           <meta name="twitter:image:height" content="630">
           <meta property="og:title" content="PUT THE TITLE OF THE TOUR HERE">
           <meta property="og:type" content="website">
           <meta property="og:description" content="PUT THE DESCRIPTION HERE">
           <meta property="og:url" content="PUT THE URL OF THIS WEBPAGE HERE">
           <meta property="fb:app_id" content="817622095004141">
           <meta property="og:image" content="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
           <meta property="og:image:width" content="1200">
           <meta property="og:image:height" content="630">
           <link rel="image_src" href="https://storage.net-fs.com/hosting/2727323/186/socialThumbnail.jpg">
           <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
           <meta name="viewport" content="user-scalable=no, initial-scale=0.5, width=device-width">
           <style type="text/css">
               html, body { height:100%; margin:0; overflow:hidden; padding:0; width:100%;}
               iframe { height:100%; position:relative; width:100%; }
           </style>
       </head>
       <body>
           <script type="text/javascript">
               var ua = (function() { return navigator.userAgent.toLowerCase(); })();
               var inUA = function(value) { return (ua.search(value.toLowerCase()) >= 0); };
               var mobile = inUA('android') || inUA('ios') || inUA('iphone') || inUA('ipod') || inUA('ipad');
               var url = 'https://storage.net-fs.com/hosting/2727323/186/' + window.location.hash;
               function redirect()
               {
                   location.href = url;
               }
               function embed()
               {
                   var attrs = {
                       'width': '100%',
                       'height': '100%',
                       'src': url,
                       'scrolling': 'auto',
                       'frameborder': '0',
                       'allowfullscreen': '1',
                       'allow': 'fullscreen; accelerometer; gyroscope; magnetometer; vr'
                   };
                   var iframe = document.createElement('IFRAME');
                   for (var name in attrs)
                       iframe.setAttribute(name, attrs[name]);
                   document.body.appendChild(iframe);
               }
               if (mobile)
               {
                   redirect();
               }
               else if (navigator.getVRDisplays)
               {
                   navigator.getVRDisplays().then(function(displays)
                   {
                       if (displays.length > 0)
                           redirect();
                       else
                           embed();
                   }).catch(function(err)
                   {
                       embed();
                   });
               }
               else
               {
                   embed();
               }
           </script>
       </body>
   </html>