This commit was manufactured by cvs2svn to create tag
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / media / scripts / testscript_EXT.php
1 <?php
2 # TYPO3 CVS ID: $Id$
3
4 if (!is_object($TSFE)) die ('Error: No parent object present.');
5
6
7
8
9 /**
10 * Printing current time dynamically
11 *
12 * @param string Content (ignore)
13 * @param array TypoScript configuration passed
14 * @return string Current time wrapped in <font> tags with red color
15 */
16 function user_printTimeExt($content,$conf) {
17 return '<font color="red">Dynamic time: '.date('H:i:s').'</font><br />';
18 }
19
20 ?>
21
22 This is output from an external script!
23 <br />
24 <br />
25
26 You can get the content of the record, that included this script in $REC:<br />
27 <br />
28
29
30 <?php debug($REC); ?>
31
32 <br />
33 <br />
34 The configuration for the script is in the array, $CONF:<br />
35 <br />
36
37
38
39
40 <?php
41 debug($CONF);
42
43 ?>
44
45 <br />
46 <br />
47 These are global variables!
48
49 <br />
50 <br />
51 Good luck....
52
53
54 BTW: The time:
55 <?php if ($CONF['showTime']) {echo user_printTimeExt('','');} ?>
56 <br />
57 <br />
58
59 <?php
60
61 $content = '(This is returned in the variable, $content, which is another option...';
62
63 ?>
64 <hr />