• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: [solved] UDT to write alternative content for smartphones ?
PostPosted: Mon Feb 18, 2013 5:22 pm 
Offline
Forum Members
Forum Members

Joined: Mon Feb 18, 2013 5:01 pm
Posts: 10
Hi there,

First post here. French is my native language. Sorry if any language bloopper.

Most smartphones get

<a href="tel:1 800 555 5555">Call us free!</a>

and dial the number, but I dont want the link to get in the way for non smartphones, since the client cant afford an alternative version for them.

How could I detect smartphones and write

<a href="tel:1 800 555 5555">Call us free!</a>

else

1 800 555 5555

I dream of a simple UDT since it would be used on many pages.


Last edited by VincentRivard on Tue Feb 19, 2013 4:03 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Simple UDT to write alternative content for smartphones
PostPosted: Tue Feb 19, 2013 1:39 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Jul 27, 2008 1:36 am
Posts: 218
Location: USA
Hi,

Do you think this RFC "recommendation" would help?
RFC3966: Usage of Telephone URIs in HTML

_________________
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Simple UDT to write alternative content for smartphones
PostPosted: Tue Feb 19, 2013 1:51 pm 
Offline
Forum Members
Forum Members

Joined: Mon Feb 18, 2013 5:01 pm
Posts: 10
Hi fredp,

Yes it would help a bit, but not for writing an UDT to detect smartphones, which was the question.

Thank you for this information. If i can find a way to do so, the phone number will be properly displayed according to those recommendations.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Simple UDT to write alternative content for smartphones
PostPosted: Tue Feb 19, 2013 3:25 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 2071
You can look at CGExtensions or ToolBox modules, both come with Mobile detection plugins/functions, just read Module Help to find out how and where.

Else you can go with a custom made UDT or Plugin using for example Mobile Detect Class that can be found here http://code.google.com/p/php-mobile-detect/

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
=============================================
Support CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Simple UDT to write alternative content for smartphones
PostPosted: Tue Feb 19, 2013 4:02 pm 
Offline
Forum Members
Forum Members

Joined: Mon Feb 18, 2013 5:01 pm
Posts: 10
Thanks uniqu3,

i have just had a quick look at these ressources and it seems everything i need is there.

Sorry for my 'newbie' question. It's the first time i play with CMSMS, and i like it a lot already.

The client is familiar with it, and introduced (forced) it to me.

Glad he did.

Got this from CGExtensions. It needs to be installed.

\$1:
{cge_is_smartphone assign='mobile'}{if $mobile}<a href="tel:555 5555">555 5555</a>
{else}555 5555{/if}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [solved] UDT to write alternative content for smartphone
PostPosted: Thu Feb 21, 2013 8:01 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 2071
Glad it worked for you ;) and thanks to your client for showing you CMSMS, welcome!

Happy coding.

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
=============================================
Support CMSMS


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting