Page 1 of 1

Display click dial phone numbers link for mobiles only

Posted: Thu Feb 21, 2013 7:44 pm
by VincentRivard
Hi,

For those who care, here is a simple way to detect smartphones, and give them a cliquable link to dial a number. Non mobile computers will read text without the link.

Dependencies:

You will need CGExtensions intalled.

As simple as that :

Code: Select all

{cge_is_smartphone assign='mobile'}{if $mobile}<a href="tel:888 555 5555">888 555 5555</a> {else}888 555 5555{/if}
No mess at all.

Credits to calguy1000 since his extension does 99.99% of the job
to
fredp

for poiting the proper way to format the link for usability here.

http://tools.ietf.org/html/rfc3966#section-8

and to

uniqu3

for showing me a great spot for fishing my own.

Related post from the newbie at CMSMS i am.

http://forum.cmsmadesimple.org/viewtopi ... 23&t=65301

Re: Display click dial phone numbers link for mobiles only

Posted: Wed Jul 03, 2013 10:25 am
by Rolf
Just what I was looking for, thanks!