[TYPO3] powermail custom field
Tapio Markula
tapio.markula at xetpoint.fi
Wed Sep 17 09:26:41 CEST 2008
luca kirjoitti:
> Hi Tapio,
>
> probably I have missed lead you.
>
> What I need is to generate a random key which will be sent into the
> answer message and recorded into the database...without actually show it
> in the published form.
that needs some extra coding - I have looked the plugin and I didn't
find suitable hook - so XCLASS
> prefill {
> uid16 = TEXT
> uid16.data= date:U
> }
>
> but I need a unique key and the time stamp is not enough...
>
> At this point if I can fill the hidden input with a script generate key
> it would be (almost) perfect....
apparently not supported
>
> Any clue?
look .../lib/class.tx_powermail_db.php
a quick hack is something like
if (isset($this->conf['dbEntry.']) && is_array($this->conf['dbEntry.']))
{ // Only if any dbEntry is set per typoscript
if($this->conf['dbEntry.']['tt_address.']['enable.']['value'])
$this->conf['dbEntry.']['tt_address.']['uid999999']='randomkey';
...
// 2. Insert static values to same array
if (isset($this->conf['dbEntryDefault.'][$key]) &&
is_array($this->conf['dbEntryDefault.'][$key])) { // Only if any
dbEntryDefault is set per typoscript
...
elseif ($sv == '[tstamp]') $db_values[$sk] = time(); // add current
timestamp
elseif ($sv == '[randomkey]') $db_values[$sk] = rand(10000000000); //
generate random key
More information about the TYPO3-english
mailing list