Skip to content

Commit

Permalink
README update, with images
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmot committed Apr 18, 2022
1 parent 1d58abc commit 9e4721a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ This repository contains a "generic" HTTP error page. It's written in PHP/HTML a
## Features

* A single file for all 40X HTTP errors
* Background image(s) are random and selected from a "pool" of error images when an error page is accessed
* Two options for the page background -
* A background image, randomly selected from a "pool" of images.
* A moving gradient of four random colors.
* All files (*except* `.htaccess`) are kept in a single folder
* Easy to copy to a website and use. You will only need to edit the `.htaccess` file
* An option to redirect automatically to a different page

Optional Page Backgrounds:

<div align="center">
<figure>
<!-- NOTE: When Github renders the images it will REMOVE the "margin", and ADD "max-width:100%" -->
<img src="./mdimg/sshot-bgimg.jpg" style="width:25%;border: 2px solid black;margin-right: 1rem;"; alt="Screen Shot of Error Page with an image background"/>
<img src="./mdimg/sshot-bggrad.jpg" style="width:25%;border: 2px solid black;margin-right: 1rem;"; alt="Error Page with a moving gradient background"/>
<br>
<figcaption><strong>Random Image and Random Color Gradient Background</strong></figcaption>
</figure>
</div>
<br>

# Installation

Two installation locations are possible. The first is a "local" location on an PC or NAS hosted HTTP server, and the second is on a "live" server.
Expand All @@ -30,10 +45,10 @@ At the top of `httperror.php` you find this -

```php
// uncomment for testing
//define('_DEBUG', true);
define('_DEBUG', false);
```

Uncomment the `//define('_DEBUG', true);` line and "debug" will be active. You can then load the page from the server and a `404` error will be simulated.
Change `false` to `true` and "debug" will be active. You can then load the page from the server and a `404` error will be simulated.

### Folder Junctions

Expand Down Expand Up @@ -123,6 +138,18 @@ To see the error page working open your browser and go to -

You should see a "400" error page.

## Changing Backgrounds

Near the top of the `httperror.php` file:

```
// can't have both!!
define('_IMG_POOL', false);
define('_GRADIENT', true);
```

Set `_IMG_POOL` or `_GRADIENT` to `true` to select that background type.

# Development Notes

* Development Environment:
Expand Down
Binary file added mdimg/sshot-bggrad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mdimg/sshot-bgimg.jpg
Loading
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 9e4721a

Please sign in to comment.