load different menue for mobile version   [SOLVED] - View the solution

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
mattkay11
Member
 
Topic author
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 21, 2015 9:10 pm
Info

load different menue for mobile version

by mattkay11 » Fri Jan 23, 2015 3:43 am

Hello everybody,

Is there the possiblity, that I can load a different menue when the tour is looked up with a mobile phone? (and another version of the menue when the tour is looked up with an Ipad)

I am using the Panorama Menue for my desktop tour, but for the mobile phone the menue is too big. It takes half of the screen of the phone. So I would like to have only one combo box with all the Panoramas in it to choose, when the tour is looked up with a phone.

OR - if that is not possible - is it possible to hide the menue with a button? The toggle button for example offers all kind of actions. It also offers "hide hotspots" but there is no option that says "hide menue"

Can it be done anyway? And if so - how?
Thank you very much!
mattk

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: load different menue for mobile version

by bdd » Fri Jan 23, 2015 9:33 am

It can be easily done with some little modifications in the generated code.

1 / Build a tour for destop

2 / In the same project, do you modifications for mobile, and build the tour in a separate directory

3 / copy the "graphics" subdirectory of this second tour in the first tour

4 / rename the index_skin.xml file of this second tour in index_skin_mobile.xml and copy it in the first tour directory

5 / Open the index.xml file of the first directory

6 /Find the include of the index_skin.xml file. It looks like this :

Code: Select all
  <!-- Plugins and Spot Styles -->
  <include url="%FIRSTXML%/index_skin.xml"/>


Change this line like this :

Code: Select all
  <!-- Plugins and Spot Styles -->
  <include url="%FIRSTXML%/index_skin.xml" devices="desktop"/>
  <include url="%FIRSTXML%/index_skin_mobile.xml" devices="mobile|tablet"/>


Gérald

Jeremiahscott likes this post.

User avatar
Virtuel Rundtur
Member
 
Posts: 88
Likes: 0 post
Liked in: 1 post
Joined: Fri Jul 08, 2011 11:47 am
Location: Denmark
Info

Re: load different menue for mobile version

by Virtuel Rundtur » Fri Jan 23, 2015 10:06 am

It can be done even more user friendly :-)

I have created two versions of the original panoramaMenu plugin.

One for mobile and one for Tablet and desktop.

Just install the attached plugins in your user directory and restart Panotour.

It is now possible to create a menu that only shows up on a mobile and another that only shows up on tablets and desktops.

No need to edit XML files after building the tour and save two different versions ;-)

Best regards

Henrik
Attachments
2ver_panoramaMenu.zip
(26.51 KiB) Downloaded 140 times

User avatar
Virtuel Rundtur
Member
 
Posts: 88
Likes: 0 post
Liked in: 1 post
Joined: Fri Jul 08, 2011 11:47 am
Location: Denmark
Info

Re: load different menue for mobile version

by Virtuel Rundtur » Fri Jan 23, 2015 10:19 am

Btw. the same can be done to the controlbar plugin, if you need bigger buttons for mobile...

no avatar
mattkay11
Member
 
Topic author
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 21, 2015 9:10 pm
Info

Re: load different menue for mobile version

by mattkay11 » Mon Jan 26, 2015 6:21 am

