The Facts:
Apache/2.0.52 (Red Hat)
PHP 5.2.x
First of all, the FCK Editor works great. A very impressive piece of programming. FCKeditor does everything I want "Most of the time".
Here's my problem. I want every page on my website to have the following piece of code.
Every time I edited a page with the editor it removed the code so I read through the forum and found out about ProtectedSource.Add The instructions say (Just use the "FCKConfig.ProtectedSource.Add" function in the configuration file.)
So I went to the config file (fckconfig.js) and found this line:
and uncommented it like this:
uploaded the file, restarted the editor and tried again. FCK is still removing my PHP code.
What did I do wrong? I really need this to work. Any help would be greatly appreciated.
Apache/2.0.52 (Red Hat)
PHP 5.2.x
First of all, the FCK Editor works great. A very impressive piece of programming. FCKeditor does everything I want "Most of the time".
Here's my problem. I want every page on my website to have the following piece of code.
<?php include("btm_menu.php") ?>
Every time I edited a page with the editor it removed the code so I read through the forum and found out about ProtectedSource.Add The instructions say (Just use the "FCKConfig.ProtectedSource.Add" function in the configuration file.)
So I went to the config file (fckconfig.js) and found this line:
// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
and uncommented it like this:
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
uploaded the file, restarted the editor and tried again. FCK is still removing my PHP code.
What did I do wrong? I really need this to work. Any help would be greatly appreciated.
Re: ProtectedSource.Add - What did I do wrong?
When you change your config.js file, you need to clear your browser cache and do a hard refresh.
For IE, this is what I do;
Tools > Delete Browsing History > Delete All...
Then hold CTRL and press F5 on your page.
This will refresh your entire FCKEditor codebase - if you don't do the above, browsers cache JS files so any changes you make will not take effect.
This is why nobody has answered your question, because it's so dumb.
Sorry to be frank, but that's just how it is noob.
Re: ProtectedSource.Add - What did I do wrong?
I did clear my browsers cache but I did not hold CTRL and press F5 on my page. I use Firefox 3.0.7, I selected Tools > Options > Advanced > Network > Clear Now. You are saying because I did not reload the page in the browser (Ctrl +R) the java script remained in the browsers cache. OK, my mistake.
A long time ago I taught auto mechanics to young people. I once asked my supervisor, "How do you put up with so many stupid questions?" He told me "There are no dumb questions, only dumb mistakes, if we don't have the patients to teach them who else will?"
Thank you again for having the patients to answer my question.
Re: ProtectedSource.Add - What did I do wrong?
I made a change to the JS file, and loaded a browser I've never had on my computer before (and maybe never again): Opera. Then I accessed the same pages I had before, but with the new browser, and the settings did not change.
The only way I'm going to be able to get around this is to have my Network Admin take my development servers out of the caching loop.
Just thought I'd throw that in there since I've been bitten by this myself also.
Re: ProtectedSource.Add - What did I do wrong?
I also may be dumb
I cleared everything in IE, ctrl+f5'd it, but the php code entered in de 'code view' is gone when switching views.
When entering code in de code view and saving it directly, it does get saved (and on the actual page the php is normally executed). The only thing is that the code is also gone when opening the editor again! (so at next save, the php code does not get saved).
Snef.
PS. the code is loaded every time. When changing the config file (by adding an alert statement) it does change when executing the editor so it does not seems to be caching...
Re: ProtectedSource.Add - What did I do wrong?
This is a big issue that it seems like a lot of people are trying to resolve. Bump bump...
Re: ProtectedSource.Add - What did I do wrong?
Can someone give me the exact syntax for adding protected sources. Mine is not working
Here is my code (I don't know the correct way to add these lines. PLEASE help).