Example #1
0
 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);
 }
Example #2
0
				container.addClass('version_latest');
			}
			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');
        ?>