[New Plugin] Mobile Detector: HandheldXH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

[New Plugin] Mobile Detector: HandheldXH

Post by bca » Mon Aug 22, 2011 12:49 pm

Hi,

I've just released HandheldXH beta02. It's available from my website. http://www.videopoint.co.uk/download

The purpose is to detect when a user is using a mobile/handheld device and divert them to a your mobile site. It requires jQuery plugin.
It does not detect iPad s because I find most sites show OK on iPads

The current version has to be considered Beta software! Use with caution! Always make a backup as explained in the manual. If you don't know how to make a backup and restore it, do not yet use HandheldXH!

This is my first plugin so any feedback is welcome.

EDIT: found a small error. needed to check JQuery included
Download updated

b
Last edited by bca on Mon Aug 22, 2011 3:33 pm, edited 1 time in total.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [New Plugin] Mobile Detector: HandheldXH

Post by cmb » Mon Aug 22, 2011 1:01 pm

Hello B,

IMO that's a very nice plugin for every website that cares about being visited by handhelds. :D

I can't really test it, because I've got no handheld device, but it works fine on my PC. I really do hope that many owners of handhelds will try it out, so it could leave beta state pretty soon.
bca wrote: This is my first plugin
And hopefully not your last ;)

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [New Plugin] Mobile Detector: HandheldXH

Post by cmb » Mon Aug 29, 2011 10:04 am

Hi B,

I've thought some more about CMSimple websites that should be usable from smartphones. Wouldn't it suffice in many cases, if only a special template would be used for handhelds? So that it is not necessary to set up a separate CMSimple installation for smartphones with mostly the same content. And if some pages have to be adjusted for smartphones, it might be possible to misuse the multi-lang feature of CMSimple (let's say with a language "sp" or "hh").

IMO it would be nice if switching the template instead of relocating to another site would be possible with HandheldXH too. It should suffice, if the following variables will be adjusted in this case:

Code: Select all

$cf['site']['template']
$pth['folder']['template']
$pth['file']['template']
$pth['file']['stylesheet']
$pth['folder']['menubuttons']
$pth['folder']['templateimages']
How they are configured by CMSimple can be seen in cmsimple/cms.php around line 100.

Then the only thing missing will be CMSimple templates that are optimized for handhelds. Any volunteers?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [New Plugin] Mobile Detector: HandheldXH

Post by cmb » Mon Aug 29, 2011 2:14 pm

Hi B,

while debugging an own plugin, I found that a JS error from HandheldXH was reported. It is due to the fact, that jQuery is loaded on my system after HandheldXH, so jQuery is not defined, when it is used from your code, even when I define jQuery4CMSimple's autoload option as 1.

I've seen, that your plugin doesn't explicitly include jQuery as documented in the jQuery4CMSimple manual (2.1 How to use). But it might be necessary to do so, because jQuery4CMSimple's autoload only works reliably for JS in the <body>.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: [New Plugin] Mobile Detector: HandheldXH

Post by bca » Mon Aug 29, 2011 5:49 pm

cmb wrote: I've seen, that your plugin doesn't explicitly include jQuery as documented in the jQuery4CMSimple manual (2.1 How to use). But it might be necessary to do so, because jQuery4CMSimple's autoload only works reliably for JS in the <body>.
Did you download the updated version?

B

(have been thinking about templates :) )

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [New Plugin] Mobile Detector: HandheldXH

Post by cmb » Mon Aug 29, 2011 6:03 pm

Hi B,
bca wrote:Did you download the updated version?
Just downloaded it from the link you've given above, but it doesn't work. But I'm not quite sure if I've got the right version. There's no code to include jQuery in any of the files. The download link says beta02, but the version displayed in the back-end is beta01.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: [New Plugin] Mobile Detector: HandheldXH

Post by bca » Mon Aug 29, 2011 9:31 pm

oops. Seems to be the wrong zip file.
Will update it soon :oops: :oops:

B

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: [New Plugin] Mobile Detector: HandheldXH

Post by bca » Wed Aug 31, 2011 1:30 pm

Replaced faulty zip.
Should be ok now

B

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [New Plugin] Mobile Detector: HandheldXH

Post by cmb » Wed Aug 31, 2011 1:49 pm

Hi B,

just tried to download:
The requested URL /handheldXHbeta2.zip was not found on this server.
bca wrote:Replaced faulty zip.
But the old version seems still be available from http://www.videopoint.co.uk/HandheldXH.zip


Christoph
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: [New Plugin] Mobile Detector: HandheldXH

Post by bca » Wed Aug 31, 2011 4:12 pm

Try again!

Why does winzip always change the extension to uppercase? :x

b

Post Reply