Home › Forums › Calendar Products › Filter Bar › Overriding Classes in Custom Extension
- This topic has 4 replies, 2 voices, and was last updated 9 years, 4 months ago by Brian.
-
AuthorPosts
-
October 29, 2014 at 9:13 am #846948Nancy BarrazaParticipant
Hi Guys, i want to know if there is a way to override existent classes in a custom extension to don’t have to override the core.
Ex. I could fix my issue here: https://tri.be/support/forums/topic/filter-by-custom-taxonomy-events-categories/
Using common categories instead event categories and using category__in() function, and left the event types as event categories 🙂
But, i need to override some files in filter bar, to do it, and i preffer create a custom extension of this, how can i do it?
there exists some hooks to do it?October 29, 2014 at 1:41 pm #847488BrianKeymasterHi,
So I looked through your previous thread and think I understand what you are trying to do.
Also, I have been all through the Filter Bar coding and it does not have a direct way to extended it through filters and actions.
I am afraid I can only give you a possible starting point as we do not have any other information to give you on it.
I would start in this file:
\the-events-calendar-filterbar\lib\tribe-filter-view.class.php
With this function and the hook in it:
initialize_filters()
And try to add filters starting there, but that is just step 1 of many more.
Let me know if you have any more questions, but the support is limited on what I can provide.
Thanks
October 29, 2014 at 5:09 pm #847970Nancy BarrazaParticipantI think i got your point here, I have to customize many functions of the plugins, community events, and filter bar, but my concern is lost my customizations after update… that’s why i want to create a custom extension.
I’m going to read deeply what you recommend, and see in other forums what can i do to make it work, but, talking a bit about the community events, and filter bar.Community Events: How can I add custom taxonomies to the front end form and save the values on submission? (Just tell me what are the files that handle this).
Search Bar: I need create a date range filter, what are the files where is located these functions?
October 30, 2014 at 11:01 am #850130BrianKeymasterI have a bunch of resources for you. None of these should involve making changes to the plugins, but they may not get it eaxctly what you are looking for.
Filer Bar Custom Filters
Snippet that might get you close:Another ticket with some more infomration:
https://theeventscalendar.com/support/forums/topic/adding-a-custom-filter/
Event Bar (Date, Search, and Location Bar)
This is a snippet that removes the date field, but you could leave that and replace it with your own field:https://gist.github.com/barryhughes/bae73fd5489be6a676cf
Community Events
For here you can start by adding a get template function here:the-events-calendar-community-events\views\community\edit-event.php
Or go to one of the existing modules and add your coding there.
These modifications can be done by following the themer’s guide and moving the files to your theme.
These two files are handle the saving:
the-events-calendar-community-events\tribe-community-events\Submission_Handler.php
the-events-calendar-community-events\tribe-community-events\Submission_Scrubber.php
In that first file there are two actions that you might be able to hook into to save your fields, they are in this function:
save()
Let me know if you have any follow up questions, but there is not much support we can provide to troubleshoot each step of the way. Hopefully this gets you closer though.
Thanks
December 9, 2014 at 5:36 am #912923BrianKeymasterSince there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂
-
AuthorPosts
- The topic ‘Overriding Classes in Custom Extension’ is closed to new replies.