Project

General

Profile

Actions

Feature #14115

closed

Add Twine Embed Plugin

Added by Laurie Hurson almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Shortcodes and embeds
Target version:
Start date:
2021-03-04
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi All,

Can we add the the Embed Twine Plugin to the Commons?

[[https://wordpress.org/plugins/embed-twine/]]

The OER Librarian from CSI is hoping to have students navigate through a twine story on her Commons site: https://csilibresearch.commons.gc.cuny.edu/

Thanks!


Files

Actions #1

Updated by Boone Gorges almost 4 years ago

  • Status changed from New to Reporter Feedback

I've had a look at the plugin, and I'm afraid it's not going to be possible on the Commons. It appears that Twine https://twinery.org/ produces .html documents that contain extensive JavaScript, and the plugin works by allowing you to upload the .html file and display it in an iframe. This is a vector for serious security issues, so we can't allow it on the Commons. (There are other security problems with the plugin as well.)

My only knowledge of Twine comes from the last three minutes reading their website, so maybe someone else understands better what it is. Is it only a piece of software that you run locally? Or is there a service where you can create a Twine document and then have it hosted by Twine? If the latter, then we might be able to build an embed code for that trusted source.

Actions #2

Updated by Laurie Hurson almost 4 years ago

This is good to know, thanks Boone.

She did want to upload the twine html and I thought uploading via the plugin might be ok security-wise. But I understand that the plugin doesn't resolve that issue.(this sound similar to the issues with h5p plugin and libraries)

Twine is a storytelling plugin that allows users to navigate through a series of choices or scenarios, kind of like a choose your own adventure book. I can look into twine more to see if it can be externally hosted on the twine site and circle back to see if we might be able to embed that way.

Actions #3

Updated by Laurie Hurson almost 4 years ago

Hi All,

It looks like [[itch.io]] is a typical place to host twine games. Once hosted on itch.io, you can get a iframe embed code for the game.

Would it be possible to create a custom embed code for iframes from itch.io in order to host twine games on the commons?

Sample iframe here:

<iframe src="https://itch.io/embed-upload/3467816?color=333333" allowfullscreen="" width="640" height="380" frameborder="0"><a href="https://lhurson.itch.io/twine-test">Play Twine test 1 on itch.io</a></iframe>

Actions #4

Updated by Boone Gorges almost 4 years ago

Awesome, thank you for researching this, Laurie. It's hard to find a specific statement about it, but it seems like itch.io does at least some basic security scanning. See eg https://itch.io/t/700541/malware-scanningwarnings. So I think that an embed code should be possible.

Can you share a screenshot of where you got that embed code from? I don't see anything at https://lhurson.itch.io/twine-test - I wonder whether it's available only for logged-in users? I need to decide exactly what information I ask for (such as the itch.io URL) when building the embed code.

Actions #5

Updated by Laurie Hurson almost 4 years ago

Great to hear embed code might be possible.And shout out to Anthony who knows a lot about twine and let me know that itch.io might be a good place to host.

I got the embed code from the "dashboard" of my account screenshot attached.

Actions #6

Updated by Boone Gorges almost 4 years ago

  • Category name set to Shortcodes and embeds
  • Status changed from Reporter Feedback to Staged for Production Release
  • Assignee set to Boone Gorges
  • Target version set to 1.18.6

Thanks, this is very helpful. I've added support in https://github.com/cuny-academic-commons/cac/commit/23674c6230a1d07c7798d29305b6c974887392c3 for the following:

- a shortcode [itchio src="https://itch.io/embed-upload/3467816?color=333333" width="100%" height="800"]
- an embed handler shortcut for the shortcode, so that entering https://itch.io/embed-upload/3467816?color=333333 on its own line will do the same thing as [itchio src="https://itch.io/embed-upload/3467816?color=333333" width="640" height="380"]

This will be available after tomorrow's release.

Actions #7

Updated by Laurie Hurson almost 4 years ago

This is great, thanks so much Boone!

Actions #8

Updated by Boone Gorges almost 4 years ago

  • Status changed from Staged for Production Release to Resolved
Actions #9

Updated by Laurie Hurson almost 4 years ago

Hi Boone,

Just a report back-- it looks like the direct link for the twine game now works for embedding in the Commons:

https://classtestbmcc.commons.gc.cuny.edu/twineitch-test-direct/

I cannot get the shortcode embed to work but I maybe be doing something wrong:

https://classtestbmcc.commons.gc.cuny.edu/twineitch-shortcode/

Actions #10

Updated by Boone Gorges almost 4 years ago

Thanks for following up! There's an error in my comment above - the correct attribute for the URL is url, not src. I've made the change.

Actions #11

Updated by Laurie Hurson almost 4 years ago

Thanks Boone! Both versions work now. I have passed directions on to the faculty member from CSI so we may have a new twine project on the Commons soon.

Thanks again.

Actions

Also available in: Atom PDF