本文整理汇总了PHP中DiscussHelper::getLocalVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP DiscussHelper::getLocalVersion方法的具体用法?PHP DiscussHelper::getLocalVersion怎么用?PHP DiscussHelper::getLocalVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DiscussHelper
的用法示例。
在下文中一共展示了DiscussHelper::getLocalVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
if (defined('EASYDISCUSS_COMPONENT_CLI')) {
$this->version = EASYDISCUSS_COMPONENT_VERSION;
} else {
$this->version = (string) DiscussHelper::getLocalVersion();
}
$this->resourceManifestFile = EASYDISCUSS_RESOURCES . '/default-' . $this->version . '.json';
}
示例2: __construct
public function __construct()
{
$config = DiscussHelper::getConfig();
$this->fullName = "EasyDiscuss";
$this->shortName = "ed";
$this->environment = $config->get('easydiscuss_environment');
$this->mode = $config->get('easydiscuss_mode');
$this->version = DiscussHelper::getLocalVersion();
$this->baseUrl = DiscussHelper::getAjaxURL();
$this->token = DiscussHelper::getToken();
parent::__construct();
}
示例3: getUpdates
function getUpdates()
{
$version = DiscussHelper::getVersion();
$local = DiscussHelper::getLocalVersion();
// Test build only since build will always be incremented regardless of version
$localVersion = explode('.', $local);
$localBuild = $localVersion[2];
if (!$version) {
return JText::_('COM_EASYDISCUSS_UNABLE_TO_UPDATE_SERVER');
}
$remoteVersion = explode('.', $version);
$build = $remoteVersion[2];
$content = JText::sprintf('COM_EASYDISCUSS_VERSION_OLDER', $local);
$content .= JText::sprintf('COM_EASYDISCUSS_VERSION_GET_LATEST_VERSION', $version);
$state = 'outdated';
if ($localBuild >= $build) {
$content = JText::sprintf('COM_EASYDISCUSS_VERSION_LATEST', $local);
$state = 'latest';
}
$ajax = DiscussHelper::getHelper('Ajax');
$ajax->resolve($state, $content, $local, $version);
}
示例4:
}
if( state == 'outdated' )
{
container.addClass('version_outdated');
}
container.attr('data-content', content);
});
})
</script>
<div class="sidebar clearfix">
<?php
$version = DiscussHelper::getVersion();
$local = DiscussHelper::getLocalVersion();
?>
<div class="ed-version" rel="ed-popover" data-placement="right" data-original-title="<?php
echo JText::_('COM_EASYDISCUSS_VERSION');
?>
" data-content="" >
<?php
echo JText::_('COM_EASYDISCUSS_VERSION') . $local;
?>
<?php
if ($local < $version) {
?>
<a href="http://stackideas.com/downloads.html" target="_BLANK" style="text-decoration:underline"><?php
echo JText::_('COM_EASYDISCUSS_DOWNLOAD_HERE');
?>
</a>