Name of Virtual Tour

  • I have another problem.
    In the tour xml I added a date attribute that shows the date the panorama was taken. It looks like this:

    Code
    <!-- Bitovnja -->
     <scene name="scene_bitovnja" kind="planina" title="Bitovnja - Lisin" date="8.4.2017." onstart=""  havevrimage="true" thumburl="panos/lisin-jug.tiles/thumb.jpg" lat="43.767086" lng="17.982950" alt="1742" heading="0">
       <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto"/>
       <preview url="panos/lisin-jug.tiles/preview.jpg"/>
       <image>
         <cube url="panos/lisin-jug.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,640,1152,2304"/>
       </image>
     </scene>

    In vtourskin.xml I changed the line of code that displays the Title and added it to also display the Date:

    Code
    if(skin_settings.title,
       if(global.title, 
           calc(layer[skin_title].html, global.title + ' - ' + scene[get(xml.scene)].title + ' - ' + scene[get(xml.scene)].date); , 
           copy(layer[skin_title].html, scene[get(xml.scene)].title + ' - ' + scene[get(xml.scene)].date);
       );

    I don't know this programming language, so I used logic, but due to some mistake, now neither Title nor Date is displayed.

    Can someone help me?

  • Thanks for the reply, but again it doesn't work.

    In the original code it is "copy", so I tried this even simpler change, but I didn't get a result

    Original code:

    Code
    if(skin_settings.title,
                    if(global.title, calc(layer[skin_title].html, global.title + ' - ' + scene[get(xml.scene)].title); , copy(layer[skin_title].html, scene[get(xml.scene)].title ); );
                    delayedcall(0.1, set(layer[skin_title].visible,true) );
                );

    My code:

    Code
    if(skin_settings.title,
                    if(global.title, calc(layer[skin_title].html, global.title + ' - ' + scene[get(xml.scene)].title) + scene[get(xml.scene)].date); , copy(layer[skin_title].html, scene[get(xml.scene)].title ); );
                    delayedcall(0.1, set(layer[skin_title].visible,true) );
                );
  • your code :

    Code
    if(skin_settings.title,
         if(global.title, 
         	 // global.title is set
             calc(layer[skin_title].html, global.title + ' - ' + scene[get(xml.scene)].title) + scene[get(xml.scene)].date); 
         ,   
         	 // global.title is NOT set
             copy(layer[skin_title].html, scene[get(xml.scene)].title ); 
         );
         delayedcall(0.1, set(layer[skin_title].visible,true) );
     );

    the first line (calc) is only executed if a global title is set,

    that is the title you can set with <krpano title="mytour" />

    this is normally not used and as it seems not the case with your tour.


    you need to change the second (copy) line to calc:

    copy(layer[skin_title].html, scene[get(xml.scene)].title );  --> change to -->

    calc(layer[skin_title].html, scene[get(xml.scene)].title + scene[get(xml.scene)].date ); 


    check out the documentation here :

    https://krpano.com/docu/actions/#calc ...

    https://krpano.com/docu/actions/#copy ...

    https://krpano.com/docu/actions/#set ...

    https://krpano.com/docu/actions/#if ...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!