Module Development: Google Calendar Beta - CLOSED
Posted by Joe Curia
|
Module Development: Google Calendar Beta - CLOSED October 25, 2008 11:20AM |
Registered: 19 years ago Posts: 1,301 |
This Google Calendar Beta thread is now closed. You can find the full module here: [www.phorum.org].
This mod allows visitors to submit a forum post to a Google calendar and allows the admin to embed that calendar into the forum.
BETA 6: Next seven days event listing, automatic in header or manual with template edit
This is a beta release! It is not intended for production use, but rather to allow other Phorum users and developers to offer critiques, find bugs, and suggest features. Any comments are welcome, but please do not attempt to use this if you are new to Phorum or do not have the time to suffer through bugs, upgrades, etc.
Installation Instructions:
Rudimentary instructions:
First, create a Google calendar account. It would be best to create this account with your forum administrator email. For the name, I would advise using your forum's title, as Google will create a primary calendar with this name and that calendar cannot be deleted.
With this calendar, this module will create secondary calendars depending on how you want to group your events. The events can be grouped by forum, by folder, or you can create categories for events. Each grouping will have its own secondary calendar to allow for color coding.
After creating the Google account, go to the module settings and authenticate that account. You will be taken to a Google login where you will authenticatethis module to your Google calendar.
Then, from the settings page you can choose your grouping and start adding those groups.
Next, go back to your Google account and publicly share the created calendars. Then go to the settings page for one of those calendars, to the "Calendar Details" tab, and the "Embed This Calendar" section. There click on the "Customize the color, size, and other options" link. Choose the items you want to show on your embedded calendar and be sure to select each calendar you want to show up in the "Calendars to Display" section.
Then, copy the provided HTML embedding code into the provided field on this modules settings page. Please note, if you delete or add calendars later, you will need to update this embedding code.
If you have not enabled the weekly event listing header, in order to show a link to your embedded calendar, you will need to edit your template files. In these template files, you can use the following template variables:
The URL for the embedded calendar:
Finally, you can post events from new topic pages (not replies) and see those events on your calendar page.
You can customize the display order for the date fields in the event creation area by editing the language file and changing the "date_format" variable.
Usage Instructions:
From the settings page, you can delete, rename, or recolor your groupings. If you delete a grouping, it will be removed from the event posting pages and hidden in your calendar. If you subsequently fully delete the grouping, it will be fully deleted from your calendar (including any past events).
Notes:
This module is currently released as a beta for testing and to gather ideas for inclusion in the final release. One large issue still to be resolved is the proper display of events in the current user's timezone in the weekly event listing header.
Todo:
- Add support for the Event Logging module (error on calendar/event creation, update, delete, etc)
- Settings to allow for private calendars (for now embedded calendars must be publicly shared)
- Any other ideas that pop in my head, I have forgottend to add here, or are suggested by others
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 10 time(s). Last edit at 11/24/2008 02:06PM by Joe Curia.
This mod allows visitors to submit a forum post to a Google calendar and allows the admin to embed that calendar into the forum.
BETA 6: Next seven days event listing, automatic in header or manual with template edit
This is a beta release! It is not intended for production use, but rather to allow other Phorum users and developers to offer critiques, find bugs, and suggest features. Any comments are welcome, but please do not attempt to use this if you are new to Phorum or do not have the time to suffer through bugs, upgrades, etc.
Installation Instructions:
Rudimentary instructions:
First, create a Google calendar account. It would be best to create this account with your forum administrator email. For the name, I would advise using your forum's title, as Google will create a primary calendar with this name and that calendar cannot be deleted.
With this calendar, this module will create secondary calendars depending on how you want to group your events. The events can be grouped by forum, by folder, or you can create categories for events. Each grouping will have its own secondary calendar to allow for color coding.
After creating the Google account, go to the module settings and authenticate that account. You will be taken to a Google login where you will authenticatethis module to your Google calendar.
Then, from the settings page you can choose your grouping and start adding those groups.
Next, go back to your Google account and publicly share the created calendars. Then go to the settings page for one of those calendars, to the "Calendar Details" tab, and the "Embed This Calendar" section. There click on the "Customize the color, size, and other options" link. Choose the items you want to show on your embedded calendar and be sure to select each calendar you want to show up in the "Calendars to Display" section.
Then, copy the provided HTML embedding code into the provided field on this modules settings page. Please note, if you delete or add calendars later, you will need to update this embedding code.
If you have not enabled the weekly event listing header, in order to show a link to your embedded calendar, you will need to edit your template files. In these template files, you can use the following template variables:
The URL for the embedded calendar:
{URL->GOOLE_CALENDAR}
The text to use for the link / button that takes the user to the embedded calendar:
{LANG->phorum_mod_google_calendar->CalendarTitle}
Example template code for adding a hyperlink to a template:
<a href="{URL->GOOLE_CALENDAR}">
{LANG->phorum_mod_google_calendar->CalendarTitle}
</a>
You can also show an event listing on selected pages. This event listing can be shown automatically after the page header, or anywhere on the page by editing your template to add the line {INCLUDE "google_calendar::event_listing"} wherever you would like to display the listing. The event listing can consist of either the current weeks events (starting on the Sunday or Monday of the current week, depending on your settings) or the next seven days of events (starting with the current day).
Finally, you can post events from new topic pages (not replies) and see those events on your calendar page.
You can customize the display order for the date fields in the event creation area by editing the language file and changing the "date_format" variable.
Usage Instructions:
From the settings page, you can delete, rename, or recolor your groupings. If you delete a grouping, it will be removed from the event posting pages and hidden in your calendar. If you subsequently fully delete the grouping, it will be fully deleted from your calendar (including any past events).
Notes:
This module is currently released as a beta for testing and to gather ideas for inclusion in the final release. One large issue still to be resolved is the proper display of events in the current user's timezone in the weekly event listing header.
Todo:
- Add support for the Event Logging module (error on calendar/event creation, update, delete, etc)
- Settings to allow for private calendars (for now embedded calendars must be publicly shared)
- Any other ideas that pop in my head, I have forgottend to add here, or are suggested by others
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 10 time(s). Last edit at 11/24/2008 02:06PM by Joe Curia.
|
Re: Module: Google Calendar Beta October 28, 2008 03:29AM |
Registered: 18 years ago Posts: 136 |
Fantastic. Az, you're on fire.
Will it simply post it to the calendar? Or will it post it to the calendar AND open up a thread (lets say in an Events forum for example).?
I mention that because it would be nice to have a calendar, and if someone selected the event, it would open up a thread where people could post images, additional information, comments, etc...
Will it simply post it to the calendar? Or will it post it to the calendar AND open up a thread (lets say in an Events forum for example).?
I mention that because it would be nice to have a calendar, and if someone selected the event, it would open up a thread where people could post images, additional information, comments, etc...
|
Re: Module: Google Calendar Beta October 28, 2008 07:54AM |
Registered: 19 years ago Posts: 1,301 |
Quote
amnesia
Will it simply post it to the calendar? Or will it post it to the calendar AND open up a thread (lets say in an Events forum for example).?
I mention that because it would be nice to have a calendar, and if someone selected the event, it would open up a thread where people could post images, additional information, comments, etc...
The way this is designed to work now is to post a message to the events forum (or wherever you allow events) and have the mod then post the event to the google calendar. what actually gets posted to the calendar can be changed from the language file. For now, the event "What" is the subject of the post and the event "Description" is a link to the forum post. So yes, the idea is to see an event on the calendar, click the "View Topic" link in that event, and be taken to the post for discussion.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
|
Module: Google Calendar Beta 3 October 30, 2008 09:42AM |
Registered: 19 years ago Posts: 1,301 |
I have posted the v5.2.1.00.BETA.3 release of this module with the following changes:
Beta Dev: Added Google embed code field to settings and the addon function for displaying the embedded calendar.
Beta Dev: Enable date formatting from the language file.
Beta Dev: Fixed the date form fields to default to today's date.
Beta Dev: Added ability to hide messages and update the Google calendar.
Beta Dev: Added the ability to move events to new forums or folders in Phorum and update the Google calendar.
Beta Bugfix: message meta data was being overwritten. phorum_db_update_message does not accept partial arrays. (ie ["meta"]["google_calendar"] overwrites ["meta"])
Beta 2: Added the ability to edit or delete events from Phorum and update the Google calendar.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Beta Dev: Added Google embed code field to settings and the addon function for displaying the embedded calendar.
Beta Dev: Enable date formatting from the language file.
Beta Dev: Fixed the date form fields to default to today's date.
Beta Dev: Added ability to hide messages and update the Google calendar.
Beta Dev: Added the ability to move events to new forums or folders in Phorum and update the Google calendar.
Beta Bugfix: message meta data was being overwritten. phorum_db_update_message does not accept partial arrays. (ie ["meta"]["google_calendar"] overwrites ["meta"])
Beta 2: Added the ability to edit or delete events from Phorum and update the Google calendar.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
|
Module: Google Calendar Beta 4 November 05, 2008 10:13PM |
Registered: 19 years ago Posts: 1,301 |
I have posted the v5.2.1.00.BETA.4 release of this module with the following changes:
Beta Dev: Added option to allow posting events only from selected forums/folders while in category mode.
Bug Fix: In forum/folder modes, only allow posting from forums/folders with an actively associated calendar
Bug Fix: The addon function needed to build the common Phorum URL's
Beta Dev: Added option to allow event posting only by admin, by admin or moderators, or by anyone able to create new topics.
Beta Dev: Enhanced the event div for easier toggling.
Bug Fix: IE does not like a javescript variable to have the same name as an element id.
Beta Dev: Added the option to display event info at the top of the message body.
Bug fix: added support for Automatic Time Zones module and properly reflected server and user time zones when storing dates.
Bugfix: Show_event_in_message settings not saved properly.
Bugfix: Updated row count for dynamically adding new calendars.
Beta Dev: Set a timestamp for the latest event/calendar creation/edit/deletion per calendar to be used for caching event data.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Beta Dev: Added option to allow posting events only from selected forums/folders while in category mode.
Bug Fix: In forum/folder modes, only allow posting from forums/folders with an actively associated calendar
Bug Fix: The addon function needed to build the common Phorum URL's
Beta Dev: Added option to allow event posting only by admin, by admin or moderators, or by anyone able to create new topics.
Beta Dev: Enhanced the event div for easier toggling.
Bug Fix: IE does not like a javescript variable to have the same name as an element id.
Beta Dev: Added the option to display event info at the top of the message body.
Bug fix: added support for Automatic Time Zones module and properly reflected server and user time zones when storing dates.
Bugfix: Show_event_in_message settings not saved properly.
Bugfix: Updated row count for dynamically adding new calendars.
Beta Dev: Set a timestamp for the latest event/calendar creation/edit/deletion per calendar to be used for caching event data.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
|
Re: Module: Google Calendar Beta November 08, 2008 12:53PM |
Admin Registered: 23 years ago Posts: 9,240 |
I didn't check the code yet but somehow this module isn't picking up all my folders / forums.
It seems to get only the first 3 folders therefore I see no forums in the forum selection on only those 3 folders in the folder selection.
Any idea? ;)
Edit: I'm talking about the settings screen btw.
Thomas Seifert
Edited 1 time(s). Last edit at 11/08/2008 12:54PM by Thomas Seifert.
It seems to get only the first 3 folders therefore I see no forums in the forum selection on only those 3 folders in the folder selection.
Any idea? ;)
Edit: I'm talking about the settings screen btw.
Thomas Seifert
Edited 1 time(s). Last edit at 11/08/2008 12:54PM by Thomas Seifert.
|
Re: Module: Google Calendar Beta November 08, 2008 03:05PM |
Registered: 19 years ago Posts: 1,301 |
I think I am going to have to delve deeper into the phorum_mod_google_calendar_get_all_forums function in the google_calendar/settings_bin/forum_functions.php file. It works fine for a simple list of forums or one layer of folders with forums. Beyond that it seems to break down. I haven't really worked with vroots before, but I will probably have to bone up on them as well :) Thanks for finding the bug. If you have any advice that would be much appreciated.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
|
Re: Module: Google Calendar Beta November 08, 2008 03:07PM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: Google Calendar Beta November 08, 2008 03:41PM |
Admin Registered: 21 years ago Posts: 8,532 |
The Jumpmenu module has to do folder tree walking. Maybe you can find some good hints in that module's tree processing code.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: Google Calendar Beta November 08, 2008 06:45PM |
Registered: 19 years ago Posts: 1,301 |
Thanks for the pointer Maurice. Your module was staring me in the face. I now use it every time I visit this site, and yet I didn't even think to use it as a reference :-D
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, you can't reply to this topic. It has been closed.
