forked from digitick/yii-faceplugs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LikeButton.php
71 lines (67 loc) · 1.65 KB
/
LikeButton.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Wrappers for facebook plugins.
* @copyright © Digitick <www.digitick.net> 2011
* @license GNU Lesser General Public License v3.0
* @author Ianaré Sévi
*/
require_once 'EFaceplugsBase.php';
/**
* The Like button lets a user share your content with friends on Facebook.
*
* When the user clicks the Like button on your site, a story appears in the
* user's friends' News Feed with a link back to your website.
*
* @see http://developers.facebook.com/docs/reference/plugins/like
*/
class LikeButton extends EFaceplugsBase
{
/**
* The URL of the Facebook page for this Like button.
* @var string
*/
public $href;
/**
* Display profile photos below the button (standard layout only)
* @var boolean
*/
public $show_faces;
/**
* Width of the Like button, defults to 450px
* @var integer
*/
public $width;
/**
* Three options : 'standard', 'button_count', 'box_count'
* @var string
*/
public $layout;
/**
* The verb to display on the button. Options: 'like', 'recommend'
* @var string
*/
public $action;
/**
* The font to display in the button. Options: 'arial', 'lucida grande',
* 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana'
* @var string
*/
public $font;
/**
* The color scheme for the plugin. Options: 'light', 'dark'
* @var string
*/
public $colorscheme;
/**
* A label for tracking referrals; must be less than 50 characters and can
* contain alphanumeric characters and some punctuation (currently +/=-.:_).
* @var string
*/
public $ref;
public function run()
{
parent::run();
$params = $this->getParams();
echo CHtml::openTag('fb:like', $params), CHtml::closeTag('fb:like');
}
}