https://github.com/remithomas/rt-gravatar
ZF2 helper extends Zend\View\Helper\Gravatar
https://github.com/remithomas/rt-gravatar
Last synced: about 1 year ago
JSON representation
ZF2 helper extends Zend\View\Helper\Gravatar
- Host: GitHub
- URL: https://github.com/remithomas/rt-gravatar
- Owner: remithomas
- Created: 2013-03-29T12:27:43.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-04-24T14:31:51.000Z (about 12 years ago)
- Last Synced: 2025-01-30T11:11:17.527Z (over 1 year ago)
- Language: PHP
- Size: 160 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
rt-gravatar
============
ZF2 helper extends Zend\View\Helper\Gravatar
Features / Goals
============
* Get the gravatar from an email address
* Get Gravatar from the current logged user
* Available edition link for the current logged user
* Indicate if the current logged user or the email address has a Gravatar
* Multilinguage EN / FR / ES / IT / RO
How to install ?
============
### Using composer.json
```json
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"minimum-stability": "dev",
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "dev-master",
"remithomas/rt-gravatar": "dev-master"
}
}
```
### Activate the module :
application.config.php
```php
array(
'Application',
'RtGravatar',
)
);
?>
```
### Only activated in one module
If you need to use this plugin **only in one module**. Just copy this code and add it into your own module config (module.config.php)
```php
array(
'invokables' => array(
'RtGravatar' => 'RtGravatar\View\Helper\RtGravatar',
'RtHasGravatar' => 'RtGravatar\View\Helper\RtHasGravatar'
)
),
...
```
### Activated for all the application
If you need to use this plugin **in all your application**. Just copy the file [rt-gravatar.global.php.dist](https://github.com/remithomas/rt-gravatar/blob/master/config/rt-gravatar.global.php.dist) (/vendor/remithomas/rt-gravatar/config/) and paste it into the folder **/config/autoload/**
How to use ?
============
### Standart use
```php
150);
$attribs = array();
echo $this->RtGravatar("me@example.com",$options,$attribs,true);
?>
```
### User has a gravatar ?
```php
RtHasGravatar("me@example.com");
?>
```
### User (connected or me) has a gravatar ?
```php
RtHasGravatar("me");
// or
var_dump ($this->RtHasGravatar();
?>
```
### User can go to the edition
```php
150);
$attribs = array();
echo $this->RtGravatar("me",$options,$attribs,true);
?>
```