Is it possible to have a plugin filter results

More
11 years 2 months ago - 11 years 2 months ago #55749 by joe
I made a pluggin that sets a param in onAfterSaveEvent based on a field I made in _drawSettingForm and it works fine, but now I need to only show events where the param is a certain value. Is there an event that I can use before pagination happens to filter the event list? Need to do this on the calendar as well.
Last edit: 11 years 2 months ago by joe. Reason: change wording

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #55781 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Is it possible to have a plugin filter results
Hi Joe

I am sorry but the extension is not flexible enough to allows you do this using events. I think you should:

1. Store the value of this param directly in a new field from #__eb_events table (you will need to create new field for it)

2. Then edit the code of calendar/category model to add an extra where clause to SQL query which return list of events

That should be the easiest way (although you will need to redo the work when you upgrade to future releases of the extension)

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc