Processing content after sunmit

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Processing content after sunmit

Post by andrewvideouk »

its prosbile to Process content like pages after been sunmit. I would like to add a php script to filer out any bad content, Clean up full stops with spaces after, remove swear words and clean up the html.

I can do the filering when the page been displayed using UDT but only problem that its takes time to run the script and posblile have time out or run out of memoy. if we had a load people viewing the page at the same time.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1800
Joined: Wed Feb 25, 2009 4:25 am

Re: Processing content after sunmit

Post by DIGI3 »

Take a look in Event Manager. the ContentEditPost event is probably the one you want. There are other more advanced methods but that's probably the most approachable.
Not getting the answer you need? CMSMS support options
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Re: Processing content after sunmit

Post by andrewvideouk »

Would I need ContentEditPre? Triggered before a content object is saved to the database.

I would like to something like
str_replace("facts", "truth", $content);

than savee it to the database

How would I do that. Is there a sample UDT templace how to do this?

Thanks
Post Reply

Return to “CMSMS Core”