當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。