Project

General

Profile

Feature #22327 ยป feature_13916.diff

Administrator Admin, 2010-03-25 17:42

View differences:

simulatestatic/class.tx_simulatestatic_realurl.php 2010-03-25 17:21:27.000000000 +0100
<?php
/***************************************************************
* Copyright notice
*
* (c) 1999-2009 Kasper Skaarhoj <kasperYYYY@typo3.com>
* (c) 2008-2009 Benjamin Mack <benni . typo3 . o)rg>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Class to enable peacefull coexistence of SimulateStatic and RealURL by
* switching on respectSimulateStaticURLs via RealURL's autoconf feature
*
* @author Gregor Hermens <gregor.hermens@a-mazing.de>
*/
class tx_simulatestatic_realurl {
/**
* Generates additional RealURL configuration and merges it with provided configuration
*
* @param array $params Default configuration
* @param tx_realurl_autoconfgen $pObj Parent object
* @return array Updated configuration
*/
function addSimulateStaticConfig($params, &$pObj) {
return array_merge_recursive($params['config'], array(
'init' => array(
'respectSimulateStaticURLs' => true
)
));
}
}
?>
simulatestatic/ext_localconf.php 2010-03-25 17:22:12.000000000 +0100
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookInitConfig';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookLinkDataPostProc';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][$_EXTKEY] = 'EXT:simulatestatic/class.tx_simulatestatic.php:&tx_simulatestatic->hookCheckAlternativeIDMethods';
// RealURL autoconfiguration
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration']['simulatestatic'] = 'EXT:simulatestatic/class.tx_simulatestatic_realurl.php:tx_simulatestatic_realurl->addSimulateStaticConfig';
?>
    (1-1/1)