[Typo3-dev] TS Constants into PHP Script

Jan-Hendrik Heuing [netfielders] jh at netfielders.de
Mon Oct 6 12:04:33 CEST 2003


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
> }
>
>






More information about the TYPO3-dev mailing list