WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Custom Content Type Manager] Calendar Integration

[Plugin: Custom Content Type Manager] Calendar Integration

  • Mike
    Member

    @mgriffis

    Have you (has anybody) tried to integrate a Custom Content Type with a calendar?

    To ask this question another way, my Custom Content Type is an event. Date and time are custom fields within this CCTM event.

    I’m trying to figure out a good way to incorporate the scheduled events into a calendar display that links to the CCTM events.

    Not surprisingly, I haven’t found an existing calendar plugin that incorporates CCTM post types (or any post types other than calendar-specific post types).

    Can you think of an approach that might make more sense than trying to shoehorn CCTM into an existing calendar?

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    That’s tough man. I’ve written several calendar apps/databases and the number of caveats and edge cases starts to boggle the mind, so it’s a tall order with or without the CCTM.

    A couple questions:

    1. Do your events all take place in the same timezone?
    2. Do your events repeat (e.g. one per week, every Sunday, etc)
    3. How do you need to search on your events?

    Mike
    Member

    @mgriffis

    No doubt. Fortunately, this is a relatively limited number of events, perhaps 50 per year (it’s for a symphony orchestra).

    To answer your questions:

    1) Yes.
    2) Not usually. Each concert is its own event. When they do have a repeating program, it’s probably OK if we have to enter the event a couple of times for each instance. That’s how we’re doing it now.
    3) Search would be nice, but not a deal breaker. It would be nice if we could search for the program details, like composer, or the event name (“Pictures at an Exhibition” for example).

    ————-

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Mussorgsky is worth it.

    Would you ever need to do a search like: which events are showing from from 1/2/2012 thru 3/4/2012 etc? E.g. “Concerts this week”?

    You can enter the event dates in the CCTM… the searches are where the hangup is… that and the view. If you want to literally see a calendar layout, then that’s some coding and formatting, but essentially, that part isn’t too bad…

    I’m working on date range filters (e.g. for displaying values that fall between 2 extremes) for Summarize Posts and the built-in GetPostsQuery, but you could come up with a database query that would handle that.

    Mike
    Member

    @mgriffis

    >>Mussorgsky is worth it.

    Agree.

    >>Would you ever need to do a search like: which events are showing from from 1/2/2012 thru 3/4/2012 etc? E.g. “Concerts this week”?

    Yes. I’ll need to show the “next 3” or “next 5” events in a widget.

    ———

    This is a blue-sky, thinking-out-loud idea: What about doing a mash-up between CCTM and an existing calendar application?

    I can do obviously make a simple mashup by creating the event in the calendar plugin, and redirect the calendar’s event link(s) to the CCTM event(s). I’ve tested the concept. It’s a little kludgy but functional.

    This has the advantage of using a relatively sophisticated calendar application and still allowing me to use my own custom post type for these events.

    It would be better to have a more integrated solution. For example, I may be able to manually add custom fields to the calendar’s custom post type. (I’m talking with the calendar developers and asking about the potential harm of adding custom fields to their post type.)

    But what about using CCTM to extend the calendar’s custom post type? CCTM sees the calendar post type, but doesn’t permit editing or adding custom fields to the other plugin’s post type.

    For example, the custom post type used by The Events Calendar is called tribe_events. CCTM sees the post type, but does not allow me to make changes because it’s assigned to another plugin.

    Here’s the pie-in-the-sky part: It would be very handy if I could use CCTM to make these modifications. I realize there’s a huge potential to make a mess, but with great power comes great responsibility. 😉 I understand this may be too much to ask, but I thought I’d float the idea to hear your thoughts.

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Interesting ideas… I programmed the CCTM to display the “Foreign post types”… some of those settings can’t be tinkered with (at least not easily), but I think it would be possible to standardize the custom fields of other post types. Let the calendar app do its thing and let the CCTM standardize the custom fields. That’d make a good feature request, actually… would take some time to implement, but I think it would be possible.

    As for how tight the other potential integrations would be, that’s hard to say without looking at the data models in question.

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Mike
    Member

    @mgriffis

    Thanks!

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    I added this feature on the dev branch — please try it out if you can: http://downloads.wordpress.org/plugin/custom-content-type-manager.zip

    It’ll go out with the next version (0.9.5.11).

    Mike
    Member

    @mgriffis

    Sure. Anything special I need to do with that zip file? Can I just extract & save it over top of the existing plugin folder?

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Any time you manually download a plugin (ie. you download its .zip file), you unzip it and place it into wp-content/plugins — you can overwrite the other custom-content-type-manager folder there.

    Make sure you download the latest .zip — I committed some changes to it earlier today.

    Mike
    Member

    @mgriffis

    This is slick.

    I am able to add CCTM Custom Fields to a Foreign Post Type. And I can enter data to simple CCTM Custom Fields from the Foreign Post Type edit screen.

    The one thing that doesn’t work is populating CCTM Repeatable Fields from the Foreign Post Type edit screen (that’s not surprising, just reporting what I’ve found).

    I’ve asked the other developer (it’s The Events Calendar at http://www.tri.be) if any hooks are available to easily modify their data entry screen to incorporate calls to CCTM data-entry functions.

    Another possible solution might be to enter the data using Gravity Forms. Integration between Gravity Forms and The Events Calendar has already been implemented.

    Do you know if Gravity Forms can handle CCTM Repeatable Fields? If not, I’ll look into it.

    Any other approaches you can think of that I might want to explore?

    Thanks for your help! You’re awesome!

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Hmmmm…. don’t know why repeatable fields wouldn’t work, unless there are difficulties reading the data out of the database, which gets back to how the data is stored. Hooks between plugins is tricky — it’s one of the weakpoints of WP in my opinion because the hooks can get called when not expected.

    Gravity Forms… I doubt there’d be a good integration point there, but what I’m working on here: http://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=132

    that’s essentially the same thing: it would allow you to put the post creation form where you wanted it (even on the front end).

    This brings up a lot of significant architectural considerations, some of them pretty severe… see the discussion here: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomFieldsDataStructure

    Pretty much anything is on the table prior to version 1.0 of the CCTM, and really the only way to see the “correct” path is to bump through the dark a bit here.

    Mike
    Member

    @mgriffis

    >>don’t know why repeatable fields wouldn’t work

    It’s certainly possible I’m misunderstanding how this should work. How are you thinking I would populate repeatable fields in the Foreign Post Type?

    FYI, the Events Calendar edit interface looks like the WordPress Add Custom Fields interface.

    Mike

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    I imagine there are lots of places where this could go wrong… oops, I just realized I tried the wrong calendar plugin…

    Plugin Contributor fireproofsocks
    Member

    @fireproofsocks

    Ok, so I tried the dev version with Modern Tribe’s Event Calendar, and I was able to add repeatable custom fields to the Event posts…. the way the CCTM works is it overrides WP’s simplistic custom fields meta box and it replaces it with its own. That much appears to be working as expected. I was even able to define a relation field that linked to other events. What exactly are you trying to do here?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Plugin: Custom Content Type Manager] Calendar Integration’ is closed to new replies.