Mobile extension

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Mobile extension

Postby hansfn » Sun Aug 15, 2010 9:14 pm

This is the discussion topic for the Mobile extension.

Visit http://extensions.pivotx.net/entry/34/mobile for download and more info.

Version 0.8 is last version.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Mobile extension

Postby ptr » Tue Dec 25, 2012 6:26 pm

Since version: 0.7.2 it is not possible to test your mobile pages in a normal browser. The extension just shows the standard templates. In previous versions you just typed m.domainname.com and you would see the mobile pages.
Is this a bug or a feature? It's not very handy imho.
ptr
PivotX Team
 
Posts: 78
Joined: Sun Dec 16, 2007 2:53 pm

Re: Mobile extension

Postby hansfn » Wed Dec 26, 2012 10:25 am

If you don't change the user-agent of your browser (which is easily done with an extension if you use FF), you need to force mobile page - visit the site as m.example.org/?mobilecookie=1 This is the same trick that the mobilelink template tag uses.

The reason m.example.org doesn't always display the mobile pages is that some people want to display full/normal pages to tablets.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Mobile extension

Postby ptr » Thu Dec 27, 2012 1:51 pm

Hans, I don't think this is a good thing. There is a feature in the mobile extension that let's you choose what version of the site tablet users see.

It's not a big problem though, I just switch back to version 0.6.
ptr
PivotX Team
 
Posts: 78
Joined: Sun Dec 16, 2007 2:53 pm

Re: Mobile extension

Postby hansfn » Thu Jan 03, 2013 12:12 am

ptr, sorry about the late reply. You are correct that the reasoning behind the change is bad - my memory wasn't correct. What we tried to fix was an issue were people used the mobile extension without having a separate domain (like m.example.org) - see revision 4075.

I agree that you should be able to visit a mobile sub domain (like m.example.org) with a normal browser and see the mobile site.

Could you please test version 0.7.2 again and replace

Code: Select all
    // Only run this hook if we are on a mobile device (or a tablet and we
    // treat it as a mobile).
    $allowTablet = ( isTablet() && !$PIVOTX['config']->get('mobile_treat_tablet_as_mobile') );
    if (!isMobile() || $allowTablet) {
        return;
    }

with

Code: Select all
    // If there isn't a separate mobile subdomain, only run this hook
    // on a mobile device (or a tablet and we treat it as a mobile).
    $canonical_domain = str_replace('http://', '', $PIVOTX['config']->get('canonical_host'));
    if ($PIVOTX['config']->get('mobile_domain') == $canonical_domain) {
        $allowTablet = ( isTablet() && !$PIVOTX['config']->get('mobile_treat_tablet_as_mobile') );
        if (!isMobile() || $allowTablet) {
            return;
        }
    }

in the function mobileHook in the file extensions/mobile/snippet_mobile.php.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Mobile extension

Postby Colp » Thu Jan 03, 2013 10:27 am

Hi Hans,

Happy New Year to you...

I think I was the one who sparked off the revision 4075 and I'm really happy that you changed it. However, for some time I've noticed that the forcing a desktop to run the mobile view with ?mobilecookie=1 or ?mobilecookie=-1 doesn't work. It always displays the full desktop version. I thought I'd previously posted this, but it seems I haven't. Is that a bug?
Colp
 
Posts: 45
Joined: Thu Nov 17, 2011 12:36 am
Location: Middlesbrough, UK

Re: Mobile extension

Postby hansfn » Thu Jan 03, 2013 11:02 am

Colp, the change I suggested above (to ptr) is just about the problem/bug you mention. Please test and report back.

Added: OK, the problem you have is related, but not 100% the same as ptr. The change above is probably not enough for you. I'll post an update later today.

Added: OK, fixing the problem for Colp - viewing the mobile version in a desktop browser without having a separate mobile sub domain, is some work to fix. I just don't have time. Change the user-agent of your browser (using the User Agent Switcher extension if you are a FF user).
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Mobile extension

Postby Colp » Fri Jan 04, 2013 10:57 pm

Ok. Thanks for looking into it.
Colp
 
Posts: 45
Joined: Thu Nov 17, 2011 12:36 am
Location: Middlesbrough, UK

Re: Mobile extension

Postby Harm10 » Sat Aug 24, 2013 4:27 pm

Version 0.8 has been released. Some improvements and the option to use mobile templates in the active weblog folder.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Mobile extension

Postby Colp » Mon Sep 02, 2013 11:28 pm

Thanks for letting me know Harm. I've upgraded and I noticed that it has a new entry for 'archive template' - it was pointing to the wrong file so I've corrected that. I'm sticking with using a separate folder for my mobile template since I've got different images and CSS files, there isn't much point in combining them. I notice that the mobilecookie=-1 from the desktop browser still doesn't force a mobile view, but since Hans said it it wouldn't be fixed that's not a surprise - I have a separate weblog named 'mobile' to do that.

Cheers
Colp
 
Posts: 45
Joined: Thu Nov 17, 2011 12:36 am
Location: Middlesbrough, UK

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 3 guests

cron