ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Converting an Events Calendar to EE

June 17, 2008 12:18am

Subscribe [3]
  • #1 / Jun 17, 2008 12:18am

    Dan Halbert

    93 posts

    I’m converting our existing synagogue website to EE. We have a purpose-built event calendar system I wrote in PHP a few years ago. I am designing a weblog replacement for the calendar but could use some advice on a few things:

    1. Each event in the current system has a date, a start and end time, and also a booking start and endtime. We don’t need to handle multi-day events. Right now I use MySQL DATE and TIME types, which is exactly what I want. Various PHP functions allow me to accept fairly free-form input.

    To replicate this, I could use the existing EE Date custom field type, but I’d have to do some fiddling with the entries in a SAEF (parse them, merge the date into the time fields, etc.) I might be able to some of this in Javascript, but it’s probably more easily done in PHP after the SAEF submits. But I don’t see how I can get a hook into the SAEF mechanism to do this. Am I missing something?

    I could write an extension for DateOnly and Time custom field types. But that seems like overkill.


    2. Our current calendar admin page has a multi-field form on top for entering new events and editing existing ones. Below, a couple of months of events are shown in tabular form, with buttons to edit, clone, or delete each event.

    To recode something similar, I need the SAEF, and also probably Solspace’s Form Helper Plugin. I think I can more or less recreate what I have, but I’m not sure it’s possible.

    Instead, I thought I might preserve most of my current PHP code, but have it do its database operations to the weblog rather than to my old table.

    I could use raw SQL on the exp_ tables to do that. However, I’d prefer some kind of weblog API. A weblog is a pretty good analog of a database table (maybe it actually was a table, once upon a time), An API that provided that abstraction, hiding the details of the actual EE tables, sounds useful. Has anyone built such a thing, or am I missing a current feature?

    (An aside: each time I think I have hit a wall in terms of possible functionality, I keep discovering ways out, like custom field extensions or the Solspace plugin. There is a lot of depth to EE, but it does take lot of forum diving to find it.)

    Thanks a lot,
    Dan

  • #2 / Jun 17, 2008 12:26pm

    Robin Sowell

    13255 posts

    Heh- yep, the pool gets very deep once you start diving in it!

    Hm- just throwing it out in case you haven’t seen it before- Repeet plugin- a riff on the EE calendar with the main addition being spanning the event date.  Which I know you said you don’t need, but throwing it out as an example.

    Otherwise- it’s too complex for me to give a solid answer.  The SAEF code has a number of hooks in there- just search modules/weblog/mod.weblog_standalone.php for the word ‘hook’- and see extensions docs if you haven’t already.  I suspect you could do what you need to pretty easily there.

    Not sure what you mean by a weblog api- well, I think I get the idea, but haven’t seen what you’re talking about.  One of the importers would likely come closes- but none would really be an api.

  • #3 / Jun 20, 2008 10:10pm

    Dan Halbert

    93 posts

    A belated thanks for the reply. I did take a closer look at some other addons, and I believe I can modify the Blind Date extension to do a little date/time merging from one field to another, which should solve my requirements. Or I can use the hook you pointed out, though Blind Date gets me some other functionality I need as well.

    Dan

  • #4 / Jun 21, 2008 1:30am

    Dan Halbert

    93 posts

    More blathering, but I found this quite wonderful list of Javascript date and time pickers: 16 Cool Date and Time pickers. Googling will get you more, but these seem to be the cream of the crop.

  • #5 / Jun 21, 2008 2:02am

    Versa Studio

    572 posts

    By the way—this date picker is reeeealy good.

    http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker-widgit-update/

    It’s quite thoughtfully designed, flexible, and uses modern code.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases