diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-11 21:07:21 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-11 21:07:21 +0000 |
commit | e58b955d4acc44bc2b49fffbffda42ad8b66069d (patch) | |
tree | d09ac5df5396926902472a5dc8a8c1322261bea8 | |
parent | 8fe1880e3016fe7a06a0c70b80604b93b9b3f01b (diff) |
Bag the header("Location:", ...);exit() and replace with
url:site(url::abs_file(...))
Create a login_page.html to be used when there is no guest access to
the root album. It doesn't have a sidebar nor breadcrumb.
-rw-r--r-- | modules/user/controllers/login.php | 3 | ||||
-rw-r--r-- | themes/default/views/login_page.html.php | 67 | ||||
-rw-r--r-- | themes/default/views/page.html.php | 4 |
3 files changed, 69 insertions, 5 deletions
diff --git a/modules/user/controllers/login.php b/modules/user/controllers/login.php index ab2dd379..62420ab1 100644 --- a/modules/user/controllers/login.php +++ b/modules/user/controllers/login.php @@ -27,9 +27,8 @@ class Login_Controller extends Controller { } public function page() { - $view = new Theme_View("page.html"); + $view = new Theme_View("login_page.html"); $view->page_type = "login"; - $view->content = "<script>\$(\"#gLoginLink\").ready(function() {\$(\"#gLoginLink\").click();});</script>"; print $view; } diff --git a/themes/default/views/login_page.html.php b/themes/default/views/login_page.html.php new file mode 100644 index 00000000..8e0639d5 --- /dev/null +++ b/themes/default/views/login_page.html.php @@ -0,0 +1,67 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> + <title> + <?= t("Please Login to Gallery") ?> + </title> + <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" /> + <link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" + media="screen,print,projection" /> + <link rel="stylesheet" type="text/css" href="<?= url::file("lib/superfish/css/superfish.css") ?>" + media="screen" /> + <link rel="stylesheet" type="text/css" href="<?= url::file("lib/themeroller/ui.base.css") ?>" + media="screen,print,projection" /> + <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/screen.css") ?>" + media="screen,print,projection" /> + <!--[if IE]> + <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>" + media="screen,print,projection" /> + <![endif]--> + <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script> + <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script> + <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script> + <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script> + <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script> + <script src="<?= $theme->url("js/jquery.scrollTo.js") ?>" type="text/javascript"></script> + <script src="<?= $theme->url("js/jquery.localscroll.js") ?>" type="text/javascript"></script> + <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script> + <?= $theme->head() ?> + <script> + $("#gLoginLink").ready(function() { + $("#gLoginLink").click(); + }); + </script> + + </head> + + <body> + <?= $theme->page_top() ?> + <div id="doc4" class="yui-t5 gView"> + <div id="hd"> + <?= $theme->site_status() ?> + <div id="gHeader"> + <?= $theme->display("header.html") ?> + </div> + </div> + <div id="bd"> + <div id="yui-main"> + <div class="yui-b"> + <div id="gContent" class="yui-g"> + <?= $theme->messages() ?> + </div> + </div> + </div> + <div id="gSidebar" class="yui-b"> </div> + </div> + <div id="ft"> + <div id="gFooter"> + <?= $theme->display("footer.html") ?> + </div> + </div> + </div> + <?= $theme->page_bottom() ?> + </body> +</html> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index e064665c..d463af1b 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -5,9 +5,7 @@ <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title> - <? if ($page_type == "login"): ?> - <?= t("Please Logon to Gallery") ?> - <? elseif ($page_type == "tag"): ?> + <? if ($page_type == "tag"): ?> <?= t("Browse Tags") ?> :: <?= $tag->name ?> <? else: ?> <?= t("Browse Photos") ?> :: <?= $item->title ?> |