Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philippfrenzel/yii2pinit
Pin It Button for Yii2
https://github.com/philippfrenzel/yii2pinit
Last synced: about 2 months ago
JSON representation
Pin It Button for Yii2
- Host: GitHub
- URL: https://github.com/philippfrenzel/yii2pinit
- Owner: philippfrenzel
- License: gpl-2.0
- Created: 2014-03-04T15:48:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-06T12:02:42.000Z (almost 11 years ago)
- Last Synced: 2024-10-18T00:35:46.638Z (2 months ago)
- Language: PHP
- Size: 176 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
yii2pinit
=========Pin It Button for Yii2
Setup
=====Pls add the image you want to show as overlay to your pictures within the folder
web/img/pinterest.png
Should be interlaced and not to big;)
Sample CKEDITOR
===============```php
$pinterest = <<< SCRIPT
{instanceReady: function() {
this.dataProcessor.htmlFilter.addRules({
elements: {
img: function( el ) {
if ( !el.attributes.alt )
el.attributes.alt = 'pinterest-image';
var fragment = CKEDITOR.htmlParser.fragment.fromHtml( ''+el.getOuterHtml()+'' );
el.replaceWith(fragment);
}
}
});
}}
SCRIPT;
```