Page 1 of 1

EventEditedPre and News?

Posted: Tue Oct 06, 2020 6:35 pm
by andrewvideouk
Hi I am trying workout how would use EventEditedPre and how would do with News module.

for example with ContentEditPre I have

Code: Select all

$content_obj =& $params['content'];
$text = $content_obj->GetPropertyValue('content_en');
$newcontent  = CleanHtml($text);	   
$content_obj->SetPropertyValue('content_en',$newcontent);
How would do this for the Calendar EventEditedPre and Also I couldnt see a NewEditedPre?
For me I think its more important that I can do this with News and the Calendar as they get updated more frequent by the admin users.

Thank you guys.

Re: EventEditedPre and News?

Posted: Tue Oct 06, 2020 6:41 pm
by velden
You can use only events that are added by the module developer. If you don't see them, they don't exist.

News has:
NewsArticleAdded, NewsArticleEdited events though I think they are called AFTER the articles are saved. So too late for you to process the content unfortunately.

Re: EventEditedPre and News?

Posted: Tue Oct 06, 2020 6:57 pm
by andrewvideouk
Thank you so how would I do with EventEditedPre

Cheers

Re: EventEditedPre and News?

Posted: Tue Oct 06, 2020 6:59 pm
by velden
You can't without hacking the module(s) or writing in the database (which I consider kind of hacking too).

Re: EventEditedPre and News?

Posted: Tue Oct 06, 2020 8:48 pm
by andrewvideouk
Yes I know I would have to hack the news module. The Calendar has EventEditedPre option. I wouldnt need to hack it. Do you know how I do it with the Calendar?

Cheres