...

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



logictrap
05-08-2009, 11:20 PM
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.

Example:

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?

Thanks

Len Whistler
05-08-2009, 11:34 PM
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.





-----------



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum