Experimental:
From this thread:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php (thanks nier3 and Lee!), we'll try to make this goes a bit (not much) further.
This time we'll try to integrate it to MyBB calendar in one way. What I mean by the "one way" is the main control is MyBB thread, not the calendar event.
The ideas that tried to be implemented by this experimental are:
- For creating an event, we choose MyBB thread, since it has more rich contents than the MyBB calendar (attachments, custom thread fields, discussion and etc).
- Editing the thread will edit the event.
- Editing the event from calendar (if forced) will redirect to edit the thread.
- It bypass the calendar permissions, so it'll uses the forum permissions. Therefore it is better if we use a specific calendar for this.
- There is a link on each event to view the thread.
- It uses a single type of event.
- There is still a possibilities to create normal events on the calendar. These normal events will use the calendar permissions.
- Deleting thread will delete the event.
- Soft deleting and unapproved thread will make the event as unapproved event.
- Restoring and approving thread will make the event as approve event.
- Some other features like displaying the upcoming events on index page.
Here is how to set it up:
Note that this is a basic set up. We still can add more custom thread fields and create new templates as usual.
- Create a new calendar specified for the XThreads Event forum.
- Create a new forum for the XThreads Event forum.
- Create custom thread fields:
- Event date
- Event description
We'll use this description as the event description on the calendar event
- Title: Event Description
Modify it as our needs. Use {$GLOBALS['threadfields']['e_desc']} for displaying it anywhere inside the forumdisplay_thread template.
- Key: e_desc
Modify it as our needs
- Applicable Forums: Select our XThreads Events forum
- Editable by / Required Field?: Everyone (required)
- Maximum Text Length: 200
Modify it as our needs
- Install the plugin (attached). Try it on our test board.
Forumdisplay:
Calendar:
Calendar events (custom events (created from the XThreads Events forum) mixed with default event (created from the calendar)):
Single calendar custom event (the "Read More" is link to the thread):
Single default event (still use the calendar permissions):
Index:
Since I'm not a coder, please don't expect much from this experimental.