hallo,
möchte eine extension bauen die das aktuelle html template aus einen cookie ausliest, damit jeder benutzer sein liebliengstemplate auswählen kann.beim nächsten start ist es automatisch aktiv.
Leider bekomme ich die globale variable nicht angehängt
hier mein script
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$cookieName = "my_template";
$wid = $GLOBALS["HTTP_COOKIE_VARS"][$cookieName];
$default = "standart";
// wmid Abfrage wenn ein Cookie bereits existiert
if (!isset($GLOBALS["HTTP_COOKIE_VARS"][$cookieName])) {
$GLOBALS["TSFE"]->set_no_cache();
setcookie($cookieName,$default,time()+(3600*24*30));
echo "setcookie";
}
else {
$GLOBALS['TSFE']->linkVars = "T=".$wid ;
echo "cookie ".$wid;
}
if(strstr($GLOBALS['TSFE']->linkVars, '&T=')) {
$GLOBALS['TSFE']->linkVars = ereg_replace('&T=[0-9]*' , '', $GLOBALS['TSFE']->linkVars);$GLOBALS['TSFE']->linkVars = "T=".$wid ;
}
return $GLOBALS['TSFE']->linkVars = "T=".$wid ;
}
}
wie kann ich typo3 beibringen, immer automatisch "T=".$wid anzuhängen?
thx im voraus