forked from digitick/yii-faceplugs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3f54c5c
Showing
13 changed files
with
1,175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?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 Activity Feed plugin displays the most interesting recent activity | ||
* taking place on your site. | ||
* | ||
* @see http://developers.facebook.com/docs/reference/plugins/activity | ||
*/ | ||
class ActivityFeed extends EFaceplugsBase | ||
{ | ||
/** | ||
* The domain to show activity for. Defaults to the current domain. | ||
* @var string | ||
*/ | ||
public $site; | ||
/** | ||
* The height of the plugin in pixels. Default height: 300px. | ||
* @var integer | ||
*/ | ||
public $height; | ||
/** | ||
* the width of the plugin in pixels. Default width: 300px. | ||
* @var integer | ||
*/ | ||
public $width; | ||
/** | ||
* Specifies whether to show the Facebook header. | ||
* @var boolean | ||
*/ | ||
public $header; | ||
/** | ||
* The color scheme for the plugin. Options: 'light', 'dark' | ||
* @var string | ||
*/ | ||
public $colorscheme; | ||
/** | ||
* The font to display in the plugin. Options: 'arial', 'lucida grande', | ||
* 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana' | ||
* @var string | ||
*/ | ||
public $font; | ||
/** | ||
* The border color of the plugin. | ||
* @var string | ||
*/ | ||
public $border_color; | ||
/** | ||
* Specifies whether to always show recommendations in the plugin. | ||
* | ||
* If set to true, the plugin will display recommendations in the bottom | ||
* half. | ||
* @var boolean | ||
*/ | ||
public $recomendations; | ||
/** | ||
* Allows you to filter which URLs are shown in the plugin. | ||
* | ||
* The plugin will only include URLs which contain the filter in the first | ||
* two path parameters of the URL. If nothing in the first two path | ||
* parameters of the URL matches the filter, the URL will not be included. | ||
* @var string | ||
*/ | ||
public $filter; | ||
/** | ||
* 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:activity', $params); | ||
echo CHtml::closeTag('fb:activity'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?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 Comments Box easily enables your users to comment on your site's content — | ||
* whether it's for a web page, article, photo, or other piece of content. | ||
* | ||
* @see http://developers.facebook.com/docs/reference/plugins/comments | ||
*/ | ||
class Comments extends EFaceplugsBase | ||
{ | ||
/** | ||
* Number of posts to show. | ||
* @var integer | ||
*/ | ||
public $numposts; | ||
/** | ||
* the width of the widget. | ||
* @var integer | ||
*/ | ||
public $width; | ||
/** | ||
* Specify whether to publish a comment on the user's wall. | ||
* @var boolean | ||
*/ | ||
public $publish_feed = true; | ||
|
||
public function run() | ||
{ | ||
parent::run(); | ||
|
||
$params = $this->getParams(); | ||
echo CHtml::openTag('fb:comments', $params), CHtml::closeTag('fb:comments'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?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'; | ||
|
||
/** | ||
* Base class for all plugins which require a Facebook application ID. | ||
*/ | ||
abstract class EFaceplugsAppLink extends EFaceplugsBase | ||
{ | ||
public function run() | ||
{ | ||
parent::run(); | ||
|
||
if (!isset ($this->app_id) && YII_DEBUG) { | ||
throw new CException('Plugin of type "'. get_class($this) . '" requires the Facebook application ID to be set.'); | ||
} | ||
} | ||
} |
Oops, something went wrong.