当前位置: 首页>>代码示例>>PHP>>正文


PHP JFBCFactory::addStylesheet方法代码示例

本文整理汇总了PHP中JFBCFactory::addStylesheet方法的典型用法代码示例。如果您正苦于以下问题:PHP JFBCFactory::addStylesheet方法的具体用法?PHP JFBCFactory::addStylesheet怎么用?PHP JFBCFactory::addStylesheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JFBCFactory的用法示例。


在下文中一共展示了JFBCFactory::addStylesheet方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display($tpl = null)
 {
     $actionModel = $this->getModel('OpenGraphAction', 'JFBConnectModel');
     $activityModel = $this->getModel('OpenGraphActivity', 'JFBConnectModel');
     $objectModel = $this->getModel('OpenGraphObject', 'JFBConnectModel');
     $user = JFactory::getUser();
     if ($this->getLayout() == 'activity') {
         $activityModel->setUserId($user->get('id'));
         $rows = $activityModel->getActivityForUser();
         $this->rows = $rows;
         $this->actionModel = $actionModel;
         $this->objectModel = $objectModel;
         $pagination = $activityModel->getPagination();
         $this->pagination = $pagination;
     } else {
         if ($this->getLayout() == 'settings') {
             $user = JFactory::getUser();
             $userModel = JFBConnectModelUserMap::getUser($user->get('id'), 'facebook');
             $userData = $userModel->getData();
             $actionsDisabled = $userData->params->get('og_actions_disabled');
             $this->actionsDisabled = $actionsDisabled;
             $actionModel = $this->getModel('OpenGraphAction', 'JFBConnectModel');
             $actions = $actionModel->getActions(true);
             $editableActions = array();
             foreach ($actions as $action) {
                 if ($action->can_disable) {
                     $editableActions[] = $action;
                 }
             }
             $this->actions = $editableActions;
         }
     }
     JFBCFactory::addStylesheet('jfbconnect.css');
     parent::display($tpl);
 }
开发者ID:q0821,项目名称:esportshop,代码行数:35,代码来源:view.html.php

