[Typo3] one-time displayed popup

Daniel daniel.rampanelli at gmail.com
Sat Aug 6 13:01:36 CEST 2005


hi there,

is there a way to display a popup-window only one time pro user? how
can I do it? because it is very annoying to get displayed the
popup-window every time.

i have tried it with an userFunc that checks if a session variable is
set. if it is not set, then it will return trze and set the variable.
if not, it returns false.

here my userFunc snippet:
function user_check() {
	if(!is_array($GLOBALS['TSFE']->fe_user->getKey('ses', 'display_popup'))) {
		$GLOBALS['TSFE']->fe_user->setKey('ses', 'display_popup', array());
		$GLOBALS['TSFE']->fe_user->storeSessionData();
		return true;
	} else {
		return false;
	}	
}

and my typoscript snippet:
[globalVar = TSFE:id = {$introPageId}] && [userFunc = user_check()]
...
[global]

bye and happy weekend ;-)
daniel



More information about the TYPO3-english mailing list