Jump to content
Sign in to follow this  
Michael_Baxter

Extending a CMS in PHP

Recommended Posts

Hi I have been putting together a CMS system for users that have no idea how to use HMTL,

at this time I have managed to build a basic CMS and now I am looking to extend the functionality of its use,

right now the user can view the public pages with links, login to the Admin area to manage the subjects or pages and visibility of all and delete any of all or add an admin member,

 

that's a nut shell to a ot of work already done;

moving forwards I want to take away the need for any user ever needing to type any code,

so if they wish to change the font colour, weight, type o back ground colour or image etc.....

so how would anyone recommend working this,

I was thinking maybe add buttons and selection boxes that save the correct data into a separate table and retrieve both and concatenate it back together  

Share this post


Link to post
Share on other sites

Usually one would just get a rich text editor such as TinyMCE and allow the user to edit the page content through that. Then you save the generated HTML to your database and display it when someone tries to view that page.

Share this post


Link to post
Share on other sites

yes that would be the really easy method to have used a third party editor.

and it would have left my evening very boring HAHA....

no that's not what I am trying to do the whole idea of creating a CMS in the first place was to lean how to write and best practise coding in general,

also I am working on extending this into a fully customised system as I have already put together the user authentication system for this so n a nut shell I am trying to learn to build this system myself allowing me to customise it and to Taylor the functionality of this user authentication and the  general CMS specific to this set group (my end users)

the reason I need it so specific is that my end user are a small group of volunteers that are able to use a computer but on the most part that is all they can do they have no knowledge of any coding not even how to inline CSS their font styles....

this s why I said if I was too add a series of buttons and options in the same way this post box has across the top ( just less of them) my issue is firstly how to deal SAFELY with that code generated from the buttons that's why I asked would it be good practise to use the character count on a post then save the character position and desired CSS into a separate MYSQL table then on call of that page concatenate all that back together? 

Share this post


Link to post
Share on other sites

The buttons across the top of the post area here are courtesy CKEditor. You would use this or TinyMCE (for instance - there are many, many other options) as the user editor. The resulting user-entered string (html included) is sent to your processing script upon form submission. That's what you would store in the database and present to the user on page load. There's no need for character counts, character positions, or concatenation. Sanitize the string, store it, retrieve it, escape it, and display it. Much simpler.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.