Project

General

Profile

Google Calendar Plugin

Added by Jim Mulholland over 16 years ago

I created a simple plugin today to integrate a Google Calendar as a project tab in Redmine.

If I were able to add plugin information to the wiki, it would look something like this:


A simple plugin to include Google Calendar iframe as a tab within Redmine projects. The calendar timezone will be user dependent based off the timezone in your Redmine user account and defaulted to the timezone set in the <iframe> if the user does not have a timezone selected.

Currently, the only way to install is using Git and GitHub:
URL: http://github.com/mully/redmine_google_calendar/tree/master

To install from git:

(Git Version < 1.5.3)
$ cd {RAILS_ROOT}/vendor/plugins
$ git clone git://github.com/mully/redmine_google_calendar.git

(Git Version >= 1.5.3 -- Because the "git-rails" gem uses Git Submodules introduced in ver. 1.5.3)
$ sudo gem install git-rails
$ git-rails install git://github.com/mully/redmine_google_calendar.git

Plugin setup

1. Install the plugin as described here (this plugin doesn't require migration).

2. Go to "Admin -> Custom fields" and create a Project custom field of "long string" type, named 'Google Calendar IFrame' for example.

3. Go to "Admin -> Information" to configure the Google Calendar plugin:

  • Project custom field 'Google Calendar IFrame': select the newly created custom field.

Enabling CI at project level

Go To Your Google Calendar:

1. Click on "Settings" in the upper left hand corner

2. Click on the "Calendars" tab

3. Select the calendar you want to use

4. In the "Embed This Calendar" section, copy the entire <iframe> code from the text box

(If this is a private calendar, you will have to replace the "src" in the <iframe> with the HTML found by clicking the blue "HTML" block in the "Private Address" section on the same page.)

In your project in Redmine, go to "Project settings" :

1. On the "Modules" tab, enable the module by checking "Google Calendar".

2. On the "Information" tab, paste the <iframe> code that you have copied in your clipboard from Google next to the 'Google Calendar IFrame' project custom field you created in step 1.

After that, a new item named "Calendar" should show up in the project menu. Click on this item to see your Google Calendar.


Replies (27)

RE: Google Calendar Plugin - Added by Eric Davis over 16 years ago

I've added your plugin to the Wiki. An administrator will have to give your account Wiki permissions to edit it.

Thank you for the contribution!

Eric

RE: Google Calendar Plugin - Added by Jim Mulholland over 16 years ago

Thanks Eric!

Account wiki access would be great. Until then, here is a screenshot of Redmine with a Google Calendar embedded:

redmine_googl_calendar.jpg (44.7 KB) redmine_googl_calendar.jpg Redmine Google Calendar Screenshot

RE: Google Calendar Plugin - Added by Jean-Philippe Lang over 16 years ago

Nice plugin Jim :-)
You have wiki edit permission now.

RE: Google Calendar Plugin - Added by Jim Mulholland over 16 years ago

Excellent!

Thank you, sir!

RE: Google Calendar Plugin - Added by Matt McMahand over 16 years ago

Can you add to the wiki that this plugin requires the tzinfo gem? I was missing this on my machine and displaying the calendar didn't work until I installed the gem. Thanks.

RE: Google Calendar Plugin - Added by Jim Mulholland over 16 years ago

Good catch, Matt. I'll update the wiki.

RE: Google Calendar Plugin - Added by Eric klopfer over 16 years ago

This is cool and adds what I think is the one glaring missing feature in Redmine.

What cosmetic issue - when I added the custom field for the calendar it appears on the project home page and runs a lot of text across the page. Is there a way to hide that custom field on the home page?

RE: Google Calendar Plugin - Added by Jim Mulholland over 16 years ago

Hi Eric. I'm glad the plugin is working out for you.

As for your issue, we ran across the same thing. The problem is that, by default, Redmine adds any custom field data on the project overview page. To resolve this issue, I had to manually go in the code and comment out the piece that was adding this data as it is obviously not needed in this situation.

With that being said, I am still running on an older version of Redmine. Does anybody know if this has been resolved in recent releases? (I did not write up a ticket because I did not know if a lot of other people enjoyed seeing custom field info here.)

The easiest fix would be to just remove those few lines of code. However, if people find this data useful on the "overview" tab, we would have to add some preferences on whether or not certain types of data should be shown there.

I have played with creating other plugins that use API keys and had thought about allowing users to enter in their API key info via the same custom field method and ran across the same issue of the API info being displayed on the project home page. Obviously, not ideal.

- Jim

RE: Google Calendar Plugin - Added by Eric klopfer over 16 years ago

I've done some more playing around with this plugin. It seems to allow more than google calendars on that tab. I embedded another google widget and another iframe successfully. Now I'm thinking this would be a great generic feature for Redmine. Add a few extra tabs that call external resources (google or otherwise). Perhaps each project could have 1-3 renamable tabs for this purpose?

Are you planning on integrating this into Redmine? Or should I request a feature?

Again, very handy work.

RE: Google Calendar Plugin - Added by James Turnbull over 16 years ago

I played with this a little but haven't finished - http://github.com/jamtur01/redmine_tab/ - this is designed to abstract the tab away from Google Calender and allow multiple tabs. No tuits to look at it right now but our plan was to imbed another Wiki into Redmine as we need RST support.

RE: Google Calendar Plugin - Added by Eric klopfer over 16 years ago

Sounds exactly like what I'm looking for. That would open a lot of possibilities. Thanks. I hope you get this working.

RE: Google Calendar Plugin - Added by Michael Aye over 15 years ago

I can't seem to install the plugin.
I went through the installation process as instructed and copied this code into the Google IFrame custom field (btw, type is "Long Text", not "Long String" as given in the install instructions):

<iframe src="http://www.google.com/calendar/embed?src=my.email.address%40my.domain.ch&ctz=Europe/Zurich" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

It is quite but not 100 % clear to me if I need to copy the code "within" the iframe instruction or just the whole thing, however I tried both and none of it results in showing a new tab on the right of settings as shown in the screen-shot.

I have the custom field "Google IFrame tab" appearing on the Project Overview Page with the iframe code being just displayed there, but no new tab appearing.

I have configured the plugin to use this custom field (however, irritatingly, after the "saving successful" messages, it's shown nowhere that this custom field is currently activated as the display for this iframe, the iFrame Text picker goes back to "Select one" after my choice was saved.

I also have as instructed activated the plugin in the module page inside the project settings, so I'm a bit clueless what else can be wrong.
Oh yes, and I also switched my previously private google calendar to public, just to see if it makes any change, and still no luck, the new tab just doesn't appear.

If someone could give me some hints how to debug this, I would be very thankful.

RE: Google Calendar Plugin - Added by Michael Aye over 15 years ago

i forgot my system data:

Redmine 0.8 stable via svn (now on revision 2643)
Rails 2.1.2
ruby 1.8.6

RE: Google Calendar Plugin - Added by Markus Buerer over 15 years ago

Hi
I have 2 problems with the plugin:
1. In the overview tab I see the iFrame code (see picture)

How can I get rid of the code or to schow the calendar?

2. We have redmine installed on a machine where we do not have internet access. We have internet access from our clients. When I click on the 'Google calendar' tab, I do not see any calendar at all and I do not get any information form the log at all. So my question here: Must the server have access to the internet?

Thanks for the help
Markus

RE: Google Calendar Plugin - Added by Mischa The Evil over 15 years ago

Michael Mohr Aye:

Jim Mulholland's current source of the plugin seems to have some errors at the compatibility-side as well as some functional errors. I've just started my Git-/GitHub-eploration by forking the plugin on GitHub and started working on some fixes for the plugin.
I've also improved the documentation side which should now describe the setup-process completely.

Can you test my fork at https://github.com/MischaTheEvil/redmine_google_calendar/tree and let me know if it fixes your issues? Note that it's currently not yet working when Redmine is running in development-mode. This will be fixed soon I hope :) If completed I'll request a git pull by mully over GitHub...

Btw: I'll "fix" the plugin's wiki-page (PluginGoogleCalendar) soon...

HTH...

Regards,

Mischa.

RE: Google Calendar Plugin - Added by Mischa The Evil over 15 years ago

Markus Schlichting Buerer

You wrote:

1. In the overview tab I see the iFrame code (see picture)

See my Redmine patch #1746 which provides an option to project custom fields to hide them from the project overview especially written for this purpose.

You wrote:

2. We have redmine installed on a machine where we do not have internet access. We have internet access from our clients. When I click on the 'Google calendar' tab, I do not see any calendar at all and I do not get any information form the log at all. So my question here: Must the server have access to the internet?

I think, yes... Though... :S Confused now... I need to take a sleep on this one atm... LOL

Greetings,

Mischa.

RE: Google Calendar Plugin - Added by Mischa The Evil over 15 years ago

Mischa The Evil wrote:

Michael Mohr Aye:

Can you test my fork at https://github.com/MischaTheEvil/redmine_google_calendar/tree and let me know if it fixes your issues? Note that it's currently not yet working when Redmine is running in development-mode. This will be fixed soon I hope :) If completed I'll request a git pull by mully over GitHub...

Development-mode compatibility is fixed and git pull request sent to Jim Mulholland...

Mischa The Evil wrote:

Btw: I'll "fix" the plugin's wiki-page (PluginGoogleCalendar) soon...

Done...

Kind regards,

Mischa.

RE: Google Calendar Plugin - Added by Michael Aye over 15 years ago

Sorry, Mischa,
I was just totally under water with work this week.
I can only test something next week.
Thanks for your help.
BTW, my issue was anyway solved by the fact that there was an "activation" hook to set in each user's rights.
Regards,
Michael

RE: Google Calendar Plugin - Added by Markus Buerer over 15 years ago

See my Redmine patch #1746 which provides an option to project custom fields to hide them from the project overview especially written for this purpose.

Tested and it works as expected

Can you test my fork at https://github.com/MischaTheEvil/redmine_google_calendar/tree and let me know if it fixes your issues?

I downloaded and tested your plugin and it works perfect.
Even the internet connection looks now good (But I think this was my mistake...)

Thanks for your help
Markus

RE: Google Calendar Plugin - Added by Mischa The Evil over 15 years ago

Mischa The Evil wrote:

Mischa The Evil wrote:

Michael Mohr Aye:

Can you test my fork at https://github.com/MischaTheEvil/redmine_google_calendar/tree and let me know if it fixes your issues? Note that it's currently not yet working when Redmine is running in development-mode. This will be fixed soon I hope :) If completed I'll request a git pull by mully over GitHub...

Development-mode compatibility is fixed and git pull request sent to Jim Mulholland...

After contact with Jim he asked me to change the source of the plugin to the new forked repo cause he experienced some troubles with the old git repo. This is now done. A new release (0.1.1) is out also...

Mischa The Evil wrote:

Btw: I'll "fix" the plugin's wiki-page (PluginGoogleCalendar) soon...

Done...

Completed the page-improvements and reflected source-change.

Regards,

Mischa.

RE: Google Calendar Plugin - Added by Mischa The Evil over 15 years ago

I've just released v0.1.2 of the plugin, see the announcement on the Forums: http://www.redmine.org/boards/3/topics/7126. On the way I've added lots of info to the plugin's wikipage also... Hope it suffices the requests for info...

I hereby consider this thread as solved... ;)

