How to implement scene/panorama dependance in template  

Share your tips and tricks here or get help with any Panotour 2.0 problem!
No bug reports (of any kind) in this forum!
no avatar
Lain Iwakura
Member
 
Posts: 15
Joined: Tue Dec 18, 2012 9:36 pm

How to implement scene/panorama dependance in template

by Lain Iwakura » Tue Mar 11, 2014 9:57 am

Hello. Yesterday I upgrade my PTP 1.8 to PTP 2.0.1 and start to learn its new features. It is a very good GUI now, and have alot of new great features, except you must learn django templates for full usage of it. :)
For start I decide to build plugins for all my interfaces that I did in the past. And in many of them I used panorama dependance. For example I did banner in the topright with the title of panorama or use different photos in photo gallery in different panoramas.
Any advice how it may be implemented in template?

User avatar
franzkekko
Member
 
Posts: 74
Joined: Sat Aug 31, 2013 3:50 pm
Location: Vicenza (Italy)

Re: How to implement scene/panorama dependance in template

by franzkekko » Wed Mar 12, 2014 11:11 am

Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.

If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)

Excuse me for eventual grammar mistakes, I'm Italian ;)

no avatar
Lain Iwakura
Member
 
Posts: 15
Joined: Tue Dec 18, 2012 9:36 pm

Re: How to implement scene/panorama dependance in template

by Lain Iwakura » Wed Mar 12, 2014 12:19 pm

franzkekko wrote:Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.


Hello. Thats cool advices, I will use them in the future, but my goal is different.

franzkekko wrote:If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)


Yes. I want this and many other things like that. Something that based on active panorama

franzkekko wrote:Excuse me for eventual grammar mistakes, I'm Italian ;)


No problem. I'm russian, so I'm sure I did alot of mistakes in my posts :)

no avatar
mediavets
Moderator
 
Posts: 14163
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

Re: How to implement scene/panorama dependance in template

by mediavets » Wed Mar 12, 2014 12:32 pm

Lain Iwakura wrote:
franzkekko wrote:Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.


Hello. Thats cool advices, I will use them in the future, but my goal is different.

franzkekko wrote:If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)


Yes. I want this and many other things like that. Something that based on active panorama

franzkekko wrote:Excuse me for eventual grammar mistakes, I'm Italian ;)


No problem. I'm russian, so I'm sure I did alot of mistakes in my posts :)


Plugins are currently tour-wide rather than pano -specific.

Other than the Title plugin, in the sense that the title text is pano-specific.

no avatar
Lain Iwakura
Member
 
Posts: 15
Joined: Tue Dec 18, 2012 9:36 pm

Re: How to implement scene/panorama dependance in template

by Lain Iwakura » Wed Mar 12, 2014 12:38 pm

mediavets wrote:Other than the Title plugin, in the sense that the title text is pano-specific.


Maybe you can use this text for coding purpose? :/
For example if title text contain part of the code, you can insert that part in other code dynamically. :/

User avatar
benji33
Kolor Team
 
Posts: 2777
Joined: Tue Apr 09, 2013 10:59 am
Location: France

Re: How to implement scene/panorama dependance in template

by benji33 » Wed Mar 12, 2014 3:18 pm

I don't understand the request but look after some plugins templates files like description/description.tmpl.
There is some Grantlee/Django string as {% ifequal p.description_title_source.mode "currentpanorama" %} and krpano code like get(scene[get(xml.scene)].name)

Perhaps it can help ?

no avatar
Lain Iwakura
Member
 
Posts: 15
Joined: Tue Dec 18, 2012 9:36 pm

Re: How to implement scene/panorama dependance in template

by Lain Iwakura » Wed Mar 12, 2014 3:33 pm

benji33 wrote:I don't understand the request but look after some plugins templates files like description/description.tmpl.
There is some Grantlee/Django string as {% ifequal p.description_title_source.mode "currentpanorama" %} and krpano code like get(scene[get(xml.scene)].name)

Perhaps it can help ?


Thanks for advice, I will look at that.

And what didn't you understand exactly? You have plugin and you want it to show only in specific panoramas. Or you want your plugin to change on different panoramas. For example you have a banner at topright that have a name of the place you are in. On all panoramas of hall it contains text "Hall" and when you move to kitchen it changes text to "Kitchen".

Sorry for my english, it may contain many mistakes.

User avatar
benji33
Kolor Team
 
Posts: 2777
Joined: Tue Apr 09, 2013 10:59 am
Location: France

Re: How to implement scene/panorama dependance in template

by benji33 » Wed Mar 12, 2014 3:44 pm

Ok for panorama specific panotour doesn't do the work yet.

But for the change on different panorama you can do it with the use of get(scene[get(xml.scene)].name) for instance to get the current scene name or other attributes of the scene or with get(panoramagroup[get(scene[get(xml.scene)].group)].name) for a group of scenes for instance.

no avatar
Lain Iwakura
Member
 
Posts: 15
Joined: Tue Dec 18, 2012 9:36 pm

Re: How to implement scene/panorama dependance in template

by Lain Iwakura » Wed Mar 12, 2014 4:18 pm

benji33 wrote:Ok for panorama specific panotour doesn't do the work yet.

But for the change on different panorama you can do it with the use of get(scene[get(xml.scene)].name) for instance to get the current scene name or other attributes of the scene or with get(panoramagroup[get(scene[get(xml.scene)].group)].name) for a group of scenes for instance.


Thanks. I think that is what I look for. I will try it.


Return to Using Panotour / Panotour Pro

Who is online

Users browsing this forum: viewmaster and 5 guests