EventEditedPre and News?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

EventEditedPre and News?

Post 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.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: EventEditedPre and News?

Post 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.
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Re: EventEditedPre and News?

Post by andrewvideouk »

Thank you so how would I do with EventEditedPre

Cheers
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: EventEditedPre and News?

Post by velden »

You can't without hacking the module(s) or writing in the database (which I consider kind of hacking too).
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Re: EventEditedPre and News?

Post 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
Post Reply

Return to “Modules/Add-Ons”