Project

General

Profile

Actions

Feature #4908

closed

Create shortcode for embedding group calendars

Added by Boone Gorges over 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Events
Target version:
Start date:
2015-11-16
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

1.9 introduced a widget for displaying a group calendar on a site. Let's add a shortcode that does the same thing.

Not sure what to suggest for the shortcode syntax. Anything we choose (group ID, group slug, group URL, group calendar URL) is going to be pretty clunky to use, so I'd like to suggest we also add a TinyMCE button that gives a UI similar to the widget controls.


Related issues

Related to CUNY Academic Commons - Bug #4080: Events Calendar: Allow sites to embed calendars from groups (perhaps via BP group blog)ResolvedRaymond Hoh2015-05-23

Actions
Related to CUNY Academic Commons - Documentation #6143: Calendar Embed documentationResolvedscott voth

Actions
Actions #1

Updated by Matt Gold over 8 years ago

Thanks for this one, guys.

Actions #2

Updated by Raymond Hoh over 8 years ago

Not sure what to suggest for the shortcode syntax. Anything we choose (group ID, group slug, group URL, group calendar URL) is going to be pretty clunky to use, so I'd like to suggest we also add a TinyMCE button that gives a UI similar to the widget controls.

IMO, a TinyMCE button will clutter up the editor interface.

Shortcake is a plugin that helps make using shortcodes easier (provided that the shortcode plugin adds support for it).

Shortcode plugins with Shortcake support are added to the "Add Media" modal under the "Insert Post Element" section:
https://wordpress.org/plugins/shortcode-ui/screenshots/

I would rather go this route.

Actions #3

Updated by Boone Gorges over 8 years ago

