Hi Guys, I've looked all over the boards and couldn't find this answer. I set up FCK so that the textarea content goes into a variable, $text, and I did uncomment the "ProtectedSource" line for php in the fckconfig.js, so that FCK doesn't change <?...?> to <!-- -->, but now when the page is called it doesn't execute the php script. For example if I put in <? echo 'Hello World'; ?> in FCK and then save the page, when I view the page in the browser, I see nothing. If I view the source, I see, <? echo 'Hello World'; ?>. It dumps out the whole text includeing the php delimeters and doesn't execute the php code.
Now, if I do, <script> document.write('hello world'); </script>, I get "hello world" in the browser, with no script tags. If I view the source I see the script tags.
So, I need to put php tags in the windows to display contenst of different variables or includes. Anyone have any idea how to do this? I know there are security concerns, but this will not be public. Please let me know if you have any tricks!
Thanks
RE: PHP Execution Inside FCK - Please Help!
What you are proposing is better dealt with in the php.ini file. <? ... ?> is outdated. You might have better luck with <?php ?>
I'm guessing this forum gets lots of questions, but maybe the author et al. don't spend much time on the support end of this.
I would love to get ahold of their wiki and fix a bunch of stuff. I think the docs need revamping to find answers easier.
RE: PHP Execution Inside FCK - Please Help!
RE: PHP Execution Inside FCK - Please Help!
The editor loads an html string, if it contains tags that should have been processed at the server side then it's too late, the editor is all javascript executed inside the browser not at the server.
Maybe in a convoluted way you could manage to achieve something, but I don't think that it will be easy and that it will fully work, but if you preprocess the string at the server replacing the php code with php+the generated content and then before you save it you remove the generated content, then maybe you could have some luck, but I think that you'll have to do all the work by yourself.