Feature #4908
closedCreate shortcode for embedding group calendars
Added by Boone Gorges over 8 years ago. Updated almost 8 years ago.
0%
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
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.
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.
Updated by Boone Gorges over 8 years ago
- Category name changed from 136 to Events
Updated by Raymond Hoh about 8 years ago
I've updated cdev to include shortcode functionality with Shortcake integration.
To test on cdev:- Navigate to one of your sites.
- Activate the "Group Events Shortcode and Widget" plugin
- Go to a post you want to edit.
- Click on the "Add Media" button.
- Next, select "Insert Post Element > Group Events".
- Make whatever customizations you want to make and insert it into your post.
- If you are using the editor's "Visual" mode, the group events should automatically render because of Shortcake.
Here's a quick GIF:
Updated by Matt Gold about 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!
Updated by Raymond Hoh about 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.
Updated by Matt Gold about 8 years ago
Thanks, Ray. "Group Events Calendar Shortcode and Widget"?
Updated by Raymond Hoh about 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
Updated by Matt Gold about 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?
Updated by Raymond Hoh about 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.
Updated by Matt Gold about 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!
Updated by Raymond Hoh about 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?
Updated by Matt Gold about 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.
Updated by Raymond Hoh about 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.
Updated by Matt Gold almost 8 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
Updated by Boone Gorges almost 8 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?
Updated by Matt Gold almost 8 years ago
Can we talk about just pushing out the 1.10 release instead?
Sure thing!
Updated by Boone Gorges almost 8 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.
Updated by Boone Gorges almost 8 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.
Updated by Matt Gold almost 8 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.
Updated by Boone Gorges almost 8 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.
Updated by Raymond Hoh almost 8 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.