I would like to allow users to create pages on my site. Not full pages, but just content for the default template.
I am currently using http://ckeditor.com/ then saving the content into a database.
Is this the best way to go about doing this?
I would like to allow users to create pages on my site. Not full pages, but just content for the default template.
I am currently using http://ckeditor.com/ then saving the content into a database.
Is this the best way to go about doing this?
That's awfully vague. Is giving users an editor and then saving the content in a database the best approach? Sure. In fact, it'd be hard to come up with any other reasonable approach.
Is CKEditor the best editor? That's up to you and your users. Stack Overflow uses a simple textarea with some buttons to add markdown code. That's far more efficient, but non-technical users would hate it. I personally tend to use TinyMCE which many users recognize from its use in WordPress.
Which editor is right for your site depends on you and your users.
And as far as saving it in a database, where else could you put it? Obviously you'll have to save what the visitors write in a database of some kind.
You're asking about some very, very broad decisions that are hardly part of the "best practice" for this sort of solution. More interesting questions are: how is it saved in the database, how do you control who has access, how do you keep track of previous versions, how do you validate which content to display, how do you prevent multiple users from overwriting each other's edits, how do users get from viewing the page to editing the page?
Perhaps it would be easier (and safer, and prettier, etc.) to use something like Simple CMS?