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.

TSLib Patcher

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Jean-David Gadina
Changed:2007-12-12T14:51:32
Email:info@macmade.net
Info 2:
Info 3:
Info 4:

TSLib Patcher

Extension Key: tslib_patcher

Copyright 2000-2002, Jean-David Gadina, <info@macmade.net>

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

TSLib Patcher 1

Introduction 1

What does it do? 1

Important warning 1

Users manual 2

Installation 2

Known problems 3

To-Do list 3

Changelog 3

Introduction

What does it do?

This extension provides a correction for some bugs in the TSLib core classes.

Actually, it mainly correct bugs related to the cache hash (cHash) variable. The use of this extension should increase the overall performances of your TYPO3 website.

The cHash URL parameter is used when URL parameters other than id, type, etc are used, in order to cache the page state. As said in the official documentation:

«Each link involving more parameters than the &id must contain “&cHash=[hash string]” in addition. The value of “&cHash” is used on the server to verify that the combination of additional parameters is made by the server itself and not forged by an outside spammer.»

Unfortunately, the core typoLink function, which is used in TypoScript and usually in TYPO3 extensions, is buggy and does not generate correctly the cHash.

In addition, there is absolutely no support for the cHash in the core TS menus. This last case is really problematic when you use the RealURL extension, and/or if you have a multi-language website. For instance, if you take that URL: http://mydomain/en/typo3-test- page/index.html (which is a RealURL URL), it means something like http://mydomain/index.php?id=35&L=1 .

As you can see, with RealURL, there is always the L variable in the URL. So a cHash is requested. As the TS menus did not generate the cHash, it causes problems to the TYPO3 mechanism.

This extension fixes the typoLink function and the TS menu classes, in order to have always a correct cHash value when needed. It also fixes some cHash related bugs in the RealURL classes,

To know more about the cHash, please see http://typo3.org/development/articles/the-mysteries-of-chash/

Important warning

This extension uses the XCLASS mechanism in order to correct some TYPO3 core classes, as there is no other way to do it. So it won't work if you already have an extension which does an XCLASS on the same core classes (except for the imagelightbox2 extension – see below).

Please also note that this extension is an override of some TYPO3 core classes, I've tried to test the most used cases, but I can't test every configuration. Please report any bug you may find.

This extension was build and tested on TYPO3 4.1.2.

Users manual

Installation

The installation of this extension is very simple. Just connect to the TYPO3 Extension Repository and download «TSLib Patcher» (tslib_patcher), located in the frontend section.Configuration

On the installation screen, you'll notice some options:

img-1

Here, you can choose which TYPO3 core classes will be overriden. If you let the default values, no core class will be overriden.

Enabling «TSLib Content» will provide a fix for the typoLink function (for PHP and TypoScript).

Enabling «TSLib Menu» will fix the cHash problem for the TypoScript menus.

Enabling «RealURL» will fixe some cHash bugs in RealURL. This is required in you use RealURL. Otherwise, don't enable this.

Enabling «Force cHash»will provide a strong check for the cHash parameter. You shouldn't turn this on for production boxes. Use it only for development purpose.

Enabling «LightBox compatibility»will allows you to use the kj_imagelightbox2 extension with tslib_patcher. Only enable this if you use the kj_imagelightbox2.

Note that this «Force cHash» option is taken from the «cHash Checker» (pp_chashchecker) extension, developped by Popy.

Please see http://typo3.org/extensions/repository/view/pp_chashchecker/1.0.0/ for more informations.

Known problems

Please contact me for any problem related to that extension.

To-Do list

Please contact me if you have any suggestion for this extension.

Changelog

((generated))

0.1.4: 5 th public release
  • The extension is now compatible with the kj_imagelightbox2 extension.
  • Fixed a bug with the addMissingSlash option of RealURL.
  • Fixed a bug with the email links.
0.1.3: 4 th public release

Fixed a bug with PHP4. The extension now also works on PHP4.

0.1.2: 3 rd public release

Redesign of the class extension of the tslib_menu classes.

0.1.1: 2 nd public release

Added method getTypoLink().

0.1.0: 1 st public release

img-2 TSLib Patcher - 3