<?php

/**
 * Snippet to implement Facebook like button.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package clearFusionCMS\module\social
 * @copyright Copyright (c) 2012 - 2013 clearFusionCMS. All rights reserved.
 * @link http://clearfusioncms.com
 */

/** @var $tplEngine cfTemplateEngine */

// Get parameters
$showFaces = isset($showFaces) ? $showFaces : 'true';
$send = isset($send) && $send ? 'true' : 'false';
$width = isset($width) ? $width : 45;
$link = isset($link) ? $link : $tplEngine->controller->getRequest()->getSelf(true);

echo "<div class=\"cfSocialFBLike\"><div class=\"fb-like\" data-href=\"$link\" data-send=\"$send\" data-layout=\"box_count\" data-width=\"$width\" data-show-faces=\"$showFaces\"></div></div>";
$tplEngine->getCodeBuffer()->requireCore()->bufferHeadJS('system/modules/social/js/social.js');
