Permalink
Browse files

adding better 404

  • Loading branch information...
1 parent 4a83eba commit ea76dea110b88275981363e3a1138f440e21cbd1 @mgkimsal committed May 20, 2012
@@ -10,7 +10,7 @@ public function _init()
public function errorAction()
{
-
+ $this->_helper->_layout->setLayout("error");
$errors = $this->_getParam('error_handler');
switch ($errors->type) {
@@ -36,6 +36,7 @@ public function errorAction()
}
$this->view->request = $errors->request;
+
}
public function getLog()
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title><?php echo $this->title;?></title>
+ <meta name="description" content="<?php echo $this->description;?>">
+ <meta name="author" content="">
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <!-- Le styles -->
+ <script src="<?=$this->baseUrl();?>js/jquery-1.7.2.min.js"></script>
+ <link rel="stylesheet" href="<?=$this->baseUrl();?>bootstrap/css/bootstrap.min.css"/>
+ <link rel="stylesheet" href="<?=$this->baseUrl();?>css/<?=$this->theme;?>.bootstrap.min.css"/>
+ <link rel="stylesheet" href="<?=$this->baseUrl();?>css/05_main.css"/>
+ <script src="<?=$this->baseUrl();?>js/bootstrap-alert.js"></script>
+ <style type="text/css">
+ body {
+ padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
+ }
+
+ </style>
+
+ </head>
+
+ <body>
+
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="#">Site</a>
+
+ <ul class="nav">
+<li><a href="<?=$this->baseUrl();?>">Home</a></li>
+ </ul>
+<?php if($this->config['register']['usesUsers']==1) : ?>
+<?php if(!$this->loggedIn()) : ?>
+ <form method="post" action="<?php echo $this->baseUrl();?>auth" class="pull-right topform">
+ <input class="topinput input-small" type="text" name="username" placeholder="Username">
+
+ <input class="topinput input-small" type="password" name="password" placeholder="Password">
+ <input class="btn blacktext btn-info" name="topbtn" type="submit" value="Sign in"/>
+ <input class="btn blacktext btn-info" name="topbtn" type="submit" value="Register"/>
+ </form>
+<?php else : ?>
+<div class="pull-right loggedin">
+Welcome <?php echo $this->loggedInAs()->username; ?>
+ &nbsp;
+<a href="<?php echo $this->baseUrl();?>auth/logout">Log out</a>
+<?php endif; ?>
+ <?php endif; ?>
+</div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="container">
+<?php echo $this->flashMessages();?>
+ <div class="content">
+ <div class="page-header">
+ <h1><?php echo $this->pageTitle ?: "page"; ?>
+ <small><?php echo $this->pageSubTitle ?: ""; ?> </small></h1>
+ </div>
+ <div class="row">
+
+
+ <div class="span12">
+
+ <?php echo $this->layout()->content; ?>
+
+ </div>
+ </div>
+ </div>
+
+ <footer>
+ <p>&copy; site <?=date("Y");?></p>
+
+ </footer>
+
+ </div> <!-- /container -->
+<script>
+ $(".alert").alert();
+</script>
+ </body>
+</html>
@@ -1,28 +1,25 @@
-<!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">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Zend Framework Default Application</title>
-</head>
-<body>
- <h1>An error occurred</h1>
+
+
+
+<div class="row centered">
+ <h1>Whoops!</h1>
<h2><?php echo $this->message ?></h2>
+</div>
+
+ <div class="row centered">
+<img src="<?=$this->baseUrl();?>images/puppy1.jpg" alert="404 puppy1"/>
+ </div>
- <?php if (isset($this->exception)): ?>
- <h3>Exception information:</h3>
- <p>
- <b>Message:</b> <?php echo $this->exception->getMessage() ?>
- </p>
+<div class="row centered">
+We couldn't find the page you were looking for,
+ <br/>
+ so here's a cute puppy to help make up for our mistake!
+ <br/>
+ <br/>
- <h3>Stack trace:</h3>
- <pre><?php echo $this->exception->getTraceAsString() ?>
- </pre>
+</div>
- <h3>Request Parameters:</h3>
- <pre><?php echo var_export($this->request->getParams(), true) ?>
- </pre>
- <?php endif ?>
</body>
</html>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ea76dea

Please sign in to comment.