示例#1
0
 public static function render($name, $check_pro = false)
 {
     if (!$name) {
         return '';
     }
     require_once __DIR__ . '/functions.php';
     $alias = NNFrameworkFunctions::getAliasByName($name);
     $name = NNFrameworkFunctions::getNameByAlias($name);
     if ($check_pro && self::isPro($alias)) {
         return '';
     }
     return '<div class="alert nn_licence">' . JText::sprintf('NN_IS_FREE_VERSION', $name) . '<br />' . JText::_('NN_FOR_MORE_GO_PRO') . '<br />' . '<a href="https://www.nonumber.nl/purchase?ext=' . $alias . '" target="_blank" class="btn btn-small btn-primary">' . ' <span class="icon-basket"></span>' . html_entity_decode(JText::_('NN_GO_PRO'), ENT_COMPAT, 'UTF-8') . '</a>' . '</div>';
 }
示例#2
0
 public static function render($alias)
 {
     if (!$alias) {
         return '';
     }
     require_once __DIR__ . '/functions.php';
     $name = NNFrameworkFunctions::getNameByAlias($alias);
     $alias = NNFrameworkFunctions::getAliasByName($alias);
     if (!($version = self::getXMLVersion($alias))) {
         return '';
     }
     JHtml::_('jquery.framework');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/script.min.js');
     $url = 'download.nonumber.nl/extensions.php?j=3&e=' . $alias;
     $script = "\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tnnScripts.loadajax(\n\t\t\t\t\t'" . $url . "',\n\t\t\t\t\t'nnScripts.displayVersion( data, \"" . $alias . "\", \"" . str_replace(array('FREE', 'PRO'), '', $version) . "\" )',\n\t\t\t\t\t'nnScripts.displayVersion( \"\" )'\n\t\t\t\t);\n\t\t\t});\n\t\t";
     JFactory::getDocument()->addScriptDeclaration($script);
     return '<div class="alert alert-success" style="display:none;" id="nonumber_version_' . $alias . '">' . self::getMessageText($alias, $name, $version) . '</div>';
 }