How to open Gallery Plugin from Bootstrap Control Bar   [SOLVED] - View the solution

This sub-forum is for discussing and reporting bugs on any content that is not available by default in Panotour, so this concerns custom HTML templates, extra plugins (both Kolor-provided and third-party), etc...

Ce sous-forum a été créé pour discuter et/ou rapporter des bugs sur tout contenu qui n'est pas disponible par défaut dans Panotour, donc cela concerne les templates HTML customisés, plugins supplémentaires, etc...
no avatar
Pak
New member
 
Topic author
Posts: 2
Likes: 0 post
Liked in: 0 post
Joined: Mon Feb 19, 2018 5:39 pm
Info

How to open Gallery Plugin from Bootstrap Control Bar

by Pak » Mon Feb 19, 2018 6:54 pm

Hi everybody,
I successfully added in the Control Bar of "Bootstrap Full Page with Project Colors" template another button that i'd like to use to call my Gallery Plugin (named "mygallery"). I don't want to use an image because with responsive design the only way to have everything in order is a button part of the control bar so I added the new button by copying the html code from others buttons and, after changing the span class in "glyphicon-camera", I'll find an excellent way to show in my Tour a Control Bar with a nice Camera button too :)

That's the code I copied and added in the button list:
<button type="button"
class="btn btn-default btn-lg"
onClick=....
data-toggle="tooltip"
data-placement="top"
title="Show Gallery">
<span class="glyphicon glyphicon-camera"></span></button>

The problem, as you can see, is to find the right function (onClick=....) to call "mygallery".
I tried to use many strings I found in the other buttons and in your forum as
onClick="getTourPlayer().call(mygallery))"...
onClick="getTourPlayer().callToAction(mygallery))" ...
onClick="getTourPlayer().call('showmygallery()')" ... or
onClick="getTourPlayer().call('mainloadscene(mygallery)')"
but none of these works :(

Maybe the code need also more lines of information in order to open "mygallery" but unfortunately I have no experience of scripts so I hope you can help me because I'm sure this easy solution could be very useful for everybody.
Thank you!

User avatar
bdd
Kolor Team
 
Posts: 2671
Likes: 13 posts
Liked in: 118 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: How to open Gallery Plugin from Bootstrap Control Bar  [SOLVED]

by bdd » Tue Feb 20, 2018 10:12 am

The name of the action to call depends on the ID of your Gallery plugin.

Open the file "mytour_skin.xml", find your Gallery plugin description. It begins with a comment like this one :

Code: Select all
<!-- ********** -->
<!-- Gallery -->
<!-- id : yourgalleryID -->
<!-- ********** -->


Then go down in the XML file, until you see an action named like this : showGallery_yourgalleryID .

By default, if you have only one gallery, and if you did not rename the plugin, the action will be : showGallery_gallery

So the right call is :
Code: Select all
onClick="getTourPlayer().call('showGallery_yourgalleryID()')"


By default it may be :
Code: Select all
onClick="getTourPlayer().call('showGallery_gallery()')"


Gérald

no avatar
Pak
New member
 
Topic author
Posts: 2
Likes: 0 post
Liked in: 0 post
Joined: Mon Feb 19, 2018 5:39 pm
Info

Re: How to open Gallery Plugin from Bootstrap Control Bar

by Pak » Tue Feb 20, 2018 1:00 pm

That works !!!!! =D =D =D =D
Thank you very much Gérald :)


Who is online

Users browsing this forum: No registered users and 1 guest