diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-10 21:26:21 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-10 21:26:21 -0700 |
commit | fbb58671d1a6dd1719566c7e3813a0deee6d00ca (patch) | |
tree | 994f3b69451008ddc29836d695b326415a2efc0a | |
parent | 25ea6085b78423ee651dc21b639c5f10f59dcaf0 (diff) | |
parent | 190d7aaa55b4f55ea3d93fb8a3d4650d7e1fc85c (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
-rw-r--r-- | installer/installer.php | 5 | ||||
-rw-r--r-- | modules/gallery/controllers/welcome_message.php (renamed from modules/gallery/controllers/after_install.php) | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/after_install.html.php | 29 | ||||
-rw-r--r-- | modules/gallery/views/after_install_loader.html.php | 7 | ||||
-rw-r--r-- | modules/gallery/views/welcome_message.html.php | 36 | ||||
-rw-r--r-- | modules/gallery/views/welcome_message_loader.html.php | 7 | ||||
-rw-r--r-- | themes/default/css/screen.css | 4 |
8 files changed, 55 insertions, 39 deletions
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/welcome_message.php index b640092f..a4b690e3 100644 --- a/modules/gallery/controllers/after_install.php +++ b/modules/gallery/controllers/welcome_message.php @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class After_Install_Controller extends Controller { +class Welcome_Message_Controller extends Controller { public function index() { if (!user::active()->admin) { url::redirect(item::root()->url()); } - $v = new View("after_install.html"); + $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..20dfeb04 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -72,7 +72,7 @@ class gallery_theme_Core { if ($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 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<h1 style="display: none"> - <?= t("Welcome to Gallery 3!") ?> -</h1> - -<p> - <?= t("Congratulations on choosing Gallery to host your photos. We're confident that you're going to have a great experience.") ?> -</p> - -<p> - <?= t("You're logged in to the <b>%user_name</b> account. The very first thing you should do is to change your password to something that you'll remember.", array("user_name" => $user->name)) ?> -</p> - -<p> - <a href="<?= url::site("form/edit/users/{$user->id}") ?>" - title="<?= t("Edit Your Profile")->for_html_attr() ?>" - id="gAfterInstallChangePasswordLink" class="gButtonLink ui-state-default ui-corners-all"><?= t("Change Password Now") ?></a> - <script> - $("#gAfterInstallChangePasswordLink").gallery_dialog(); - </script> -</p> - -<p> - <?= t("Want to learn more? The <a href=\"%url\">Gallery website</a> has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> -</p> - -<p> - <?= t("Having problems? There's lots of information in our <a href=\"%codex_url\">documentation site</a> or you can <a href=\"%forum_url\">ask for help in the forums!</a>", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> -</ul> 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 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<span id="gAfterInstall" - title="<?= t("Welcome to Gallery 3")->for_html_attr() ?>" - href="<?= url::site("after_install") ?>"/> -<script type="text/javascript"> - $(document).ready(function(){$("#gAfterInstall").gallery_dialog({immediate: true});}); -</script> 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 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<div id="gWelcomeMessage"> + <h1 style="display: none"> + <?= t("Welcome to Gallery 3!") ?> + </h1> + + <p> + <h2> + <?= t("Congratulations on choosing Gallery to host your photos. You're going to have a great experience!") ?> + </h2> + </p> + + <p> + <?= t("First things first. You're logged in to the <b>%user_name</b> account. You should change your password to something that you'll remember.", array("user_name" => $user->name)) ?> + </p> + + <p> + <a href="<?= url::site("form/edit/users/{$user->id}") ?>" + title="<?= t("Edit Your Profile")->for_html_attr() ?>" + id="gAfterInstallChangePasswordLink" + class="gButtonLink ui-state-default ui-corners-all"> + <?= t("Change Password Now") ?> + </a> + <script> + $("#gAfterInstallChangePasswordLink").gallery_dialog(); + </script> + </p> + + <p> + <?= t("Want to learn more? The <a href=\"%url\">Gallery website</a> has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> + </p> + + <p> + <?= t("Having problems? There's lots of information in our <a href=\"%codex_url\">documentation site</a> or you can <a href=\"%forum_url\">ask for help in the forums!</a>", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> + </p> +</div> 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 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<span id="gWelcomeMessageLink" + title="<?= t("Welcome to Gallery 3")->for_html_attr() ?>" + href="<?= url::site("welcome_message") ?>"/> +<script type="text/javascript"> + $(document).ready(function(){$("#gWelcomeMessageLink").gallery_dialog({immediate: true});}); +</script> 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 { |