[Typo3-dev] Help needed with Backend-Programming for Book Database

Mario Birkigt mario at mario-birkigt.de
Tue Jun 21 17:40:40 CEST 2005


Mario Birkigt schrieb:
> Mathias Schreiber [wmdb>] schrieb:
> 
>> Mario Birkigt wrote:
>>
>>> you're right, except that i retrieve the html-page from amazon and 
>>> parse it with regular expressions.
>>
>>
>>
>> I strongly suggest you use the free XML services by amazon.
>> Simply open up a bookshop at amazon and you will be able to get XML 
>> envelopes from amazon - much easier to parse (t3lib_div::xml2array) 
>> and much less hassle.
>>
> The Book Database is not intended to be used for a book shop. I think i 
> looked at the XML services earlier and they wrote something about a fee 
> for the use of this services, that they could want in the future. 
> Perhaps this has changed.
> 
>>> Ok, now i know, that i'm on the right way. I haven't figured out yet, 
>>> how to interact with the tceform, how to start the needed action and 
>>> how to fill in the values. Perhaps i'm too dumb for it.
>>
>>
>>
>> Take a look at the colorpicker wizard (search for 
>> wizard_colorpicker.php, not sure about the path).
>> This will work
>>
>>
> Thank you for this hint. I will take a look at the sourcecode of this 
> wizard.
> 
> Greetings from Leipzig
> 
> Mario
> 
> 
> 
I've found out that the 'wizard_add' script would fit my needs, if i 
were able to pass a value to the current record editing session without 
creating a new record or opening a new edit-window.
Here is an extract from the wizard_add script, to show what i mean.

// Setting the new field data:
$data[$this->P['table']][$this->P['uid']][$this->P['field']] = 
implode(',',t3lib_div::trimExplode(',',$data[$this->P['table']][$this->P['uid']][$this->P['field']],1));
//#######################################################################
// this value i want to pass to the current record editing session
$data[$this->P['table']][$this->P['uid']]['publ_date'] = 'heute';
//#######################################################################
// Submit the data:
$tce->start($data,array());
$tce->process_datamap();
}
}
// Return to the parent alt_doc.php record editing session:
header('Location: .t3lib_div::locationHeaderUrl($this->P['returnUrl']));

How should i modify the header('Location: ' ... ); statement, to achieve 
that the value 'heute' is passed to the approbiate field in the current 
record editing session? The following statement isn't working for me, 
because i don't want to create a new record.

header('Location: 
'.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'&returnEditConf=1&edit['.$this->P['params']['table'].']['.$this->pid.']=new'));


Greetings

Mario




More information about the TYPO3-dev mailing list