本文整理汇总了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();
}
示例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;
}