From 67455583e5a598ca764c47272197af59f08cdc76 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 6 Apr 2008 21:07:29 +0000 Subject: [PATCH] This feature freeze is more of a feature mild chill... git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@769 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/setup/main.php | 4 ++++ ext/setup/theme.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/ext/setup/main.php b/ext/setup/main.php index e5bfc964..b2482d45 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -152,6 +152,10 @@ class Setup extends Extension { $page->set_mode("redirect"); $page->set_redirect(make_link("setup")); } + else if($event->get_arg(0) == "advanced") { + global $config; + $this->theme->display_advanced($event->page, $config->values); + } else { $panel = new SetupPanel(); send_event(new SetupBuildingEvent($panel)); diff --git a/ext/setup/theme.php b/ext/setup/theme.php index a9ccff8c..6de0eee8 100644 --- a/ext/setup/theme.php +++ b/ext/setup/theme.php @@ -52,10 +52,41 @@ class SetupTheme extends Themelet { $page->add_block(new Block("Setup", $table)); } + public function display_advanced($page, $options) { + $rows = ""; + foreach($options as $name => $value) { + $h_value = html_escape($value); + $len = strlen($h_value); + $box = ""; + if($len < 50) { + $box .= ""; + } + else { + $box .= ""; + } + $box .= ""; + $rows .= "$name$box"; + } + + $table = " +
+ + $rows + +
NameValue
+ "; + + $page->set_title("Shimmie Setup"); + $page->set_heading("Shimmie Setup"); + $page->add_block(new Block("Navigation", $this->build_navigation(), "left", 0)); + $page->add_block(new Block("Setup", $table)); + } + protected function build_navigation() { return " Index
Help +
Advanced "; }