https://github.com/loadsys/cakephp-sociallinks
https://github.com/loadsys/cakephp-sociallinks
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/loadsys/cakephp-sociallinks
- Owner: loadsys
- License: mit
- Created: 2013-10-30T18:07:52.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-08T01:34:11.000Z (over 10 years ago)
- Last Synced: 2025-01-09T03:14:46.603Z (about 1 year ago)
- Language: PHP
- Size: 477 KB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CakePHP-SocialLinks
[](https://github.com/loadsys/CakePHP-SocialLinks/releases)
[](LICENSE.md)
[](https://travis-ci.org/loadsys/CakePHP-SocialLinks)
[](https://coveralls.io/r/loadsys/CakePHP-SocialLinks)
[](https://packagist.org/packages/loadsys/cakephp_sociallinks)
Adds fields to a model for saving social links, eg. Blog, Facebook, Twitter, etc.
## Requirements ##
* PHP 5.3+
* CakePHP 2.1+
## Installation
### Composer
````bash
$ composer require loadsys/cakephp_sociallinks:~1.0
````
## Usage ##
* Add SocialLinks to your application by adding this line to your bootstrap.php
````php
CakePlugin::load('SocialLinks');
````
* Add Behavior to the Model, each parameter is the database field name, or `false` to not include that field
````php
public $actsAs = array(
'SocialLinks.SocialLinks' => array(
'blog' => 'blog', //blog field name in the database, or false if you don't have this field
'pinterest' => false, //pinterest field name in the database, or false if you don't have this field
'googleplus' => 'googleplus', //googleplus field name in the database, or false if you don't have this field
'youtube' => 'youtube', //youtube field name in the database, or false if you don't have this field
'linkedin' => 'linkedin', //linkedin field name in the database, or false if you don't have this field
'facebook' => 'facebook', //facebook field name in the database, or false if you don't have this field
'twitter' => 'twitter', //twitter field name in the database, or false if you don't have this field
),
);
````
## Contributing
* Fork the plugin to your Github account
* Checkout the plugin
* Create a new branch with your changes
* Issue a PR back to the master branch with your changes
##License
Copyright (c) 2015 Loadsys Web Strategies