Elgg  Version 1.11
caching.php
Go to the documentation of this file.
1 <?php
6 // simple cache
7 $is_simple_cache_on = (bool)elgg_get_config('simplecache_enabled');
8 $simple_cache_disabled_class = $is_simple_cache_on ? '' : 'elgg-state-disabled';
9 
10 $params = array(
11  'label' => elgg_echo('installation:simplecache:label'),
12  'name' => 'simplecache_enabled',
13  'checked' => $is_simple_cache_on,
14 );
15 if (elgg_get_config('simplecache_enabled_in_settings')) {
16  $params['class'] = 'elgg-state-disabled';
17  $params['label_class'] = 'elgg-state-disabled';
18 }
19 $simple_cache_input .= elgg_view("input/checkbox", $params);
21 
22 if (elgg_get_config('simplecache_enabled_in_settings')) {
23  $warning = elgg_echo('admin:settings:in_settings_file');
24  $simple_cache_warning .= "<span class=\"elgg-text-help\">$warning</span>";
25 }
26 
27 // minify
28 $minify_js_input = elgg_view("input/checkbox", array(
29  'label' => elgg_echo('installation:minify_js:label'),
30  'name' => 'simplecache_minify_js',
31  'checked' => (bool)elgg_get_config('simplecache_minify_js'),
32  'label_class' => $simple_cache_disabled_class,
33 ));
34 
35 $minify_css_input = elgg_view("input/checkbox", array(
36  'label' => elgg_echo('installation:minify_css:label'),
37  'name' => 'simplecache_minify_css',
38  'checked' => (bool)elgg_get_config('simplecache_minify_css'),
39  'label_class' => $simple_cache_disabled_class,
40 ));
41 
42 $system_cache_input = elgg_view("input/checkbox", array(
43  'label' => elgg_echo('installation:systemcache:label'),
44  'name' => 'system_cache_enabled',
45  'checked' => (bool)elgg_get_config('system_cache_enabled'),
46 ))
47 
48 ?>
49 <fieldset class="elgg-fieldset" id="elgg-settings-advanced-caching">
50  <legend><?php echo elgg_echo('admin:legend:caching'); ?></legend>
51 
52  <div>
53  <?php echo $simple_cache_input; ?>
54  <p class="elgg-text-help"><?php echo elgg_echo('installation:simplecache:description'); ?></p>
55  <?php echo $simple_cache_warning; ?>
56 
57  </div>
58 
59  <div>
60  <p><?php echo elgg_echo('installation:minify:description'); ?></p>
61  <?php echo $minify_js_input; ?><br />
62  <?php echo $minify_css_input; ?>
63  </div>
64 
65  <div>
66  <?php echo $system_cache_input; ?>
67  <p class="elgg-text-help"><?php echo elgg_echo('installation:systemcache:description'); ?></p>
68  </div>
69 
70 </fieldset>
$params
Definition: caching.php:10
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
p
Definition: admin.php:118
$minify_css_input
Definition: caching.php:35
if(elgg_get_config('simplecache_enabled_in_settings')) $minify_js_input
Definition: caching.php:28
$is_simple_cache_on
Advanced site settings, caching section.
Definition: caching.php:7
fieldset div
Definition: admin.php:470
$system_cache_input
Definition: caching.php:42
$simple_cache_disabled_class
Definition: caching.php:8
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
if(elgg_get_config('simplecache_enabled_in_settings')) $simple_cache_input
Definition: caching.php:19
$simple_cache_warning
Definition: caching.php:20
elgg fieldset legend
Definition: admin.php:520
elgg fieldset
Definition: admin.php:513