diff options
Diffstat (limited to 'views/installation')
32 files changed, 852 insertions, 0 deletions
diff --git a/views/installation/input/access.php b/views/installation/input/access.php new file mode 100644 index 000000000..a57014840 --- /dev/null +++ b/views/installation/input/access.php @@ -0,0 +1,49 @@ +<?php +/** + * Elgg access level input + * Displays a pulldown input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * + */ + +if (isset($vars['class'])) { + $class = $vars['class']; +} +if (!$class) { + $class = "input_access"; +} + +if ((!isset($vars['options'])) || (!is_array($vars['options']))) { + $vars['options'] = array(); + $vars['options'] = get_write_access_array(); +} + +if (is_array($vars['options']) && sizeof($vars['options']) > 0) { + + ?> + + <select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>"> + <?php + + foreach($vars['options'] as $key => $option) { + if ($key != $vars['value']) { + echo "<option value=\"{$key}\">{$option}</option>"; + } else { + echo "<option value=\"{$key}\" selected=\"selected\">{$option}</option>"; + } + } + + ?> + </select> + + <?php + +}
\ No newline at end of file diff --git a/views/installation/input/button.php b/views/installation/input/button.php new file mode 100644 index 000000000..2c36841df --- /dev/null +++ b/views/installation/input/button.php @@ -0,0 +1,53 @@ +<?php +/** + * Create a input button + * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides + * extra security which help prevent CSRF attacks. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['type'] Submit or reset, defaults to submit. + * @uses $vars['src'] Src of an image + * + */ + +global $CONFIG; + +$class = $vars['class']; +if (!$class) { + $class = "submit_button"; +} + +if (isset($vars['type'])) { + $type = strtolower($vars['type']); +} else { + $type = 'submit'; +} + +switch ($type) { + case 'button' : + $type='button'; + break; + case 'reset' : + $type='reset'; + break; + case 'submit': + default: + $type = 'submit'; +} + +$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); +$name = $vars['internalname']; +$src = $vars['src']; +// blank src if trying to access an offsite image. +if (strpos($src,$CONFIG->wwwroot)===false) { + $src = ""; +} +?> +<input type="<?php echo $type; ?>" class="<?php echo $type; ?>_button" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" src="<?php echo $src; ?>" class="<?php echo $class; ?>" />
\ No newline at end of file diff --git a/views/installation/input/checkboxes.php b/views/installation/input/checkboxes.php new file mode 100644 index 000000000..0792f09ce --- /dev/null +++ b/views/installation/input/checkboxes.php @@ -0,0 +1,50 @@ +<?php +/** + * Elgg checkbox input + * Displays a checkbox input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['options'] An array of strings representing the options for the checkbox field + * + */ + +$class = $vars['class']; +if (!$class) { + $class = "input-checkboxes"; +} + +foreach($vars['options'] as $label => $option) { + //if (!in_array($option,$vars['value'])) { + if (is_array($vars['value'])) { + if (!in_array($option,$vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } else { + if ($option != $vars['value']) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } + + // handle indexed array where label is not specified + // @todo deprecate in Elgg 1.8 + if (is_integer($label)) { + $label = $option; + } + + $disabled = ""; + if ($vars['disabled']) { + $disabled = ' disabled="yes" '; + } + echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />"; +}
\ No newline at end of file diff --git a/views/installation/input/form.php b/views/installation/input/form.php new file mode 100644 index 000000000..35e718adb --- /dev/null +++ b/views/installation/input/form.php @@ -0,0 +1,53 @@ +<?php +/** + * Create a form for data submission. + * Use this view for forms rather than creating a form tag in the wild as it provides + * extra security which help prevent CSRF attacks. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['body'] The body of the form (made up of other input/xxx views and html + * @uses $vars['method'] Method (default POST) + * @uses $vars['enctype'] How the form is encoded, default blank + * @uses $vars['action'] URL of the action being called + * + */ + +if (isset($vars['internalid'])) { + $id = $vars['internalid']; +} else { + $id = ''; +} +if (isset($vars['internalname'])) { + $name = $vars['internalname']; +} else { + $name = ''; +} +$body = $vars['body']; +$action = $vars['action']; +if (isset($vars['enctype'])) { + $enctype = $vars['enctype']; +} else { + $enctype = ''; +} +if (isset($vars['method'])) { + $method = $vars['method']; +} else { + $method = 'POST'; +} + +$method = strtolower($method); + +// Generate a security header +$security_header = ""; +if (!isset($vars['disable_security']) || $vars['disable_security'] != true) { + $security_header = elgg_view('input/securitytoken'); +} +?> +<form <?php if ($id) { ?>id="<?php echo $id; ?>" <?php } ?> <?php if ($name) { ?>name="<?php echo $name; ?>" <?php } ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>" <?php if ($enctype!="") echo "enctype=\"$enctype\""; ?>> +<?php echo $security_header; ?> +<?php echo $body; ?> +</form>
\ No newline at end of file diff --git a/views/installation/input/hidden.php b/views/installation/input/hidden.php new file mode 100644 index 000000000..dd5c8bb98 --- /dev/null +++ b/views/installation/input/hidden.php @@ -0,0 +1,18 @@ +<?php +/** + * Create a hidden data field + * Use this view for forms rather than creating a hidden tag in the wild as it provides + * extra security which help prevent CSRF attacks. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * + */ +?> +<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" />
\ No newline at end of file diff --git a/views/installation/input/longtext.php b/views/installation/input/longtext.php new file mode 100644 index 000000000..9da3d8276 --- /dev/null +++ b/views/installation/input/longtext.php @@ -0,0 +1,24 @@ +<?php +/** + * Elgg long text input + * Displays a long text input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * + */ + +$class = $vars['class']; +if (!$class) { + $class = "input_textarea"; +} + +?> + +<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo $vars['value']; ?></textarea>
\ No newline at end of file diff --git a/views/installation/input/password.php b/views/installation/input/password.php new file mode 100644 index 000000000..461f77955 --- /dev/null +++ b/views/installation/input/password.php @@ -0,0 +1,23 @@ +<?php +/** + * Elgg password input + * Displays a password input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * + */ + +$class = $vars['class']; +if (!$class) { + $class = "input_password"; +} +?> + +<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> diff --git a/views/installation/input/pulldown.php b/views/installation/input/pulldown.php new file mode 100644 index 000000000..6ad12eec4 --- /dev/null +++ b/views/installation/input/pulldown.php @@ -0,0 +1,45 @@ +<?php +/** + * Elgg pulldown input + * Displays a pulldown input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['options'] An array of strings representing the options for the pulldown field + * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is + * the value displayed on the button. Replaces $vars['options'] when defined. + */ + + +$class = $vars['class']; +if (!$class) { + $class = "input-pulldown"; +} +?> +<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>"> +<?php +if ($vars['options_values']) { + foreach($vars['options_values'] as $value => $option) { + if ($value != $vars['value']) { + echo "<option value=\"$value\">{$option}</option>"; + } else { + echo "<option value=\"$value\" selected=\"selected\">{$option}</option>"; + } + } +} else { + foreach($vars['options'] as $option) { + if ($option != $vars['value']) { + echo "<option>{$option}</option>"; + } else { + echo "<option selected=\"selected\">{$option}</option>"; + } + } +} +?> +</select>
\ No newline at end of file diff --git a/views/installation/input/reset.php b/views/installation/input/reset.php new file mode 100644 index 000000000..bb8d278c3 --- /dev/null +++ b/views/installation/input/reset.php @@ -0,0 +1,26 @@ +<?php +/** + * Create a reset input button + * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides + * extra security which help prevent CSRF attacks. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['type'] Submit or reset, defaults to submit. + * + */ + +$vars['type'] = 'reset'; +$class = $vars['class']; +if (!$class) { + $class = "submit_button"; +} +$vars['class'] = $class; + +echo elgg_view('input/button', $vars);
\ No newline at end of file diff --git a/views/installation/input/securitytoken.php b/views/installation/input/securitytoken.php new file mode 100644 index 000000000..a2a4a0e01 --- /dev/null +++ b/views/installation/input/securitytoken.php @@ -0,0 +1,17 @@ +<?php +/** + * CSRF security token view for use with secure forms. + * + * It is still recommended that you use input/form. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +$ts = time(); +$token = generate_action_token($ts); + +echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token)); +echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts)); diff --git a/views/installation/input/submit.php b/views/installation/input/submit.php new file mode 100644 index 000000000..cfa7989d0 --- /dev/null +++ b/views/installation/input/submit.php @@ -0,0 +1,26 @@ +<?php +/** + * Create a submit input button + * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides + * extra security which help prevent CSRF attacks. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['type'] Submit or reset, defaults to submit. + * + */ + +$vars['type'] = 'submit'; +$class = $vars['class']; +if (!$class) { + $class = "submit_button"; +} +$vars['class'] = $class; + +echo elgg_view('input/button', $vars);
\ No newline at end of file diff --git a/views/installation/input/text.php b/views/installation/input/text.php new file mode 100644 index 000000000..7f69a2f93 --- /dev/null +++ b/views/installation/input/text.php @@ -0,0 +1,26 @@ +<?php +/** + * Elgg text input + * Displays a text input field + * + * @package Elgg + * @subpackage Core + + * @author Curverider Ltd + + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['disabled'] If true then control is read-only + * @uses $vars['class'] Class override + */ + +$class = $vars['class']; +if (!$class) { + $class = "input_text"; +} + +?> +<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file diff --git a/views/installation/install/footer.php b/views/installation/install/footer.php new file mode 100644 index 000000000..69cd27f66 --- /dev/null +++ b/views/installation/install/footer.php @@ -0,0 +1,10 @@ +<?php +/** + * Install footer - offers help links + */ +?> +<ul> + <li><a href="http://docs.elgg.org/wiki/Installation">Install instructions</a></li> + <li><a href="http://docs.elgg.org/wiki/Install_Troubleshooting">Install troubleshooting</a></li> + <li><a href="http://community.elgg.org/pg/groups/world/">Elgg community forums</a></li> +</ul>
\ No newline at end of file diff --git a/views/installation/install/forms/admin.php b/views/installation/install/forms/admin.php new file mode 100644 index 000000000..ae83cadea --- /dev/null +++ b/views/installation/install/forms/admin.php @@ -0,0 +1,21 @@ +<?php +/** + * Admin account form + * + * @uses $vars['variables'] Array of form variables. See ElggInstaller. + */ + +$vars['type'] = 'admin'; +$form_body = elgg_view('install/forms/template', $vars); + + +// @todo bug in current_page_url() with :8080 sites +//$url = current_page_url(); +$url = '/install.php?step=admin'; + +$params = array( + 'body' => $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/database.php b/views/installation/install/forms/database.php new file mode 100644 index 000000000..a3fa8dd65 --- /dev/null +++ b/views/installation/install/forms/database.php @@ -0,0 +1,20 @@ +<?php +/** + * Database form + * + * @uses $vars['variables'] Array of form variables. See ElggInstaller. + */ + +$vars['type'] = 'database'; +$form_body = elgg_view('install/forms/template', $vars); + +// @todo bug in current_page_url() with :8080 sites +//$url = current_page_url(); +$url = '/install.php?step=database'; + +$params = array( + 'body' => $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/settings.php b/views/installation/install/forms/settings.php new file mode 100644 index 000000000..67cba10f6 --- /dev/null +++ b/views/installation/install/forms/settings.php @@ -0,0 +1,20 @@ +<?php +/** + * Site settings form + * + * @uses $vars['variables'] Array of form variables. See ElggInstaller. + */ + +$vars['type'] = 'settings'; +$form_body = elgg_view('install/forms/template', $vars); + +// @todo bug in current_page_url() with :8080 sites +//$url = current_page_url(); +$url = '/install.php?step=settings'; + +$params = array( + 'body' => $form_body, + 'action' => $url, + 'disable_security' => TRUE, +); +echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/template.php b/views/installation/install/forms/template.php new file mode 100644 index 000000000..a2d93f42e --- /dev/null +++ b/views/installation/install/forms/template.php @@ -0,0 +1,27 @@ +<?php +/** + * Generic form template for install forms + * + * @uses $vars['variables'] + * @uses $vars['type'] Type of form: admin, database, settings + */ + +$variables = $vars['variables']; +$type = $vars['type']; + +$form_body = ''; +foreach ($variables as $field => $params) { + $label = elgg_echo("installation:$type:label:$field"); + $help = elgg_echo("installation:$type:help:$field"); + $params['internalname'] = $field; + + $form_body .= '<p>'; + $form_body .= "<label>$label</label>"; + $form_body .= elgg_view("input/{$params['type']}", $params); + $form_body .= "<span class=\"install_help\">$help</span>"; + $form_body .= '</p>'; +} + +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('next'))); + +echo $form_body; diff --git a/views/installation/install/header.php b/views/installation/install/header.php new file mode 100644 index 000000000..d821e31e5 --- /dev/null +++ b/views/installation/install/header.php @@ -0,0 +1,6 @@ +<?php +/** + * Install header + */ +?> +<h1>Elgg</h1> diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php new file mode 100644 index 000000000..d6a20ea2b --- /dev/null +++ b/views/installation/install/nav.php @@ -0,0 +1,35 @@ +<?php +/** + * Navigation for installation pages + * + * @uses $vars['url'] base url of site + * @uses $vars['next_step'] next step as string + * @uses $vars['refresh'] should refresh button be shown? + * @uses $vars['advance'] should the next button be active? + */ + + +// has a refresh button been requested +$refresh = ''; +if (isset($vars['refresh']) && $vars['refresh']) { + $refresh_text = elgg_echo('Refresh'); + $refresh = "<a href=\"\">$refresh_text</a>"; +} + +// create next button and selectively disable +$next_text = elgg_echo('next'); +$next_link = "{$vars['url']}install.php?step={$vars['next_step']}"; +$next = "<a href=\"$next_link\" disable=\"disable\">$next_text</a>"; +if (isset($vars['advance']) && !$vars['advance']) { + // disable the next button + $next = "<a class=\"disabled\">$next_text</a>"; +} + + +echo <<<___END +<div class="install_nav"> + $next + $refresh +</div> + +___END; diff --git a/views/installation/install/pages/admin.php b/views/installation/install/pages/admin.php new file mode 100644 index 000000000..1fdd5dced --- /dev/null +++ b/views/installation/install/pages/admin.php @@ -0,0 +1,8 @@ +<?php +/** + * Install create admin account page + */ + +echo autop(elgg_echo('install:admin:instructions')); + +echo elgg_view('install/forms/admin', $vars); diff --git a/views/installation/install/pages/complete.php b/views/installation/install/pages/complete.php new file mode 100644 index 000000000..60838a630 --- /dev/null +++ b/views/installation/install/pages/complete.php @@ -0,0 +1,14 @@ +<?php +/** + * Install completion page + */ + +echo autop(elgg_echo('install:complete:instructions')); + +?> + +<div class="install_nav"> +<?php + echo "<a href=\"{$vars['url']}index.php\">Go to site</a>"; +?> +</div> diff --git a/views/installation/install/pages/database.php b/views/installation/install/pages/database.php new file mode 100644 index 000000000..7765c6e48 --- /dev/null +++ b/views/installation/install/pages/database.php @@ -0,0 +1,16 @@ +<?php +/** + * Install database page + * + * @uses $vars['failure'] Settings file exists but something went wrong + */ + +if (isset($vars['failure']) && $vars['failure']) { + echo autop(elgg_echo('install:database:error')); + $vars['refresh'] = TRUE; + $vars['advance'] = FALSE; + echo elgg_view('install/nav', $vars); +} else { + echo autop(elgg_echo('install:database:instructions')); + echo elgg_view('install/forms/database', $vars); +}
\ No newline at end of file diff --git a/views/installation/install/pages/requirements.php b/views/installation/install/pages/requirements.php new file mode 100644 index 000000000..b6516840f --- /dev/null +++ b/views/installation/install/pages/requirements.php @@ -0,0 +1,39 @@ +<?php +/** + * Install requirements checking page + * + * @uses $vars['num_failures] Number of requirements failures + * @uses $vars['num_warnings] Number of recommendation warnings + */ + +if ($vars['num_failures'] != 0) { + $instruct_text = elgg_echo('install:requirements:instructions:failure'); +} elseif ($vars['num_warnings'] != 0) { + $instruct_text = elgg_echo('install:requirements:instructions:warning'); +} else { + $instruct_text = elgg_echo('install:requirements:instructions:success'); +} + +echo autop($instruct_text); + +$report = $vars['report']; +foreach ($report as $category => $checks) { + $title = elgg_echo("install:require:$category"); + echo "<h3>$title</h3>"; + echo "<ul>"; + foreach ($checks as $check) { + echo "<li class=\"{$check['severity']}\">"; + echo autop($check['message']); + echo "</li>"; + } + echo "</ul>"; +} + +$vars['refresh'] = TRUE; + +// cannot advance to next step with a failure +if ($vars['num_failures'] != 0) { + $vars['advance'] = FALSE; +} + +echo elgg_view('install/nav', $vars); diff --git a/views/installation/install/pages/settings.php b/views/installation/install/pages/settings.php new file mode 100644 index 000000000..6f20573ef --- /dev/null +++ b/views/installation/install/pages/settings.php @@ -0,0 +1,5 @@ +<?php + +echo autop(elgg_echo('install:settings:instructions')); + +echo elgg_view('install/forms/settings', $vars); diff --git a/views/installation/install/pages/welcome.php b/views/installation/install/pages/welcome.php new file mode 100644 index 000000000..f069e4ba7 --- /dev/null +++ b/views/installation/install/pages/welcome.php @@ -0,0 +1,8 @@ +<?php +/** + * Install welcome page + */ + +echo autop(elgg_echo('install:welcome:instructions')); + +echo elgg_view('install/nav', $vars); diff --git a/views/installation/install/sidebar.php b/views/installation/install/sidebar.php new file mode 100644 index 000000000..8136cd898 --- /dev/null +++ b/views/installation/install/sidebar.php @@ -0,0 +1,26 @@ +<?php +/** + * Install sidebar + * + * @uses $vars['step'] Current step + * @uses $vars['steps'] Array of steps + */ + +$current_step = $vars['step']; +$steps = $vars['steps']; + +$current_step_index = array_search($current_step, $steps); + +echo '<ol>'; +foreach ($steps as $index => $step) { + if ($index < $current_step_index) { + $class = 'past'; + } elseif ($index == $current_step_index) { + $class = 'present'; + } else { + $class = 'future'; + } + $text = elgg_echo("install:$step"); + echo "<li class=\"$class\">$text</li>"; +} +echo '</ol>'; diff --git a/views/installation/messages/errors/error.php b/views/installation/messages/errors/error.php new file mode 100644 index 000000000..2ec365890 --- /dev/null +++ b/views/installation/messages/errors/error.php @@ -0,0 +1,17 @@ +<?php +/** + * Elgg error message + * Displays a single error message + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['object'] An error message (string) + */ +?> + +<p> + <?php echo $vars['object']; ?> +</p>
\ No newline at end of file diff --git a/views/installation/messages/errors/list.php b/views/installation/messages/errors/list.php new file mode 100644 index 000000000..c270d6c0a --- /dev/null +++ b/views/installation/messages/errors/list.php @@ -0,0 +1,41 @@ +<?php +/** + * Elgg list errors + * Lists error messages + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['object'] An array of error messages + */ + +if (!empty($vars['object']) && is_array($vars['object'])) { + +?> +<style type="text/css"> +.messages_error { + border:1px solid #D3322A; + background:#F7DAD8; + color:#000000; + padding:3px 10px 3px 10px; + margin:20px 0px 0px 0px; + z-index: 9999; + position:relative; + width:95%; +} +</style> + <div class="database_settings"> + <div class="messages_errors"> + +<?php + foreach($vars['object'] as $error) { + echo elgg_view('messages/errors/error',array('object' => $error)); + //echo "<hr />"; + } +?> + </div> + </div> +<?php +}
\ No newline at end of file diff --git a/views/installation/messages/list.php b/views/installation/messages/list.php new file mode 100644 index 000000000..2410103da --- /dev/null +++ b/views/installation/messages/list.php @@ -0,0 +1,18 @@ +<?php +/** + * Elgg global system message list + * Lists all system messages + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['object'] The array of message registers + */ + +if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { + foreach($vars['object'] as $register => $list ) { + echo elgg_view("messages/{$register}/list", array('object' => $list)); + } +}
\ No newline at end of file diff --git a/views/installation/messages/messages/list.php b/views/installation/messages/messages/list.php new file mode 100644 index 000000000..ed169c692 --- /dev/null +++ b/views/installation/messages/messages/list.php @@ -0,0 +1,43 @@ +<?php +/** + * Elgg list system messages + * Lists system messages + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['object'] An array of system messages + */ + +if (!empty($vars['object']) && is_array($vars['object'])) { + +?> + +<style type="text/css"> +.messages { + border:1px solid #00cc00; + background:#ccffcc; + color:#000000; + padding:3px 10px 3px 10px; + margin:20px 0px 0px 0px; + z-index: 9999; + position:relative; + width:95%; +} +</style> + + <div class="messages"> + +<?php + foreach($vars['object'] as $message) { + echo elgg_view('messages/messages/message',array('object' => $message)); + } +?> + + </div> + +<?php + +}
\ No newline at end of file diff --git a/views/installation/messages/messages/message.php b/views/installation/messages/messages/message.php new file mode 100644 index 000000000..6bc24d730 --- /dev/null +++ b/views/installation/messages/messages/message.php @@ -0,0 +1,17 @@ +<?php +/** + * Elgg standard message + * Displays a single Elgg system message + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['object'] A system message (string) + */ +?> + +<p> + <?php echo nl2br($vars['object']); ?> +</p>
\ No newline at end of file diff --git a/views/installation/page_shells/default.php b/views/installation/page_shells/default.php new file mode 100644 index 000000000..b023197fa --- /dev/null +++ b/views/installation/page_shells/default.php @@ -0,0 +1,51 @@ +<?php +/** + * Elgg install pageshell + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['title'] The page title + * @uses $vars['body'] The main content of the page + * @uses $vars['sysmessages'] Array of system status messages + */ + +// we won't trust server configuration but specify utf-8 +header('Content-type: text/html; charset=utf-8'); + +// turn off browser caching +header('Pragma: public', TRUE); +header("Cache-Control: no-cache, must-revalidate", TRUE); +header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>Elgg Install : <?php echo $vars['title']; ?></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="SHORTCUT ICON" href="<?php echo $vars['url']; ?>_graphics/favicon.ico" /> + <link rel="stylesheet" href="<?php echo $vars['url']; ?>install/install.css" type="text/css" /> + </head> + <body> + <div id="elgg_wrapper"> + <div id="elgg_header"> + <?php echo elgg_view('install/header', $vars); ?> + </div> + <div id="elgg_sidebar"> + <?php echo elgg_view('install/sidebar', $vars); ?> + </div> + <div id="elgg_content"> + <h2><?php echo $vars['title']; ?></h2> + <?php echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?> + <?php echo $vars['body']; ?> + </div> + <div class="clearfloat"></div> + </div> + <div id="elgg_footer"> + <?php echo elgg_view('install/footer'); ?> + </div> + </body> +</html> |