Using PHP in a content block?
Permalink
Hi guys, I've got a PHP script that will display a random quote (listed in an array) each time the page it visited/refreshed.
However, I can't seem to figure out how to implement this code within a content block, as the HTML editor treats it as HTML code, not PHP.
Is there a way to have the code parsed as PHP within a content block so that it functions the way it's supposed to? Any help would be greatly appreciated!
However, I can't seem to figure out how to implement this code within a content block, as the HTML editor treats it as HTML code, not PHP.
Is there a way to have the code parsed as PHP within a content block so that it functions the way it's supposed to? Any help would be greatly appreciated!
Hi, thanks for letting me know. I've searched up and down for such a thing, and I'm not having any luck. Do you have any idea of where I can find it besides having to search through topics with specific keywords, or through all of Remo's posts?
http://www.concrete5.org/community/forums/block_requests/simple_php_block
I believe remo wrote a php block for this type of thing, you can probably find it around these forums.
there's an advertising add-on that might let you accomplish something similar.
you could do some php in a theme to make that happen.
the idea letting people post php through an in-context editing system seems fundamentally funky to us from a security prospective - but time will tell.