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'; }
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(); }
public function __construct() { $config = DiscussHelper::getConfig(); // @legacy: If environment is set to production, change to static. $environment = $config->get('easydiscuss_environment'); if ($environment == 'production') { $environment = 'static'; } $this->fullName = 'EasyDiscuss'; $this->shortName = 'ed'; $this->environment = $environment; $this->mode = $config->get('easydiscuss_mode'); $this->version = (string) DiscussHelper::getLocalVersion(); $this->baseUrl = DiscussHelper::getBaseUrl(); $this->token = DiscussHelper::getToken(); $this->options = array("scriptVersioning" => (bool) $config->get('main_script_versioning'), "responsive" => (bool) $config->get('responsive')); parent::__construct(); }
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); }
} 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>