Announcement

#1 2012-08-01 05:07:25

ezeben
Member
2012-07-31
5

mobile site for Ipad

I am having trouble to redirect the ipad to the mobile web.
I am using piwigo 2.4.3  and everything is working ok , but when I enter the site with the Ipad or a tablet
the size I get is the regular website  but i will like it to go directly to the mobile website. can someone tell me how  redirect the Ipad automatically to the piwigo website.

I still want to use the regular piwigo from any computer  but when access from an Ipad i wanted it to go to the mobile site.

Offline

 

#2 2012-08-01 19:15:04

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: mobile site for Ipad

Create a personal plugin (in LocalFiles Editor, 5th tab), and add this code:

Code:

add_event_handler('loading_lang', 'mobile_theme_for_tablet');

function mobile_theme_for_tablet()
{
  if (get_device() == 'tablet')
  {
    pwg_set_session_var('device', 'mobile');
  }
}

Then activate your personal plugin.


P@t

Offline

 

#3 2012-08-02 11:08:20

TheChief
Member
2012-07-21
16

Re: mobile site for Ipad

Thanks, worked for me.

Another question: On my iPhone i switched from mobile theme to standard theme. How can i easily switch back? I mean without deleteing cache or something.

Offline

 

#4 2012-08-02 16:13:31

ezequiel
Guest

Re: mobile site for Ipad

Thanks

 

#5 2012-08-05 11:01:22

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: mobile site for Ipad

TheChief wrote:

Thanks, worked for me.

Another question: On my iPhone i switched from mobile theme to standard theme. How can i easily switch back? I mean without deleteing cache or something.

Which standard theme do you use?
You should have a link to switch in the footer.


P@t

Offline

 

#6 2012-08-05 11:06:51

TheChief
Member
2012-07-21
16

Re: mobile site for Ipad

I use the stripped theme. How should the link look like?

Offline

 

#7 2012-09-09 18:28:25

faqvideo
Member
2012-01-21
114

Re: mobile site for Ipad

I have tried to create a plugin but it did not work for me. My default theme is Stripped. It switches to the Mobile theme by itself when I use iPhone, but stays as Stripped with the iPad.

Offline

 

#8 2012-09-09 18:39:17

faqvideo
Member
2012-01-21
114

Re: mobile site for Ipad

Now, I have also tried to install the Theme Switch plug-in. In my theme configuration I do have only 2 themes activated, the Stripped and the Smart Pocket.

But on the visitors end when I push the "Interface" link I can see only the Stripped. The Smart Pocket won't show.

Offline

 

#9 2012-09-09 20:19:56

flop25
Piwigo Team
2006-07-06
7037

Re: mobile site for Ipad

faqvideo wrote:

I have tried to create a plugin but it did not work for me. My default theme is Stripped. It switches to the Mobile theme by itself when I use iPhone, but stays as Stripped with the iPad.

Did you enable/activate the Personal Plugin ?

faqvideo wrote:

Now, I have also tried to install the Theme Switch plug-in. In my theme configuration I do have only 2 themes activated, the Stripped and the Smart Pocket.

But on the visitors end when I push the "Interface" link I can see only the Stripped. The Smart Pocket won't show.

This is normal


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2012-09-10 02:27:17

faqvideo
Member
2012-01-21
114

Re: mobile site for Ipad

faqvideo wrote:

I have tried to create a plugin but it did not work for me. My default theme is Stripped. It switches to the Mobile theme by itself when I use iPhone, but stays as Stripped with the iPad.
Did you enable/activate the Personal Plugin ?

Yes, I have activated it but to no result. Mystery???

faqvideo wrote:

Now, I have also tried to install the Theme Switch plug-in. In my theme configuration I do have only 2 themes activated, the Stripped and the Smart Pocket.

But on the visitors end when I push the "Interface" link I can see only the Stripped. The Smart Pocket won't show.
This is normal

Why is it normal? One should assume if there are two themes activated on the Admin site, they should show on the visitor side, no?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact