[TYPO3-english] userFunc condition
Sergio Catalá Gil
scatala at iti.upv.es
Tue Sep 8 16:48:44 CEST 2009
Hi,
Your second part (condition body) doesn't work, Dmitry. As you said on
other thread: "Unlike other userFuncs, condition require true function,
not method" :-(
The problem I'm facing up to is (1) I need to compare with a value of
the current tt_news record inside my function; and (2) I need my
function to get executed inside an USER object to get
$this->cObj->data['generic_tx_mblnewsevent_inscription_end_date']
field.
Any other idea?
### fileadmin/class.user_functions.php ###
<?
class user_functions {
function user_compare_dates($content, $conf) {
echo "Function executed";
// Opened course
if
($this->cObj->data['generic_tx_mblnewsevent_inscription_end_date'] >
strtotime(now))
return true;
// Closed course
else
return false;
}
}
?>
### fileadmin/class.user_functions.php ###
More information about the TYPO3-english
mailing list