Im trying to make a template ( fcktemplates.xml ) became interactive.
That means, i try to insert automaticly the date - via php.
Code:
<table height="10" cellspacing="0" cellpadding="0" width="90%" border="0">
<tbody>
<tr>
<td align="left">15/05</td>
<td>Aushang bis
</td>
<td>Blatt 1 von 1</td>
</tr>
</tbody>
</table>
doesent work.
Even renaming 'fcktemplates.xml' into 'fcktemplates.php'
(and settings in fckconfig.js :
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.php' ;
doesnt help.
Any Ideas?
Axel3
That means, i try to insert automaticly the date - via php.
Code:
<table height="10" cellspacing="0" cellpadding="0" width="90%" border="0">
<tbody>
<tr>
<td align="left">15/05</td>
<td>Aushang bis
<?php
$timestamp = time();
echo date('d.m.Y',$timestamp);
?>
</td>
<td>Blatt 1 von 1</td>
</tr>
</tbody>
</table>
doesent work.
Even renaming 'fcktemplates.xml' into 'fcktemplates.php'
(and settings in fckconfig.js :
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.php' ;
doesnt help.
Any Ideas?
Axel3
RE: How to make templates interactive
put these lines to the files front:
Don't forget to clean up your browser's cache.
SelfMan
RE: How to make templates interactive
Hy, Selfman:
Thank you for your help.
And if i add
header("Content-type: text/xml"); too, it will work fine.
STEP 1: fcKtemplates.XML rename in PHP
STEP2: fckconfig.js: change FCKConfig.TemplatesXmlPath
STEP 3: insert into fcktemplates.php:<?php header("Content-type: text/xml");?>
RE: How to make templates interactive
Keine ursache...
SelfMan
Re: How to make templates interactive
I want to do a similar implementation. But instead of PHP, I have a js file in place.
I have set the path of the TemplatesXMLPath to a js file. Its able to locate the js file but says an error "Error on loading the js file"
Can any one help me on using the js file as the template file.
Thanks in advance.
Vijay
Re: How to make templates interactive
Use a debugger to trace the error.