forked from digitick/yii-faceplugs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FanBox.php
73 lines (69 loc) · 1.64 KB
/
FanBox.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
72
73
<?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 Box is a social plugin that enables Facebook Page owners to
* attract and gain Likes from their own website.
*
* The Like Box enables users to:
* <ul>
* <li>See how many users already like this page, and which of their friends like it too
* <li>Read recent posts from the page
* <li>Like the page with one click, without needing to visit the page
* </ul>
*
* @see http://developers.facebook.com/docs/reference/plugins/like
*/
class FanBox extends EFaceplugsBase
{
/**
* The width of the plugin in pixels. Default width: 300px.
* @var integer
*/
public $width;
/**
* The height of the plugin in pixels.
* @var integer
*/
public $height;
/**
* Specifies whether to display a stream of the latest posts from the
* page's wall.
* @var boolean
*/
public $stream;
/**
* Specifies the profile to be a fan of.
* @var string
*/
public $profile_id;
/**
* Specifies whether to display the Facebook logo at the top of the plugin.
* @var boolean
*/
public $logobar;
/**
* Specify the number of connections (faces) to display in the plugin.
* @var integer
*/
public $connections;
/**
* Specify a CSS file to use with the plugin.
* @var string Absolute URL
*/
public $css;
public function run()
{
parent::run();
if (!isset($this->profile_id)) {
$this->profile_id = $this->app_id;
}
$params = $this->getParams();
echo CHtml::openTag('fb:fan', $params), CHtml::closeTag('fb:fan');
}
}