Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
update_basic.php
Go to the documentation of this file.
1 <?php
5 $form_body = "";
6 
7 foreach (array('sitename','sitedescription', 'siteemail', 'default_limit') as $field) {
8  $form_body .= "<div>";
9  $form_body .= elgg_echo('installation:' . $field) . "<br />";
10  $warning = elgg_echo('installation:warning:' . $field);
11  if ($warning != 'installation:warning:' . $field) {
12  echo "<b>" . $warning . "</b><br />";
13  }
14  if ($field === 'siteemail') {
15  $value = elgg_get_site_entity()->email;
16  } else {
17  $value = elgg_get_config($field);
18  }
19  $form_body .= elgg_view("input/text",array('name' => $field, 'value' => $value));
20  $form_body .= "</div>";
21 }
22 
24 $form_body .= "<div>" . elgg_echo('installation:language');
25 $form_body .= elgg_view("input/select", array(
26  'name' => 'language',
27  'value' => elgg_get_config('language'),
28  'options_values' => $languages,
29 )) . "</div>";
30 
31 $form_body .= '<div class="elgg-foot">';
32 $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
33 $form_body .= '</div>';
34 
35 echo $form_body;
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
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$value
Definition: longtext.php:26
if(elgg_extract('required', $vars)) $field
Definition: field.php:26
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
get_installed_translations()
Return an array of installed translations as an associative array "two letter code" => "native langua...
Definition: languages.php:93
$form_body
Definition: update_basic.php:5
foreach(array('sitename','sitedescription', 'siteemail', 'default_limit') as $field) $languages