[IMPROVED] Adding customizable error page to MPOS
* `.htaccess` is used to re-define the error documents * redirects to `index.php?page=error&action=<code>` * does not work for MPOS inside subfolders yet Addresses #734. If this works we can add this to all the other themes.
This commit is contained in:
parent
c89831943b
commit
13c06715fc
@ -1,3 +1,4 @@
|
||||
ErrorDocument 404 /index.php?page=error&action=404
|
||||
RedirectMatch 404 /templates(/|$)
|
||||
RedirectMatch 404 /include(/|$)
|
||||
RedirectMatch 404 /.git(/|$)
|
||||
|
||||
9
public/include/pages/error.inc.php
Normal file
9
public/include/pages/error.inc.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// Make sure we are called from index.php
|
||||
if (!defined('SECURITY'))
|
||||
die('Hacking attempt');
|
||||
|
||||
// Tempalte specifics
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
?>
|
||||
9
public/include/pages/error/404.inc.php
Normal file
9
public/include/pages/error/404.inc.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// Make sure we are called from index.php
|
||||
if (!defined('SECURITY'))
|
||||
die('Hacking attempt');
|
||||
|
||||
// Tempalte specifics
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
?>
|
||||
6
public/templates/mpos/error/404/default.tpl
Normal file
6
public/templates/mpos/error/404/default.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
<article class="module width_full">
|
||||
<header><h3>{$GLOBAL.website.name}</h3></header>
|
||||
<div class="module_content">
|
||||
<p>The page you requested was not found.</p>
|
||||
</div>
|
||||
</article>
|
||||
6
public/templates/mpos/error/default.tpl
Normal file
6
public/templates/mpos/error/default.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
<article class="module width_full">
|
||||
<header><h3>{$GLOBAL.website.name}</h3></header>
|
||||
<div class="module_content">
|
||||
<p>The page you requested was not found.</p>
|
||||
</div>
|
||||
</article>
|
||||
Loading…
Reference in New Issue
Block a user