Pretty Google Calendar

Descrição

Plugin Migration Notice

Pretty Google Calendar is transitioning to Hydrogen Calendar Embeds. Please install that plugin for future updates and improvements.

Why Switch to Hydrogen Calendar Embeds?

  • No more fussing with the Google API — just use simple .ics calendar feeds
  • Display any calendar that provides a public .ics feed (e.g. Google Calendar, Apple Calendar, Outlook, etc.)
  • Works with blocks and shortcodes
  • More features, fewer bugs, and still lightweight
  • 100% FREE
  • Active development and ongoing support

Legacy Pretty Google Calendar Features

Você: Eu só quero colocar um calendário do Google Agenda no meu site WordPress.
Google: Aqui está ele de um jeito bem horroroso!
Pretty Google Calendar: Deixa que eu resolvo.

Este é um plugin leve e simples que integra calendários do Google Agenda em seu website com estilo, beleza e graça.

Pontos principais:

  • Out of the box support for calendar grid and agenda list view (and most other FullCalendar views)
  • Design responsivo, alterando para exibição em lista para telas menores
  • Exibição em lista customizável para dia, semana, mês, ano ou um número customizável de dias.

Como funciona:

  1. Continue a gerenciar eventos usando o Google Agenda como você sempre fez.
  2. Adicione um shortcode na sua página.
  3. Respire com alívio.
  4. É isso.

Capturas de tela

  • Pretty Google Calendar.
  • Exibição em Lista.
  • Popup de Evento Opcional.
  • Página de configurações. É simples assim.

Instalação

  1. Suba a pasta do pretty-google-calendar para o diretório /wp-content/plugins/.
  2. Ative o Pretty Google Calendar através do menu ‘Plugins’ no painel do WordPress.
  3. Obtenha a sua chave de API do Google Agenda (veja abaixo)
  4. Adicionar a chave da API às Configurações -> Configurações do Pretty Google Calendar
  5. Use o shortcode [pretty_google_calendar gcal="calendarID@group.calendar.google.com"] diretamente na sua página ou post.

Opções do Shortcode

gcal="CalendarID,CalendarID"

O ID do calendário do Google Agenda desejado (nota: precisa ser configurado para ‘Disponibilizar publicamente’. Para exibir multiplos calendários, separe os IDs com uma vírgula. (Nota: os calendários devem estar sob o mesmo acesso da chave de API.))

cal_ids="identifier,identifier" \

Optional custom CSS identifiers for each calendar (must match the number of calendars in gcal). Allows using meaningful names instead of numeric indexes for styling. Example: cal_ids="soccer,baseball" generates classes like .pgcal-calendar-soccer and .pgcal-calendar-baseball. Identifiers should be lowercase alphanumeric with hyphens.
Defaults to numeric indexes (0, 1, 2, etc.)

locale="en"

Configura o local para regionalização do calendário. O padrão é “en”.

list_type="listCustom"

Configura o tipo de lista. Opções: listDay, listWeek, listMonth, listYear, e listCustom. (Também aceita day, week, month, year e custom).
O padrão é listCustom para compatibilidade retroativa.

Nota: listCustom permite que você configure o número de dias que você deseja exibir a partir da data atual. Enquanto listMonth mostra todos os eventos deste mês (incluindo eventos passados), list_type="custom" custom_days="28" irá mostrar os próximos 28 dias através dos meses.

custom_days="28"

Configura o número de dias a serem exibidos na aba de lista. O padrão é 28. Somente utilizado com listCustom.

custom_list_button="list"

Configura o rótulo do botão listCustom. O padrão é “list”.

views="dayGridMonth, listCustom"

Configura os tipos de calendários disponíveis. Se apenas um for provido, não serão exibidos botões para alterar os tipos de calendários. O padrão é “dayGridMonth, listCustom”.

initial_view="dayGridMonth"

Sets the default view to be displayed when opening the page. Defaults to “dayGridMonth”. Note: If only one view is specified in “views”, “initial_view” will automatically be set to that view and does not need to be specified.

enforce_listview_on_mobile="true"

Configura o comportamento de mudança para o tipo lista em telas pequenas. Opções: “true” e “false”. O padrão é “true”. Esta opção não tem efeito se não houver uma lista declarada na opção “views”.

show_today_button="true"

Configura a visibilidade do botão “Hoje”. Opções: “true” e “false”. O padrão é “true”.

show_title="true"

Configura a visibilidade do título do calendário. Opções: “true” e “false”. O padrão é “true”.

hide_past="false"

Hides past events from the calendar completely. Options: true and false. Defaults to false. When set to true, events before today will not be displayed in any view.

id_hash=random

Sets the ID hash for a calendar. If you have multiple calendars on a page and need to style them, you can set this to a permanent code. Otherwise, it’ll randomly generate each load. (Note: as of v2.0.0 this can only be alphanumeric.)

