Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freewil/platform_detection
Dynamic layout/view theme selection in CakePHP based on user's platform thanks to browscap.ini
https://github.com/freewil/platform_detection
Last synced: about 1 month ago
JSON representation
Dynamic layout/view theme selection in CakePHP based on user's platform thanks to browscap.ini
- Host: GitHub
- URL: https://github.com/freewil/platform_detection
- Owner: freewil
- Created: 2012-03-11T07:17:11.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-04-18T05:11:41.000Z (almost 13 years ago)
- Last Synced: 2024-10-12T01:15:13.460Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 165 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# platform_detection
Dynamic layout/view [theme](http://book.cakephp.org/1.2/view/488/Themes)
selection in CakePHP based on user's platform thanks to
[browscap.ini](https://browsers.garykeith.com/downloads.asp).## Tested with:
* PHP 5.3.6
* CakePHP 1.2## Setup
Check that your install of PHP5 has the
[browscap config setting](http://php.net/manual/misc.configuration.php#ini.browscap)
pointing to a recent version of
[browscap.ini](https://browsers.garykeith.com/downloads.asp).You can easily submodule the plugin into your existing CakePHP project:
`git submodule add https://github.com/freewil/platform_detection app/plugins/platform_detection`Add the plugin's component and view helper to your AppController:
```php
mobileOverrideLink(); ?>
```
You may also add this to your normal non-themed layout for a
`View Mobile Site`:```php
isMobileOverride()):
echo $platformDetection->mobileOverrideResetLink();
endif; ?>```