function smarty_cms_function_cms_jquery($params, &$smarty)
{
    $exclude = isset($params['exclude']) && !empty($params['exclude']) ? $params['exclude'] : '';
    $cdn = isset($params['cdn']) && $params['cdn'] == 'true' ? true : false;
    $append = isset($params['append']) && !empty($params['append']) ? $params['append'] : '';
    $ssl = isset($params['ssl']) && $params['ssl'] == 'true' ? true : false;
    $custom_root = isset($params['custom_root']) && !empty($params['custom_root']) ? $params['custom_root'] : '';
    // get the output.
    $out = cms_get_jquery($exclude, $ssl, $cdn, $append, $custom_root);
    if (isset($params['assign'])) {
        $smarty->assign(trim($params['assign']), $out);
        return;
    }
    return $out;
}
Esempio n. 2
0
 /**
  * OutputHeaderJavascript
  * This method can be used to dump out any javascript you'd like into the
  * Admin page header. In fact, it can be used to put just about anything into
  * the page header. It's recommended that you leave or copy the javascript
  * below into your own method if you override this -- it's used by the dropdown
  * menu in IE.
  */
 function OutputHeaderJavascript()
 {
     $config = cmsms()->GetConfig();
     $ssl = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off';
     $ssl = $ssl && isset($config['ssl_url']);
     return cms_get_jquery('', $ssl);
 }
 /**
  * OutputHeaderJavascript
  * This method can be used to dump out any javascript you'd like into the
  * Admin page header. In fact, it can be used to put just about anything into
  * the page header. It's recommended that you leave or copy the javascript
  * below into your own method if you override this -- it's used by the dropdown
  * menu in IE.
  */
 function OutputHeaderJavascript()
 {
     $config = cmsms()->GetConfig();
     $ssl = cmsms()->is_https_request();
     $ssl = $ssl && isset($config['ssl_url']);
     return cms_get_jquery('', $ssl);
 }