Elgg  Version 3.0
configuration.js
Go to the documentation of this file.
1 elgg.provide('elgg.config');
2 
8 elgg.get_site_url = function() {
9  return elgg.config.wwwroot;
10 };
11 
19 elgg.get_simplecache_url = function(view, subview) {
20  elgg.assertTypeOf('string', view);
21 
22  var lastcache, path;
23 
24  if (elgg.config.simplecache_enabled) {
25  lastcache = elgg.config.lastcache;
26  } else {
27  lastcache = 0;
28  }
29 
30  if (!subview) {
31  path = '/cache/' + lastcache + '/' + elgg.config.viewtype + '/' + view;
32  } else {
33  elgg.assertTypeOf('string', subview);
34 
35  if ((view === 'js' || view === 'css') && 0 === subview.indexOf(view + '/')) {
36  subview = subview.substr(view.length + 1);
37  }
38  path = '/cache/' + lastcache + '/' + elgg.config.viewtype + '/' + view + '/' + subview;
39  }
40 
41  return elgg.normalize_url(path);
42 };
$CONFIG view
The current view type.
Definition: config.php:135
$CONFIG lastcache
The last cache time for the current viewtype.
Definition: config.php:235
$CONFIG path
Legacy documentation for the old $CONFIG object.
Definition: config.php:17
var elgg
Definition: elgglib.js:4