Jump to content

Search the Community

Showing results for tags 'mobile detect'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi there, I've been trying to figure out some PHP that will detect mobile, tablet and desktop. I'm so close... the problem is that the 'tablet' part of the code is also reading as a 'mobile' device. Is there a way to make the 'tablet' function ignore the 'mobile' function? P.S. I'm using the standard Mobile_detect.php Here's my code: [ <?php include_once "wa/includes/Mobile_Detect.php"; $detect = new My_Mobile_Detect(); ?> <!-- TABLET START --><?php if($detect->isTablet()) { ?> <div style="float:right;position:relative;margin:35px 25px 40px 0px;font-size:40px">(206) 601-1904</div> <!-- TABLET END --><?php } if($detect->isMobile()) { ?> <a href="tel:(206) 601-1904" style="float:left; position:right; position:relative;top:10px; left:100px; margin-bottom:-25px !important; text-decoration:none;" title="Call (206) 601-1904"><img src="http://www.legend-cars.com/wp-content/uploads/2012/11/phone_icon.png" width="90" height="90" alt="Call (206) 601-1904"></a> <a href="tel:(206) 601-1904" style="text-decoration:none;" title="Call (206) 601-1904"><span style="font-size:40px;float:left; margin:15px 25px 0px 115px;line-height:1em;">Call<br />Us!</span></a> <a href="sms:2066011904" style="float:left; position:right; position:relative;top:10px; margin-bottom:-25px !important; text-decoration:none;" title="Text (206) 601-1904"><img src="http://www.legend-cars.com/wp-content/uploads/2012/11/text_icon.png" width="90" height="90" alt="Phone Icon"></a> <a href="sms:2066011904" style="text-decoration:none;" title="Text (206) 601-1904"><span style="font-size:40px;float:left; margin:15px 0px 0px 20px;line-height:1em;">Text<br />Us!</span></a> <?php }else{ ?> <!-- DESKTOP START --> <div style="float:right;position:relative;margin:35px 25px 40px 0px;font-size:40px">(206) 601-1904</div> <!-- DESKTOP END --><?php } ?> ] Thanks in advance ecarollo
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.