ich habe folgende Extension (Just include library) installiert:
<?php
require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_txstyleswitcher_pi1 extends tslib_pibase {
var $prefixId = 'tx_txstyleswitcher_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_txstyleswitcher_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'tx_styleswitcher'; // The extension key.
// var $pi_checkCHash = TRUE;
var $conf;
/***** [Put your description here] ******/
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
// $this->pi_USER_INT_obj=1;
/***** Abfrage der Cookies *****/
$style = t3lib_div::GPvar("S");
$cookieName = "my_style";
/** Cookie **/
if (!isset($GLOBALS["HTTP_COOKIE_VARS"][$cookieName])) {
if ($style) {
$GLOBALS["TSFE"]->set_no_cache();
// set a cookie
setcookie($cookieName,$style,time()+(3600*24*300));
}
} else {
$GLOBALS["TSFE"]->set_no_cache();
$style = $GLOBALS["HTTP_COOKIE_VARS"][$cookieName];
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tx_styleswitcher/pi1/class.tx_txstyleswitcher_pi1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tx_styleswitcher/pi1/class.tx_txstyleswitcher_pi1.php']);
}
?>
außerdem habe ich im Setup:
config.linkVars = S
page.stylesheet = fileadmin/template/main/standard.css
[globalVar = GP:S = standard]
page.stylesheet = fileadmin/template/main/standard.css
[global]
[globalVar = GP:S = kontrast]
page.stylesheet = fileadmin/template/main/kontrast.css
[global]
funktioniert das so überhaupt? Ich hab das Gefühl ich versteh da noch gar nichts. Wie spreche ich jetzt das ganze mit einem Link an? also Links:
--> Kontrast
--> Standard
Stephan