DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: 404 Sponsoring

Author:Michiel Roos
Created:2010-07-31T23:33:43
Changed by:Michiel Roos
Changed:2013-01-27T22:02:38
Email:extensions@typofree.org
Info 2:
Info 3:
Info 4:

EXT: 404 Sponsoring

Extension Key: sponsoring404

Copyright 2010-2011, Michiel Roos <extensions@typofree.org>

A great Peter Voets idea!

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: 404 Sponsoring 1

Introduction 3

What does it do? 3

An extension that uses your 404 page to support charity. This great idea is from Peter Voets. You can find more information on the 404sponsoring site: http://www.404sponsoring.info/ 3

Features 3

Screenshots 3

Configure the extension using the TypoScript Constant editor 3

Example RealURL configuration 3

Example 404 pages 4

General usage 8

Administration 9

Installation 9

Extension installation 9

Install the static template 9

Configure RealURL 9

Configure TYPO3 to redirect to sponsoring404 9

Configuration 10

Known problems 11

TODO 12

Changelog 13

Introduction

What does it do?

An extension that uses your 404 page to support charity. This great idea is from Peter Voets. You can find more information on the 404sponsoring site: http://www.404sponsoring.info/

Features

  • Choose a charity to show on your 404 page
  • Let the system randomly pick a 404 page to show

Screenshots

Everybody loves screenshots.

Configure the extension using the TypoScript Constant editor

img-1 Illustration 1: Configure the extension using the TypoScript Constant editor

Example RealURL configuration

img-2 Illustration 2: Example RealURL configuration

Example 404 pages

img-3 Illustration 3: Example 404 page

img-4 Illustration 4: Example 404 page

img-5 Illustration 5: Example 404 page

img-6 Illustration 6: Example 404 page

General usage

  • Go to a page that does not exist
  • Look at the nice 404 page
  • Click through to the charity
  • See where you can help

Administration

Installation

Extension installation

Install the extension using the extension manager.

Install the static template

Install the static template using the template tool.

img-7 Illustration 7: Include static template

Configure RealURL

This step is optional. You can use this extension without RealURL.

The extension replaces your entire site template with it's own HTML templates for 404 messages. The extension uses a different pagetype from the default TYPO3 pagetype. We can use the fileName configuration option in RealURL to register our own pagetype under the filename 404.htm for example:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
  '_DEFAULT' => array (
    'fileName' => array (
      'index' => array (
        '404.htm' => array (
          'keyValues' => array (
            'type' => 1280570199,
          ),
        ),
      ),
    ),
  ),
);

All pages using the sponsoring404 pagetype will display the 404 page. So we only need to map the pagetype to a filename of our liking. You can also use 404.html, 404.404 or something else. You will probably never see the filename directly because you will be redirected to the page when you call a non-existing URI.

Configure TYPO3 to redirect to sponsoring404

TYPO3 can be configured to do a redirect to a page when it can not find the page a visitor is looking for. This can be configured in the Install Tool. Under the Frontend section there is a configuration variable called: pageNotFound_handling.

You can configure this to point to our pagetype:

$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/?type=1280570199';

Or to the value you have configured in your RealURL configuration:

$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/404.htm';

Configuration

The extension can be configured using the TypoScript Constant editor.

img-1 Illustration 8: Configuration using the TypoScript Constant Editor

The extension has two configuration options:

  • The charity to show on the 404 page
  • The path to the templates

In the extension the templates are stored in:

EXT:sponsoring404/Resources/Private/Templates/

You can copy the templates from the extension directory and place them in a folder in the fileadmin. This enables you to modify the templates to your liking. You may want to add links to your homepage, sitemap, search page etc.

Known problems

If you find any problems, please report them over at forge:

http://forge.typo3.org/projects/extension-sponsoring404/issues

Please take some time and make a proper report stating at least:

  • version of the extension
  • reproducibility
  • steps to reproduce
  • observed behavior
  • expected behavior

Writing a good bug report will help us to fix the bugs faster and better.

TODO

Currently we have no TODO. If you have great innovative ideas, please let us know by posting a feature request:

http://forge.typo3.org/projects/extension-sponsoring404/issues

Changelog

Version

a

Version

b

Date

c

Changes

1.2.1

a

1.2.1

b

27 January 2013

c

New templates

1.2.0

a

1.2.0

b

16 March 2011

c

New templates

1.1.0

a

1.1.0

b

1 September 2010

c

New templates

1.0.0

a

1.0.0

b

1 August 2010

c

First release

img-8

EXT: 404 Sponsoring 0