use_tooltip="true"

Migrating from global setting for individual calendar styling. Whether the floating tooltip for event pops up on click.

no_link="true"

Migrating from global setting for individual calendar styling. Whether to disable link to calendar.google.com on click.

fc_args = JSON string ((EXPERIMENTAL))

Allows you to override or impliment just about any FullCalendar argument (with some exception). For example: fc_args='{"weekNumbers":"true", "eventTextColor":"red"}'

Note: any argument that contains [] will fail due to WordPress’ parsing of shortcodes. No workaround currently.
Note: this is experimental – things may break.

Styling Multiple Calendars

As of v1.7.0, each calendar gets it’s own CSS selector: pgcal-event-# where the # is the order of the listed calendar (starting with 0). So if you have two calendars in one, you can use pgcal-event-0 to style the first, and pgcal-event-1 to style the second calendar.

The following improvements were made in v2.2.0 for easier styling of multiple calendars:
– Custome calendar identifiers via cal_ids shortcode argument (see above) (defaults to numeric indexes if not provided).
– Events get new class name: pgcal-calendar-0-event for consistent naming convention (old class pgcal-event-0 is still supported for backward compatibility).
– Event pop-up tooltips now get a calendar-specific class: pgcal-calendar-0-event-popup for easier styling of event pop-ups per calendar.

