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


PHP EasyBlogHelper::getBaseUrl方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $config = EasyBlogHelper::getConfig();
     // @legacy: If environment is set to production, change to static.
     $environment = $config->get('easyblog_environment');
     if ($environment == 'production') {
         $environment = 'static';
     }
     $this->fullName = 'EasyBlog';
     $this->shortName = 'eb';
     $this->environment = $environment;
     $this->mode = $config->get('easyblog_mode');
     $this->version = (string) EasyBlogHelper::getLocalVersion();
     $this->baseUrl = EasyBlogHelper::getBaseUrl();
     $this->token = EasyBlogHelper::getToken();
     $this->options = array("scriptVersioning" => (bool) $config->get('main_script_versioning'), "responsive" => (bool) $config->get('layout_responsive'));
     parent::__construct();
 }
开发者ID:Tommar,项目名称:vino2,代码行数:18,代码来源:configuration.php

示例2: loadHeaders

 public static function loadHeaders()
 {
     $document = JFactory::getDocument();
     if ($document->getType() !== 'html') {
         return;
     }
     if (!self::$headersLoaded) {
         $config = EasyBlogHelper::getConfig();
         $enableLightbox = $config->get('main_media_lightbox_preview') ? 'true' : 'false';
         $lightboxTitle = $config->get('main_media_show_lightbox_caption') ? 'true' : 'false';
         $enforceLightboxSize = $config->get('main_media_lightbox_enforce_size') ? 'true' : 'false';
         $lightboxWidth = $config->get('main_media_lightbox_max_width');
         $lightboxHeight = $config->get('main_media_lightbox_max_height');
         $lightboxStripExtension = $config->get('main_media_lightbox_caption_strip_extension') ? 'true' : 'false';
         $lightboxWidth = empty($lightboxWidth) ? '640' : $lightboxWidth;
         $lightboxHeight = empty($lightboxHeight) ? '480' : $lightboxHeight;
         $url = EasyBlogHelper::getBaseUrl();
         $document = JFactory::getDocument();
         // @task: Legacy ejax global variables.
         $ajaxData = "/*<![CDATA[*/\n\tvar eblog_site \t= '" . $url . "';\n\tvar spinnerPath = '" . EBLOG_SPINNER . "';\n\tvar lang_direction\t= '" . $document->direction . "';\n\tvar eblog_lightbox_title = " . $lightboxTitle . ";\n\tvar eblog_enable_lightbox = " . $enableLightbox . ";\n\tvar eblog_lightbox_enforce_size = " . $enforceLightboxSize . ";\n\tvar eblog_lightbox_width = " . $lightboxWidth . ";\n\tvar eblog_lightbox_height = " . $lightboxHeight . ";\n\tvar eblog_lightbox_strip_extension = " . $lightboxStripExtension . ";\n/*]]>*/";
         $document->addScriptDeclaration($ajaxData);
         EasyBlogHelper::addTemplateCss('common.css');
         // Load EasyBlogConfiguration class
         require_once EBLOG_CLASSES . DIRECTORY_SEPARATOR . 'configuration.php';
         // Get configuration instance
         $configuration = EasyBlogConfiguration::getInstance();
         // Attach configuration to headers
         $configuration->attach();
         self::$headersLoaded = true;
     }
     return self::$headersLoaded;
 }
开发者ID:Tommar,项目名称:vino2,代码行数:32,代码来源:helper.php


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