[TYPO3-english] flvplayer2 and tt_news

Christopher Torgalson bedlamhotel at gmail.com
Tue Jul 28 03:14:17 CEST 2009


On 27-Jul-09, at 6:07 PM, Christopher Torgalson wrote:

> Hello again,
>
> On 27-Jul-09, at 5:32 PM, Markus Deckmann wrote:
>
>> Hi Christopher,
>>
>>> Without testing it, it looks as though you've missed a small step;  
>>> if
>>> the 'url' object has stdWrap, you should be able to do this, but
>>> stdWrap has no 'RECORDS' function which is what your TS code  
>>> assumes.
>>
>> In the documentation it looks like 'url' have stdWrap function:
>>
>> http://typo3.org/documentation/document-library/extension-manuals/flvplayer2/1.2.1/view/1/4/
>>
>> In sourcecode from the flvplayer2 the following line in function
>> "buildFlashCode" will parse the url-setting:
>>
>> $filePath =    $this->cObj->stdWrap($this->conf['url'],$this- 
>> >conf['url.']);
>>
>> So it looks like the class parse stdWrap functions.
>>
>>
>>> When you need to make a cObject in stdWrap, you use (surprise!) the
>>> 'cObject' property, so you'll need something like
>>> plugin.tx_flvplayer_pi1.url.cObject < temp.newsFileRecord.
>>
>> Now I am using the following TS code:
>>
>> ### TS code start ###
>> temp.newsFileRecord = RECORDS
>> temp.newsFileRecord {
>> 	source = {GPvar:tx_ttnews|tt_news}
>> 	source.insertData = 1
>> 	tables = tt_news
>> 	conf.tt_news = TEXT
>> 	conf.tt_news.field = news_files
>> 	#wrap = http://mydomain/fileadmin/videos/|
>> 	wrap = |
>> }
>>
>> plugin.tx_flvplayer_pi1 {
>> 	width = 550
>> 	height = 413
>> 	playerParams.autoStart = 0
>> 	#url = http://mydomain/fileadmin/videos/example.flv
>> 	url = 1
>> 	url.10 = TEXT
>> 	url.10 {
>> 		cObject < temp.newsFileRecord
>> 		wrap = |
>> 	}
>> }
>>
>> #####################
>>
>> I have debug the flvplayer2-extension with a
>> t3lib_div::debug($filePath), but this will return only the 1 from  
>> "url =
>> 1" I think. Normaly it must return the "news_file"-name I have  
>> defined
>> by the news-item, isnt it?
>
>
> Well, you've prolonged your problem in the same way you started it:  
> by using a value that can ONLY be interpreted as a string and then  
> expecting it to be parsed as stdWrap. Remove "url = 1" (*why* is  
> that there in the first place? In what other TS context does a  
> cObject start with "foo = 1" instead of "foo = COBJECT_NAME"?), and  
> I suspect you'll find it suddenly works for you.


I'm slightly too quick with the Send button. You have to remove 'url =  
1', yes, but that won't fix the problem.

In your extension, the object .url has stdWrap properties. But "10" is  
NOT a stdWrap property or function (check the stdWrap section of the  
TSref, there is no property or function called "10").

When an object has stdWrap, ONLY those properties listed in the  
TSref's stdWrap section can be used as properties or objects of that  
function--anything else you try MUST be interpreted as a string. I'd  
suggest you read my article on the subject: http://www.typo3apprentice.com/howto/rtfm/

In any case, change your object as follows:


>> plugin.tx_flvplayer_pi1 {
>> 	width = 550
>> 	height = 413
>> 	playerParams.autoStart = 0
>> 	#url = http://mydomain/fileadmin/videos/example.flv
>> 	url.cObject < temp.newsFileRecord
>> }



This is the same as doing this:


>> plugin.tx_flvplayer_pi1 {
>> 	width = 550
>> 	height = 413
>> 	playerParams.autoStart = 0
>> 	#url = http://mydomain/fileadmin/videos/example.flv
>> 	url.cObject = RECORDS
>> 	url.cObject { // Properties }
>> }



--
Christopher Torgalson
http://www.typo3apprentice.com/







More information about the TYPO3-english mailing list