[Typo3-dev] TS Constants into PHP Script

Nils Meyer Nils at Meyer-Brothers.de
Mon Oct 6 19:21:50 CEST 2003


Hi Jan-Hendrik,

Thanks for your reply. The way I posted below was the way I expected it 
to work. But the problem is, that using debug($conf) I can see that 
there is only a userFunc set in $conf. Nothing more, although I defined 
the constants the way you see it in my files.

And even if I set the userFunc in my setup.txt to another value, let's 
say "userFunc = tx_bball_pi1->main_anything" my method main still gets 
executed. That bring me to the suspicion that those things I write in 
the setup.txt never play a role because I have done something wrong 
there. Could that be possible? And if so, where is my fault?

Thanks
Nils Meyer

Jan-Hendrik Heuing [netfielders] schrieb:

>What you do is the right way, in the setup.txt, you add properties which you
>fill with constant values... So, the values should be available via $conf.
>There is no straight way to get the constants, but it should be fine in your
>case, what exactly is the problem ?
>
>debug($conf) shows you content of $conf. As you put in the constants into
>the setup fiels, they are also available this way in $conf.
>
>jh
>
>"Nils Meyer" <Nils at Meyer-Brothers.de> schrieb im Newsbeitrag
>news:mailman.1065401046.15315.typo3-dev at lists.netfielders.de...
>  
>
>>Hi,
>>
>>I'm currently developing a frontend plugin especially for the needs of
>>my basketball club, with several teams etc. (Extension key: bball)
>>
>>Now I managed to get the output working using the Kickstart Wizard and
>>adapting the class.tx_bball_pi1.php->main
>>
>>But my problem now is to get the constants defined in
>>ext_typoscript_constants.txt into my script. The only value I get into
>>my script via $conf is the preset userFunc.
>>
>>As no changings in my ext_typoscript_setup.txt take effect (e.g. I can
>>enter a totally different userFunc and the old one still gets called) I
>>guess that I did something wrong here.
>>
>>How can I get some data from my constant file into the php Script?
>>
>>Please find the two txt files below.
>>
>>Thanks for your help!
>>
>>Nils Meyer
>>
>>---------- ext_typoscript_setup.txt ----------
>>plugin.tx_bball_pi1 >
>>plugin.tx_bball_pi1 = USER
>>plugin.tx_bball_pi1 {
>>   userFunc = tx_bball_pi1->main
>>   templateFile = {$plugin.tx_bball_pi1.file.templateFile}
>>   playerPageID = {$plugin.tx_bball_pi1.playerPageID}
>>   teamPageID = {$plugin.tx_bball_pi1.teamPageID}
>>}
>>
>>-------- ext_typoscript_constants.txt --------
>>plugin.tx_bball_pi1 {
>>     # cat=plugin.bball/file; type=file[html,htm,tmpl,txt]; label=
>>Player Template File: HTML-template file for display of a player. See
>>EXT:bball/pi1/player.tmpl for an example
>>   file.playerTemplateFile = EXT:bball/pi1/player.tmpl
>>
>>     # cat=plugin.bball/file; type=file[html,htm,tmpl,txt]; label= Team
>>Template File: HTML-template file for display of a team. See
>>EXT:bball/pi1/team.tmpl for an example
>>   file.teamTemplateFile = EXT:bball/pi1/team.tmpl
>>
>>     # cat=plugin.bball//; type=int+; label= "Player" pid: The PID of
>>the page on which a single player should be displayed
>>   playerPageID=0
>>}
>>
>>
>>    
>>
>
>
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
>  
>






More information about the TYPO3-dev mailing list