If you had well undestanded your typoScript the steps to include an PHP script in your template are short.
For instance, let assume that you have defined a subpart ###script### in your template, like this
...
<body>
<!-- ###DOCUMENT_BODY### -->
<!-- ###content### content here-->
<!-- ###content### -->
<!-- ###script### script here-->
<!-- ###script### -->
<!-- ###DOCUMENT_BODY### -->
</body>
...
you could include in your TS these codes to integrate your php script (in your user_my_script.php file):
includeLibs.my_php_script = fileadmin/user_my_script.php
#...
workOnSubpart = DOCUMENT_BODY
subparts.content < styles.content.get
subparts.script = USER_INT
subparts.script.userFunc = your_php_class_name->your_php_function_name
for more details just read at this :
http://wiki.typo3.org/index.php/Introduction/Matthew
ok this could works, but I'm a newbie too
, I do it, but my php script is rendered in top of my template (before the <HTML> tag) instead of the template's position defined by ##script## subpart:
Someone know the cause of this? maybe is cause my function try to put on screen html code by echo?
For instance, let assume that you have defined a subpart ###script### in your template, like this
...
<body>
<!-- ###DOCUMENT_BODY### -->
<!-- ###content### content here-->
<!-- ###content### -->
<!-- ###script### script here-->
<!-- ###script### -->
<!-- ###DOCUMENT_BODY### -->
</body>
...
you could include in your TS these codes to integrate your php script (in your user_my_script.php file):
includeLibs.my_php_script = fileadmin/user_my_script.php
#...
workOnSubpart = DOCUMENT_BODY
subparts.content < styles.content.get
subparts.script = USER_INT
subparts.script.userFunc = your_php_class_name->your_php_function_name
for more details just read at this :
http://wiki.typo3.org/index.php/Introduction/Matthew
ok this could works, but I'm a newbie too
Someone know the cause of this? maybe is cause my function try to put on screen html code by echo?