示例2: onAfterDispatch

 public function onAfterDispatch()
 {
     if ($this->enabled) {
         $path = JPATH_SITE . '/components/com_jfbconnect/libraries/toolbar/button/';
         $files = JFolder::files($path, '\\.php$');
         // Probably need to add some way to order these things..
         foreach ($files as $f) {
             $class = 'JFBConnectToolbarButton' . ucfirst(str_replace('.php', '', $f));
             if (class_exists($class)) {
                 $obj = new $class();
                 $this->buttons[$obj->order] = $obj;
             }
         }
         ksort($this->buttons);
         $doc = JFactory::getDocument();
         JFBCFactory::addStylesheet('jfbconnect.css');
         if (JFBCFactory::config()->get('facebook_display_errors')) {
             //                $doc->addScript('media/sourcecoast/js/jquery-ui.js');
             $doc->addStyleSheet('media/sourcecoast/css/jquery-ui/jquery-ui.css');
         } else {
             //                $doc->addScript('media/sourcecoast/js/jquery-ui.min.js');
             $doc->addStyleSheet('media/sourcecoast/css/jquery-ui/jquery-ui.min.css');
         }
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:25,代码来源:toolbar.php

示例3: getTagHtml

 protected function getTagHtml()
 {
     JFBCFactory::addStylesheet('jfbconnect.css');
     $tag = '<script type="IN/Share"';
     $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-url');
     $tag .= $this->getField('showzero', 'show_zero', 'boolean', 'false', 'data-showzero');
     if ($this->fields->exists('layout')) {
         $tag .= SCEasyTags::getShareButtonLayout('linkedin', $this->fields->get('layout'), '"');
     } else {
         $tag .= $this->getField('counter', null, null, '', 'data-counter');
     }
     $tag .= ' data-onsuccess="jfbc.social.linkedin.share"';
     $tag .= '></script>';
     return $tag;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:15,代码来源:share.php

示例4: getTagHtml

 protected function getTagHtml()
 {
     JFBCFactory::addStylesheet('jfbconnect.css');
     $tag = '<div class="fb-like"';
     $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href');
     $tag .= $this->getField('show_faces', null, 'boolean', 'true', 'data-show-faces');
     $tag .= $this->getField('share', 'show_send_button', 'boolean', 'true', 'data-share');
     $tag .= $this->getField('layout', null, null, '', 'data-layout');
     $tag .= $this->getField('width', null, null, '', 'data-width');
     $tag .= $this->getField('action', null, null, '', 'data-action');
     $tag .= $this->getField('colorscheme', null, null, '', 'data-colorscheme');
     $tag .= $this->getField('ref', null, null, '', 'data-ref');
     $tag .= $this->getField('kid_directed_site', null, 'boolean', 'false', 'data-kid-directed-site');
     $tag .= '></div>';
     return $tag;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:16,代码来源:like.php

示例5: render

 public function render()
 {
     $class[] = "sourcecoast facebook";
     $class[] = $this->systemName;
     //Facebook javascript is added automatically
     JFBCFactory::addStylesheet('jfbconnect.css');
     $tag = $this->getTagHtml();
     if ($tag) {
         $this->provider->widgetRendered = true;
         if ($this->className) {
             $class[] = $this->className;
         }
         $classString = implode(' ', $class);
         $tag = '<div class="' . $classString . '">' . $tag . '</div>';
     }
     return $tag;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:17,代码来源:widget.php

示例6: getTagHtml

 protected function getTagHtml()
 {
     JFBCFactory::addStylesheet('jfbconnect.css');
     $tag = '<div class="g-plusone"';
     if ($this->fields->exists('layout')) {
         $tag .= SCEasyTags::getShareButtonLayout('google', $this->fields->get('layout'), '"');
     } else {
         $tag .= $this->getField('size', null, null, '', 'data-size');
         $tag .= $this->getField('annotation', null, null, '', 'data-annotation');
     }
     $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href');
     $tag .= $this->getField('width', null, null, '', 'data-width');
     $tag .= $this->getField('align', null, null, '', 'data-align');
     $tag .= $this->getField('expandTo', null, null, '', 'expandTo');
     $tag .= $this->getField('recommendations', null, 'boolean', 'true', 'data-recommendations');
     $tag .= ' data-callback="plusone_callback"';
     $tag .= '></div>';
     return $tag;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:19,代码来源:plusone.php

示例7: getTagHtml

 protected function getTagHtml()
 {
     JFBCFactory::addStylesheet('jfbconnect.css');
     $tagButtonText = '<a href="http://twitter.com/share" class="twitter-share-button" ';
     $tagButtonText .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-url');
     if ($this->fields->exists('layout')) {
         $tagButtonText .= SCEasyTags::getShareButtonLayout('twitter', $this->fields->get('layout'), '"');
     } else {
         $tagButtonText .= $this->getField('data-count', 'data_count', null, '', 'data-count');
     }
     $tagButtonText .= $this->getField('via', null, null, '', 'data-via');
     $tagButtonText .= $this->getField('text', null, null, '', 'data-text');
     $tagButtonText .= $this->getField('related', null, null, '', 'data-related');
     $tagButtonText .= $this->getField('lang', null, null, '', 'data-lang');
     $tagButtonText .= $this->getField('counturl', null, null, '', 'data-counturl');
     $tagButtonText .= $this->getField('hashtags', null, null, '', 'data-hashtags');
     $tagButtonText .= $this->getField('size', null, null, '', 'data-size');
     $tagButtonText .= $this->getField('dnt', null, 'boolean', 'false', 'data-dnt');
     $tagButtonText .= '>Tweet</a>';
     return $tagButtonText;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:21,代码来源:share.php

示例8: getTagHtml

 protected function getTagHtml()
 {
     $actionID = $this->getParamValue('id');
     if ($actionID) {
         JFBCFactory::addStylesheet('jquery-ui/jquery-ui-autocomplete.css');
         $actionText = $this->getParamValue('text');
         $triggeredText = $this->getParamValue('inactive');
         $actionImage = $this->getParamValue('active_image');
         $triggeredImage = $this->getParamValue('inactive_image');
         if ($triggeredImage) {
             $triggeredText = '<img src="' . $triggeredImage . '"' . ($triggeredText ? ' alt="' . $triggeredText . '"' : '') . '/>';
         }
         if ($actionImage) {
             $actionText = '<img src="' . $actionImage . '"' . ($actionText ? ' alt="' . $actionText . '"' : '') . '/>';
         }
         $jfbcOgActionModel = JModelLegacy::getInstance('OpenGraphAction', 'JFBConnectModel');
         $action = $jfbcOgActionModel->getAction($actionID);
         // Build up the Javascript params list
         $caps = array();
         $capabilities = $action->params->get('og_capabilities');
         if ($capabilities) {
             foreach ($capabilities as $cap => $enable) {
                 $caps[] = $cap;
             }
         }
         // Add an href parameter to the tag eventually as well and use that instead of this
         $uri = JURI::getInstance();
         $url = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query'));
         if ($action->actionReady($jfbcOgActionModel->getUniqueKey($url))) {
             $tagText = '<button id="share-button" class="btn" onclick=\'jfbc.share.display_modal(' . $actionID . ', ' . json_encode($caps) . ');\' type="button">' . $actionText . '</button>';
         } else {
             $tagText = '<button id="share-button" class="btn disabled" type="button">' . $triggeredText . '</button>';
         }
     } else {
         $tagText = "JFBCAction ID not found!";
     }
     return $tagText;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:38,代码来源:action.php

示例9:

echo $layout . ' ' . $orientation;
?>
">
    <?php 
if ($linkedinEnable) {
    echo '{JLinkedShare' . $href . ' layout=' . $layout . ' showzero=' . $linkedinShowZero . $renderKeyString . '}';
}
if ($twitterEnable) {
    echo '{SCTwitterShare' . $href . ' layout=' . $layout . $renderKeyString . '}';
}
if ($googleEnable) {
    echo '{SCGooglePlusOne' . $href . ' layout=' . $layout . ' width=' . $googleWidth . $renderKeyString . '}';
}
if ($facebookEnable) {
    if (!$facebookShareEnable) {
        JFBCFactory::addStylesheet('jfbconnect.css');
        //Use Like IFrame for height and width to not resize dynamically/cause flashing.
        //However, Share button will not display in this mode
        echo '<div class="jfbclike"><iframe src="//www.facebook.com/plugins/like.php?href=' . $url . '&amp;width=' . $facebookWidth . '&amp;height=' . $facebookHeight . '&amp;colorscheme=' . $facebookColorScheme . '&amp;layout=' . $layout . '&amp;action=' . $facebookVerb . '&amp;show_faces=' . $facebookShowFacesValue . '&amp;kid_directed_site=' . $facebookKidDirectedSiteValue . '&amp;appId=' . $fbAppId . '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' . $facebookWidth . '; height:' . $facebookHeight . ';" allowTransparency="true"></iframe></div>';
    } else {
        echo '{JFBCLike' . $href . ' layout=' . $layout . ' show_faces=' . $facebookShowFacesValue . ' share=' . $facebookShowShareButtonValue . ' width=' . $facebookWidth . ' height=' . $facebookHeight . ' action=' . $facebookVerb . ' colorScheme=' . $facebookColorScheme . ' ref=' . $facebookRef . $renderKeyString . '}';
    }
} else {
    if ($facebookShareEnable) {
        if ($layout == 'standard' || $layout == 'button') {
            $style = 'button';
        } else {
            if ($layout == 'box_count') {
                $style = 'box_count';
            } else {
                $style = 'button_count';
开发者ID:q0821,项目名称:esportshop,代码行数:31,代码来源:default.php

示例10: onBeforeRender

 public function onBeforeRender()
 {
     if (!JFactory::getApplication()->isAdmin() && JFactory::getDocument()->getType() == 'html') {
         if (JFactory::getUser()->authorise('jfbconnect.opengraph.debug', 'com_jfbconnect') && JFBCFactory::config()->get('facebook_display_errors')) {
             JFBCFactory::addStylesheet('jfbconnect.css');
         }
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:8,代码来源:jfbcsystem.php

示例11: setupTimedActions

 protected function setupTimedActions()
 {
     $doc = JFactory::getDocument();
     $actionAdded = false;
     foreach ($this->object->getAssociatedActions() as $action) {
         if ($action->params->get('og_auto_type') == "page_load" && $action->params->get('og_auto_timer') > 0) {
             $key = $this->getUniqueKey($this->getCurrentURL());
             $jq = JFBCFactory::config()->getSetting('jquery_load') ? 'jfbcJQuery' : 'jQuery';
             if ($action->actionReady($key)) {
                 $actionAdded = true;
                 // The space between { jfbc.opengraph is required. Otherwise, our system plugin will strip it thinking it's a {JFBCxyz} tag.
                 // Not the perfect solution, but it works..
                 $doc->addScriptDeclaration($jq . "(document).ready(function () {" . "setTimeout(function(){ jfbc.opengraph.triggerAction('" . $action->id . "','" . $this->getCurrentURL() . "');}, " . $action->params->get('og_auto_timer') * 1000 . ");" . "});");
             } else {
                 $data = $action->getLastPublished($key);
                 if ($data) {
                     SCStringUtilities::loadLanguage('com_jfbconnect');
                     $actionAdded = true;
                     $date = new JDate($data->created);
                     $doc->addScriptDeclaration($jq . "(document).ready(function () {" . "setTimeout(function(){jfbc.opengraph.actionPopup('<span class=\"ogMessage\">" . JText::sprintf("COM_JFBCONNECT_OPENGRAPH_ACTION_EXISTS", $date->format(JText::_('DATE_FORMAT_LC4'))) . "</span>" . '<span class="ogOptions"><a href="' . JRoute::_('index.php?option=com_jfbconnect&task=opengraph.userdelete&actionid=' . $data->id) . '" target="_blank">' . JText::_('COM_JFBCONNECT_OPENGRAPH_ACTION_DELETE') . '</a>' . ' | <a href="' . JRoute::_('index.php?option=com_jfbconnect&view=opengraph&layout=activity') . '" target="_blank">' . JText::_('COM_JFBCONNECT_OPENGRAPH_ACTION_SEE_ALL') . '</a></span>' . "')})" . "});");
                 }
             }
         }
     }
     if ($actionAdded) {
         // Include our CSS file for styling the popup
         JFBCFactory::addStylesheet('jfbconnect.css');
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:29,代码来源:openGraphPlugin.php


注:本文中的JFBCFactory::addStylesheet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。