Add fields to a model for storing Social Links, eg. Blog, Facebook, Twitter, etc.
##Background##
Currently has a behavior to add the fields along with validation to the model
- PHP 5.3+
- CakePHP 2.1+
##Installation##
[Manual]
- Download this: http://github.com/loadsys/CakePHP-SocialLinks/zipball/master
- Unzip that download.
- Copy the resulting folder to app/Plugin
- Rename the folder you just copied to @SocialLinks@
[GIT Submodule]
In your app directory type:
git submodule add git://github.com/loadsys/CakePHP-SocialLinks.git Plugin/SocialLinks
git submodule init
git submodule update
[GIT Clone]
In your Plugin directory type
git clone git://github.com/loadsys/CakePHP-SocialLinks.git SocialLinks
- Add The Plugin to your application by adding this line to your bootstrap.php
CakePlugin::load('SocialLinks');
- Add Behavior to the Model, each parameter is the database field name, or FALSE to not include that field
public $actsAs = array(
'SocialLinks.SocialLinks' => array(
'blog' => 'blog',
'pinterest' => FALSE,
'googleplus' => 'googleplus',
'youtube' => 'youtube',
'linkedin' => 'linkedin',
'facebook' => 'facebook',
'twitter' => 'twitter',
),
);
## Options ##
* blog : blog field name in the database, or FALSE if you don't have this field
* pinterest : pinterest field name in the database, or FALSE if you don't have this field
* googleplus : googleplus field name in the database, or FALSE if you don't have this field
* youtube : youtube field name in the database, or FALSE if you don't have this field
* linkedin : linkedin field name in the database, or FALSE if you don't have this field
* facebook : facebook field name in the database, or FALSE if you don't have this field
* twitter : twitter field name in the database, or FALSE if you don't have this field
## Todo ##
* Unit Tests