MyBB Community Forums

Full Version: Linking Threads to the Calendar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Linking Threads to the Calendar

Rather than creating a CALENDAR "module", have the calendar just display calendar "threads" using specified date time fields.

In other words, the Calendar only display links to the threads.

1. Monthly view
2. weekly view
3. daily view
That is a good idea.
If I remember correctly we've talked about taking the calendar out of the core and making it an officially maintained plugin instead. As an official plugin it would have more support and features.
I like the idea of a calendar event being linked to a thread, but I don't think all events need a thread. Also to consider is if an individual occurrence of an event gets a thread (eg. a Christmas 2015 thread) or if the whole reoccurring event gets a thread (Christmas thread).
YOu dont seem to get the idea, there are should NO longer be a "calendar" per se....

In my view, a Thread should be designated as an event if it has a start and stop fields. So yes a Christmas gets its own thread as an "event". Others can have their own threads for their own Xmas event
@expat, I understand that the Calendar is being converted into a plugin, however I feel that a UI with at least month and week views is warranted for that plugin. It is too convenient to group all event threads into a single view.
thing is i dont need a separate plugin if it just to duplicate the creation of an event
To me, this is a no-brainer.  From an implementation point of view, having both events and threads is MORE work.  They are esstentially the same thing but with code duplicated for each.  As I went about implementing a BB for my community, this was at the top of the list of things to fix (to me, not having an event is a bug).

So I have done this.  I have not packaged it so my work is easily duplicated (yet) but here is an approximate roadmap of what I did.

1. Created a new template that handles the table row for event date.
2. Adjusted the templates for edit_post and newthread to also include that template (also added a row for specifying an event location).
3. Adjusted showthread and its template to output a "tcat" line giving the event date/location.

4. Adjusted the code in the edit.php and newthread.php. This was mostly a cut/paste operation,  essentially pasting in the date handling functionality from calendar.php for actions editpost, do_editpost, addpost, and do_addpost.
5. Repurposed the events DB entry to store an event thread's date info.  I repurposed the UID field to store the FID of the corresponding thread.  The DETAILS field now stores the event's location.  The UID and details/message are already stored in the thread. (The query $db->simple_select("events", "*", "uid='$fid'") gets the events entry given a known forum id.)
6. Changed all the links in calendar tmeplates that point to calendar.php with actions editevent or addevent to now point to the corresponding thread links.
7. I am still working on adjusting the delete stuff, but I am sure it will follow the same pattern.

Two HUGE advantges of this are: users can use a POLL to get an RSVP list for an event and users can be notified of new events via the subscription mechanism.
I did an experimental "integrating" XThreads example event forum with MyBB calendar some years ago:
http://mybbhacks.zingaburga.com/showthre...4#pid19064