Obtendo a Chave de API do Google Agenda

  1. Go to the Google Cloud Console and sign in.
  2. Click the project selector (top bar) New project.
  3. Give the project a name and click Create.
  4. With the project selected, go to APIs & Services Library.
  5. Search for Google Calendar API and click Enable.
  6. Go to APIs & Services Credentials.
  7. Click Create credentials API key.
  8. Copy the API key.
  9. (Recommended) Restrict the key:
    1. Click the API key you just created.
    2. Under Application restrictions, choose Websites (HTTP referrers).
    3. Add your site’s URL (e.g. https://example.com/*).
    4. Under API restrictions, choose Restrict key.
    5. Select Google Calendar API.
    6. Click Save.
  10. Paste the API key into Pretty Google Calendar’s Google API field in WordPress and save.

Deixe o seu calendário do Google Agenda público:

  1. Na interface do Google Agenda, ache a área de “Minhas agendas” à esquerda.
  2. Passe o mouse sobre o calendário que você precisa e clique na seta para baixo.
  3. Um menu irá aparecer. Clique em “Compartilhar esta agenda”.
  4. Marque “Tornar este calendário público”.
  5. Certifique-se que “Ver apenas os níveis disponível/ocupado (ocultar detalhes)” está desmarcado.
  6. Clique em “Salvar”.

Obtenha o ID do seu calendário do Google Agenda:

  1. Na interface do Google Agenda, ache a área de “Minhas agendas” à esquerda.
  2. Passe o mouse sobre o calendário que você precisa e clique na seta para baixo.
  3. Um menu irá aparecer. Clique em “Configurações da agenda”.
  4. In the “Integrage Calendar” section of the screen, you will see your “Calendar ID”. It will look something like “abcd1234@group.calendar.google.com” (or your email if it’s your default calendar) this is the value you enter into the shortcode.

Perguntas frequentes

Que feitiçaria é essa?!

O Pretty Google Calendar implementa o excelente Full Calendar para você e usa um pouco de Tippy.js e Popper para fazer as coisas… bem… popar.

Eu posso usar isso para gerenciar um calendário?

Não. Todos os eventos do calendário são mantidos através do Google Agenda. Este plugin apenas os mostra de um jeito menos pior.

Como eu crio um tema para o calendário?

Adicione um CSS customizado ao seu tema para adaptar ao seu desejo.

Este plugin pode fazer X, Y ou Z?

Provavelmente não. Mas talvez possa!

O Pretty Google Calendar é propositalmente simples e fácil, configurável com poucos valores padrão para fazer as coisas simplesmente funcionarem. Contudo, pode ser que haja uma funcionalidade matadora que outros também estão clamando.

Uma vez que é baseado no Full Calendar, teoricamente, tudo que é possível lá é possivel aqui. Entre em contato para solicitar funcionalidades adicionais e vamos ver o que nós conseguimos criar juntos!

Avaliações

8 março, 2024
Pretty Google Calendar is an extraordinarily useful and welcome plugin, especially considering Google’s disappointing default integration. It is responsive and seamlessly adapts to any screen, switching to list mode when necessary. Customization is simple and intuitive, allowing you to modify colors and fonts to seamlessly integrate with your website. The synchronization simply “works,” and the shortcode is rich in parameters, including language localization, offering complete control over the calendar’s appearance and behavior. In short, Pretty Google Calendar is the ultimate solution for integrating Google calendars easily and effectively on WordPress. Thank you for this contribution.
8 janeiro, 2024 1 resposta
Yes, it does take a while, because it needs a Google Calendar API key… (arghs), and it is embedded via Shortcode. But the result! All my fonts, all the colours, everything happens right according to my template. It looks SO BLOODY good. I am SO VERY HAPPY. (And yes, I am a beginner with WordPress & Oxygen, and I am still baffled with how complex everything is. So I might be overly enthusiastic.)
Leia todas as 20 avaliações

Colaboradores e desenvolvedores

“Pretty Google Calendar” é um programa de código aberto. As seguintes pessoas contribuíram para este plugin.

Colaboradores

Pretty Google Calendar” foi traduzido para 6 localidades. Agradecemos aos tradutores por suas contribuições.

Traduzir o “Pretty Google Calendar” para seu idioma.

Interessado no desenvolvimento?

Navegue pelo código, consulte o repositório SVN ou assine o registro de desenvolvimento por RSS.

Registro de alterações

2.2.1

  • Introducing Hydrogen Calendar Embeds! (See https://wordpress.org/plugins/hydrogen-calendar-embeds/)

2.2.0

  • Fixed: Handle spaces in multiple calendar IDs (Fixes #39)
  • Fixed: Free/busy events with undefined titles now display “Busy” (Closes #41)
  • Fixed: fc_args removing views
  • Added: hide_past shortcode argument (Closes #48)
  • Added: close button to tooltip (Closes #59)
  • Added: Better CSS in tooltip (Closes #56)
  • Added: Handle displayEventEnd arg in popup
  • Added: Download .ics button in popup
  • Added: Pupup button styling
  • Added: calendar-specific popup styling classes (closes #46)
  • Added: Custom calendar identifiers via cal_ids shortcode arg

2.1.0

  • Fixed: Better list args parsing (Fixes #57)
  • Fixed: Removed hardcoded timezone argument for correct local time display. Override with fc_args='{"timeZone":"###"}' if needed.
  • Fixed: Admin CSS versioning
  • Fixed: Sanitization of Google API key in admin
  • Improved: id_hash generation
  • Improved: Automatic initial_view resolution when only one view is specified (Fixes #51)

2.0.2

  • Fixed: Security fix (no known exploit)

2.0.1

  • Tested: WordPress 6.9

2.0.0

  • Fixed: XSS vulnerability (required elevate privileges, not likely to be exploited). May break CSS for folks using the id_hash shortcode argument.
  • Tested: WordPress 6.5.2

1.7.2

  • Tested: WordPress 6.4.3
  • Fixed: Security fix

1.7.1

  • Fixed: full FullCalendar locale support
  • Updated: FC Google Calendar to 6.1.10

1.7.0

  • Tested: WordPress 6.4.2
  • Added: (Almost) full implimentation of FullCalendar args (see Shortcode Options)
  • Added: Colors for multiple calendars in one
  • Fixed: Removed view restrictions
  • Update: FullCalendar to v6.1.9
  • Update: Tippy.js to 6.3.7
  • Update: Popper.js to 2.11.8

1.6.2

  • Fixed: Broken table margin

1.6.1

  • Fixed: Arg parsing in shortcode

1.6.0

  • Added: Multiple calendars on one page
  • Added: use_tooltip shortcode arg for calendar specific options
  • Added: no_link shortcode arg for calendar speficic options
  • Fixed: Security fixes

1.5.1

  • Fixed: Better parsing of urls to accomodate existing tags

1.5.0

  • Tested to WordPress 6.3.1
  • Added: End times in details popup
  • Added: Location under time in popup
  • Added: Shortcode instructions link to settings page
  • Fixed: URLs in descriptions are now parsed
  • Fixed: Remove seconds on pop-up time

1.4.1

  • Corrigido: domínio de texto para localização

1.4.0

  • Adicionado: suporte para mútiplos calendários exibidos em um
  • Adicionado: internacionalização completa (Obrigado @mwguerra!)
  • Adicionado: novos parâmetros de shortcode (view, initial_view, enforce_listview_on_mobile, show_today_button, show_title) (Trabalho heróico por @mwguerra!)
  • Testado até o WordPress 6.0.3

1.3.1

Salto de versão para atender ao sistema de versionamento do WordPress.

1.3.0

  • Adicionado: seletor para o tipo de lista
  • Adicionado: texto do botão list customizável
  • Adicionado: suporte à localização

1.2.0

  • Adicionado: opção para desabilitar link
  • Adicionado: opção “list_days” no shortcode
  • Corrigido: fuso horário no tooltip
  • Atualização do FullCalendar para v5.11.0
  • Testado até o WordPress 5.9.3

1.1.0

Lançamento Inicial ao Público