The Google calendar plugin integrates events from your Google calendars into Joomla through DPCalendar. It is a two way sync plugin, means that you can manage (create/edit/delete) the Google events from within your Joomla site.
The ONLY way to make your Google calendars accessible in DPCalendar is to import them, because the Google API requires a refresh token which is obtained through the import process. To be able to import the calendars you need to get first a client id and client secret string from the Google developer console.
To get a bigger picture how external calendars are handled inside DPCalendar read the article Integration/Import external calendars.
To be able to import your Google calendars you need a client ID and client secret from the Google developer console. This credentials are used to make authenticated requests against the google API endpoint. It is OAuth authentication and allows you to revoke the credentials at any time without exposing your private username and password.
Select in the top bar a project, when you open the console the first time, Google creates an initial "API Project" for you automatically. Then click on the "Enable API's And Services" link.
You will get redirected to the API search page. Search for calendar and click on the Google Calendar API result. Now a page comes up where you can activate by clicking on the "Enable" link.
If you click again on APIs, then you should see in the Enabled APIs tab the Calendar API. In the left toolbar click now on Credentials.
The consent screen represents the page when you import the calendars later. Go through the wizard and define the required fields. After you have finished to setup the consent screen, go back to the page and verify that the "Publishing status" is set to production. Otherwise your API keys will expire after 7 days.
Click on the credentials tab. Click now on the Create credentials button and then on the OAuth client ID list item. Now you are going to create the actual credentials which will be used then later for the import.
You have to select Web application and put into the "Authorized Javascript origins" your web site url. You have to make sure to set url correctly without any path, and it must start with https. In the "Authorized redirect URIs" field you have to put an url with the following parameters:
https://www.example.com/administrator/index.php?option=com_dpcalendar&task=plugin.action&plugin=google&action=import
Replace example.com with your web site url. This url is important, if it is wrong you can't import your calendars, you will get a redirect_uri_mismatch error! Yo need also to use HTTPS as scheme as HTTP is not supported.
The Google calendar API does support attachments. But only if they are stored on Google Drive. The attachments are rendered in a separate layout in the file /plugins/dpcalendar/google/tmpl/attachments.php. If you want to change that, then you need to copy it to /templates/{your template}/html/plg_dpcalendar_google/attachments.php and change it to your needs. The attachments are automatically downloaded to a local cache folder (/cache/plg_dpcalendar_google/attachments) and when they are images, then they are added to the event image attributes. Like that are the attachments served locally from the Joomla web browser and do improve your sites privacy. If attachments throw a 403 error, please read the trouble shooting guibe below.
These settings are the same for every calendar configured in the plugin.
Comments (0)