Page 1 of 1
Insert php code into FCK Editor
Posted: Wed Nov 01, 2006 9:54 pm
by bojans
Hi!
I want to insert a php code ( in one of page, but when I try in FCK editor type this code (in source mode), editor change my code in something like < -- ?php include.....
So, how can I insert a php code into my pages?
Thanks!
Re: Insert php code into FCK Editor
Posted: Wed Nov 01, 2006 10:12 pm
by tsw
right way would be creating user defined tag with your php code (remember udt adds automatically) and call it with {yourudtname} another way is to allow smarty php tags in config.php and use {php} {/php}
hope this helps
Re: Insert php code into FCK Editor
Posted: Wed Nov 01, 2006 11:00 pm
by bojans
thank you! it works!!!

Re: Insert php code into FCK Editor
Posted: Sat Jan 13, 2007 6:05 pm
by Fabi
Hello..
first of all, CMSMS is a really good CMS system, but to publish my site I need to include an external news script into CMSMS.
I activated the smarty tags in the config.php but it don't works!
The code I want to include is:
Code: Select all
<?PHP
$number = "2";
include("http://start.fgnet.de/fnet/cutenews/show_news.php");
?>
So I inserted the following into my "Home"-site with the FCK Editor
Code: Select all
{php}$number="2";include("http://start.fgnet.de/fnet/cutenews/show_news.php");{/php}
Well, with this code inserted, the page needs very long to load and after it loaded completely, I don't see the included file.
Thanks in advance
Fabi
Re: Insert php code into FCK Editor
Posted: Sat Jan 13, 2007 10:16 pm
by bojans
Try this:
Go to admin control panel -> extensions -> user defined tags -> add user defined tags. Then name your new tag (for example news1), and insert this code (withouth :
$number = "2";
include("
http://start.fgnet.de/fnet/cutenews/show_news.php");
Then on your site, where you want to have this news, type in FCK editor {news1}, and your done!
Hope it helps!
Bojan
Re: Insert php code into FCK Editor
Posted: Sat Jan 13, 2007 10:25 pm
by Fabi
Thanks for your tipp,
I tried this out, too, but unfortunaly, it don't works, too
Any other tipps and opinions?
Re: Insert php code into FCK Editor
Posted: Sat Jan 13, 2007 10:41 pm
by bojans
Re: Insert php code into FCK Editor
Posted: Sun Jan 14, 2007 12:48 am
by Dr.CSS
Did you do it in Source mode so it doesn't get formated?...
Re: Insert php code into FCK Editor
Posted: Sun Jan 14, 2007 10:17 am
by Fabi
I try it on my site and it works
Thats crazy. I tried the same way with the correct path, too, but it didn't worked, too..
Did you do it in Source mode so it doesn't get formated?...
Yes, I did it in the source mode.
Btw. the site is
http://start.fgnet.de/cms if you want to take a look.