ahhh no :( it seems it took me too long to reply, I got logged out and well.. here we go again...

Thank you very much for your replies!
I downloaded the plugins and installed them. But it did not help me a lot because my tour is so big, it has so many panoramas, that even when I show a smaller version of the Panorama Menu it will not fit on a mobile phone.

What I need for the mobile phone is the combobox version of a menu. It is a dropdown menu where all groups and panos are combined in one. For a better understanding please have a look at the 2 screenshots I attached.

With the plugin you put online to download (thank you for your great work), I can only modify the Panorama menu.
It would be great, if I could also choose between different types of menues I want to show (like combo box, drop down, pano menu...).

Is this possible?

Thank you very much!
Attachments
screenshot2.jpg
screenshot_01.jpg

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: load different menue for mobile version

by bdd » Mon Jan 26, 2015 11:01 am

Then you can use the Panorama Menu from Virtuel Rundtur, and a classic combobox.

And when the tour is built, apply the same modification as the one he did in his plugins.

Find the following "events" XML node

Code: Select all
<events name="combopanolistallpanoramasStartTourEvents" onTourStart="set(layer[combopanolistallpanoramas].isStarted, true);if(layer[combopanolistallpanoramas].isLoaded,combopanolistallpanoramasShow(););" keep="true" />


And modify it like this :

Code: Select all
<events name="combopanolistallpanoramasStartTourEvents" onTourStart="set(layer[combopanolistallpanoramas].isStarted, true);if(layer[combopanolistallpanoramas].isLoaded,combopanolistallpanoramasShow(););" keep="true" devices="tablet|mobile"/>


Gérald

User avatar
Virtuel Rundtur
Member
 
Posts: 88
Likes: 0 post
Liked in: 1 post
Joined: Fri Jul 08, 2011 11:47 am
Location: Denmark
Info

Re: load different menue for mobile version  [SOLVED]

by Virtuel Rundtur » Mon Jan 26, 2015 11:02 am

That can easily be done.

I have also made a "Mobile only" version of the Combox plugin.

It is quite simple to make your own versions of the plugins.

Just add:
Code: Select all
devices="desktop|tablet"
or
Code: Select all
devices="mobile"
in the events tag on the tmpl file of the plugin. Don't forget to update the plugname of your new plugin

If you need to have two versions of a plugin in the tour (One for mobile and one for desktop) you also need to rename the plugin name in the xml file, since plugins can't have the same name twice.

I have added to new categories in my style tab. One called: "For mobile only" and another "For desktop only" In that way it is easy to build a single tour that looks good on both smartphones, tablet and desktops.

Enjoy!

// Henrik

User avatar
Virtuel Rundtur
Member
 
Posts: 88
Likes: 0 post
Liked in: 1 post
Joined: Fri Jul 08, 2011 11:47 am
Location: Denmark
Info

Re: load different menue for mobile version

by Virtuel Rundtur » Mon Jan 26, 2015 11:24 am

Ooopss

I forgot to attach the plugin...

Here we go

// Henrik
Attachments
MOBILEpanoramaCombobox.zip
(6.36 KiB) Downloaded 113 times

no avatar
mattkay11
Member
 
Topic author
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 21, 2015 9:10 pm
Info

Re: load different menue for mobile version

by mattkay11 » Mon Jan 26, 2015 2:48 pm

Henrik you are awesome!
Thank you very much! It works just fine.
I just had to change the code in the plugin a little as it does not work like you put it online.

Your Code says:
Code: Select all
<plugin id="mobilepanoramacombobox" category="tr:For mobile only" name="tr:Mobile Panorama Combobox" version="1.3" isGraphical="true" multipleInstance="true" description="tr:Drop down list containing the panoramas">
  <parameters>


But it should be
Code: Select all
<plugin id="mobilepanoramacombobox" category="tr:Menu" name="tr:Mobile Panorama Combobox" version="1.3" isGraphical="true" multipleInstance="true" description="tr:Drop down list containing the panoramas">
  <parameters>


So "Menu" instead of "For mobile only"

all the best!
mattk

User avatar
Virtuel Rundtur
Member
 
Posts: 88
Likes: 0 post
Liked in: 1 post
Joined: Fri Jul 08, 2011 11:47 am
Location: Denmark
Info

Re: load different menue for mobile version

by Virtuel Rundtur » Mon Jan 26, 2015 2:56 pm

You are welcome :-)

The reason for the "For mobile only" category, is that I like to group the "Mobile only" plugins on my plugins list in the style view.
styletab.png

no avatar
mattkay11
Member
 
Topic author
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 21, 2015 9:10 pm
Info

Re: load different menue for mobile version

