本文整理汇总了PHP中JFBCFactory::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP JFBCFactory::widget方法的具体用法?PHP JFBCFactory::widget怎么用?PHP JFBCFactory::widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFBCFactory
的用法示例。
在下文中一共展示了JFBCFactory::widget方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getReconnectButtons
public static function getReconnectButtons($params = null)
{
$params['show_reconnect'] = 'true';
return JFBCFactory::widget('facebook', 'login', $params)->render();
}
示例2: connectButton
function connectButton($params)
{
if (!isset($params['providers'])) {
$params['providers'] = $this->systemName;
}
$params['show_reconnect'] = 'true';
return JFBCFactory::widget('facebook', 'login', $params)->render();
}
示例3: replaceWidgetTags
private function replaceWidgetTags()
{
//Tag like {JFBCTag} {JLinkedTag} {SCTag} {JFBCTag field=value field2=value2} {JLinkedTag field=value field2=value2} {SCTag field=value field2=value2}
$regex = '/\\{(' . $this->scTags . '|JFBC|JLinked)(.*?)}/i';
$replace = FALSE;
$contents = JResponse::getBody();
if (preg_match_all($regex, $contents, $matches, PREG_SET_ORDER)) {
$count = count($matches[0]);
if ($count == 0) {
return true;
}
$jfbcRenderKey = JFBCFactory::config()->get('social_tag_admin_key');
foreach ($matches as $match) {
$tagFields = explode(' ', $match[2]);
$method = strtolower($match[1]) . strtolower($tagFields[0]);
unset($tagFields[0]);
$val = implode(' ', $tagFields);
$params = SCEasyTags::_splitIntoTagParameters($val);
$cannotRender = SCEasyTags::cannotRenderEasyTag($params, $jfbcRenderKey);
if ($cannotRender) {
continue;
}
if (array_key_exists($method, $this->tagsToReplace)) {
$widgetInfo = $this->tagsToReplace[$method];
$fields = SCEasyTags::getTagParameters($params);
$widget = JFBCFactory::widget($widgetInfo['provider'], $widgetInfo['widget'], $fields);
$newText = $widget->render();
$replace = TRUE;
} else {
$newText = '';
}
$search = '/' . preg_quote($match[0], '/') . '/';
$contents = preg_replace($search, $newText, $contents, 1);
}
if ($replace) {
JResponse::setBody($contents);
}
}
return $replace;
}
示例4: defined
<?php
/**
* @package JFBConnect
* @copyright (c) 2009-2015 by SourceCoast - All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version Release v6.4.2
* @build-date 2015/08/24
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.filesystem.file');
if (!JFile::exists(JPATH_ROOT . '/components/com_jfbconnect/libraries/provider.php')) {
echo "JFBConnect not found. Please reinstall.";
return;
}
if (!class_exists('JFBCFactory')) {
echo "JFBConnect not enabled. Please enable.";
return;
}
$userIntro = $params->get('user_intro');
$providerType = $params->get('provider_type');
$widgetType = $params->get('widget_type');
$widget = JFBCFactory::widget($providerType, $widgetType, $params->get('widget_settings'));
require JModuleHelper::getLayoutPath('mod_scsocialwidget');