GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rob-bar/special_agent: A FuelPHP package which wraps php-mobile-detect for better mobile device detection.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
classes
classes
 
 
vendor
vendor
 
 
.gitmodules
.gitmodules
 
 
README.md
README.md
 
 
bootstrap.php
bootstrap.php
 
 

Repository files navigation

Special Agent

Special Agent is a FuelPHP package which uses php-mobile-detect to determine whether a device is mobile or not - this is largely to negate the use of Browscap, which has proven to be entirely unreliable as of late.

What it does

This package does three things.

  • Firstly, it overwrites the default Agent::is_mobiledevice() method to use php-mobile-detect.
  • Secondly, it overrides the is_mobiledevice method:
    • Agent::is_mobile() - merely shorthand for Agent::is_mobiledevice()
  • Thirdly, added all the remaining methods from the class
    • Agent::is_tablet()
    • Agent::is_mobiledevice()
    • Agent::is_mobile()
    • Agent::is_tablet()
    • Agent::is_ios()
    • Agent::is_android_os()
    • Agent::is($value)
    • Agent::component_version($value)

Usage

Clone it into fuel/packages:

git clone --recursive git://github.com/rob-bar/special_agent fuel/packages/special_agent

After doing that, ensure you're always loading it in your config.php file, like so:

'always_load' => array(
	'packages' => array(
		'special_agent'
	)
)

And you're done. Easy as cheese.

About

A FuelPHP package which wraps php-mobile-detect for better mobile device detection.

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.