Elgg  Version 2.3
set_maintenance_mode.php
Go to the documentation of this file.
1 <?php
7 $mode = (int)elgg_get_config('elgg_maintenance_mode', null);
8 
9 $message = $site->getPrivateSetting('elgg_maintenance_message');
10 if (!$message) {
11  $message = elgg_echo('admin:maintenance_mode:default_message');
12 }
13 
14 echo '<p>' . elgg_echo('admin:maintenance_mode:instructions') . '</p>';
15 
16 echo '<div><label>' . elgg_echo('admin:maintenance_mode:mode_label') . ': ';
17 echo elgg_view('input/select', array(
18  'name' => 'mode',
19  'options_values' => array(
20  '1' => elgg_echo('on'),
21  '0' => elgg_echo('off'),
22  ),
23  'value' => $mode,
24 ));
25 echo '</label></div>';
26 
27 echo '<div><label for="message">' . elgg_echo('admin:maintenance_mode:message_label') . ':</label><br>';
28 echo elgg_view('input/longtext', array(
29  'name' => 'message',
30  'id' => 'message',
31  'value' => $message,
32 ));
33 echo '</div>';
34 
35 echo '<div class="elgg-foot">';
36 echo elgg_view('input/submit', array('value' => elgg_echo('save')));
37 echo '</div>';
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
$mode
Configure site maintenance mode.
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:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336