https://github.com/mcred/cakephp-tinypng-helper
CakePHP TinyPNG Helper
https://github.com/mcred/cakephp-tinypng-helper
Last synced: 11 months ago
JSON representation
CakePHP TinyPNG Helper
- Host: GitHub
- URL: https://github.com/mcred/cakephp-tinypng-helper
- Owner: mcred
- License: mit
- Created: 2014-03-03T22:44:39.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-03T23:09:28.000Z (over 12 years ago)
- Last Synced: 2025-02-02T02:16:24.695Z (over 1 year ago)
- Language: PHP
- Size: 129 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CakePHP-TinyPNG-Helper
======================
A CakePhp Plugin that extends the HTML Image helper to resize and cache PNG files using the TinyPNG.com API.
#Requirements#
*PHP 4,5
*CakePhp 2+
*TinyPNG API key
#Installation#
```
$ cd /your_app_path/Plugin
$ git submodule add git@github.com:mcred/CakePHP-TMDB-API-Plugin.git TinyPng
```
#Configuration#
1. Create an account at https://tinypng.com/developers
2. Obtain your API key
3. Create a copy of tinypng.php to /app/Config/tinypng.php
4. Insert your API Key
5. Edit your /app/Controller/AppController.php
```
class AppController extends Controller {
public $helpers = array(
'Html' => array('className' => 'TinyPng.TinyPng')
);
}
```
#Usage#
This Plugin extends the Image helper, so usage is the same. There are no special calls required.
#Example#
Load the CakePHP Favicon
```
Html->image('cake.icon.png'); ?>
```
#Change History#
CakePHP TMDB v.1 - 2014-03-03
*Initial Committ