From b8053c9ddf3e393f76594e7dccc2f81f7116fd85 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 10 Sep 2009 21:10:20 -0700 Subject: Rename "after_installer" to "welcome_message" in the code to make it clearer what its purpose is. Add some spacing in the theme for it so that it's less cramped. --- installer/installer.php | 5 +++ modules/gallery/controllers/after_install.php | 30 ------------------ modules/gallery/controllers/welcome_message.php | 30 ++++++++++++++++++ modules/gallery/helpers/gallery_theme.php | 4 +-- modules/gallery/views/after_install.html.php | 29 ----------------- .../gallery/views/after_install_loader.html.php | 7 ----- modules/gallery/views/welcome_message.html.php | 36 ++++++++++++++++++++++ .../gallery/views/welcome_message_loader.html.php | 7 +++++ themes/default/css/screen.css | 4 +++ 9 files changed, 84 insertions(+), 68 deletions(-) delete mode 100644 modules/gallery/controllers/after_install.php create mode 100644 modules/gallery/controllers/welcome_message.php delete mode 100644 modules/gallery/views/after_install.html.php delete mode 100644 modules/gallery/views/after_install_loader.html.php create mode 100644 modules/gallery/views/welcome_message.html.php create mode 100644 modules/gallery/views/welcome_message_loader.html.php diff --git a/installer/installer.php b/installer/installer.php index 7fed25c7..4480e35e 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -47,6 +47,11 @@ class installer { } static function unpack_var() { + if (!file_exists(VARPATH)) { + mkdir(VARPATH); + chmod(VARPATH, 0777); + } + include(DOCROOT . "installer/init_var.php"); return true; } diff --git a/modules/gallery/controllers/after_install.php b/modules/gallery/controllers/after_install.php deleted file mode 100644 index b640092f..00000000 --- a/modules/gallery/controllers/after_install.php +++ /dev/null @@ -1,30 +0,0 @@ -admin) { - url::redirect(item::root()->url()); - } - - $v = new View("after_install.html"); - $v->user = user::active(); - print $v; - } -} diff --git a/modules/gallery/controllers/welcome_message.php b/modules/gallery/controllers/welcome_message.php new file mode 100644 index 00000000..a4b690e3 --- /dev/null +++ b/modules/gallery/controllers/welcome_message.php @@ -0,0 +1,30 @@ +admin) { + url::redirect(item::root()->url()); + } + + $v = new View("welcome_message.html"); + $v->user = user::active(); + print $v; + } +} diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index 69c5a091..8c97f124 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -70,9 +70,9 @@ class gallery_theme_Core { return L10n_Client_Controller::l10n_form(); } - if ($session->get("after_install")) { + if (true || $session->get("after_install")) { $session->delete("after_install"); - return new View("after_install_loader.html"); + return new View("welcome_message_loader.html"); } } diff --git a/modules/gallery/views/after_install.html.php b/modules/gallery/views/after_install.html.php deleted file mode 100644 index 897946a2..00000000 --- a/modules/gallery/views/after_install.html.php +++ /dev/null @@ -1,29 +0,0 @@ - -

- -

- -

- -

- -

- %user_name account. The very first thing you should do is to change your password to something that you'll remember.", array("user_name" => $user->name)) ?> -

- -

- id}") ?>" - title="for_html_attr() ?>" - id="gAfterInstallChangePasswordLink" class="gButtonLink ui-state-default ui-corners-all"> - -

- -

- Gallery website has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> -

- -

- documentation site or you can ask for help in the forums!", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> - diff --git a/modules/gallery/views/after_install_loader.html.php b/modules/gallery/views/after_install_loader.html.php deleted file mode 100644 index c2e3e1d9..00000000 --- a/modules/gallery/views/after_install_loader.html.php +++ /dev/null @@ -1,7 +0,0 @@ - -for_html_attr() ?>" - href=""/> - diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php new file mode 100644 index 00000000..5515c3dc --- /dev/null +++ b/modules/gallery/views/welcome_message.html.php @@ -0,0 +1,36 @@ + +

+

+ +

+ +

+

+ +

+

+ +

+ %user_name account. You should change your password to something that you'll remember.", array("user_name" => $user->name)) ?> +

+ +

+ id}") ?>" + title="for_html_attr() ?>" + id="gAfterInstallChangePasswordLink" + class="gButtonLink ui-state-default ui-corners-all"> + + + +

+ +

+ Gallery website has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> +

+ +

+ documentation site or you can ask for help in the forums!", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> +

+
diff --git a/modules/gallery/views/welcome_message_loader.html.php b/modules/gallery/views/welcome_message_loader.html.php new file mode 100644 index 00000000..2c6bffca --- /dev/null +++ b/modules/gallery/views/welcome_message_loader.html.php @@ -0,0 +1,7 @@ + +for_html_attr() ?>" + href=""/> + diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index fec618e6..d4c23155 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -773,6 +773,10 @@ form .gError, text-decoration: underline; } +#gWelcomeMessage p { + padding-bottom: 1em; +} + /* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .gPager { -- cgit v1.2.3