Page 1 of 1
is possible include php in a post?
Posted: Fri Oct 01, 2004 12:16 pm
by lebyrus
i am trying it, but i don't have success...
i've been looking a solution, but i don't find it. is it possible?
Posted: Fri Oct 01, 2004 1:50 pm
by romulus
no that is and shout not be possible. From a security point of view you don't want to have this
What do you want to do exactly? I think you need to write a plugin. I'm working right now on a static page plugin, maybe that would be a help for you?
Posted: Fri Oct 01, 2004 1:58 pm
by lebyrus
i have a php function to color php code from an external (php) file:
<?php
include("get_sourcecode.php");
echo get_sourcecode("my-example.php");
?>
first line can be added in layout, but i need the echo line
Posted: Fri Oct 01, 2004 2:04 pm
by romulus
Basically you want to display php code in your post with syntax highlighting, right?
I think that a plugin is the *ideal* solution for this. There are quite a few text formatting you can look into, to inherit you own plugin from. I have done the same with 2 smaller ones for my site.
My first idea to this would be to automatically add some css classes to php functions and the like with your plugin and to add the classes and colors in your style.css.
Sounds not too hard to implement, but still I'm no s9y developer

Posted: Fri Oct 01, 2004 2:16 pm
by lebyrus
Basically you want to display php code in your post with syntax highlighting, right?
yes
I think that a plugin is the *ideal* solution for this.
me too
Sounds not too hard to implement, but still I'm no s9y developer
like me. I think that it would be something easy, but I wanted something quickly.
I'll study it, and, if i have time, maybe, I'll try it
Thanks
