Add Twine Embed Plugin
#1 Updated by Boone Gorges 8 months ago
- Status changed from New to Reporter Feedback
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.
#2 Updated by Laurie Hurson 8 months 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.
#3 Updated by Laurie Hurson 8 months ago
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>
#4 Updated by Boone Gorges 8 months 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.
#5 Updated by Laurie Hurson 8 months 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.
#6 Updated by Boone Gorges 8 months 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.
#9 Updated by Laurie Hurson 8 months ago
Just a report back-- it looks like the direct link for the twine game now works for embedding in the Commons:
I cannot get the shortcode embed to work but I maybe be doing something wrong: