View Full Version : How to allow users to add modules in a custom CMS

05-09-2009, 12:20 AM
I want to allows users to customize parts of a website by allowing them to insert modules such as a poll or slideshow from a preset list of modules without giving them the ability to use php or javascript code.

I'm looking for recommendations for methods to handle this. The first method I came up with is to use FCKeditor and allow them to enter plain text in a field and then have php parse the code and replace it with the corresponding module.


Users enters: %%poll%%

PHP replaces it '%%poll%%' with <?php include('poll.php'); ?>

Is this a good method? security issues? is there a better method that might be easier and more versatile?


Len Whistler
05-09-2009, 12:34 AM
How about having a poll and slideshow column in a MySQL database with a default value of 0 for off. When the user changes the value to 1 for on, the poll or slideshow would be included.