Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
ianare committed Jun 15, 2011
0 parents commit 3f54c5c
Show file tree
Hide file tree
Showing 13 changed files with 1,175 additions and 0 deletions.
88 changes: 88 additions & 0 deletions ActivityFeed.php
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');
}

}
43 changes: 43 additions & 0 deletions Comments.php
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');
}

}
24 changes: 24 additions & 0 deletions EFaceplugsAppLink.php
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.');
}
}
}
Loading

0 comments on commit 3f54c5c

Please sign in to comment.