Kind regards,

Mischa.

Spam removed by Mischa - Added by DoinaUlianovschi DoinaUlianovschi about 15 years ago

... Spam removed by Mischa The Evil ...

RE: Google Calendar Plugin - Added by Alfredo Bonilla over 13 years ago

First of all, great work. Very useful plugin. Just one idea... what about integration between redmine's calendar and the google ones. Do you think it would be possible to include in the google calendar displayed in redmine tab... some projects information?... at least the versions would be really interesting.

RE: Google Calendar Plugin - Added by Terence Mill over 13 years ago

I think it would be best to save all dates for events and schedules on th loval server instead googles. In enterprises its not acceptable to have this personal data beyond intranet, as it would need sever to have internet access too.

But there is a ready to use railsapp baed on jquery called full calendar which could do the job locally - see demo

Its nearly to google calendar..
“FullCalendar” provides a full-sized, drag & drop calendar. It uses AJAX to fetch events on-the-fly for each month. It also supports an intuitive interface to manage events that spans over multiple days or weeks. It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event.

Could be used and embedded in redmine for appointment management, meeting schedule and holidays.

RE: Google Calendar Plugin - Added by Alfredo Bonilla over 13 years ago

Hi,

I have a problem with the time zone. Although my iframe has a reference to Europe/Madrid

<iframe src="http://www.google.com/calendar/embed?src=.....&ctz=Europe/Madrid" 
style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

The calendar shows the message: "Events shown in time zone: Algier"... and displays the events one hour sooner...
Is it a problem of tzinfo configuration? gem installation?...
Environment:

  • Ubuntu 10.04.1 LTS
  • Redmine 1.2.0.stable.6069 (MySQL)
  • Google Calendar Plugin 0.1.2
  • GEMS: ...i18n (0.4.2), mongrel (1.1.5),... ,rack (1.1.2, 1.1.1, 1.0.1), rails (2.3.11, 2.3.5), rake (0.8.7), ruby-ole (1.2.11.1), tzinfo (0.3.28)

From console, I've used tzinfo... and it works perfeclty... Any idea?

(1-25/27)