Home › Forums › Calendar Products › Events Calendar PRO › Extending ECPro – Venue and Organizer (Artist) showing events…
- This topic has 1 reply, 2 voices, and was last updated 12 years, 11 months ago by
Barry.
-
AuthorPosts
-
June 4, 2013 at 12:52 am #50463
Garry
ParticipantOk this one’s going to sound a bit weird; but I’ve started working on a plugin to ECPro for a client where I’ve overridden labels only for the Organizer to make it Artist, adding the normally supported fields (content, thumbnail etc) — all that’s fine and impacts ECPro in no way.
However I’m attempting to do something a little differently here – let me explain and in the next paragraph I’ll have specific questions. I’m trying to allow each venue and each organizer (artist for me) to be able to create events for that specific item -meaning if I have a Venue called ‘The Bar’ and I’m on the The Bar backend single, I’ll see the same metabox an event has but there won’t be a venue selector, I’m just passing in that venueID to pass along; and organizers will be selectable / creditable as normal. On an organizer (artist) page the opposite: venues will be listed but artists won’t be. Now on the whole I’ve taken what’s been used in the TribeEvents class and all the includes to admin/metaboxes etc fairly well (hooray for Singleton classes!). However for some reason the javascripts aren’t working for these metaboxes and I know you’ve kind of ‘corralled’ it’s use for only the tribe_events post type. Yet it seems that you’ve thought about this very thing since there’s if(s) around sections such as if ($post->post_type != TribeEvents::VENUE_POST_TYPE): around the print out for the venue controls, etc.
However, in being as ‘non-destructive’ as I can I’ve been trying to track down all the things I need to do and add them to my extension – such as having an init with changes the body classes adding ‘events-cal ‘ etc, but still no go. I’m also making sure that these metaboxes don’t use the $post (since that wouldn’t be correct and am instead assuming eventID to be 0 since it hasn’t been saved etc). I’ve also made sure that all $this are referring to TribeEvents::instance() etc — so just trying to lay the groundwork that I’m trying to do this well and right without interfering with the main plugin, and am sort of adept here so I don’t get something dismissive as an answer.
Now the weird almost stupid question: I don’t know why the javascripts / jquery classes aren’t being found. I did notice things like classes such as hasDatepicker weren’t being printed out; I started to try to look through the filters in place but in some cases I can’t even find them:
What was do_action(‘tribe_events_detail_top’, $postId, true) ?> I’ve changed to do_action(‘tribe_events_detail_top’, $eventID, true) ?> — but I can’t track down this filter for the life of me; I search for it in the plugins and it only returns the one time it’s used? Doesn’t it have to be declared or is this something in place for the developer to declare?
I can’t figure out why things like the datePickers aren’t picking up the hasDatepicker class for what it’s worth; thought it might be going through some sort of filter such as i notice here:
$events_meta_box_template = apply_filters(‘tribe_events_meta_box_template’, $events_meta_box_template); — which doesn’t seem to be doing anything and I can’t find tribe_events_meta_box_template filter.Nor things like — where can I find tribe_venue_table_top, etc?
I hope someone can point me out in the right direction; I totally understand that when I save an event from the say venue page there’s got to be a function that grabs it and saves it to the db — I’m ok with that, I’m more stuck trying to make everything function on the front end first.
June 4, 2013 at 9:14 am #50490Barry
MemberSome actions (like tribe_events_details_top) are indeed used by third party and our own add-ons to add new capabilities and user interface elements, but you may not come across any use cases within the core or Pro plugins themselves.
All in all it sounds like you are doing some interesting work – however I’m afraid it sounds sufficiently bespoke and complex that helping you much further is going to be beyond the level of support we can offer.
-
AuthorPosts
- The topic ‘Extending ECPro – Venue and Organizer (Artist) showing events…’ is closed to new replies.