by mattkay11 » Mon Jan 26, 2015 3:01 pm

I see, nice one :) I just sent you an Email, hope it is also useful to you.
br
mattk

no avatar
ptira
New member
 
Posts: 2
Likes: 0 post
Liked in: 0 post
Joined: Thu May 21, 2015 1:47 pm
Info

Re: load different menue for mobile version

by ptira » Thu May 21, 2015 5:20 pm

Hello,
the tricks offered by Virtuel Rundtur for Panorama Menu works fine but does not go for Simple Button / Toggle Button plugin.

I need to have two versions of a plugin in the tour (one for the mobile and one for desktop) but not work.

What to do?

User avatar
Annis
Kolor Team
 
Posts: 6062
Likes: 801 posts
Liked in: 444 posts
Joined: Mon Aug 12, 2013 12:47 pm
Location: France
Info

Re: load different menue for mobile version

by Annis » Fri May 22, 2015 10:59 am

ptira wrote:Hello,
the tricks offered by Virtuel Rundtur for Panorama Menu works fine but does not go for Simple Button / Toggle Button plugin.

I need to have two versions of a plugin in the tour (one for the mobile and one for desktop) but not work.

What to do?


When modifying the plugin, make sure that you rename the "plugname" to something different, for example add "mobile" to the name. It's the plugin's ID in the built tour so if you have one normal button and one modified but they both have the same ID they will cancel each other out and only the last one in the xml will be used.

CUsersAnnis-DocumentsKolorPanotourPro 2pluginsmobilebuttonbutton.tmpl - Notepad++.png


The same modification should be done to the mobile only combobox listed higher up.


Annis

no avatar
ptira
New member
 
Posts: 2
Likes: 0 post
Liked in: 0 post
Joined: Thu May 21, 2015 1:47 pm
Info

Re: load different menue for mobile version

by ptira » Sat May 23, 2015 3:36 am

Yes !!

After rename the "plugname" It works very well ...

Thank you very much Annis for the clarification and the response speed.

no avatar
FunkyPunky
Member
 
Posts: 227
Likes: 10 posts
Liked in: 4 posts
Joined: Sat Jan 25, 2014 11:50 pm
Info

Re: load different menue for mobile version

by FunkyPunky » Sun Jun 07, 2015 9:56 am

Hi,

i just try Géralds tip:

bdd wrote:It can be easily done with some little modifications in the generated code.

1 / Build a tour for destop

2 / In the same project, do you modifications for mobile, and build the tour in a separate directory

3 / copy the "graphics" subdirectory of this second tour in the first tour

4 / rename the index_skin.xml file of this second tour in index_skin_mobile.xml and copy it in the first tour directory

5 / Open the index.xml file of the first directory

6 /Find the include of the index_skin.xml file. It looks like this :

Code: Select all
  <!-- Plugins and Spot Styles -->
  <include url="%FIRSTXML%/index_skin.xml"/>


Change this line like this :

Code: Select all
  <!-- Plugins and Spot Styles -->
  <include url="%FIRSTXML%/index_skin.xml" devices="desktop"/>
  <include url="%FIRSTXML%/index_skin_mobile.xml" devices="mobile|tablet"/>


Gérald


My question regarding point 3 is: Have i to overwrite the graphics folder in the first tour output or have i to rename the new graphics folder in graphics_mobile?

Thanks!

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: load different menue for mobile version

by benji33 » Tue Jun 09, 2015 2:19 pm

Overwrite.
Always keep a backup of your first work and kpt version to be able to recover your tour in the last good step.
Benjamin

no avatar
FunkyPunky
Member
 
Posts: 227
Likes: 10 posts
Liked in: 4 posts
Joined: Sat Jan 25, 2014 11:50 pm
Info

Re: load different menue for mobile version

by FunkyPunky » Tue Jun 09, 2015 7:24 pm

Thanks, Benjamin!


Who is online

Users browsing this forum: No registered users and 4 guests

cron