Elgg  Version 2.2
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  var lastcache, path;
21 
22  if (elgg.config.simplecache_enabled) {
23  lastcache = elgg.config.lastcache;
24  } else {
25  lastcache = 0;
26  }
27 
28  if (!subview) {
29  path = '/cache/' + lastcache + '/' + elgg.config.viewtype + '/' + view;
30  } else {
31  if ((view === 'js' || view === 'css') && 0 === subview.indexOf(view + '/')) {
32  subview = subview.substr(view.length + 1);
33  }
34  path = '/cache/' + lastcache + '/' + elgg.config.viewtype + '/' + view + '/' + subview;
35  }
36 
37  return elgg.normalize_url(path);
38 };
elgg
Definition: install.js:23
$CONFIG view
The current view type.
Definition: config.php:149
$CONFIG lastcache
The last cache time for the current viewtype.
Definition: config.php:264
$CONFIG path
The full path where Elgg is installed.
Definition: config.php:16