Shortcake integration is fine with me. (I'm not a huge fan of TinyMCE buttons.) I mainly just meant that this is not a simple enough shortcode that we can get away with not providing a GUI.

Actions #4

Updated by Boone Gorges about 8 years ago

  • Category name changed from 136 to Events
Actions #5

Updated by Raymond Hoh almost 8 years ago

I've updated cdev to include shortcode functionality with Shortcake integration.

To test on cdev:
  1. Navigate to one of your sites.
  2. Activate the "Group Events Shortcode and Widget" plugin
  3. Go to a post you want to edit.
  4. Click on the "Add Media" button.
  5. Next, select "Insert Post Element > Group Events".
  6. Make whatever customizations you want to make and insert it into your post.
  7. If you are using the editor's "Visual" mode, the group events should automatically render because of Shortcake.

Here's a quick GIF:

Actions #6

Updated by Matt Gold almost 8 years ago

Awesome, Ray! very exciting to see this!

Two small notes:

Go to a post you want to edit.

This does indeed work on pages, as well, as your gif and my test showed. Our documentation should reflect that.

Activate the "BP Event Organiser - Group Shortcode and Widget" plugin

Are we tied to this name? I wonder whether we can come a more user-friendly name -- something like "Calendar Shortcode" or "Event Shortcode" or something?

Again, huge thanks for your work on this!

Actions #7

Updated by Raymond Hoh almost 8 years ago

Are we tied to this name? I wonder whether we can come a more user-friendly name -- something like "Calendar Shortcode" or "Event Shortcode" or something?

Definitely not tied to the name. However, the plugin carries a dual-purpose as it includes both the shortcode and widget functionality.

It must have "group" in the name though because the shortcode / widget is tied to a logged-in user's group events.

Actions #8

Updated by Matt Gold almost 8 years ago

Thanks, Ray. "Group Events Calendar Shortcode and Widget"?

Actions #9

Updated by Raymond Hoh almost 8 years ago

"Group Events Calendar Shortcode and Widget" is a little too wordy for me.

Perhaps one of the following?

- Group Events Shortcode and Widget
- Group Calendar Shortcode and Widget

Actions #10

Updated by Matt Gold almost 8 years ago

Hi Guys --

One question -- is it possible for blogs not associated with a group to use the shortcode? I ask because groups can only be connected to a single blog, but some groups contain multiple constituents using a shared calendar, and they may all want to embed the calendar on their individual sites. Here's an example: http://commons.gc.cuny.edu/groups/gc-events-and-workshops/ -- various members of that group (the Teaching and Learning Center, Digital Initiatives, the Career Center, the Futures Initiative) may be interested in embedding the calendar of this group; is that possible in the current setup? If not, is there a way to create such functionality or does that alter the scope so much that we should create a second ticket and/or set that as a second stage of work for this plugin?

Actions #11

Updated by Raymond Hoh almost 8 years ago

is it possible for blogs not associated with a group to use the shortcode?

If you're talking about within the Commons multisite network, then yes. If you're talking about using a Commons group calendar on external sites like NYCDH.org, it is possible, but there is currently no user interface to allow members to copy the <iframe> code.

I could add oEmbed support. Meaning if someone copies the group calendar URL and pastes it into the WordPress editor of their external site, the calendar should render. The external site might need to install a plugin so that CAC is registered as an oEmbed provider on their site so the calendar renders properly.

Actions #12

Updated by Matt Gold almost 8 years ago

Okay -- I was principally asking about within the Commons multisite install. That's great! Does one need to be part of the group to make that work?

I think that oEmbed support would be great if it wouldn't be too much work to add. It can also be something we add in the next round of development

Thanks for all of your work!

Actions #13

Updated by Raymond Hoh almost 8 years ago

I've added oEmbed support to our BP Event Organiser plugin, but I haven't added it to cdev yet.

This functionality will require BuddyPress 2.6, which we will upgrade to probably next month. When we upgrade to v2.6, I'll update cdev so everyone can test.

Other than the name of the plugin, is there anything that needs to be addressed for this ticket?

Actions #14

Updated by Matt Gold almost 8 years ago

I've added oEmbed support to our BP Event Organiser plugin,

That's fantastic, Ray -- thanks so much!

Other than the name of the plugin, is there anything that needs to be addressed for this ticket?

I think we should move forward and that you should go with whatever name you want to expedite matters.

Actions #15

Updated by Raymond Hoh almost 8 years ago

  • Status changed from Assigned to Resolved

I think we should move forward and that you should go with whatever name you want to expedite matters.

I've renamed the plugin to "Group Events Shortcode and Widget".

Going to close this one! Thanks for the feedback, Matt.

Actions #16

Updated by Matt Gold almost 8 years ago

Thank you, Ray!

Actions #17

Updated by Matt Gold over 7 years ago

  • Status changed from Resolved to Assigned
  • Assignee changed from Raymond Hoh to Boone Gorges

Hi All,

If I am right that this hasn't been ported to the Commons yet, can we please move it forward into a release so that people can start using this feature?

Best,

Matt

Actions #18

Updated by Boone Gorges over 7 years ago

If I am right that this hasn't been ported to the Commons yet, can we please move it forward into a release so that people can start using this feature?

Can we talk about just pushing out the 1.10 release instead?

Actions #19

Updated by Matt Gold over 7 years ago

Can we talk about just pushing out the 1.10 release instead?

Sure thing!

Actions #20

Updated by Boone Gorges over 7 years ago

Cool - there are probably ten of these little goodies, and it would be nice to get them all out of the pipeline at once. Let's make a plan during tomorrow's call.

Actions #21

Updated by Boone Gorges over 7 years ago

  • Status changed from Assigned to Resolved

It looks like this is done, and it will go into 1.10, so I'm going to mark Resolved again to clear the milestone.

Actions #22

Updated by Matt Gold over 7 years ago

Hi Boone -- the GCDI team is really hoping to use this feature in the new website it is building. Is there any chance you can sneak this into the next update on the 21st and then still have us publicize it with the 1.10 release? Thanks for considering this.

Actions #23

Updated by Boone Gorges over 7 years ago

  • Status changed from Resolved to Assigned
  • Assignee changed from Boone Gorges to Raymond Hoh
  • Target version changed from 1.10 to 1.9.31

Ray, will you please let us know whether there are problems backporting this to 1.9.x, and if not, will you please do it? Also, let me know what ACTION_REQUIRED items will have to be performed. Thanks.

Actions #24

Updated by Raymond Hoh over 7 years ago

  • Status changed from Assigned to Resolved

Boone Gorges wrote:

Ray, will you please let us know whether there are problems backporting this to 1.9.x, and if not, will you please do it? Also, let me know what ACTION_REQUIRED items will have to be performed. Thanks.

Done.

I cherry-picked a previous commit to add Shortcake (see commit 118c23a).

Then, I had to pin bp-event-organiser to its 1.1.x branch, since the shortcode commits were done on that branch (see commit 7a38162). This means that some other improvements from that branch will be rolled into CAC 1.9.31. I forget exactly what these improvements are, but I think they are minor enough that they can be rolled in.

ACTION_REQUIRED doc has also been updated.

Actions #25

Updated by Matt Gold over 7 years ago

Thanks so much, Boone and Ray

Actions

Also available in: Atom PDF